Help required with ...
 
Notifications
Clear all

[Solved] Help required with a JDY-40 (EY-40) Wireless Transceiver Module.

20 Posts
6 Users
0 Likes
17.8 K Views
Mandy
(@amanda)
Member
Joined: 5 years ago
Posts: 74
Topic starter  

Has anyone here successfully used a JDY-40 module pair?

I'm hopeing to use these to send data from my robot to a data logger of sorts but, at the moment, I'm getting a response to the AT commands but I'm not seeing them talk to each other.

I'm assuming that I 'm missing something in the settings (or I've fried something again.)

Any help would be appreciated.

 

The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot.


   
Quote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Hello Amanda,

What voltage level are you using with it? It's a 3.3v module.

 

Scott

 


   
ReplyQuote
Mandy
(@amanda)
Member
Joined: 5 years ago
Posts: 74
Topic starter  

Hi Scott,

Yes, I seem to have the voltages right as I can interrogate the module with AT commands and I get the correct response back so the rs232 is working and the module is on.

I'm assuming there is something in the settings to join the two units or something of that sort I was hoping to find a working example as the data sheet only gives minimal information.

One of the problems I'm having is viewing the outputs of two Arduinos at once, the IDE gets very upset about ports and then I have to reboot.

I think I may have to borrow a laptop.

Mandy

The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot.


   
ReplyQuote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Do you have the set pin pulled high?


   
ReplyQuote
Mandy
(@amanda)
Member
Joined: 5 years ago
Posts: 74
Topic starter  
Posted by: jscottbee

Do you have the set pin pulled high?

I was manually pulling the pin high or low with a jumper.  As I remember, low for AT commands and high for straight through.

I think I'll try setting it up another way and running the test again.

 

The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot.


   
ReplyQuote
Mandy
(@amanda)
Member
Joined: 5 years ago
Posts: 74
Topic starter  

It works!

I've had lots of trouble communicating with the Nanos during this project and I beginning the think it was my computer so that was very frustrating.

I had been using a transistor as a level shifter on a TX line but I changed it for an 8bit level shifter so I could access the control lines via software but then I stopped getting the AT commands.  So out came the LEDs, putting a led on a data line can save getting out test kit, as soon as I connected them the AT commands started working again.  I'm thinking that I will need pull down resistors with the level shifter.  At the moment it is working so I'm not pulling it apart to find out.

I still had lots of problems with communicating with the Nano but after a little more experimentation I found that most of my Nano boards will not provide enough power on the 3V3 for the radio card.  Connecting the card to 3V3 on the bench power supply cured the problems with the programmer and everything started working.

Now I have a Nano sending "Hello World" and another receiving it and putting it on my screen. YAY!

Now to put one of these on Eric, it should be less of a problem connecting the radio to the Pi and the base station can have its own power supply so I should not have as much of a problem with the 3V3 on the final build.

The Pi has built in WiFi but it has overheads, it requires quite a lot of power and programming it is a pain and all I am using it for is to send a string of data to my PC.

I hope this helps people in the future.

The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot.


   
ReplyQuote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Congrats! 


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: Mandy

The Pi has built in WiFi but it has overheads, it requires quite a lot of power and programming it is a pain and all I am using it for is to send a string of data to my PC.

I'm not sure how the WiFi works on the Pi but I've been using the ESP 8266 module for my WiFi connection to my robot.  I agree the programming can be extremely complex and a pain if you're using TCP. 

Instead I use UDP which is extremely easy to program and works just fine for my application.   The programming is a piece of cake, both on the ESP module and on my laptop where I use C# as my programming language.

At first I was going to use TCP, but it just got way too complicated.  Once I switched to UDP it was a piece of cake.   Very minimal amount of coding required.   Not sure if that can be applied to the Pi WiFi.

 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Mandy
(@amanda)
Member
Joined: 5 years ago
Posts: 74
Topic starter  
Posted by: Robo Pi

.. but I've been using the ESP 8266 module for my WiFi connection to my robot. 

 

I'm using the EY40, firstly, because it uses a lot less power than the Wi-Fi, battery life is always a problem and the EY40 is only pulling 40mA even with LEDs attached.  (50 to 170 mA for the ESP8266)

The second reason is that Wi-Fi is very insecure and allows an attacker easy access to your network and as a result I use wired Ethernet for everything I can.

The RS232 on the Pi is all built in and therefore has hardly any software overheads, it connects via a standard TTY port and could even be used to program the Pi but all I will be doing is transmitting a string of variables to a base station.  WiFi, with all the extra features is overkill in this situation.

The data can be recorded on a PC, rather than the SD card, for analysis with something like MatLab on the fly rather than having to download the log files from the robot. 

I hope that all made sense.

 

The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot.


   
ReplyQuote
Mandy
(@amanda)
Member
Joined: 5 years ago
Posts: 74
Topic starter  

I have a working prototype transmitting from my Pi and being picked up on the Nano.  The Pi was a fiddle to get the TTY port working, you have to turn the BlueTooth off, and again I ran into power problems with the 3v3 lines.

The code for sending a message has been reduced to :

      while(EricIsRunning) {  // This is run as a parallel loop.
dataToSend = "00,"; // The first item is the error status.
// Put together the information. For this example I'm reading temperature floats.
if ((temperatureObject < 100.0) & (temperatureAmbient < 100.0)) { // Anything over 100C is an error most of the time.
dataToSend += std::to_string(temperatureObject) + ",";
dataToSend += std::to_string(temperatureAmbient) + "\n";
} else {
dataToSend = "01,00.00,00.00\n"; // mark the data as invalid
}
// now we need just one line to send the data.
write(fd, dataToSend.c_str(), strlen(dataToSend.c_str()));
usleep(200000); // set the frequency.
}

So down to 13 lines of code from 500+ using the Wi-Fi.

On the Nano I have :

void loop() {
if (radioModem.available() > 0) {
Serial.write(radioModem.read());
}
}

I'm only using the radio at the standard 9600baud but it says it will run up to 19200, we shall see.

 

 

 

The 600 series had rubber skin. We spotted them easy, but these are new. They look human... sweat, bad breath, everything. Very hard to spot.


   
ReplyQuote
(@avamartin)
Member
Joined: 5 years ago
Posts: 1
 

Hi...JDY-08 transparent transmission module is based on the Bluetooth 4.0 protocol standard, the working frequency of 2.4GHZ range, modulation scheme is GFSK, the maximum transmit power of 0db, maximum transmission distance of 80 meters, the use TICC2541 chip design, allowing users to modify the device name through AT commands service UUID, transmit power, pairing password instructions, convenient to use and flexible.


   
ReplyQuote
(@igeorge)
Member
Joined: 4 years ago
Posts: 6
 

Hi,

I have two modules of JDY40. How i send data from one to other one for a UART replacement cable. I know how to connect the microprocessor to it and the selection of through protocol, but how module B know about date sent by module A and send it to second processor.

The same question is for push buttons and leds. How one module know i press a push buton on the other and turn on the coresponding led ? Do i have to pair them or what ?

Thank you, but is first time when i use them.


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 
Posted by: @igeorge

Hi,

I have two modules of JDY40. How i send data from one to other one for a UART replacement cable. I know how to connect the microprocessor to it and the selection of through protocol, but how module B know about date sent by module A and send it to second processor.

The same question is for push buttons and leds. How one module know i press a push buton on the other and turn on the coresponding led ? Do i have to pair them or what ?

Thank you, but is first time when i use them.

@igeorge

When the SET pin is pulled HIGH, the modules are in pass-though mode and are basic serial devices. The default baud rate for them is 9600. You would open up one on each uC connecting via the UART of each as you already know.  You can then send data to them via whatever serial write functions you may have for the uC and framework you are using. 

In Arduino have a look at the Serial examples. Other uC/frameworks, the UART/Serial examples they may have.

Remember that this is a 3.3v device and not to write to it with 5v.  See https://www.electrodragon.com/w/images/0/05/EY-40_English_manual.pdf for more info on the modules.

Scott

 

 


   
ReplyQuote
(@igeorge)
Member
Joined: 4 years ago
Posts: 6
 

@triform Thank you Scott, but how the module A know how to look for module B and who it is.

They might be 4-6-10 modules in the same area. It is like in my house. When i look for WIFI i see 12 routers around my house, but i know which one is mine and i connect to that one . How is done here ? Please help me to understand. I want to use 4 sets of module for turning ON an Led when a reed switch is open/close.

All are in the same location, the receivers. If i turn the reed switch 5 in module 2 transmiter, how the led 5 in module 2 receiver will turn on if i do not paire them like

1T-1R

2T-2R

3T-3R

4T-4R

Please help me to solve this issue.

Thank you very much

Ion

 

 


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

@igeorge

Looking at the docs for the module... You might be able to have each SLAVE module on a different RF channel and the MASTER would use the AT commands to change channels and talk to the slaves individually that way.   Each slave would have to be configured with the channel via the AT commands. 

You also *might* be able to do your own master/slave net by sending out a data package with the ID of the slave you want to address and ONLY that slave respond back to the master.  You would have to assign each slave a unique id like "SLV1", "SLV2", etc. 

Either way, you do it you may want to do some form of data validation with a checksum to make sure the data sent and received it what you expect. 

Sorry, I can't be more help.  There may be a way to perform this all with the AT commands, but the docs do seem a bit terse.

Scott


   
ReplyQuote
Page 1 / 2