(More Info) |
As of December 2023, the JDY-30/JDY-31 seem to be hard to procure in quantities. It looks like all vendors have switched to other, newer members of the family, the closest being the JDY-33. I am evaluating the JDY-33 at the moment and will post an update to this page when the project is complete.
I have made a number of projects using HC-05 Bluetooth modules. They draw relatively low current and are pretty fast (I typically run them at 115,200 Bauds) and there are no issues pairing them with any of my Android devices. No such luck with Apple devices, those do not support the Serial Protocol Profile.
I have been frustrated by the AT command set of the HC-05 though, particularly the command to change the module name. Since all modules have, by default, the same name, it can be very confusing if you have more than one device associated with your phone or tablet as they show up under the same name. I have the same issue with WiFi modules so I routinely add the last 4 digits of the MAC address to the device's name and put a sticker on them so I can more easily identify them later.
It is fairly easy to change the name using AT commands but I have found that while you can change the name to anything you want, making it longer than the default name (HC-05), even by one character will cause the command AT+NAME? to return nothing, even though the module still works fine, so the only way to make sure the command worked is to try to associate the module with your phone after you have changed the name.
It is not a major problem since the modules otherwise work very well, but it is annoying.
Another annoyance is the need to connect the KEY pin to ground to place the chip in AT command mode.
See this wiki article I wrote about the HC-05.
In my quest for a better replacement, I came across the JDY-30 and JDY-31. The two part numbers seem to be functionally identical aside from a slightly different layout of the pins on the narrow side. The JDY-30 is on the left, the JDY-31 is on the right, even though most sellers will use the part numbers interchangeably.
It is a single chip Bluetooth module (the HC-05 has two chips) that is even cheaper so I bought a few to experiment. Another advantage is the JDY-31 has a row of holes on the narrow side ready to receive 0.1" headers so you can breadboard with them right away without having to buy a carrier board (don't fry the modules, they run on 3.3V). On the other hand, the castellated holes on the wide sides are compatible with the HC-05 carrier boards if you want to run the module from 5V, the best of both worlds.
Even though the seller on Alibaba says the modules are replacement for the HC-05, that is only true of their physical form factor and pinout. They do not use the same command set and the protocol to place the module in command mode is different. However, once configured, they work almost the same with one important caveat, see below.
If your application requires sending binary data, you are out of luck. One significant difference between the HC-05 and the JDY-30 is that the HC-05 sends data when you stop sending it data through the UART (for a programmable amount of time, usually a few mS). The JDY-30 sends data when it receives newline characters \n\r. That means you cannot reliably send random binary data without encoding using the JDY-30 no matter how hard you try. In most of my applications, I use the JDY-30 as an alternative to WiFi modules which have the same restriction so it's not been a problem for me. Your mileage may vary.
Command Mode:
The module is automatically in command (AT) mode when not paired, and it enters the serial emulation mode automatically when paired, so you do not need the KEY pin as you do with the HC-05.
Banggood has a comparison chart between the JDY-30 and JDY-31. I have not verified it:
The first task was to find a datasheet. I only found one in Chinese but it was easy enough to translate:
I have checked most of the commands and they seem to work the same between the JDY-30 and the JDY-31.
I have created ExpressPCB compatible models for the JDY-30 and JDY-31.
The JDY-30/JDY-31 modules seem to fix the annoyances with the HC-05 and do not bring new ones, which is a pretty good deal considering they are even cheaper.
To buy one of these modules, simply enter JDY-30 or JDY-31 in any of your favorite electronics shopping sites (it works on Amazon, eBay, AliExpress and Banggood). It is also available from a number of Arduino vendors like Adafruit and Sparkfun.