Closed KirillKhudoyarov closed 2 years ago
Kirill, Privyet! Good to hear from my comrades in Russia. I've had the pleasure of visiting Moscow a few times over the years, hopefully I can visit Russia again. Here's a photo of me at the Kremlin back in 2005. Thanks for sending the wiring diagram and I see the issue. the Rx line on the MCU must connect to the Tx line on the EBYTE. This is a strange, but the EBYTE transmitter sends data through the Tx line and the MCU receives through the Rx line. You will need to reverse the connections for your transmitter and reciever. Let's start there and see if that helps. Spi Ceba,
Kris Kasprzak
On Tuesday, October 12, 2021, 02:51:06 AM CDT, KirillKhudoyarov ***@***.***> wrote:
Dear Kris, My name is Kirill. Write to you from a Russian model rocket club “Borschevik”. We’re making an on-board computer for our rocket model. As part of this device we’re using radiomodule Ebyte E32-868T20D controlled by Arduino Pro Mini 3.3V. There is one problem. We’re trying to use the example from your library “Ebyte” but something is going wrong: we can’t transmit or receive any data. Could you advise us the ways to solve it? I attached to this message: -our electrical scheme; -two videos of voltage measurements on radiomodules’ pins during the work; -a program code; -screenshots of a program we’re using to set up module params. Sincerely, Kirill
Transmitter
struct DATA { unsigned long Count; int Bits; float Volts; }; int Chan; DATA MyData; SoftwareSerial ESerial(PIN_RX, PIN_TX); EBYTE Transceiver(&ESerial, PIN_M0, PIN_M1, PIN_AX);
void setup() {
Serial.begin(9600); ESerial.begin(9600); Serial.println("Starting Sender"); Transceiver.init(); }
void loop() { MyData.Count++; MyData.Bits = 10; MyData.Volts = MyData.Bits * ( 5.0 / 1024.0 ); Transceiver.SendStruct(&MyData, sizeof(MyData)); Serial.print("Sending: "); Serial.println(Transceiver.available()); delay(1000); }
Receiver
struct DATA { unsigned long Count; int Bits; float Volts; }; int Chan; DATA MyData; SoftwareSerial ESerial(PIN_RX, PIN_TX); EBYTE Transceiver(&ESerial, PIN_M0, PIN_M1, PIN_AX);
void setup() {
Serial.begin(9600); ESerial.begin(9600); Serial.println("Starting Reader"); Transceiver.init(); }
void loop() { if (ESerial.available()) { Transceiver.GetStruct(&MyData, sizeof(MyData)); Serial.print("Count: "); Serial.println(MyData.Count); Serial.print("Bits: "); Serial.println(MyData.Bits); Serial.print("Volts: "); Serial.println(MyData.Volts); Last = millis(); } else { if ((millis() - Last) > 1000) { Serial.println("Searching: "); Last = millis(); } }
Video Tx: https://drive.google.com/file/d/11_lKVOkfTr2ua-ZTcl26wmVUJlUjYeBs/view?usp=sharing Video Rx: https://drive.google.com/file/d/1S2jI8LHeGZeUg3xzuOff7Qa88wt6Tpff/view?usp=sharing
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Thanks for your answer. Seems there is no such a mistake. Radio’s pins TxD and RxD are connected to MCU’s pins 10 and 7 respectively. The 10th pin is initialised as Rx, the 7th - as Tx, if I understand a program code correctly. Can’t see your Moscow photo.
OK, The wiring diagram showed Tx to Tx and Rx to Rx, these just need to be Tx to Rx and Rx to Tx. Try this, In setup add the line Transceiver.PrintParameters() for both your transmitter and receiver. The printout should show all parameters read from the EBYTES, while there can be different settings for each, most of the settings must match (like channel, address, air data rate, and a few others. I guess correspondence removed my pic.
Thanks, Kris Kasprzak
On Tuesday, October 12, 2021, 10:43:02 AM CDT, Kirill Khudoyarov ***@***.***> wrote:
Thanks for your answer. Seems there is no such a mistake. Radio’s pins TxD and RxD are connected to MCU’s pins 10 and 7 respectively. The 10th pin is initialised as Rx, the 7th - as Tx, if I understand a program code correctly. Can’t see your Moscow photo.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Hi, Kris. I’ve got this, the same for both the transmitter and the receiver
I can't see the image, however, i'm not sure about the wiring. I'm looking more at your wiring diagram and i'm confused as to what you are trying to do. It looks like you are powering one EBYTE from a NANO--I guess you want to power it with 5 volts? But it's communicating with a pro mini a 3v3 device. I'm not sure what the Tx signal voltage will be from the EBYTE, but if outputting 5V0 i'm not sure what will happen the the pro mini. I'm not sure what the USB to TTL is for maybe to power the pro mini? The other EBYTE is powered from 5v0 buck converter but using the pro mini regualtor to give it 3v3--again this may be problematic since the EBYTE may spit out 5v0 for the Tx.
Note. The EBYTE is a 3v3 device but 5V0 tolerant, so I would recommend powering the pro-mini and EBYTE from 3v3. Maybe this vid will help. Wireless for MCU projects made easy
|
Wireless for MCU projects made easy
|
|
|
Thanks, Kris @.***
On Thursday, October 14, 2021, 11:23:08 AM CDT, Kirill Khudoyarov ***@***.***> wrote:
Hi, Kris. I’ve got this, the same for both the transmitter and the receiver
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Thanks. I’ll think about what you’ve written a bit later.
Here’s the image. All params equal zero
When all parameters are zero the unit is not connecting to the MCU. some possible reasons could be:
Thanks, Kris @.***
On Thursday, October 14, 2021, 12:58:59 PM CDT, Kirill Khudoyarov ***@***.***> wrote:
Thanks. I’ll think about what you’ve written a bit later. Here’s the image. All params equal zero
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Thank you. I’ll try to do smth and then will text you
Hello, Kris. Could you tell why do these “trying”s (look at the attached picture) appear in the serial monitor?
It means the reader is not receiving any data.
These “trying”s appear between the lines 58 and 63 before starting the loop. Could it be a problem with an init?
There is a print statement indicating if the model information can't be read. The function actually tries to communicate several times before giving up. I'm not sure if you got the wiring sorted, it's possible the pin recovery on the MCU is very slow. Open the EBYTE.H (in notepad or something) and find the line around line 85
Change the 50 to say 200, save the .h file and recompile everything Thanks, Kris @.***
On Monday, November 1, 2021, 01:42:37 PM CDT, Kirill Khudoyarov ***@***.***> wrote:
These “trying”s appear between the lines 58 and 63 before starting the loop. Could it be a problem with an init?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
I’ve changed 50 to 200 - it’s not helped. Also I’ve tried to power the module from the Nano’s 3v3 - nothing’s happened.
I’ve improved and repainted the wiring diagrams. Hope they’ve become more readable (D-SUN is a 9V to 5V converter, CP2102 is for powering ProMini and reading its data). Are there any mistakes?
The wiring on the Rx is still weird. Not sure why you are using a NANO to power another MCU--why just not use the NANO. And you are still powering the EBYTE from 5v0. Until you get this issue sorted I would use the NANO for the Rx. The CP device may be intercepting some serial communication. However, get rid of the library completely at least for now. I had wrote this code, not tested. but if you can't get the units communication by basic serial.print and serial.read there's a wiring issue, damaged devices, or something else. // transmitter
SoftwareSerial ESerial(PIN_RX, PIN_TX);
void setup() { Serial.begin(9600);ESerial.begin(9600);Serial.println("Starting Sender"); } void loop() {ESerial.print("A");delay(100);} //Receiver
SoftwareSerial ESerial(PIN_RX, PIN_TX);byte b; void setup() { Serial.begin(9600);ESerial.begin(9600);Serial.println("Starting reader");} void loop() {if (ESerial.available()) {b = ESerial.read();Serial.println(b);}else {Serial.println("No data");}delay(100);}
Thanks, Kris @.***
On Tuesday, November 2, 2021, 03:35:23 AM CDT, Kirill Khudoyarov ***@***.***> wrote:
I’ve changed 50 to 200 - it’s not helped. Also I’ve tried to power the module from the Nano’s 3v3 - nothing’s happened. I’ve improved and repainted the wiring diagrams. Hope they’ve become more readable (D-SUN is a 9V to 5V converter, CP2102 is for powering ProMini and reading its data). Are there any mistakes?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Kris! Transceiving is working. The 10th arduinos’ pin doesn’t work as ESerial Rx for some reasons. I’ve changed it for the other one and everything’s become fine. Thank you very much for your participation! I’m happy you decided to help me. I continue working with your library. Perhaps new questions will appear soon)
Glad to hear you got it working. Thanks, Kris Kasprzak
On Friday, November 5, 2021, 03:55:58 PM CDT, Kirill Khudoyarov ***@***.***> wrote:
Kris! Transceiving is working. 10th arduinos’ pin doesn’t work as ESerial Rx for some reasons. I’ve changed it for the other one and everything’s become fine. Thank you very much for your participation! I’m happy you decided to help me. I continue working with your library. Perhaps new questions will appear soon)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Dear Kris, My name is Kirill. Write to you from a Russian model rocket club “Borschevik”. We’re making an on-board computer for our rocket model. As part of this device we’re using radiomodule Ebyte E32-868T20D controlled by Arduino Pro Mini 3.3V. There is one problem. We’re trying to use the example from your library “Ebyte” but something is going wrong: we can’t transmit or receive any data. Could you advise us the ways to solve it? I attached to this message: -our electrical scheme; -two videos of voltage measurements on radiomodules’ pins during the work; -a program code; -screenshots of a program we’re using to set up module params. Sincerely, Kirill
Transmitter
include
include "EBYTE.h"
define PIN_RX 10 //arduinoRX
define PIN_TX 7 //arduinoTX
define PIN_M0 9
define PIN_M1 8
define PIN_AX 11
struct DATA { unsigned long Count; int Bits; float Volts; }; int Chan; DATA MyData; SoftwareSerial ESerial(PIN_RX, PIN_TX); EBYTE Transceiver(&ESerial, PIN_M0, PIN_M1, PIN_AX);
void setup() {
Serial.begin(9600); ESerial.begin(9600); Serial.println("Starting Sender"); Transceiver.init(); }
void loop() { MyData.Count++; MyData.Bits = 10; MyData.Volts = MyData.Bits * ( 5.0 / 1024.0 ); Transceiver.SendStruct(&MyData, sizeof(MyData)); Serial.print("Sending: "); Serial.println(Transceiver.available()); delay(1000); }
Receiver
include
include "EBYTE.h"
define PIN_RX 10 //arduinoRX
define PIN_TX 7 //arduinoTX
define PIN_M0 9
define PIN_M1 8
define PIN_AX 11
struct DATA { unsigned long Count; int Bits; float Volts; }; int Chan; DATA MyData; SoftwareSerial ESerial(PIN_RX, PIN_TX); EBYTE Transceiver(&ESerial, PIN_M0, PIN_M1, PIN_AX);
void setup() {
Serial.begin(9600); ESerial.begin(9600); Serial.println("Starting Reader"); Transceiver.init(); }
void loop() { if (ESerial.available()) { Transceiver.GetStruct(&MyData, sizeof(MyData)); Serial.print("Count: "); Serial.println(MyData.Count); Serial.print("Bits: "); Serial.println(MyData.Bits); Serial.print("Volts: "); Serial.println(MyData.Volts); Last = millis(); } else { if ((millis() - Last) > 1000) { Serial.println("Searching: "); Last = millis(); } }
Video Tx: https://drive.google.com/file/d/11_lKVOkfTr2ua-ZTcl26wmVUJlUjYeBs/view?usp=sharing Video Rx: https://drive.google.com/file/d/1S2jI8LHeGZeUg3xzuOff7Qa88wt6Tpff/view?usp=sharing