You should use level shifters on the RX and TX between the Arduino 5V logic levels and the module's 3.3V logic levels. It's not enough to supply power at 3.3V from an Arduino... Try running the modules without the Arduino and the USB-serial converter running at 3.3V logic levels.
The BDY-40 is 3.3v and I don't think it's TTL logic level - so you might need to use logic level shifters on the RX and/or TX pins (assuming you haven't already fried the BDY-40).... or use a 3.3v level arduino (some Nanos are only 3.3v if I recall?). Other people have also mentioned using an external 3.3v power supply for the BDY-40 as the 3.3v supply from the Arduino can't provide enough power.
When playing with anything RS232 i first off connect it to the PC via a USB-RS232 dongle and use a terminal program.I use “YAT” ‘Yet Another Terminal” to build up the strings to send to the module, far easier than trying to do it while programming an Arduino. As you know RS232 is an open ended data stream. It’s up to you or the manufacture to come up with a termination character, or define the Data length either fixed or as part of the stream data. It’s always a pain as buffer overruns are easy to get if you’re not reading the RS232 buffer faster enough or you’re waiting for a termination character and it was not sent or you missed it as the buffer was overwritten. Most folk only use the RS232 for talking to the PC, very few use it for communications, so don’t fully understand how much user interaction is required with the UART. Just chucking text at the screen is easy, but reading a UART to act on the data stream is a lot harder and can very easy bite you rear end. At least “Serial.println()” adds a carriage return line feed to the end of the data stream so it gives you something to look for when decoding the incoming stream. As normaly you loop around looking for the termination char to know when to stop reading. There is a big lack of understanding on what’s going on behind the reception and decode of RS232, it’s just like reading a serial port and expecting to get all the data sent in the correct place! this is just not going to happen all the time. been there done that and you end up with quite a little state machine to parse the data in to useful information without blocking the code while waiting for a that you just missed due to a buffer overrun.
@@RalphBacon with the loss of windows built in terminal, I use this one the most. the ability to define strings to be sent on a mice click is very handy when debuging RS232 com's
I'm not that unhappy, actually, Allan, because I will connect up that device (with no documentation) and it will continue to work just the same as I showed for some simple Serial.print statements. Good enough (until I can find a better solution).
I had the same thought as "supardau" regarding a 3.3v board with the arduino 5 v signal as I am currently trying a Nokia 5110 graphical display which states clearly not to use the 5v signal without a level shift circuit which is where I have stopped at the mo. Thank you for mentioning the Github download zip from the CODE button. like a lot to tech / electronics if you put it down for a couple of months you have a lot of little things to catch up on. while very simple , any question you know the answer to is simple while the opposite is also true. Keep up the great content.
I found that the HC-05 boards were all basically the same, but their internal code was often crippled. Some boards offer only basic commands, while others allow the full command set.
I hadn't heard that but I tend to use the HC-06 as that can act as master OR slave (initiator/responder) whereas the HC-05 can only respond but not initiate comms.
These are great. I direct connect my receiver to my PC n wrote a C# app to read from the serial n log to the DB then present everything in a web page. Great stuff, thx 👍
To change baud rate, type AT+BAUDX, where X=1 to 9. 1 set to 1200bps 2 set to 2400bps 3 set to 4800bps 4 set to 9600bps (Default) 5 set to 19200bps 6 set to 38400bps 7 set to 57600bps 8 set to 115200bps
Thanks, you too! Yes, I use ESP-NOW all the time for my sensors (one in the workshop, two in the attic all sending stuff to my main workshop Heater Controller). But in this case I wanted a non-Wi-Fi type transmission, and that's what I sort of got. It means that a humble Arduino UNO can only use it.
Just picked up a few LC12s modules that are very similar to the jyd-40, thay have the same ic = bk2461. I did find the datasheet on that chip, a very detailed sheet at that. Got them to learn how they work to fix a hot tub wireless controller/ pump link that uses them to communicate.
Good show! I'm glad you mentioned using software serial. I have been using HC-12 with good results for a few years. I know that timing the command execution is really important. I spent several days experimenting and researching how to put the HC-12 to sleep. I had to add delays after commands to slow the arduino down enough to let the HC-12 keep up. I found the info in a User Manual for the HC-12 translated from Chinese. I will try to zip a copy to your email. I browsed your git and didn't see it listed. It has a lot of good tech info in it. I learned here about the other modules. I have never seen them before. I'll be checking them out. Cheers!
My goto modules are the Ebyte E32, they allow for higher speeds, have longer range and are transparent once you have them configured as you want (a single time setup)
I always considered the E32 range of modules are much longer range devices (basically LoRa) rather than something for my 3m transmission range requirement here in the workshop! I think that my understanding still holds true, although I'm sure they would work just the same in my workshop. During my search as a result of your comment, I did find a nice web site (blog) with libraries and other stuff for others to peruse: www.mischianti.org/category/my-libraries/lora-e32-devices/ This is something I have bookmarked to investigate more. 👍
@@RalphBacon you can reduce the power output of the modules to reduce the range and interference to other devices, and if you don’t need much data transfer (just a few bytes) you can also reduce the data rate to reduce the RF bandwidth too.
Hi Ralph. The standard blue HC12 transceivers have been my go-to serial wireless modules for years. I've always been able to use AT commands on them. No problem. Not familiar with those green ones with the backplane antenna and the non-standard pin spacing. Blech! For the ranges you're talking about, the standard blue HC12 modules are probably just fine. Alternatively, if you're having ESP32s talking to each other, could you set up an ESP32 'Command Server Station' as an access point and then just have your 'sender' ESP32s just do a POST request to the server station with their respective debug messages. If you set up your command server as an access point, you don't have to have it on your home wifi network. If it doesn't matter, just set it up on your wifi network and either way, you have server that receives/logs debug messages and you could have it do IFTTT email sends to your phone when messages come in from your various devices as they generate debug messages. Have fun! Gord.
Happy new year! Hmm, good luck with "playing" with AT commands. However, as I showed the HC-12 modules could be a good place to start. If you want Bluetooth (BT) then the HC-05 (master or slave) and HC-06 (slave only) are very good too, I'm using one daily in my Smart Phone Charger project.
You mention that the 3.3V is fine because the Arduino has 3.3V power but I didn't see or hear anything about 5V to 3.3V logic level shifting. The HC-12 seems to be 5V tolerant, but are the others?
I wondered this too, but of the (few) circuits I could find online they all connected the data lines directly to GPIO pins. Of course, they could all be 3v3 GPIO pins 🤔 Hmm, I suppose it's something else I could try (although I'm pretty fed up with the whole things now (except for the HC-12, which not only worked but is 5v tolerant too!).
Just put a 2k2 down to a 1 k, restistor, in serial output from the Arduino, and then you are good. The input (Aduno) can understand the 0-3,3 volt signals, no trouble.
@Asger Vestbjerg Yes, I concur, that would be the simplest solution if we are sure we need it. After all, the TX pin of the 3v3 μC is the output pin going into a very weak 5v RX input pin. Is that enough to cause problems, I wonder? But resistor divider (or level shifter) is the safest solution, most definitely.
Ralph, great video as always. Really enjoy the deep-dives and showing us your evolution through a problem. I may have missed it but could it be start/stop/parity settings, since you tried different baud-rates? Anyway, I working on sending data to a remote display using those cheap 433Mhz Xmtr/Rcvr modules that just send CW do to cost. I may have to get some of the ones here that you've mentioned just to goof with!
Hello Ralph, Happy New Year to you. I had a similar problem in the past with a GSM module. Here was the solution: The baudrate for the AT commands was not 9600Baud, but 4800Baud. So my tip is: Try the AT commands with different baudrates. I think/hope that this works. Unfortunately I don't have such a module, I use the NRF24L01 modules for such "simple" WiFi connections. I hope this helps you Greetings and happy coding Frank
Similar issue and the AT command had to be CAPITAL and all past it could be either upper or lower, and unlike the " examples " for the NRF module did not actually always respond with the plus sign between the two modules. One did not use it for just responding, the other needed it for all commands.
I would like to hear more about using the data pins. Can a transmitter set a data pin on a receiver and then go to sleep or loose power. The receiver would have to always be on of course.
You might have destroyed the 3.3V boards by connecting them to the Uno, which has 5V logic levels. If in doubt, if a device can handle 5V logic levels, use a voltage divider on all of its inputs (1k:2k Ohm works fine). Other reasons for not reacting to AT commands: RX/TX are swapped (misprint on board or user error), obviously if the default transmission works, that's not it. The AT mode baudrate is not as specified; pretty much all "standard" rates from 9600 up to 115200 should be tried. Also, for some modules the AT mode baudrate changes with the transmission baudrate, for some it doesn't. The line ending is wrong (newline, carriage return, both or none). Some modules fail to parse input, if any line ending is sent. They instead work by "timing out". The command and only that (no newline) has to be sent within let's say half a second of the first character. For debugging something like this you really should use a better terminal program with more options. I use hterm (free, available for Windows and Linux).
Yes, this did occur to me but given that the TX is an output GPIO, going into an input RX on the wireless module I thought it might be OK. Maybe I was wrong! I'll check out the HTerm program.
For serial wireless communication why not just use nrf24 modules? There are lots of arduino libraries, they are cheap, same range as blue tooth, and baud rate can be set in cpp. They use 3.3V but are 5V tolerant if used on SPI bus. The nrflite library claims they can be used on I2C but I have not tried that.
It's an option although I don't think there is much advantage over an HC-12 device, is there? Apart from the pairing (which could be good or bad depending on how you look at it).
for HC-05 baud rate setup command: AT+UART=,, Param1 Param2 Param3 4800 Stop Bit Parity 9600 0 : 1 bit 0 : none 19200 1 : 2 bit 1 : odd 38400 2 : even 57600 115200 Default: 9600, 0, 0 from document: HC-03/05 Embedded Bluetooth Serial Communication Module AT command set
Hi Ralph. I was just wondering if you have tried swapping the Rx and Tx around with those problematic modules. Sometimes they do make these kinds of mistakes in PCB designs.
I tried swapping the TX/RX too (just in case) but no joy. I do always swap them from the device to the FTDI device TX->RX and vice versa. But nothing worked here.
It sounds like you'll be monitoring more than one project at a time. Do you plan on making a polling routine, to prevent data collisions? Well done by the way!
I'm not sure about monitoring multiple projects, actually. Not even a single project continuously. I was thinking more about plugging in the serial device when things go wrong to see what happened. What do mean, stable door open, horse gone? Oh, I see. 🤦♂️
What about getting the RSGB Radio Communication Handbook FIFTH edition which gives details about RTTY operation and gives schematic for a RTTY tone decoder for 1275/1445Hz, and building a small transceiver module for the frequency you want.
Hi Ralph, I have found your tutorials really helpful and have been working on a hot tub controller ever since I watched your blue tooth connection upload. Would you please recommend a FET TTL device that will handle a 2A load @ 12v. Regards Martin.
Greetings Martin, I'm just a rando that pops in when I can. You also need to specify if you want to control from the source or ground side of the switched circuit. This determines P or N channel. N channel is more common and less expensive, switching from the ground side. The trigger voltage is commonly less than the source voltage, so what voltage from your controller will you be needing to trigger the FET. There are a number of suppliers that have options to specify your parameters, and help you find what you want. I generally use Digi-key and often order from them. Once you have the part number, you can usually source it from several places, but with Digi-key, you know you're getting a genuine article. With 2 amps, that might be important. Of course, you could go with a higher current rating, and reduce heat considerations. I doubt it would be a major increase to the cost. Also, check through Mr. Bacon's catalog of videos, and you'll probably find one explaining Fets. He's good at that. 😄
Yes, Mr. gfodale is correct. Normally, we would probably specify an N-channel MOSFET to control a device, so that the MOSFET has one leg (the source) connected to GND, and the other leg (drain) connected to the device you are trying to control. The other side of the device goes to the power supply (which might not be the same one powering the rest of the circuit, especially as you mention 12v). The TTL gate of the MOSFET will fully switch on the MOSFET at 5v (possibly even lower) so an Arduino UNO/Nano (but not necessarily a 3v3 device like an ESP32) will be fine. Sometimes, though, we control the power via a P-Channel MOSFET and I've shown this in other videos which you can find in the pdf that is linked to in every video description.
@@RalphBacon Hi Ralph, Thank you for your reply. I ended up using a 2N2222 PNP device as it was easily capable of driving a relay though an opto couple and is in a package that fitts my prototype board. This is all part of my output device from a Nano to control a hot tub via a Bluetooth connection to my phone with an app I have written.(no electrical switches near the water here only a mobile phone to ruin.) I have been working on and off with this project for about a year now and will get the final circuit board made by PCB Way as I am using there easy EDA as you have recommended (many times). P.S. Your TH-cam tutorials are fantastic and have inspired me to become an Arduin'ite. Many thanks, Martin.
If you are telling the board to change the baud rare, I believe you also need to change the baud rate of the serial device on the Arduino so that the speeds match. Did you get a failing status, garbage, or no response from the board?
I got nothing, nada, zilch. If I had got some corrupted characters I'd have tried what you said. Having thought about, I'm pretty sure I did try that, just in case, but still nothing. 😢
I've also been thinking about remote monitoring of serial comms on installed devices but my approach was going to be a little different. All my installed microcontroller devices are within WiFi range (even if they don't/can't use it themselves). I plan to avoid using HC12 and other potentially dodgy modules by using an ESP32 as the plugin transmitter(s) and have them send their captured serial streams over Wifi onto my local network and thence to a single receiving address/port that could be a Windows app or another ESP32 and which could potentially interleave comms from more than one monitored device. I envisage using a DIP switch on the transmitter(s) to set the expected baud rate to match the serial TX of the monitored device although it might be possible to detect the baud rate automatically in future by measuring bit lengths. I'd be interested to know what you think.
If you use an ESP32 as the transmitter (instead of those dodgy HC-12s 😁) then you could use simple-but-excellent ESP-NOW to send the data to a receiving ESP32 and it would be "secure" in the sense that only the receiving device's MAC address would get it/process it. But you'd still need to be wary of data collisions from multiple transmitters.
@@RalphBacon Worth some experiments for sure but I suspect ESP-now won't reach the devices at the bottom of the garden (where I have a wifi access point). Maybe I'll design in both options.
Thanks Ralph, all good stuff. Tell me tho', why didn't you just use an ESP and ESP Now. There's very little difference in costs these days, and you get so much more flexibility. Genuine question and happy new year!
Another viewer asked me this and I certainly use ESP-NOW for my sensors but this time I wanted a different way of continuously transmitting a data stream (a wireless USB cable, as I mentioned). And it means that the Arduino can also be used this way (ie no Wi-Fi or ESP-NOW available).
Well, not really. What about Arduinos? I can't use ESP technology on those whereas using, say, and HC-12 works just fine on _any_ microcontroller! Looking at the GitHub it looks quite complicated too - is it suitable for beginners, I wonder?
@@RalphBacon It runs on any ESP32, or cheap ESP8266, and works with Arduinos very well. Additional slight complexity is worth it, because you can not only communicate via it, but flash and debug as well. There is even a fork that I tested and used with SMT32duino. Right after firmware flash everything else including configuration is done in Web GUI starting from WiFi AP mode on that ESP.
Do not confuse it with a MCU that you base your project around. ESP-Link is a intermediate device that provides transparent (meaning you do not have to setup your project MCU in any special way as e.g. in case of OTA) WiFi bridge for any communication to your project as if it was connected with a wire. It simplifies development and could be used as a means of end design communication as well. It is not necessary a part of project, you may use it as a wireless dongle for all your projects.
@@Mr.Leeroy interesting I never thought about it that way, I had chunks of Attiny85 lying around because I'm too lazy to set up breadboard FTDI wire it to my PC testing it. I wish @Ralph s Bacon, do a video about this idea.
A SQL database? On an Arduino? Sounds unlikely! You could probably find something for an ESP32 (with lots of SRAM/PSRAM). But controlling a relay from an ESP32 is pretty straightforward and has been shown by me and many others.
I bought some HC-06 bluetooth modules for pretty much this purpose, for monitoring serial output from my microcontroller projects, planning to just connect my laptop to the bluetooth serial device which according to the lnternet was easy on Linux (which is what I use on my laptop). However it didn't instantly work so I thought "I'll fiddle with this later". That was back in march 2022 so perhaps its time to give it another go! i will agree, however, that the documentation on these transmitter modules is very patchy, not helped by the fact that you will get a huge variety of different firmware versions, sometimes which have vastly different functionality, and you can't always work out which version you're going to get, which version the documentation you find is for, or if the firmware can be reflashed.
I found the HC-06 modules very easy to deal with. Simple serial commands to send data from the source device. On a Linux machine I have been using pyserial, there is some setup required to get the Bluetooth Adapter to connect as a serial device (rfcomm) but once set up it is easy to ready the serial data. The HC-06 seems to be better documented than most and being straightforward serial makes them easy to work with.
I've done the same using both HC-05 and HC-06 modules. There is a great Android app called Bluetooth Graphics that can receive the serial data. It's mostly for displaying numerical data on graphs if you have that kind of project but will displays and send anything and do data logging. Similar software available for PCs as well. Wireless serial monitoring has played a big part in the development of a few of my projects.
@@Ed.R The 'Serial Bluetooth Terminal' app on Android allows you to send data to and receive data from the HC05/06 modules. It works for regular Bluetooth and BLE.
@@paulweston1106 Got it installed but I like graphs so don't use it as Bluetooth Graphics does everything it does. Also have the USB version which is rather useful, saves getting the laptop.
Just because the board has a 3.3 V output doesn’t mean you can use it directly with 3.3 V devices. You are powering the module from 3.3 V but the UART signals and the rest of the GPIO are still 5 V, most electronics can’t take a higher voltage that its supply voltage on its inputs, so you may have damaged the board by using the 5 V uart or 5 V GPIO on the arduino. You either need to find a module that works with 5 V or has 5 V tolerant pins, use a level shifter or a 3.3 V microcontroller. You can make a very basic unidirectional level shifter using a voltage divider, you need to take the 5 V from the arduino down to 3.3 V, but for the receiving connection from the module to the arduino you can just connect the module directly as 3.3 V still registers as high on most microcontrollers. The proper way is to use level shifters though.
Check the chipset data sheets. Is the "serial interface" RS232 compatible? Using logic or -3V, +3V levels? Does the AT mode require a specific baud rate? 300 or 1200 baud was once a common setup protocol. Check the start/stop/parity bits. TX for the chip is RX for the Arduino and vice-versa.
Hey Ralph, it's been a while, still watching from afar :) I've thought quite a bit about various ways to do wireless communication over the years, from simple stuff like you're trying for the "why isn't it working" debug stuff, to how to keep two devices in sync. I was going to go with the nRF24L01 modules with the mesh library, although it does eat progmem, it's very good, you have a master node, and then every other node automatically configures it's connection through other active subnodes. 5 can connect to one, if one already has 5, it connects to another down the chain... but I then was thinking if I go to ESP, I get wifi basically for free (both component count and progmem) for short range communication (and a benefit is that progmem isn't as... restrictive in ESP world)... so have basically been thinking of using ESP kind of how it started, as the communication method for between arduino devices. If I need a quote "real" Atmega chip to do some specific work, it can just be sent commands over the wifi and maybe do some I2C trickery.... So a possible idea to consider for debugging, if you use an ESP of your choice with appropriate level shifter, could that not be used to push out serial debug information over it's wifi connection (either some complex web page with AJAX or just some simple TCP API library or MQTT), then all you have to do is plug the "debugger" into any device you want to debug, then connect to it with your phone or computer directly, or have the debugger connect to your wifi (depending on where it is), since you were saying most devices are mostly within wifi distance anyway... (or you could go to the ESP LORA type world?) Just some ideas :) I have a question too, if you found that the HC-12 works the best, and responds to AT commands, and they're relatively cheap, my question is why are you keeping using the "inferior" ones? Or is it just a case of "I will prove this works if it kills me!"? :) x
Wow! Lots of ideas there, Jess! Last question first: the HC-12 indeed works best but I only found out the others (in the test batch of hardware) were troublesome when I tried them out. I'm not progressing the others unless/until they resurface and I will try few things out that others have suggested. Using a ESP32 is indeed a possibility although it does rely on the Wi-Fi being present. Or it could be an AP that another (listening) device could connect to and read the data. The sending ESP32 device could simply continuously read the RX pin and put it all in a big (huge) circular buffer to be read by the other device, as part of a web page. It's something bubbling along at the back of my mind to test out. Being able to just connect to a device and scan a web page is very attractive assuming the ESP32 hasn't "hung", of course! OK, back to the design of other projects, keep at it!
@@RalphBacon You'll just have to make sure your code is up to snuff :p ... although, if it's a debug device, it's more general purpose and would be a "plug it in to figure out something wrong with another device" so less likely to hang over time? "Oh, my beehive counter keeps crashing, I wonder why... DEPLOY THE RalphInatorDebugger3000ESP and watch it for a while"? :D Unless it's a feature you want to permanently add to your projects and I misread your intentions (quite possible! I am a natural blonde. ^^,)
Hi Ralph, You say these modules are not Bluetooth: do they require any kind of pairing? Perhaps I missed something... Also, the 2mm pin-spacing; PCBWay will sort that problem when it comes to your final project! 😁
The only require "pairing", I believe, in the sense that each module (in a pair or mesh) must have the correct (same) device ID (they all have the same out of the factory) and channel number (ditto). They can be changed to create a unique pair of modules. I didn't get that far as I couldn't get it to talk to me!
This is awesome! I'm struggling to understand AT commands. Are AT commands firmware or hardwired in? I have a HC-05 where you can enable AT mode, but on my ESP-01 i have to upload AT command firmware if i want to talk to it in AT. But if i want to upload a code to the ESP then you can no longer use AT commands until you reprogram it again. Do arduinos respond to AT commands if you upload the correct code?
AT commands are usually wired in. Certainly HC-05 AT commands are, and I use one of those in my Smart Phone Charger project (still in daily use). You should not need to upload anything at all. But it is a _one time_ operation; that is, set the pairing, baud rate etc using a USB-to-Serial dongle and then just plug it into the Arduino and it will "just work". The programmed settings are "sticky" across power downs. That's my experience, anyway.
I have indeed tested these and ended up chucking one of them to the other side of the workshop it was useless! Luckily, current ones are much better. But these are _wireless_ devices and whilst I could debug over Wi-Fi that wasn't my intention here.
Ignore me. I made my comment before watching to the end of the video. Looks like there are other commands that output info that don't end in a question mark.
Consider yourself ignored, Tony. 😉 Yes, the AT commands work fine on the HC-12 but not on the other modules. It can only be a formatting issue (line endings etc).
I presume these transmit "in the clear" (no encryption)? Would it be possible, in that case, to have multiple units transmitting (at different times) and have one receiver capture them all?
@@RalphBacon Spending some time thinking about it, a combination of checksums and time division should do it. IIRC, that's how Ethernet and cellular protocols sort out collisions.
I dont know at what distance you hold the antenna of both transceivers. I had the same problem with C1101 modules. It appeared the distance must be at least 1m. Otherwise they could not communicatie.
All old hat things have moved on.......would really like a vid on Tasmota with esp 8266 or 32 get your head away from Arduino where nothing compiles. Can you get your head round tasmotizer? Love what you do long term fan
Well, it's new for me, so I will keep at it for a while longer. Only then will I actually give up! Tasmota I've played with a couple of years ago, but nothing since then. Added to the list!
Is this a "fun with radios" project -- or a remote serial port? 😄 If it is remote serial, just use a radio you know (wifi) plus a chip you know (8266), and a bit of software to receive, buffer, timestamp your serial output, and put it on a webpage to serve out to any wifi computer phone etc. I got a bit of code from mrdiyca and a d1-mini with hookup clips soldered to 5v/33v/gnd/rx/tx and just walk that over to any project with an tx and gnd, and your serial output is streaming to a webpage on your computer in seconds. You can get 5 or 3.3 power from your project, or bring a usb battery for the d1-mini. Plus a d1-mini or esp-01 cheaper than 2 radios and radio is only running then your looking at it. Although you miss out on the "fun with radios" aspect of the project. 😄
Indeed. I did consider web pages but it's all much more complex than a wireless USB cable, don't you think? But certainly an option that I've been toying with for years!
Yes, Ron got it right. Available here: freeware.the-meiers.org/ it's totally free but I'm sure Roger will be happy for any donations if you use it a lot (like me).
Hi, this is very interesting. I'd like to flash a JDY-41 module and if I connect it via Serial USM RS232 I get a response "wake". No AT command gives me a response from the module. VCC is a coin battery 3,2 V. Do you know what might be wrong with it? I'd like to transmit a countinous endless bitstream and AT+CSSa= should switch the module into transparent transmission mode but it seems to be that nothing is working. Do you konw what might be wrong? Kind regards
I suspect you are not putting the device into AT mode by holding down the button on the board BEFORE powering on. The flash rate of the LED is quicker when in AT mode (rather than just paired and working mode).
I wish! What you can do is load the OTA library and upload a specific device via its IP address. I've not done it with the ESP8266, only the ESP32, but the procedure is basically the same. If you read this article you will find a link for how to do it with the ESP8266 too: randomnerdtutorials.com/esp32-ota-over-the-air-arduino/
I imagine the boards are made to someone else's specification, for their particular project. What we get are over-runs / extras / rejects. Best bet is to find the spec sheet for the chip, rather than the board if you're hard up against it for a solution, then pin trace.
You should use level shifters on the RX and TX between the Arduino 5V logic levels and the module's 3.3V logic levels. It's not enough to supply power at 3.3V from an Arduino...
Try running the modules without the Arduino and the USB-serial converter running at 3.3V logic levels.
I'll give it a go, Bernd!
The BDY-40 is 3.3v and I don't think it's TTL logic level - so you might need to use logic level shifters on the RX and/or TX pins (assuming you haven't already fried the BDY-40).... or use a 3.3v level arduino (some Nanos are only 3.3v if I recall?). Other people have also mentioned using an external 3.3v power supply for the BDY-40 as the 3.3v supply from the Arduino can't provide enough power.
So, more power AND use a level shifter if needed (not already running on 3v3). Back to the workbench I go!
When playing with anything RS232 i first off connect it to the PC via a USB-RS232 dongle and use a terminal program.I use “YAT” ‘Yet Another Terminal” to build up the strings to send to the module, far easier than trying to do it while programming an Arduino.
As you know RS232 is an open ended data stream. It’s up to you or the manufacture to come up with a termination character, or define the Data length either fixed or as part of the stream data.
It’s always a pain as buffer overruns are easy to get if you’re not reading the RS232 buffer faster enough or you’re waiting for a termination character and it was not sent or you missed it as the buffer was overwritten.
Most folk only use the RS232 for talking to the PC, very few use it for communications, so don’t fully understand how much user interaction is required with the UART. Just chucking text at the screen is easy, but reading a UART to act on the data stream is a lot harder and can very easy bite you rear end.
At least “Serial.println()” adds a carriage return line feed to the end of the data stream so it gives you something to look for when decoding the incoming stream. As normaly you loop around looking for the termination char to know when to stop reading.
There is a big lack of understanding on what’s going on behind the reception and decode of RS232, it’s just like reading a serial port and expecting to get all the data sent in the correct place! this is just not going to happen all the time. been there done that and you end up with quite a little state machine to parse the data in to useful information without blocking the code while waiting for a
that you just missed due to a buffer overrun.
Squeaktastic !
I'll have to check out that YAT program and see how it helps me. 👍
@@RalphBacon with the loss of windows built in terminal, I use this one the most. the ability to define strings to be sent on a mice click is very handy when debuging RS232 com's
Ah. The joys of modules without backup. Well presented video dispute your frustrations. I feel your pain mate.
I'm not that unhappy, actually, Allan, because I will connect up that device (with no documentation) and it will continue to work just the same as I showed for some simple Serial.print statements. Good enough (until I can find a better solution).
I had the same thought as "supardau" regarding a 3.3v board with the arduino 5 v signal as I am currently trying a Nokia 5110 graphical display which states clearly not to use the 5v signal without a level shift circuit which is where I have stopped at the mo. Thank you for mentioning the Github download zip from the CODE button. like a lot to tech / electronics if you put it down for a couple of months you have a lot of little things to catch up on. while very simple , any question you know the answer to is simple while the opposite is also true. Keep up the great content.
Yes, if I haven't actually zapped my modules now I'll give it a whirl with a level shifter (which I always use in my projects, ironically).
Welcome BACK(!) Mr. Bacon :)
Thank YOU, Christian! Ha, ha, one day I will change my vocal inflexion in my greeting and that will confuse everyone!
Happy New year to you too and your Familly. May it be a nice one !
Merci Beaucoup!
I found that the HC-05 boards were all basically the same, but their internal code was often crippled. Some boards offer only basic commands, while others allow the full command set.
I hadn't heard that but I tend to use the HC-06 as that can act as master OR slave (initiator/responder) whereas the HC-05 can only respond but not initiate comms.
@@RalphBacon I had a project where I used one HC-05 as master, the other HC-05 as slave.
These are great. I direct connect my receiver to my PC n wrote a C# app to read from the serial n log to the DB then present everything in a web page. Great stuff, thx 👍
That's a great idea!
To change baud rate, type AT+BAUDX, where X=1 to 9.
1 set to 1200bps
2 set to 2400bps
3 set to 4800bps
4 set to 9600bps (Default)
5 set to 19200bps
6 set to 38400bps
7 set to 57600bps
8 set to 115200bps
I tried this too but no response. I think it _must_ be the way the AT command is being terminated.
sounds like you've been having fun lol. i just use esp-now now it just works. good video and good to see you and a happy new year to you to fella :)
Thanks, you too! Yes, I use ESP-NOW all the time for my sensors (one in the workshop, two in the attic all sending stuff to my main workshop Heater Controller).
But in this case I wanted a non-Wi-Fi type transmission, and that's what I sort of got. It means that a humble Arduino UNO can only use it.
@@RalphBacon fair enough. i tryed a few of them wifi boards and gave up lol.. i dont know maybe they where a copy or something like that lol.
Just picked up a few LC12s modules that are very similar to the jyd-40, thay have the same ic = bk2461. I did find the datasheet on that chip, a very detailed sheet at that. Got them to learn how they work to fix a hot tub wireless controller/ pump link that uses them to communicate.
Datasheets can make all the difference, so it's good you have them. Good luck with your hot tub repair.
Good show! I'm glad you mentioned using software serial. I have been using HC-12 with good results for a few years. I know that timing the command execution is really important. I spent several days experimenting and researching how to put the HC-12 to sleep. I had to add delays after commands to slow the arduino down enough to let the HC-12 keep up. I found the info in a User Manual for the HC-12 translated from Chinese. I will try to zip a copy to your email. I browsed your git and didn't see it listed. It has a lot of good tech info in it. I learned here about the other modules. I have never seen them before. I'll be checking them out. Cheers!
I got the manual, David, thanks for that, it's now in my GitHub for everyone to benefit from 👍
My goto modules are the Ebyte E32, they allow for higher speeds, have longer range and are transparent once you have them configured as you want (a single time setup)
I always considered the E32 range of modules are much longer range devices (basically LoRa) rather than something for my 3m transmission range requirement here in the workshop!
I think that my understanding still holds true, although I'm sure they would work just the same in my workshop.
During my search as a result of your comment, I did find a nice web site (blog) with libraries and other stuff for others to peruse: www.mischianti.org/category/my-libraries/lora-e32-devices/
This is something I have bookmarked to investigate more. 👍
@@RalphBacon you can reduce the power output of the modules to reduce the range and interference to other devices, and if you don’t need much data transfer (just a few bytes) you can also reduce the data rate to reduce the RF bandwidth too.
Hi Ralph. The standard blue HC12 transceivers have been my go-to serial wireless modules for years. I've always been able to use AT commands on them. No problem. Not familiar with those green ones with the backplane antenna and the non-standard pin spacing. Blech! For the ranges you're talking about, the standard blue HC12 modules are probably just fine. Alternatively, if you're having ESP32s talking to each other, could you set up an ESP32 'Command Server Station' as an access point and then just have your 'sender' ESP32s just do a POST request to the server station with their respective debug messages. If you set up your command server as an access point, you don't have to have it on your home wifi network. If it doesn't matter, just set it up on your wifi network and either way, you have server that receives/logs debug messages and you could have it do IFTTT email sends to your phone when messages come in from your various devices as they generate debug messages.
Have fun! Gord.
Yes, the HC-12 modules seemed to behave as I expected. Not so the others! But I still might implement one just for the wireless transmission.
thanks.. i was able to get the soft serial to work because you explained the changing baud rate..
Glad it helped, Steve!
Happy New year, Ralph. I have yet to play with the AT commands, but it is on the list to explore in one of my future projects. Cheers.
Happy new year!
Hmm, good luck with "playing" with AT commands. However, as I showed the HC-12 modules could be a good place to start.
If you want Bluetooth (BT) then the HC-05 (master or slave) and HC-06 (slave only) are very good too, I'm using one daily in my Smart Phone Charger project.
Happy newyear to you too, Ralph
Many thanks!
You mention that the 3.3V is fine because the Arduino has 3.3V power but I didn't see or hear anything about 5V to 3.3V logic level shifting. The HC-12 seems to be 5V tolerant, but are the others?
I wondered this too, but of the (few) circuits I could find online they all connected the data lines directly to GPIO pins. Of course, they could all be 3v3 GPIO pins 🤔 Hmm, I suppose it's something else I could try (although I'm pretty fed up with the whole things now (except for the HC-12, which not only worked but is 5v tolerant too!).
Just put a 2k2 down to a 1 k, restistor, in serial output from the Arduino, and then you are good. The input (Aduno) can understand the 0-3,3 volt signals, no trouble.
@Asger Vestbjerg Yes, I concur, that would be the simplest solution if we are sure we need it. After all, the TX pin of the 3v3 μC is the output pin going into a very weak 5v RX input pin. Is that enough to cause problems, I wonder?
But resistor divider (or level shifter) is the safest solution, most definitely.
@@RalphBacon if you aren’t sure if the pins are 5 V tolerant, it is best to assume that they aren’t.
Ralph, great video as always. Really enjoy the deep-dives and showing us your evolution through a problem.
I may have missed it but could it be start/stop/parity settings, since you tried different baud-rates?
Anyway, I working on sending data to a remote display using those cheap 433Mhz Xmtr/Rcvr modules that just send CW do to cost.
I may have to get some of the ones here that you've mentioned just to goof with!
I was hoping the settings were going to work "out of the box", as it were, 9600-8-n, just as the Arduino has as default.
Happy New year Ralph and Family !
Happy new year!
Speed contra distance, that is the problem.
I would start with the software serial.
Thanks for sharing your experience with All of us 👍😃
I'll give it all another go when I have a moment.
Hello Ralph,
Happy New Year to you.
I had a similar problem in the past with a GSM module.
Here was the solution: The baudrate for the AT commands was not 9600Baud, but 4800Baud.
So my tip is: Try the AT commands with different baudrates. I think/hope that this works.
Unfortunately I don't have such a module, I use the NRF24L01 modules for such "simple" WiFi connections.
I hope this helps you
Greetings and happy coding
Frank
Similar issue and the AT command had to be CAPITAL and all past it could be either upper or lower, and unlike the " examples " for the NRF module did not actually always respond with the plus sign between the two modules. One did not use it for just responding, the other needed it for all commands.
The NRF24L01 is not a wifi module, it uses 2.4 GHz but has nothing to do with wifi.
Thanks for the tips!
@@conorstewart2214 You are right. Strictly speaking, WiFi is a standard. But in Germany, we use the term "WiFi" colloquially as a wireless network. 🙂
@@DuckDonald1969 so do you call Lora and 433 MHz, wifi as well?
I would like to hear more about using the data pins. Can a transmitter set a data pin on a receiver and then go to sleep or loose power. The receiver would have to always be on of course.
From what I read in the documentation, that is exactly how it can work.
You might have destroyed the 3.3V boards by connecting them to the Uno, which has 5V logic levels. If in doubt, if a device can handle 5V logic levels, use a voltage divider on all of its inputs (1k:2k Ohm works fine).
Other reasons for not reacting to AT commands:
RX/TX are swapped (misprint on board or user error), obviously if the default transmission works, that's not it.
The AT mode baudrate is not as specified; pretty much all "standard" rates from 9600 up to 115200 should be tried. Also, for some modules the AT mode baudrate changes with the transmission baudrate, for some it doesn't.
The line ending is wrong (newline, carriage return, both or none). Some modules fail to parse input, if any line ending is sent. They instead work by "timing out". The command and only that (no newline) has to be sent within let's say half a second of the first character.
For debugging something like this you really should use a better terminal program with more options. I use hterm (free, available for Windows and Linux).
Yes, this did occur to me but given that the TX is an output GPIO, going into an input RX on the wireless module I thought it might be OK. Maybe I was wrong! I'll check out the HTerm program.
For serial wireless communication why not just use nrf24 modules? There are lots of arduino libraries, they are cheap, same range as blue tooth, and baud rate can be set in cpp. They use 3.3V but are 5V tolerant if used on SPI bus. The nrflite library claims they can be used on I2C but I have not tried that.
It's an option although I don't think there is much advantage over an HC-12 device, is there? Apart from the pairing (which could be good or bad depending on how you look at it).
"This is madness"... Welcome my friend.
Cable madness is my nemesis, whether in a box, neatly coiled (until the next day) or strewn on my workshop floor!
IDE 2.03 is great!
Yes, it's a good step forward.
for HC-05 baud rate setup command: AT+UART=,,
Param1 Param2 Param3
4800 Stop Bit Parity
9600 0 : 1 bit 0 : none
19200 1 : 2 bit 1 : odd
38400 2 : even
57600
115200
Default: 9600, 0, 0
from document: HC-03/05 Embedded Bluetooth Serial Communication Module
AT command set
Nice.
Thanks for that info! 👍
Happy new year
And to you too, Hans!
Hi Ralph. I was just wondering if you have tried swapping the Rx and Tx around with those problematic modules. Sometimes they do make these kinds of mistakes in PCB designs.
why would 9600 work initially?
I tried swapping the TX/RX too (just in case) but no joy. I do always swap them from the device to the FTDI device TX->RX and vice versa. But nothing worked here.
@kingofcastlechaos
Baud 9600 (which is what it is set at from the factory) works fine in default transmission mode. But no luck with the AT commands.
It sounds like you'll be monitoring more than one project at a time. Do you plan on making a polling routine, to prevent data collisions? Well done by the way!
I'm not sure about monitoring multiple projects, actually. Not even a single project continuously.
I was thinking more about plugging in the serial device when things go wrong to see what happened.
What do mean, stable door open, horse gone? Oh, I see. 🤦♂️
What about getting the RSGB Radio Communication Handbook FIFTH edition which gives details about RTTY operation and gives schematic for a RTTY tone decoder for 1275/1445Hz, and building a small transceiver module for the frequency you want.
Interesting alternative solution you have there, David, thanks for sharing 👍
Hi Ralph, I have found your tutorials really helpful and have been working on a hot tub controller ever since I watched your blue tooth connection upload. Would you please recommend a FET TTL device that will handle a 2A load @ 12v. Regards Martin.
Greetings Martin, I'm just a rando that pops in when I can. You also need to specify if you want to control from the source or ground side of the switched circuit. This determines P or N channel. N channel is more common and less expensive, switching from the ground side. The trigger voltage is commonly less than the source voltage, so what voltage from your controller will you be needing to trigger the FET. There are a number of suppliers that have options to specify your parameters, and help you find what you want. I generally use Digi-key and often order from them. Once you have the part number, you can usually source it from several places, but with Digi-key, you know you're getting a genuine article. With 2 amps, that might be important. Of course, you could go with a higher current rating, and reduce heat considerations. I doubt it would be a major increase to the cost. Also, check through Mr. Bacon's catalog of videos, and you'll probably find one explaining Fets. He's good at that. 😄
@@gfodale Thank you for your reply. I will check out Digi-Key. Best regards, Martin.
Yes, Mr. gfodale is correct.
Normally, we would probably specify an N-channel MOSFET to control a device, so that the MOSFET has one leg (the source) connected to GND, and the other leg (drain) connected to the device you are trying to control. The other side of the device goes to the power supply (which might not be the same one powering the rest of the circuit, especially as you mention 12v). The TTL gate of the MOSFET will fully switch on the MOSFET at 5v (possibly even lower) so an Arduino UNO/Nano (but not necessarily a 3v3 device like an ESP32) will be fine.
Sometimes, though, we control the power via a P-Channel MOSFET and I've shown this in other videos which you can find in the pdf that is linked to in every video description.
@@RalphBacon Hi Ralph, Thank you for your reply. I ended up using a 2N2222 PNP device as it was easily capable of driving a relay though an opto couple and is in a package that fitts my prototype board. This is all part of my output device from a Nano to control a hot tub via a Bluetooth connection to my phone with an app I have written.(no electrical switches near the water here only a mobile phone to ruin.) I have been working on and off with this project for about a year now and will get the final circuit board made by PCB Way as I am using there easy EDA as you have recommended (many times). P.S. Your TH-cam tutorials are fantastic and have inspired me to become an Arduin'ite. Many thanks, Martin.
Great to hear, Martin.
If you are telling the board to change the baud rare, I believe you also need to change the baud rate of the serial device on the Arduino so that the speeds match.
Did you get a failing status, garbage, or no response from the board?
I got nothing, nada, zilch. If I had got some corrupted characters I'd have tried what you said. Having thought about, I'm pretty sure I did try that, just in case, but still nothing. 😢
I've also been thinking about remote monitoring of serial comms on installed devices but my approach was going to be a little different. All my installed microcontroller devices are within WiFi range (even if they don't/can't use it themselves). I plan to avoid using HC12 and other potentially dodgy modules by using an ESP32 as the plugin transmitter(s) and have them send their captured serial streams over Wifi onto my local network and thence to a single receiving address/port that could be a Windows app or another ESP32 and which could potentially interleave comms from more than one monitored device. I envisage using a DIP switch on the transmitter(s) to set the expected baud rate to match the serial TX of the monitored device although it might be possible to detect the baud rate automatically in future by measuring bit lengths. I'd be interested to know what you think.
Another benefit of this approach is the possibility of getting the transmitter ESP32 to control the reset pin on the target device
If you use an ESP32 as the transmitter (instead of those dodgy HC-12s 😁) then you could use simple-but-excellent ESP-NOW to send the data to a receiving ESP32 and it would be "secure" in the sense that only the receiving device's MAC address would get it/process it. But you'd still need to be wary of data collisions from multiple transmitters.
@@RalphBacon Worth some experiments for sure but I suspect ESP-now won't reach the devices at the bottom of the garden (where I have a wifi access point). Maybe I'll design in both options.
Thanks Ralph, all good stuff. Tell me tho', why didn't you just use an ESP and ESP Now. There's very little difference in costs these days, and you get so much more flexibility. Genuine question and happy new year!
Another viewer asked me this and I certainly use ESP-NOW for my sensors but this time I wanted a different way of continuously transmitting a data stream (a wireless USB cable, as I mentioned). And it means that the Arduino can also be used this way (ie no Wi-Fi or ESP-NOW available).
@@RalphBacon there is also the option of setting up Bluetooth serial on the esp32
Alot of the keyestudio boards have like 3 hardware serials built in. Along with 3amps output haha
The UARTS have to connect somewhere though, Joey, and the Arduino only has one on-board UART. The Mega2560 has three which would work just fine.
@Ralph S Bacon I think the keyestudio use a second ic aside from the main one near the usb port. I get what you mean. It's 2 different things
You are reinventing Jeelabs ESP-Link firmware, but that's alright (:
Happy New Year!
Well, not really. What about Arduinos? I can't use ESP technology on those whereas using, say, and HC-12 works just fine on _any_ microcontroller!
Looking at the GitHub it looks quite complicated too - is it suitable for beginners, I wonder?
@@RalphBacon It runs on any ESP32, or cheap ESP8266, and works with Arduinos very well. Additional slight complexity is worth it, because you can not only communicate via it, but flash and debug as well. There is even a fork that I tested and used with SMT32duino.
Right after firmware flash everything else including configuration is done in Web GUI starting from WiFi AP mode on that ESP.
@@Mr.Leeroy Sorry, if you already use ESP8266 etc. with it Wi-Fi and IO, why bother using another MCU?
Do not confuse it with a MCU that you base your project around. ESP-Link is a intermediate device that provides transparent (meaning you do not have to setup your project MCU in any special way as e.g. in case of OTA) WiFi bridge for any communication to your project as if it was connected with a wire. It simplifies development and could be used as a means of end design communication as well. It is not necessary a part of project, you may use it as a wireless dongle for all your projects.
@@Mr.Leeroy interesting I never thought about it that way, I had chunks of Attiny85 lying around because I'm too lazy to set up breadboard FTDI wire it to my PC testing it.
I wish @Ralph s Bacon, do a video about this idea.
Hi Ralph hope you're good, can you make one video on control relay using webserver with sql database?
A SQL database? On an Arduino? Sounds unlikely! You could probably find something for an ESP32 (with lots of SRAM/PSRAM). But controlling a relay from an ESP32 is pretty straightforward and has been shown by me and many others.
I bought some HC-06 bluetooth modules for pretty much this purpose, for monitoring serial output from my microcontroller projects, planning to just connect my laptop to the bluetooth serial device which according to the lnternet was easy on Linux (which is what I use on my laptop). However it didn't instantly work so I thought "I'll fiddle with this later". That was back in march 2022 so perhaps its time to give it another go!
i will agree, however, that the documentation on these transmitter modules is very patchy, not helped by the fact that you will get a huge variety of different firmware versions, sometimes which have vastly different functionality, and you can't always work out which version you're going to get, which version the documentation you find is for, or if the firmware can be reflashed.
I found the HC-06 modules very easy to deal with. Simple serial commands to send data from the source device. On a Linux machine I have been using pyserial, there is some setup required to get the Bluetooth Adapter to connect as a serial device (rfcomm) but once set up it is easy to ready the serial data. The HC-06 seems to be better documented than most and being straightforward serial makes them easy to work with.
@@paulweston1106 Yes, that the impression I got.
I've done the same using both HC-05 and HC-06 modules. There is a great Android app called Bluetooth Graphics that can receive the serial data. It's mostly for displaying numerical data on graphs if you have that kind of project but will displays and send anything and do data logging. Similar software available for PCs as well.
Wireless serial monitoring has played a big part in the development of a few of my projects.
@@Ed.R The 'Serial Bluetooth Terminal' app on Android allows you to send data to and receive data from the HC05/06 modules. It works for regular Bluetooth and BLE.
@@paulweston1106 Got it installed but I like graphs so don't use it as Bluetooth Graphics does everything it does. Also have the USB version which is rather useful, saves getting the laptop.
Just because the board has a 3.3 V output doesn’t mean you can use it directly with 3.3 V devices. You are powering the module from 3.3 V but the UART signals and the rest of the GPIO are still 5 V, most electronics can’t take a higher voltage that its supply voltage on its inputs, so you may have damaged the board by using the 5 V uart or 5 V GPIO on the arduino. You either need to find a module that works with 5 V or has 5 V tolerant pins, use a level shifter or a 3.3 V microcontroller.
You can make a very basic unidirectional level shifter using a voltage divider, you need to take the 5 V from the arduino down to 3.3 V, but for the receiving connection from the module to the arduino you can just connect the module directly as 3.3 V still registers as high on most microcontrollers. The proper way is to use level shifters though.
I have others (spares) so I will try again using a level shifter (or the resistor divider). 👍
@@RalphBacondid 5V damage these modules? Or was your issues incorrect commands?
Check the chipset data sheets. Is the "serial interface" RS232 compatible? Using logic or -3V, +3V levels? Does the AT mode require a specific baud rate? 300 or 1200 baud was once a common setup protocol. Check the start/stop/parity bits. TX for the chip is RX for the Arduino and vice-versa.
The boards are 3v3 but I took a risk that 5v (on the TX pin) would not be a problem but maybe it is. I'll recheck all this next time I get them out.
Hey Ralph, it's been a while, still watching from afar :) I've thought quite a bit about various ways to do wireless communication over the years, from simple stuff like you're trying for the "why isn't it working" debug stuff, to how to keep two devices in sync. I was going to go with the nRF24L01 modules with the mesh library, although it does eat progmem, it's very good, you have a master node, and then every other node automatically configures it's connection through other active subnodes. 5 can connect to one, if one already has 5, it connects to another down the chain... but I then was thinking if I go to ESP, I get wifi basically for free (both component count and progmem) for short range communication (and a benefit is that progmem isn't as... restrictive in ESP world)... so have basically been thinking of using ESP kind of how it started, as the communication method for between arduino devices. If I need a quote "real" Atmega chip to do some specific work, it can just be sent commands over the wifi and maybe do some I2C trickery....
So a possible idea to consider for debugging, if you use an ESP of your choice with appropriate level shifter, could that not be used to push out serial debug information over it's wifi connection (either some complex web page with AJAX or just some simple TCP API library or MQTT), then all you have to do is plug the "debugger" into any device you want to debug, then connect to it with your phone or computer directly, or have the debugger connect to your wifi (depending on where it is), since you were saying most devices are mostly within wifi distance anyway... (or you could go to the ESP LORA type world?) Just some ideas :)
I have a question too, if you found that the HC-12 works the best, and responds to AT commands, and they're relatively cheap, my question is why are you keeping using the "inferior" ones? Or is it just a case of "I will prove this works if it kills me!"? :) x
Wow! Lots of ideas there, Jess! Last question first: the HC-12 indeed works best but I only found out the others (in the test batch of hardware) were troublesome when I tried them out. I'm not progressing the others unless/until they resurface and I will try few things out that others have suggested.
Using a ESP32 is indeed a possibility although it does rely on the Wi-Fi being present. Or it could be an AP that another (listening) device could connect to and read the data. The sending ESP32 device could simply continuously read the RX pin and put it all in a big (huge) circular buffer to be read by the other device, as part of a web page. It's something bubbling along at the back of my mind to test out.
Being able to just connect to a device and scan a web page is very attractive assuming the ESP32 hasn't "hung", of course!
OK, back to the design of other projects, keep at it!
@@RalphBacon You'll just have to make sure your code is up to snuff :p ... although, if it's a debug device, it's more general purpose and would be a "plug it in to figure out something wrong with another device" so less likely to hang over time?
"Oh, my beehive counter keeps crashing, I wonder why... DEPLOY THE RalphInatorDebugger3000ESP and watch it for a while"? :D
Unless it's a feature you want to permanently add to your projects and I misread your intentions (quite possible! I am a natural blonde. ^^,)
Hi Ralph,
You say these modules are not Bluetooth: do they require any kind of pairing? Perhaps I missed something...
Also, the 2mm pin-spacing; PCBWay will sort that problem when it comes to your final project! 😁
The only require "pairing", I believe, in the sense that each module (in a pair or mesh) must have the correct (same) device ID (they all have the same out of the factory) and channel number (ditto). They can be changed to create a unique pair of modules. I didn't get that far as I couldn't get it to talk to me!
@@RalphBacon thanks. I'm considering using them in a simple project where waiting for units to pair at switch-on would not be convenient.
This is awesome! I'm struggling to understand AT commands.
Are AT commands firmware or hardwired in? I have a HC-05 where you can enable AT mode, but on my ESP-01 i have to upload AT command firmware if i want to talk to it in AT. But if i want to upload a code to the ESP then you can no longer use AT commands until you reprogram it again. Do arduinos respond to AT commands if you upload the correct code?
AT commands are usually wired in. Certainly HC-05 AT commands are, and I use one of those in my Smart Phone Charger project (still in daily use). You should not need to upload anything at all. But it is a _one time_ operation; that is, set the pairing, baud rate etc using a USB-to-Serial dongle and then just plug it into the Arduino and it will "just work". The programmed settings are "sticky" across power downs. That's my experience, anyway.
Hi. Have you tested the esp8266-01 witch come with AT from factory
I have indeed tested these and ended up chucking one of them to the other side of the workshop it was useless!
Luckily, current ones are much better. But these are _wireless_ devices and whilst I could debug over Wi-Fi that wasn't my intention here.
Have you tried AT+BAUD? - I thought AT commands that returned information (ie you are asking a question) ended with a question mark .
Ignore me. I made my comment before watching to the end of the video. Looks like there are other commands that output info that don't end in a question mark.
Consider yourself ignored, Tony. 😉 Yes, the AT commands work fine on the HC-12 but not on the other modules. It can only be a formatting issue (line endings etc).
I presume these transmit "in the clear" (no encryption)? Would it be possible, in that case, to have multiple units transmitting (at different times) and have one receiver capture them all?
You could, although you would have to ensure no collisions occurred.
@@RalphBacon Spending some time thinking about it, a combination of checksums and time division should do it. IIRC, that's how Ethernet and cellular protocols sort out collisions.
I dont know at what distance you hold the antenna of both transceivers. I had the same problem with C1101 modules. It appeared the distance must be at least 1m. Otherwise they could not communicatie.
I too have had problems in the past with the C1101 modules having issues when they were to close to one another.
This is very strange and I must admit mine were almost on top of one another. Back to the workbench I must go!
That shouldn’t affect the AT commands in any way, since they shouldn’t send any data out wirelessly.
@@conorstewart2214 For AT commands correct,. It only affects the communication between 2 modules.
All old hat things have moved on.......would really like a vid on Tasmota with esp 8266 or 32 get your head away from Arduino where nothing compiles. Can you get your head round tasmotizer? Love what you do long term fan
Well, it's new for me, so I will keep at it for a while longer. Only then will I actually give up! Tasmota I've played with a couple of years ago, but nothing since then. Added to the list!
Is this a "fun with radios" project -- or a remote serial port? 😄 If it is remote serial, just use a radio you know (wifi) plus a chip you know (8266), and a bit of software to receive, buffer, timestamp your serial output, and put it on a webpage to serve out to any wifi computer phone etc. I got a bit of code from mrdiyca and a d1-mini with hookup clips soldered to 5v/33v/gnd/rx/tx and just walk that over to any project with an tx and gnd, and your serial output is streaming to a webpage on your computer in seconds. You can get 5 or 3.3 power from your project, or bring a usb battery for the d1-mini. Plus a d1-mini or esp-01 cheaper than 2 radios and radio is only running then your looking at it. Although you miss out on the "fun with radios" aspect of the project. 😄
Indeed. I did consider web pages but it's all much more complex than a wireless USB cable, don't you think? But certainly an option that I've been toying with for years!
AT Command Mode of HC-05 and HC-06 Bluetooth Module , site: > instructables
Good pointer there Jack, thanks.
Hello Ralph, what is the serial monitor software in this video at 5:00, thank you
CoolTerm
Yes, Ron got it right. Available here: freeware.the-meiers.org/ it's totally free but I'm sure Roger will be happy for any donations if you use it a lot (like me).
Hi,
this is very interesting. I'd like to flash a JDY-41 module and if I connect it via Serial USM RS232 I get a response "wake". No AT command gives me a response from the module. VCC is a coin battery 3,2 V. Do you know what might be wrong with it? I'd like to transmit a countinous endless bitstream and AT+CSSa= should switch the module into transparent transmission mode but it seems to be that nothing is working.
Do you konw what might be wrong?
Kind regards
I suspect you are not putting the device into AT mode by holding down the button on the board BEFORE powering on. The flash rate of the LED is quicker when in AT mode (rather than just paired and working mode).
@@RalphBacon Hi Ralph, thank's alot for this hint. This might be the reason and I'll try it out as soon as I got time for it.
Kind regards Bruno
hello, is there any way to establish a serial port at esp8266 ans access it wireless from my desktop , to program, lets day other arduino modules ?
I wish! What you can do is load the OTA library and upload a specific device via its IP address. I've not done it with the ESP8266, only the ESP32, but the procedure is basically the same.
If you read this article you will find a link for how to do it with the ESP8266 too: randomnerdtutorials.com/esp32-ota-over-the-air-arduino/
@@RalphBacon nice, thanks
🙏🙏🙏🙏🥰
Great to see you here, Yogesh!
I don't like the language of this board. "Mode: F* You 3"?!
Yes, very rude😲 and I was quite careful in the way I pronounced that!
I wonder why the companies that develop the board do not put out any specifications for it. Does not make sense to me. Frustrating experience.
I imagine the boards are made to someone else's specification, for their particular project. What we get are over-runs / extras / rejects. Best bet is to find the spec sheet for the chip, rather than the board if you're hard up against it for a solution, then pin trace.
Yes, these boards were almost certainly made for some toy or other. Just a pity there is no (or very little) info out there for them.
ESP8266/32 set to ESPnow. Problem solved.
Except that my Arduino UNOs are not ESP32s, so a different problem!
looks like JDY-41 does not talk AT, it has its own commands, see www.postavrobota.cz/fotky46704/fotov/_ps_2370JDY-41-Manual.pdf
Hmm, that is very different to the JDY-40 (perhaps this _is_ the difference). I'll give it a whirl. 👍