#257

  Переглядів 13,766

Ralph S Bacon

Ralph S Bacon

Рік тому

Want to see the Arduino's Serial Monitor output remotely? Easy!
► PCBWay $5 for 10 pieces www.pcbway.com
Much more information in my GitHub for this video:
bit.ly/Wireless-Serial-Comms
I want to send everything my project Arduino (or ESP32 etc) sends out on the TX pin to another Arduino on my workbench so I can see what's going on - remotely!
Easy enough but there are some caveats if you want to take full advantage of these little Serial Wireless Transceivers. Luckily for us, there are only 5 wires needed: two for power, two for the data and one control wire (which you might not need).
In fact, in my project I'm using just three wires: VCC, GND and TX! So simple. You'll see this module in the opening shots of the video. And you can do this right out of the box if you are happy with the 9,600bps transmission rate.
Much more information in my GitHub for this video:
bit.ly/Wireless-Serial-Comms
M-BK2461 module
M-BK2461U serial wireless transceiver pdf manual
PLEASE NOTE: this module is 3v3 limited - don't apply 5v
bit.ly/3Gv6xgy
bit.ly/3Zi4RiS
Full manual pdf for the BK2461 chip used in this module
www.mikrocontroller.net/attac...
JDY-040/JDY-041 module
JDY-040 module Serial Wireless transceiver info
PLEASE NOTE: this module is 3v3 limited - don't apply 5v
sudonull.com/post/48570-Radio...
w.electrodragon.com/w/images/...
JDY-041 where to buy (almost identical to JDY-040)
bit.ly/3izz9Ns
www.aliexpress.com/i/10050015...
Someone who had more luck with me regarding AT commands on the JDY-040:
NB: This video is in Russian but you can switch on English (translated) subtitles - worth watching!
• Радиомодули на 2.4 Ггц...
HC-12 module
HC-12 433MHz Serial Transceiver information (with Arduino sketch examples)
bit.ly/3XiKMaj (wolles-elektronikkiste.de)
bit.ly/3QqpA05 (blackfalconelectronics.com/)
bit.ly/3ZBvU9c (howtomechanics.com)
bit.ly/3VUykwB (allaboutcircuits.com)
HC-12 (two units) that I bought from AliExpress
(PLEASE NOTE: this module has a wider voltage range of 3v3 to 5v5)
(New Model B is less than $2 each and comes with spiral antenna)
www.aliexpress.com/item/32832...
Much more information in my GitHub for this video:
bit.ly/Wireless-Serial-Comms
► List of all my videos
(Special thanks to Michael Kurt Vogel for compiling this)
bit.ly/UKpostsVideoList-RalphB...
► If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite (and other μControllers) journey
My channel, GitHub and blog are here:
\------------------------------------------------------------------
• / ralphbacon
• ralphbacon.blog
• github.com/RalphBacon
• buymeacoffee.com/ralphbacon
\------------------------------------------------------------------
My ABOUT page with email address: / ralphbacon

КОМЕНТАРІ: 181
@BerndFelsche
@BerndFelsche Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
I'll give it a go, Bernd!
@allangoodger969
@allangoodger969 Рік тому
Ah. The joys of modules without backup. Well presented video dispute your frustrations. I feel your pain mate.
@RalphBacon
@RalphBacon Рік тому
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).
@OtusAsio
@OtusAsio Рік тому
Happy New year to you too and your Familly. May it be a nice one !
@RalphBacon
@RalphBacon Рік тому
Merci Beaucoup!
@livetohash6152
@livetohash6152 19 днів тому
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 👍
@RalphBacon
@RalphBacon 18 днів тому
That's a great idea!
@andymouse
@andymouse Рік тому
Happy New year Ralph and Family !
@RalphBacon
@RalphBacon Рік тому
Happy new year!
@Cptnbond
@Cptnbond Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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.
@Ed19601
@Ed19601 Рік тому
Happy newyear to you too, Ralph
@RalphBacon
@RalphBacon Рік тому
Many thanks!
@Chriva
@Chriva Рік тому
Welcome BACK(!) Mr. Bacon :)
@RalphBacon
@RalphBacon Рік тому
Thank YOU, Christian! Ha, ha, one day I will change my vocal inflexion in my greeting and that will confuse everyone!
@MikesAllotment
@MikesAllotment Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
So, more power AND use a level shifter if needed (not already running on 3v3). Back to the workbench I go!
@steveyoutube1709
@steveyoutube1709 Рік тому
thanks.. i was able to get the soft serial to work because you explained the changing baud rate..
@RalphBacon
@RalphBacon Рік тому
Glad it helped, Steve!
@gazzacroy
@gazzacroy Рік тому
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 :)
@RalphBacon
@RalphBacon Рік тому
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.
@gazzacroy
@gazzacroy Рік тому
@@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.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Рік тому
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.
@andymouse
@andymouse Рік тому
Squeaktastic !
@RalphBacon
@RalphBacon Рік тому
I'll have to check out that YAT program and see how it helps me. 👍
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Рік тому
@@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
@hansdegroot652
@hansdegroot652 Рік тому
Happy new year
@RalphBacon
@RalphBacon Рік тому
And to you too, Hans!
@davidh8285
@davidh8285 Рік тому
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!
@RalphBacon
@RalphBacon Рік тому
I got the manual, David, thanks for that, it's now in my GitHub for everyone to benefit from 👍
@victoriavickers33
@victoriavickers33 Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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).
@SpinStar1956
@SpinStar1956 Рік тому
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!
@RalphBacon
@RalphBacon Рік тому
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.
@jmcbike
@jmcbike Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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.
@jmcbike
@jmcbike Рік тому
@@RalphBacon I had a project where I used one HC-05 as master, the other HC-05 as slave.
@kychemclass5850
@kychemclass5850 Рік тому
"This is madness"... Welcome my friend.
@RalphBacon
@RalphBacon Рік тому
Cable madness is my nemesis, whether in a box, neatly coiled (until the next day) or strewn on my workshop floor!
@avejst
@avejst Рік тому
Speed contra distance, that is the problem. I would start with the software serial. Thanks for sharing your experience with All of us 👍😃
@RalphBacon
@RalphBacon Рік тому
I'll give it all another go when I have a moment.
@techdoc.repair
@techdoc.repair 6 місяців тому
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.
@RalphBacon
@RalphBacon 6 місяців тому
Datasheets can make all the difference, so it's good you have them. Good luck with your hot tub repair.
@TheDefpom
@TheDefpom Рік тому
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)
@RalphBacon
@RalphBacon Рік тому
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. 👍
@TheDefpom
@TheDefpom Рік тому
@@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.
@FergusonRW55
@FergusonRW55 Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
From what I read in the documentation, that is exactly how it can work.
@tubeDude48
@tubeDude48 Рік тому
IDE 2.03 is great!
@RalphBacon
@RalphBacon Рік тому
Yes, it's a good step forward.
@gordonpayne9735
@gordonpayne9735 Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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.
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
Interesting alternative solution you have there, David, thanks for sharing 👍
@notsurt
@notsurt Рік тому
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?
@RalphBacon
@RalphBacon Рік тому
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!).
@avejst
@avejst Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
@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.
@conorstewart2214
@conorstewart2214 Рік тому
@@RalphBacon if you aren’t sure if the pins are 5 V tolerant, it is best to assume that they aren’t.
@JBERGALIEN
@JBERGALIEN Рік тому
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
@RalphBacon
@RalphBacon Рік тому
I tried this too but no response. I think it _must_ be the way the AT command is being terminated.
@martin87865
@martin87865 Рік тому
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.
@gfodale
@gfodale Рік тому
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. 😄
@martin87865
@martin87865 Рік тому
@@gfodale Thank you for your reply. I will check out Digi-Key. Best regards, Martin.
@RalphBacon
@RalphBacon Рік тому
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.
@martin87865
@martin87865 Рік тому
@@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 UKposts tutorials are fantastic and have inspired me to become an Arduin'ite. Many thanks, Martin.
@RalphBacon
@RalphBacon Рік тому
Great to hear, Martin.
@byronwatkins2565
@byronwatkins2565 Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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.
@Mr.Leeroy
@Mr.Leeroy Рік тому
You are reinventing Jeelabs ESP-Link firmware, but that's alright (: Happy New Year!
@RalphBacon
@RalphBacon Рік тому
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?
@Mr.Leeroy
@Mr.Leeroy Рік тому
@@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.
@user-ir2fu4cx6p
@user-ir2fu4cx6p Рік тому
@@Mr.Leeroy Sorry, if you already use ESP8266 etc. with it Wi-Fi and IO, why bother using another MCU?
@Mr.Leeroy
@Mr.Leeroy Рік тому
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.
@user-ir2fu4cx6p
@user-ir2fu4cx6p Рік тому
@@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.
@alistairmurray626
@alistairmurray626 Рік тому
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?
@RalphBacon
@RalphBacon Рік тому
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.
@MultiRdh
@MultiRdh 3 місяці тому
Hi Ralph hope you're good, can you make one video on control relay using webserver with sql database?
@RalphBacon
@RalphBacon 3 місяці тому
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.
@hariseldon2577
@hariseldon2577 Рік тому
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!
@RalphBacon
@RalphBacon Рік тому
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).
@conorstewart2214
@conorstewart2214 Рік тому
@@RalphBacon there is also the option of setting up Bluetooth serial on the esp32
@yorrrrick
@yorrrrick Рік тому
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.
@yorrrrick
@yorrrrick Рік тому
Another benefit of this approach is the possibility of getting the transmitter ESP32 to control the reset pin on the target device
@RalphBacon
@RalphBacon Рік тому
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.
@yorrrrick
@yorrrrick Рік тому
@@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.
@superdau
@superdau Рік тому
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).
@RalphBacon
@RalphBacon Рік тому
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.
@gfodale
@gfodale Рік тому
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!
@RalphBacon
@RalphBacon Рік тому
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. 🤦‍♂️
@jehangirkhan8279
@jehangirkhan8279 Рік тому
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.
@kingofcastlechaos
@kingofcastlechaos Рік тому
why would 9600 work initially?
@RalphBacon
@RalphBacon Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
@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.
@DuckDonald1969
@DuckDonald1969 Рік тому
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
@ericblenner-hassett3945
@ericblenner-hassett3945 Рік тому
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.
@conorstewart2214
@conorstewart2214 Рік тому
The NRF24L01 is not a wifi module, it uses 2.4 GHz but has nothing to do with wifi.
@RalphBacon
@RalphBacon Рік тому
Thanks for the tips!
@DuckDonald1969
@DuckDonald1969 Рік тому
@@conorstewart2214 You are right. Strictly speaking, WiFi is a standard. But in Germany, we use the term "WiFi" colloquially as a wireless network. 🙂
@conorstewart2214
@conorstewart2214 Рік тому
@@DuckDonald1969 so do you call Lora and 433 MHz, wifi as well?
@paulparker2639
@paulparker2639 Рік тому
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?
@RalphBacon
@RalphBacon Рік тому
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. 😢
@ppanzer7243
@ppanzer7243 10 місяців тому
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
@RalphBacon
@RalphBacon 10 місяців тому
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).
@ppanzer7243
@ppanzer7243 10 місяців тому
@@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
@mainer8912
@mainer8912 Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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).
@msevland
@msevland Рік тому
Hi. Have you tested the esp8266-01 witch come with AT from factory
@RalphBacon
@RalphBacon Рік тому
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.
@McTroyd
@McTroyd Рік тому
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
@RalphBacon Рік тому
You could, although you would have to ensure no collisions occurred.
@McTroyd
@McTroyd Рік тому
@@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.
@jcxtra
@jcxtra Рік тому
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
@RalphBacon
@RalphBacon Рік тому
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!
@jcxtra
@jcxtra Рік тому
@@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. ^^,)
@Poult100
@Poult100 Рік тому
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! 😁
@RalphBacon
@RalphBacon Рік тому
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!
@Poult100
@Poult100 Рік тому
@@RalphBacon thanks. I'm considering using them in a simple project where waiting for units to pair at switch-on would not be convenient.
@jstro-hobbytech
@jstro-hobbytech Рік тому
Alot of the keyestudio boards have like 3 hardware serials built in. Along with 3amps output haha
@RalphBacon
@RalphBacon Рік тому
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.
@jstro-hobbytech
@jstro-hobbytech Рік тому
@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
@fillempie1501
@fillempie1501 Рік тому
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.
@arongooch
@arongooch Рік тому
I too have had problems in the past with the C1101 modules having issues when they were to close to one another.
@RalphBacon
@RalphBacon Рік тому
This is very strange and I must admit mine were almost on top of one another. Back to the workbench I must go!
@conorstewart2214
@conorstewart2214 Рік тому
That shouldn’t affect the AT commands in any way, since they shouldn’t send any data out wirelessly.
@fillempie1501
@fillempie1501 Рік тому
@@conorstewart2214 For AT commands correct,. It only affects the communication between 2 modules.
@IanSlothieRolfe
@IanSlothieRolfe Рік тому
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.
@paulweston1106
@paulweston1106 Рік тому
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.
@IanSlothieRolfe
@IanSlothieRolfe Рік тому
@@paulweston1106 Yes, that the impression I got.
@Ed.R
@Ed.R Рік тому
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.
@paulweston1106
@paulweston1106 Рік тому
@@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.
@Ed.R
@Ed.R Рік тому
@@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.
@tonylock7657
@tonylock7657 Рік тому
Have you tried AT+BAUD? - I thought AT commands that returned information (ie you are asking a question) ended with a question mark .
@tonylock7657
@tonylock7657 Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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).
@iceberg789
@iceberg789 Місяць тому
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 ?
@RalphBacon
@RalphBacon 27 днів тому
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/
@iceberg789
@iceberg789 27 днів тому
@@RalphBacon nice, thanks
@JBERGALIEN
@JBERGALIEN Рік тому
Hello Ralph, what is the serial monitor software in this video at 5:00, thank you
@RonDogInTheHouse
@RonDogInTheHouse Рік тому
CoolTerm
@RalphBacon
@RalphBacon Рік тому
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).
@JBERGALIEN
@JBERGALIEN Рік тому
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
@andymouse
@andymouse Рік тому
Nice.
@RalphBacon
@RalphBacon Рік тому
Thanks for that info! 👍
@JBERGALIEN
@JBERGALIEN Рік тому
AT Command Mode of HC-05 and HC-06 Bluetooth Module , site: > instructables
@RalphBacon
@RalphBacon Рік тому
Good pointer there Jack, thanks.
@conorstewart2214
@conorstewart2214 Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
I have others (spares) so I will try again using a level shifter (or the resistor divider). 👍
@r.in.shibuya
@r.in.shibuya 2 місяці тому
@@RalphBacondid 5V damage these modules? Or was your issues incorrect commands?
@yogeshitaliya473
@yogeshitaliya473 Рік тому
🙏🙏🙏🙏🥰
@RalphBacon
@RalphBacon Рік тому
Great to see you here, Yogesh!
@imstubby6844
@imstubby6844 Рік тому
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
@RalphBacon
@RalphBacon Рік тому
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!
@jameszahary
@jameszahary Рік тому
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. 😄
@RalphBacon
@RalphBacon Рік тому
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!
@noweare1
@noweare1 Рік тому
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.
@gfodale
@gfodale Рік тому
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.
@RalphBacon
@RalphBacon Рік тому
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.
@ismzaxxon
@ismzaxxon Рік тому
ESP8266/32 set to ESPnow. Problem solved.
@RalphBacon
@RalphBacon Рік тому
Except that my Arduino UNOs are not ESP32s, so a different problem!
@user-jp1qt8ut3s
@user-jp1qt8ut3s Рік тому
I don't like the language of this board. "Mode: F* You 3"?!
@RalphBacon
@RalphBacon Рік тому
Yes, very rude😲 and I was quite careful in the way I pronounced that!
@Dust599
@Dust599 Рік тому
looks like JDY-41 does not talk AT, it has its own commands, see www.postavrobota.cz/fotky46704/fotov/_ps_2370JDY-41-Manual.pdf
@RalphBacon
@RalphBacon Рік тому
Hmm, that is very different to the JDY-40 (perhaps this _is_ the difference). I'll give it a whirl. 👍
#226 ROTARY ENCODER with no switch bounce 🤓 - you MUST use this
25:49
Ralph S Bacon
Переглядів 27 тис.
格斗裁判暴力执法!#fighting #shorts
00:15
武林之巅
Переглядів 7 млн
ПЕЙ МОЛОКО КАК ФОКУСНИК
00:37
Masomka
Переглядів 2,4 млн
Новая технология! РАССЫПНОЙ ПОДШИПНИК
00:35
JDY-40 2.4GHz UART тестирование
28:24
RADIOSOFT
Переглядів 13 тис.
#BB9 Organising your code🧹for easier debugging and maintenance✅
18:45
Радио модули JDY-40. PCBWAY.COM
13:46
Home Made
Переглядів 15 тис.
#BB4 MOSFETs - From an Arduino Perspective
15:10
Ralph S Bacon
Переглядів 21 тис.
Радиомодули JDY-40 2.4G с UART интерфейсом.
6:30
FS1000A and XY-MK-5V 433MHz #Arduino radio modules range test
15:25
PS After Hours
Переглядів 55 тис.
#266 ESP32 Deep Sleep Project - Door Open/Closed Detection with ESP-NOW
25:18
#253 Accurate Task Scheduler for the Arduino (and STM32, ESP32...)
21:37
Ralph S Bacon
Переглядів 19 тис.
Лучший Смартфон До 149 Баксов!!!??? itel s24
20:25
РасПаковка ДваПаковка
Переглядів 54 тис.
APPLE УБИЛА ЕГО - iMac 27 5K
19:34
ЗЕ МАККЕРС
Переглядів 82 тис.
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Переглядів 5 млн