#196

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ค. 2020
  • As part of a bigger project I need one-way comms between two Arduinos, as if they were connected together via the RX and TX pins. If required, it also supports two-way, wireless comms.
    JLCPCB Only $2 for PCB Prototype and Assembly any colour jlcpcb.com/
    Here I show you the basics of doing that but more importantly I go through Martyn Currey's instructions on how to pair two Bluetooth devices (eg an HC05 and HC06 or just two HC05s) so that they will only connect to each other (automatically) upon power up.
    Note that you can't use two HC06s because an HC06 cannot act as an initiator, only a responder.
    A complete list of the commands you need for both Initiator and Responder are included in my GitHub to save you the bother of finding each command. You also can find the sketches and anything else that I found pertinent to this topic.
    github.com/RalphBacon/196-Blu...
    INFORMATION
    Martyn Currey's website
    www.martyncurrey.com/connectin...
    Guide to all AT commands
    www.itead.cc/wiki/Serial_Port...
    Full list of AT commands and ERROR CODES
    www.martyncurrey.com/arduino-w...
    HARDWARE COMPONENTS
    Single HC-05 Wireless Bluetooth Serial Transceiver Module (UK, USA and China warehouses)
    www.banggood.com/HC-05-Wirele...
    3Pcs HC-05 Wireless Bluetooth Serial Transceiver Module (China, USA and UK warehouses)
    www.banggood.com/3Pcs-HC-05-W...
    List of all my videos
    (Special thanks to Michael Kurt Vogel for compiling this)
    bit.ly/TH-camVideoList-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 journey
    My channel, GitHub and blog are here:
    ------------------------------------------------------------------
    / ralphbacon
    ralphbacon.blog
    github.com/RalphBacon
    ------------------------------------------------------------------
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 194

  • @johnstephenson2891
    @johnstephenson2891 3 ปีที่แล้ว +1

    So pleased to see your back to your love of the AT command set!! lol

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Ha ha! This was OK, though, John, it gelled better this time and Martyn Currey's website put me right when things went awry (as if).

  • @gpTeacher
    @gpTeacher 3 ปีที่แล้ว +1

    Great as always Ralph! I’m a huge fan of HC12. Much more straightforward, easier to setup, 100 independent channels and longer range. Nice to have options.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Cool, thanks!

    • @gpTeacher
      @gpTeacher 3 ปีที่แล้ว

      @@RalphBacon Hi Ralph. Could you briefly explain what the capacitor does in this situation? Does it allow extra charge to build up so that when the reset pin goes low(high)? it discharges and gives more charge that the reset pin sees as the indicator to start receiving the sketch? It would be interesting to know the actual purpose of the capacitor!
      Keep cool! GET and AC! Thanks, Gord

  • @TheUnofficialMaker
    @TheUnofficialMaker 3 ปีที่แล้ว

    now we are all sitting on the edge of our seats to discover your project for this!!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      You will no doubt be deflated when you realise the project is not that uncommon. But I wanted to build this for me so I obviously will share with everyone. It's fun and provides a basis for all sorts of upgrades too. Drat! Now I've probably intrigued you further when that was not my intention.

  • @wv838
    @wv838 3 ปีที่แล้ว +1

    Now I'm looking for an excuse to add Bluetooth to all my projects. Thanks Ralph!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +2

      Keep tuned for the final project, we will see how well (or not) it performs!

    • @kitecattestecke2303
      @kitecattestecke2303 3 ปีที่แล้ว +1

      @@RalphBacon subbed for it :-) 1+

  • @jjab99
    @jjab99 3 ปีที่แล้ว

    Keep up the great work Ralph.
    Stay safe and have fun,
    Joe

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Thanks, you too!

  • @PyroRob69
    @PyroRob69 3 ปีที่แล้ว

    Outstanding explanation and thought process.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Thank you for saying that, nice to hear from you.

  • @Cptnbond
    @Cptnbond 3 ปีที่แล้ว

    Thanks Ralph,
    this project demystify BT a lot, and thanks for github, references and all other helpful stuff to get going ;-)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Glad it was helpful!

  • @OsoPolarClone
    @OsoPolarClone 3 ปีที่แล้ว

    Great video. I found it very enlightening.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Glad to hear it!

  • @davidh8285
    @davidh8285 3 ปีที่แล้ว

    Good show! This module reminds me of the HC12 Wireless Serial Port Communication Module. I wound up using two of them to get more distance for a water softener salt tank monitor system. My "castle" was too big for the MX-05V transmitter/receiver pairs. After this video, I may have to revisit the old project. It might be nice to check the salt level with bluetooth on my phone. Hmmmm....

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Hmm. And I'm using an HC-12 (at least, I think I am, details in the video when I make it) for my project.

  • @UpcycleElectronics
    @UpcycleElectronics 3 ปีที่แล้ว

    Nice. I like that breadboard. I haven't seen that one before.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I love it. So much better than my other (Asian, cheap) ones. I got it from Cool Components in the UK, not cheap but then again quality never is. I now have three and they have reduced my stress factor when plugging components into the breadboard to near zero!
      coolcomponents.co.uk/products/ad-11-advanced-solderless-breadboard

    • @UpcycleElectronics
      @UpcycleElectronics 3 ปีที่แล้ว +1

      @@RalphBacon
      It's one of the best executed inclusions of terminal posts I've seen. The Asian ones have been okay for me. I've gotten some bad ones but mostly good. I wish they would offer a slightly better quality version and hard gold plate the terminal ends at a reasonable price. The biggest issue I've had is with rust on the terminals over time. I have had the same issue with my old velleman boards from RadioShack too, at least the ones I have taken apart.

  • @johnrees44..G4EIJ
    @johnrees44..G4EIJ 3 ปีที่แล้ว

    Another interesting video, Ralph.. Thank you.. John.. Bristol

  • @sortofsmarter
    @sortofsmarter 3 ปีที่แล้ว

    This is great, I want to use this to monitor my 3D printer that's in the back room. I can never think up ideas like this on my own but I can always take someone's idea and modify it all up until it does what I need..easy enough to get the serial print out to a lcd..

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Go for it! And you'll be an expert in AT commands when you're finished.

    • @TuttleScott
      @TuttleScott 3 ปีที่แล้ว +1

      I use an old raspi and octoprint to watch mine. you can even connect a web cam to it to stream video.

    • @sortofsmarter
      @sortofsmarter 3 ปีที่แล้ว

      @@TuttleScott I use octoprint already,even use spaghetti , but I want something portable and battery powered and just to watch temps without my chunky laptop..lol

    • @TuttleScott
      @TuttleScott 3 ปีที่แล้ว

      @@sortofsmarter hmmm, that's probably doable with a script on it somehow since raspis have bluetooth already. I'd check the octoprint addons. never know.

  • @randallyoung9411
    @randallyoung9411 3 ปีที่แล้ว

    Love to see how to video on your Eclipse IDE setup!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I'm waiting for the new Arduino IDE which should be in beta this year. I did a quick overview in one of my earlier videos th-cam.com/video/JJ94EWX3Td4/w-d-xo.html

  • @robertrobert5583
    @robertrobert5583 3 ปีที่แล้ว

    Thanks for another interesting and clear video. I now know why I couldn't get mine to work!
    Changing the subject, I wonder if you might do one of your videos about pointers / arrays for arduino?
    I hope you're well.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Glad you liked it Robert. Did you get your BT module working yet? On the subject of pointers (and arrays) I was thinking of doing something in my Bacon Bytes series - it's not for beginners but it would be a beginners intro to pointers. Coincidentally I've just written a tiny demo sketch for a future video that uses a single pointer... perhaps I'll see if that confuses viewers first!

    • @robertrobert5583
      @robertrobert5583 3 ปีที่แล้ว +1

      @@RalphBacon I will have to get them out and try. I have a feeling that I bought two 06s thinking that they would be better than 05s 🙄

  • @Poult100
    @Poult100 ปีที่แล้ว

    Hi Ralph, you say this is part of a bigger project and I'll be looking out for that. Presumably you will be reassigning the received data into variables so that you can work with it. I added more data to send via the Initiator and it was faithfully received by the Responder on a separate line on the serial monitor but I am struggling to assign those data into variables.
    I'm so glad you're well again. Health is incredibly precious!

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      You're not wrong about health, Simon!
      Regarding getting the values into variables, remember that you should be sending/receiving a struct (consisting of any number of different [types of] variables).
      Thus, each individual variable in the struct can be assigned to another (local) variable.
      struct {
      int temperature;
      uint8_t sensorId;
      } myData;
      Once myData has been received, you access the individual elements of the struct like this in your sketch:
      int currentTemperature = myData.temperature;
      Any clearer?

    • @Poult100
      @Poult100 ปีที่แล้ว

      @@RalphBacon Thanks a million, I think it is clearer! I will have to wait till tomorrow now when I'm awake properly. I'm an old dog trying to learn new tricks;. My brain is almost entirely analog!

    • @Poult100
      @Poult100 ปีที่แล้ว

      @@RalphBacon I had another look at this today. In #196 you didn't use 'struct' but I do remember it from somewhere... I tried to implement it but failed. I've hit a good logical (if analog) brain but I'm too inexperienced to yet recognise exactly where things should go. Do you have a tutorial you can point me to? Nevermind if not, I'll probably find something or work it out eventually, and I've taken enough of your time for which I'm very grateful, thank you!

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      I must have covered _struct_ in the ESP32 NOW video th-cam.com/video/lkHdk_mKGUw/w-d-xo.html but if not let me know and I'll dig out some easy to understand documentation.

    • @Poult100
      @Poult100 ปีที่แล้ว

      @@RalphBacon you did indeed refer to struct for data transfer in the ESP32 video. I'll have a good read and see if I can make it work. Thanks for staying with me on this. I know it would be a much quicker task of we were sitting at the same desk!
      I'll be back to you to let you know how I get on.

  • @johnjoyce
    @johnjoyce 3 ปีที่แล้ว

    recent arduino units (the real ones) have bluetooth a lot for cheap. especially the newer nano variety. this can simplify some of the work.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      That is true, Joisyon, but they are quite expensive for what they offer, don't you think?

  •  3 ปีที่แล้ว

    Hi Ralph, any chance these support the "+++" sequence to switch to command mode, as old school Hayes compatible modems did?
    (I feel old)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I've not seen that method of switching to command mode, and given that you have to tie pin 34 high to get FULL command mode (otherwise you get mini command mode, if you pressed the button as you powered up) I'd doubt it.

    •  3 ปีที่แล้ว

      @@RalphBacon OK, that would have been convenient, thanks for your answer!

  • @andymouse
    @andymouse 3 ปีที่แล้ว

    Hi Ralph, can't wait to know what the project is, any particular reason for the choice of Bluetooth ?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Only that the project I'm following uses a serial wireless transmitter... but it turns out it's not Bluetooth after all. Doh.

  • @markgreco1962
    @markgreco1962 3 ปีที่แล้ว

    Very nice work Ralph. I will revisit my owon multimeter data receiver that I couldn’t get working.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      You can do it! Let me know how you get on!

    • @markgreco1962
      @markgreco1962 3 ปีที่แล้ว

      Ralph S Bacon here is the project that I’m working on. I have put it away for now, just can’t figure it out sometimes it’s best to walk away and then come back to it. th-cam.com/video/lkl6yVauCKg/w-d-xo.html

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Hmm, which bit of that project did you not get going? The BT comms?

    • @markgreco1962
      @markgreco1962 3 ปีที่แล้ว

      Ralph S Bacon yes, could not get the auto connect working.

  • @jasonsuharyono8657
    @jasonsuharyono8657 ปีที่แล้ว

    hi, i make a similliar project like this but for maze robot. The problem is, when i send the data, the data structure that receiver receive is not intact. I've try to lower the vaud rate and place the receiver as close as possible to the sender but i doesn't seems to help. The other problem is, when the sender send the data, the servo start to jittering like crazy, and my baterry voltage fluctuate arround 1 volt up and down, this things happen when i use power supply instead of baterry. Is there any suggestion??

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      You say the servo jitters when data is received? This indicates that your receiving function code is taking too much time, because the servo needs continuous data (every few milliseconds) to tell it what to do.
      If you are using an Arduino UNO (or similar) look at the excellent Task Manager I describe in video #253 (th-cam.com/video/eoJUlH_rWOE/w-d-xo.html ) which will allow you to put the separate functions into different tasks and they will not interfere with each another.
      If you are using an ESP32 (or ESP8266) then you have RTOS built in with task scheduling, which you need to use.

  • @gregwmanning
    @gregwmanning 3 ปีที่แล้ว

    Thanks Ralph

  • @PauloRicardo-pp4ml
    @PauloRicardo-pp4ml ปีที่แล้ว

    I would like to create a brake light system for a motorcycle that could be activated by bluetooth where the led would be on the rider's jacket. But that didn't use a cell phone, but a button on the motorcycle's brake pedal.
    Do you have a tutorial that could help me?

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      So the motorbike brake light will initiate a transmission to the rider's jacket light, to light up the LED?
      Remember the receiver (the rider's jacket) has to be permanently switched on if it is to receive the signal. So you want longevity of battery power (unless the rider is hooked up to the bike's voltage supply, if that is even legal). The nRF24 has an IRQ (interrupt) pin that changes value when it receives a transmission; this could be used to interrupt a microcontroller from a Deep Sleep (power saving) state.
      Ironically, the bike's (brake light) transmitter only needs to switch on when the brake is initiated; A small ATTiny85 with nRF24L01 would switch on within about 100mS.
      You need to draw this out, in its simplest form, and get it working on the workbench. Range will not be an issue so even fake nRF24s will work, as long as the standby current is low. Original versions have a standby current of about 20-300μA (depending on exact mode) fine for battery use. The LEDs on the rider's jacket will take several hundred times more than that, I suppose.
      This video should get you started at least. Then you will at least know what works and what doesn't. A prototype is called for!

    • @PauloRicardo-pp4ml
      @PauloRicardo-pp4ml ปีที่แล้ว +1

      @@RalphBacon thanks. Your explanation was very usefull. I will study and try to do it.

    • @PauloRicardo-pp4ml
      @PauloRicardo-pp4ml ปีที่แล้ว

      @@RalphBacon th-cam.com/video/wXaEo5TCT1M/w-d-xo.html

  • @markday3145
    @markday3145 3 ปีที่แล้ว +1

    I'm curious about the pros & cons of Bluetooth vs. nRF24L01 vs. other kinds of wireless. Things like power usage, speed, distance. Why did you choose Bluetooth? Were you just curious, had the hardware laying around, need to interface with something else bluetooth, etc.?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The project I'm following (and modifying) stipulated this. As it happens, and quite ironically, I've found it doesn't use Bluetooth at all but an HC-12 433MHz Serial link. But there we are, a video was made and was hopefully useful to some.

    • @superdau
      @superdau 3 ปีที่แล้ว

      I don't like bluetooth in general (it felt like an unfinished product to me and was hassle more often than help for anything but serial links). But these bluetooth modules are quite useful as a dropin replacement for a serial wire. No changes in the code needed at all. That's completely different for nRF24s (and many of the other kinds of wireless links). There are other easy-to-use wireless serial links (zigbee for example), but they are usually much more expensive than the bluetooth modules. Bluetooth serial also has the advantage that it is supported by almost all phones and computers.
      Then there's all the other stuff: range, throughput, reliability, security, price... I'm sure there are comparisons in that regard somewhere on the internet.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Horses for courses! Pays your money, takes your choice! Never look a gift horse in the mouth! Oh. Forget that last one. Basically it all depends on what you want to do. Benny's cat run uses a 433MHz transmitter and receiver and has been working fine since the day I built it (several years ago). It lets me know when it's raining (so I can quickly move Benny's stuff) what the cat run temperature is, the humidity and a couple of other things. This could easily have been implemented using Bluetooth or nRF24L01+ technology. If I had to build it again I'd probably use nRF2401s because I have a few but I can't judge one against the other for functionality.

    • @stephenborntrager6542
      @stephenborntrager6542 3 ปีที่แล้ว

      Overall, I think that the nRF is a better choice for point to point communication, between two projects. But if you really need bluetooth though, the nRF boards aren't going to work.
      Bluetooth: (HM-5/6/10)
      Pros
      * Simple. Acts like UART (wire to Tx/Rx and use Serial.print)
      * Can perform GPIO on their own. No Arduino needed. (Not sure if this is all of them or not.)
      * Able to communicate with smartphones. (Phone app still required... possible with Android and some Java skill.)
      Cons
      * IO is often not 5v tolerant, so it may require level shifting.
      * Can cost more than some micros.
      * Configuration is done via AT Commands, which can't be done from the host once a connection is established.
      nRF24L01
      Pros
      * Very cheap
      * Same range and power as bluetooth. (Literally the exact same radio technology.)
      * Configuration and communication done via SPI, with the help of an Arduino library.
      * Potentially reduced power usage, due to manual control of power level. (Host controls power level, not remote end.)
      * Can connect to multiple devices at once.
      * IO pins are 5v tolerant
      Cons
      * Can only communicate with other nRF modules. Cannot send data to smart-phone.
      * Packets payload is 32 bytes. If you want to send longer packets, you will need to break data up into multiple packets and send them with your own protocol.
      A few other choices:
      ESP32: Bluetooth, WiFi, and 240Mhz processor. With optional external antenna, longer range. Typically less than $10. Can be made to work in arduino IDE too.
      433Hz radio: Cheap, and potentially much longer range. Never used one though. Not sure if they have quirks.

  • @adabill295
    @adabill295 3 ปีที่แล้ว

    Great Video, You must be reading my mind because I've been thinking about having an Outside Temp Humidity sensor give me an update inside. I can see on Dark Skies what my local area is but I'd lie to know what my back porch is like. Sometimes quite a bit diff +/- degrees. Its this or the NRF24L unit. I just got a pair of the NRF's with external antennas and need to run a test to see the reach of the new units.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Go for it! Whichever solution you choose it will be fine. Remember that for outside you need a DHT22 (not DHT11) unless your part of the world does not go below freezing. Ever.

  • @noweare1
    @noweare1 ปีที่แล้ว

    Hello Ralph, you don't need to solder on the hc05. On those HC05 units the pin is brought out and is called EN pin.

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Good to know, thanks for the heads up. 👍🏻

    • @Poult100
      @Poult100 ปีที่แล้ว

      I have checked this with a multimeter and pin 34 and EN are NOT connected. However, as stated in Martyn Currey's info, holding down the button will connect pin 34 to the 3v3 rail. So all that is needed for the higher level commands is to make sure the module is in AT mode and then, additionally, hold the button down during higher level commands/requests.

  • @michaelstevens630
    @michaelstevens630 3 ปีที่แล้ว +3

    Would it not almost get cheaper to Go ESP32 in hardware costs, probably not understanding what the actual project is.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I'm following a design by A N Other (modifying it a bit) but don't want to deviate too far. As it happens, as I need a remote control function the ESP32 won't help as I would need two devices.

  • @davidsummers1545
    @davidsummers1545 3 ปีที่แล้ว

    Ralph
    It would be interesting to hear a comment on the transmission range that can be achieved. 1, 3 or 5m for example
    Thanks Dave.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I managed about 10m when plugged into my workshop and I went down my garden. It _should_ manage 30m but until I build the entire project it will be difficult to say.

  • @superdau
    @superdau 3 ปีที่แล้ว

    I'm pretty sure I have paired and used two HC-06s some time ago, although I can't remember what for XD . The configuration for that was also much easier (just a single AT command on one of the modules to change its role).

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The HC-06 cannot act as an initiator; that is, it cannot request a pairing from anything. For that you need an HC-05.

    • @superdau
      @superdau 3 ปีที่แล้ว

      @@RalphBacon
      Nope, I just retried. I definitively have two HC-06s talking to each other. hterm -> CP2102 -> HC-06 ---> HC-06 -> CP2102 -> hterm.
      The only thing you need to do is use the AT command "AT+ROLE=M" (M for [M]nitiator, S for [S]esponder). Obviously the PINs have to be the same on both. As soon as both are plugged in, the LEDs stop flashing and I can send text between two terminals.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I'm quite confused by this. As would Martyn Currey be too, no doubt. Setting the Role (AT+ROLE=1 or 0) only works on an HC-05 because the HC-06 can only ever be a responder. What have you bought there? How do you KNOW they are HC-06 devices? What tells you this? I'm intrigued to say the least.

    • @superdau
      @superdau 3 ปีที่แล้ว

      @@RalphBacon
      The main reason I think they are HC-06s is that I labeled them as such ;) . Joking aside AT+VERSION returns linvorV1.8 and baudrates have to be set with AT+BAUDx (x = 1,2,3,..,C). Both commands that are specific to the HC-06. (and none of the HC-05 specific commands work)
      I bought nothing special, just the usual HC-06 modules from ebay (bought several over the years), like this one:
      www.ebay.com/itm/Slave-HC-06-Wireless-Bluetooth-Transeiver-RF-Module-Serial-4p-Port-line-M8/301724406499
      I have modules with the silkscreen with the bluetooth symbol, other ones with the "POWER" and "LEVEL" silkscreen. setting them to ROLE=M works with all of them.
      I don't know where that "can't pair on their own" is coming from. I've done that years ago already and I doubt it is something that the very recent modules stopped supporting.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The way to pair to another BT module is the way I showed (AT+PAIR). Your (alleged) HC-06 allows you that command? I'll see if I have an HC-06 still lying around to test this out on!

  • @boddaalaa726
    @boddaalaa726 ปีที่แล้ว

    Thanks , but I received reads of potentiometer in master arudino too slow , how can i make them more faster . UART for modules is 38400 and i used serial.begin(38400)

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      You will only be able to transmit the data as fast as the stream allows. Can you not increase the module's baud rate to, say, 115200? Or is it fixed? In which case there is nothing you can do.

    • @noweare1
      @noweare1 ปีที่แล้ว

      I put a delay in the loop which actually helped. Try using delay(10) and see if it helps. It is still is pretty slow for me too. I had problems running the HC05's at 115200 baud also, brought it down to 38400 and that got it consistant.

  • @flemmingchristiansen2462
    @flemmingchristiansen2462 3 ปีที่แล้ว

    yeah - easy when you know it, when you use AT-command on a regular basis, you will know them by heart.
    Looking forward to see what you are cooking. Please don't keep us waiting too long.😀
    -is it Benny working the WEE?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      The project is underway, but takes a long time, as does any project when you actually have to build real stuff, get the drill out, solder stuff, design a PCB, pay the import duties (grrr).. the list goes on!
      Benny is not too well so is just quietly supervising, at the moment.

    • @flemmingchristiansen2462
      @flemmingchristiansen2462 3 ปีที่แล้ว +1

      @@RalphBacon Yeah don't I know it, projects do take time.
      Sorry to hear about Benny, hope he get well.
      Import duries and taxes all support your country. Pay up and be a good patrion 😁

  • @QwertYuiop-dg8yp
    @QwertYuiop-dg8yp 3 ปีที่แล้ว

    I want to know a project that can get the TIME TRAVEL from the transmitter to receiver. Please suggest some projects or do one. Any module bluetooth or other radio freq. module as long as it gets the time it travel. Thank you

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      You're talking Time of Flight. Plenty of videos and articles out there. But I haven't done one, sorry.

    • @QwertYuiop-dg8yp
      @QwertYuiop-dg8yp 3 ปีที่แล้ว

      Ralph S Bacon i don’t see any that gets the time of flight. Please recommend

  • @troyfrei2962
    @troyfrei2962 3 ปีที่แล้ว

    Have you looked at Seeed Studio wireless boards? I think they have a small Arduino board with a wireless chip on the board.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      The ones I have, or have seen, are all WiFi oriented, not 433MHz wireless or BT. Some have a built in ESP32 or ESP01 on board. But not for this project!

    • @troyfrei2962
      @troyfrei2962 3 ปีที่แล้ว +1

      @@RalphBacon Seeed also makes a Arduino with a display and Grove in/outputs. It's called Wio. If it shipped from China it does take a LONG time, If shipped from US it's faster.

  • @alnoorratansi9364
    @alnoorratansi9364 3 ปีที่แล้ว

    Hi, Just wondering if you could send me the link for your breadboard.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      It's a UK site, Cool Components (not a sponsor of mine), and here's the link:
      coolcomponents.co.uk/products/ad-11-advanced-solderless-breadboard

  • @phillipneal8194
    @phillipneal8194 3 ปีที่แล้ว +1

    Excellent video. However, this only shows data being sent 1 way. What about from the receiver back to the initiator ? Scenario being: braincpu says turn left and look around.
    motorsensorcpu moves, gets sensor data and sends it back to brain cpu.... ?

    • @superdau
      @superdau 3 ปีที่แล้ว

      Serial.write() on the receiver.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I deliberately omitted this for two reasons:
      1) I'm not sending stuff back and in this scenario the sender can't do anything with it anyway. It's a bit like saying your TV remote sends stuff out but should receive an OK or something from the TV.
      2) The hardware remains the same; you can send an item back with Serial.write (binary) or Serial.print (ascii) and the initiator will have to read that using if Serial.available() which we already covered in the responder. But, as I say, in this case it was not appropriate.
      In your scenario a two way conversation would be appropriate but that's not the project I'm working on at the moment. Perhaps we'll do a deeper dive in a future video?

    • @markj3851
      @markj3851 3 ปีที่แล้ว +1

      @@RalphBacon Great video Ralph but I also thought you'd have 2-way communications since that's the title of the video. Still great info and perhaps a good subject for another future video?!

  • @ishan-vyas
    @ishan-vyas 2 หลายเดือนก่อน

    hey ralph, i have a question ,in my project i have 4 servos controlled by mpu6050 ,servos are going to be on the robotic arm and controlled by arduino and motor driver which are receiving signal through hco5 from another arduino having 4 mpu6050 so if i want to use 2 sensors(mpu6050) together so hco5 will send the data directly how i sort them for different motors or even i send the signal one by one how i sort and send signal to the respective motor?

    • @RalphBacon
      @RalphBacon  หลายเดือนก่อน

      The data you send must include some kind of identifier. You probably want to send a struct which will include the data and the servo identifier as a block of data.

  • @trevornorrey7483
    @trevornorrey7483 3 ปีที่แล้ว

    AT+Thanks Ralph.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Don't you just love the AT+ commands!?!

  • @nilimakulkarni4541
    @nilimakulkarni4541 4 หลายเดือนก่อน

    what is the range of bluetooth module?can i use this in school building of 4 floors?

    • @RalphBacon
      @RalphBacon  4 หลายเดือนก่อน

      BT has a technical max range of around 30m in free air. I doubt that would penetrate 4 floors (possibly concrete) of a building. You would need repeater stations on each floor!

  • @iceberg789
    @iceberg789 3 ปีที่แล้ว +1

    is there any way, we can convert one ps2 mouse or keyboard to wireless with arduino/nrf/bt modules?
    and thanks for the vid, as always.

    • @kitecattestecke2303
      @kitecattestecke2303 3 ปีที่แล้ว

      Not without massive lagg? Ps2 to arduino uno->BT bt->arduino Leonardo ->HID imnterface via micro USB..
      Much hassle for what?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Yes and yes but not the way you think, perhaps. I've now got my Numeric Keypad running (in prototype mode) but it uses a USB HOST module plugged into an Arduino to RECEIVE the data, then another Arduino to act as the USB DEVICE (as per my video switching unit) that gets read by the PC. When I plugged in my wireless dongle it "just worked", so I could use my keyboard (and mouse, but I didn't try it) with my Arduino.
      Stay tuned for the final project!

    • @iceberg789
      @iceberg789 3 ปีที่แล้ว

      @@kitecattestecke2303 ​ @Ralph S Bacon i see. so no straight forward way to make regular keyboards to wireless ?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Well: Keyboard -> Arduino HOST -> Arduino DEVICE -> PC is fairly straightforward but I suspect it would be cheaper to just buy a wireless keyboard. However, keep tuned as this is something I will share.

    • @iceberg789
      @iceberg789 3 ปีที่แล้ว

      @@RalphBacon oh great !

  • @johnstephenson2891
    @johnstephenson2891 3 ปีที่แล้ว

    Damn!! I ordered 5 HC-05 in mid 2019 at £2.02 each! Now £5.87 each!!

    • @superdau
      @superdau 3 ปีที่แล้ว

      You can still easily find them for ~3$/€. But many of the sellers now charge shipping costs.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      As superdau says, shipping is slowly killing the Chinese and Asian markets (for me, anyway). When the price difference is just $1 for Chinese vs Local (with the Local delivering in a few days) then I prefer to spend the extra $.

  • @crispychickenwing
    @crispychickenwing 2 ปีที่แล้ว

    can we connect a hc05 and esp01s to one arduino? is that possible

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      Absolutely. You can communicate with the ESP01 via TX/RX (if you use the SoftwareSerial library you can choose which pins you use) and use a different set of TX/RX pins for the HC05 (you will need two instances of the SoftwareSerial object, one for each device).

    • @crispychickenwing
      @crispychickenwing 2 ปีที่แล้ว

      @@RalphBaconOk thank you so much sirr😁😁👍

  • @boblewis5558
    @boblewis5558 3 ปีที่แล้ว

    Hmm running 9600 baud over 300 feet never used to pose us a problem years ago and 110 and 300 baud were standard telex rates for decades Ralph, I'm SURE you must remember those (Grandstand on the Beeb at results time on a Saturday!?). Bluetooth is great and highly useful, as is WiFi, but I think that sometimes young Arduinites might be surprised at what the world actually achieved 30, 40 and even 50 years ago! I used to quite happily get a VTX screen full of live data from Oz in less than a second as far back as the mid 80's! (maximum speed on the link? 64k baud international private modem link!) Basic serial comms (RS232 or RS422). NOTHING so simple as two twisted pairs for reliable serial comms up to 128k baud - distance is really the limiting factor for whatever speed the data needs (and avoidance of noise - use RS422 for better noise rejection). And as Einstein said "Things should be as simple as possible, but no simpler". Bob says "VERY simple works, is LOW cost (pennies), super reliable and secure"! :))
    Really nice,useful video as always though, despite my preference for old, simple tech! LOL

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Remember Grandstand on a Saturday, Bob? I was but a glint in my dad's eye... well, alright, yes I do, and it was boring as mud. I guess I don't have the football or horse racing gene!
      I know that when connecting a cassette deck to my first UK101 computer, it would only run at 300 baud over a couple of feet before errors crept in. I could double the speed if the cable was shorter. I guess commercial solutions have more resources (money, time, expertise) to get it right.

    • @boblewis5558
      @boblewis5558 3 ปีที่แล้ว +1

      @@RalphBacon Ha! Ha! No! I'm Welsh! Round ball!!?? Sacrilege where I hail from! Horses? Only to ride occasionally (not for decades though!)
      Back in the early 80's, everone was on serial green or white monochrome screens so they and all the comms was always over serial - mainly 9600, especially when modems went from 2400 up to 9600 baud! Modern serial, especially on 3v electronics tends to be limited purely by lack of voltage drive, easily solved though by level shifters each end. 😁

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Yes, I've heard that rugby is a game Welshmen play with odd shaped balls. 😁

    • @boblewis5558
      @boblewis5558 3 ปีที่แล้ว +1

      ​@@RalphBacon Vielleicht, aber Ich habe zwei Eier auch! 😁

    • @noweare1
      @noweare1 ปีที่แล้ว

      At logic level ? I remember logic levels being converted to +/- 12 volts for communicating longer distances.

  • @lulusehnihpi8901
    @lulusehnihpi8901 ปีที่แล้ว

    does this require a usb to serial or can an Arduino be used as a usb to serial?

    • @lulusehnihpi8901
      @lulusehnihpi8901 ปีที่แล้ว

      if not what is that usb serial adapter module thing?

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      I don't see a USB-to-Serial module (not in the first few minutes of the video, anyway), I'm just using two Arduino UNOs with two BT modules. Perhaps you have a video timecode you can send me?

    • @lulusehnihpi8901
      @lulusehnihpi8901 ปีที่แล้ว +1

      @@RalphBacon oh ignore me, i didn't see you name it last time it was a cp2102 8:48 . I ended up finding a video of someone setting it up without one of those so im good now anyway. Cheers though

  • @Graham1904
    @Graham1904 3 ปีที่แล้ว

    If you don't get the responder to answer back how does the initiator know that the data has been received?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Apparently, Bluetooth LE guarantees that either the message is delivered, or the connection drops. Probably an ACK being sent back behind the scenes. An ACK means the data was received, intact. A bit like what the nRF24L01+ modules do. That's my (broad, non-specific) understanding, anyway!

  • @catalinalb1722
    @catalinalb1722 3 ปีที่แล้ว

    Hello, how can one pair these two Bluetooth devices together and assign them IP address in order to run a throughput test?

    • @superdau
      @superdau 3 ปีที่แล้ว

      Bluetooth modules and IP addresses have nothing to do with each other.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      As superdau says, Bluetooth has no IP addresses; that is for Wifi. Bluetooth has a unique address to which another BT item can be paired.

    • @catalinalb1722
      @catalinalb1722 3 ปีที่แล้ว

      @@RalphBacon It can be implemented under Linux with Microprocessors like Raspberry pi. I know that in Arduino world where everything is hardcoded it's probably impossible. Still I would like to see how much data/sec can be sent between them, of course that will depend also on the distance btw the modules.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Well, Bluetooth won't act differently when using an Arduino. BT 3.0 can shift 24Mb/s but these HC-05s and HC-06s are not BT 3.0, only BT 2.0 so will shift about 2-3Mb/s. Still quite impressive.

  • @oncledan282
    @oncledan282 3 ปีที่แล้ว

    Hey, Ralph.
    It seems that the old nRF24L01 is much more complicated to wire than this one. I've ordered 2 of these babies and will receive them on Monday. I have the FTDI interface to set them up so, I expect this new project to be a breeze .. but is it ever a breeze ? Hahahaha !! Murphy's Law dictates just the opposite !
    Have a great day, my Friend.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      If it were easy everyone would be doing it, Daniel!

    • @oncledan8509
      @oncledan8509 3 ปีที่แล้ว

      Yep ! Hahaha !! Quite a reputation, that lad !
      Now catching up on your latest videos. LOTS of watching to do since Friday.
      Started writing to you on Tuesday .. bit by bit. It's been sooo long !
      Have a great evening, my Friend ! Talk to you soon.

    • @johnjoyce
      @johnjoyce 3 ปีที่แล้ว

      these are pretty nice. it’s just a whole other thing to think about with a domain-specific language of the bluetooth commands.
      but man these units are a lot easier to use than one might expect. but their LEDs sure are bright.

  • @chimpspecialist
    @chimpspecialist 3 ปีที่แล้ว

    I searched on Google for that header file and got this response:
    ...Your search - Arduino_Bluetooth_Link_TX.h - did not match any documents...

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      That's because it's lurking in my Github along with the .cpp file (that you will have to rename to an .ino file). It doesn't actually do anything for the Arduino IDE so you can comment out the #include for it if you want and ignore it.
      github.com/RalphBacon/196-Bluetooth-Serial-Comms-for-Arduino

  • @davidwillmore
    @davidwillmore 3 ปีที่แล้ว

    Would nrf24 work well for this?

    • @donbriggs9128
      @donbriggs9128 3 ปีที่แล้ว +1

      That's what I thought. Far easier to set up. But he probably needs the Bluetooth for the rest of the project.

    • @davidwillmore
      @davidwillmore 3 ปีที่แล้ว +1

      @@donbriggs9128 that was my thinking as well. 👍

    • @davidwillmore
      @davidwillmore 3 ปีที่แล้ว

      @@donbriggs9128 at 27:03 or close to it he mentions wanting to connect one of these to a Wii controller, so that would explain the preference for BT over something simpler like the nrf24.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Well, you know, nRF24L01+ works well too, but Bluetooth is just a protocol, after all. HC-12 modules are just 433MHz transceivers but still have some of the Hayes influence. They all end up sending serial data. The nRF24L01s do have an auto-acknowledge for each packet though.

  • @normcaissie5598
    @normcaissie5598 3 ปีที่แล้ว

    Nice

  • @TheUnofficialMaker
    @TheUnofficialMaker 3 ปีที่แล้ว

    why not just use esp32?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Well, you could do, although the design to which I'm working doesn't specify that. I guess the only way to know would be to try it with one and see how well it worked. I don't think I've ever used BT on the ESP32... how remiss of me, something to add to the list. That way, we'd have processor, BT and (should we need it) WiFi too!

  • @AtlantaTerry
    @AtlantaTerry 3 ปีที่แล้ว +2

    Initiator / Responder
    Hmmm... in the old (politically incorrect) days we would have said Master / Slave.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Politically Incorrect. Quite.

    • @boblewis5558
      @boblewis5558 3 ปีที่แล้ว

      @@RalphBacon Like religion shouldn't play in politics, politics shouldn't play in Electronics! :))

  • @newburypi
    @newburypi 3 ปีที่แล้ว

    Thanks, once again. I'm a little less BTphobic now.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Once you have tried it a couple of times you think "So what is the problem?". Familiarity brings confidence in this case.

  • @Graham1904
    @Graham1904 3 ปีที่แล้ว

    No comments below.....

  • @RalphBacon
    @RalphBacon  3 ปีที่แล้ว

    You can ignore this comment as I'm just experimenting exactly when TH-cam allows me to comment on my own video!

    • @davidwillmore
      @davidwillmore 3 ปีที่แล้ว +1

      A four day old comment on a 5minute old video? That's a neat trick, Ralph!

    • @fredflintstone1
      @fredflintstone1 3 ปีที่แล้ว

      I would never ignore you:-)

    • @newburypi
      @newburypi 3 ปีที่แล้ว

      Done! Ignored. Oops!

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Ha ha! Very witty! And interesting! I now can comment when I upload (and it's in Unlisted mode) and can then make it Private/scheduled with my comments intact. At last. Only took 4 years to work this out.

    • @fredflintstone1
      @fredflintstone1 3 ปีที่แล้ว

      @@RalphBacon With Age comes experience and knowledge :-)

  • @Magic-Smoke
    @Magic-Smoke 3 ปีที่แล้ว

    Ralph, its probably your usual, interesting and useful stuff but 3 ads (1 long one from you (=2) and 1 from YT) in the first 2 minutes is a bit much - didn't bother listening to the rest. Sorry, I know you have to make an income but others seem to manage without such 'ad compression'.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I bet you don't watch much TV either then, John. Sorry, I think it quite in order for me to promote the services of the very people making my video possible and Google want their pound of flesh for the TH-cam hosting services too. I even put a countdown timer on the sponsor ad so you would know how long it was.

    • @Magic-Smoke
      @Magic-Smoke 3 ปีที่แล้ว

      @@RalphBacon Ralph, you may have misunderstood, I'm fully in agreement with the promotion of services - I was only mentioning the compression of so much into the 1st 2 minutes. And, you're right, I don't watch much TV. I learn far more from channels such as your own :)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Oh dear, I have no control over the mid-roll adverts, John. Actually, not quite true. If I were to manually select the places where Google can place its adverts it would follow my instructions. But that takes (even more) time and effort and silly me, I accepted that Google would place the ads at "appropriate places" (ie in quiet places, not in the middle of the sentence, etc) so having it put one right at the front was unfortunate.
      But you can skip the Google ads after a few seconds (usually) and even the promo if you want (hence the countdown - shh!).
      It would be unfortunate for us both if you were so put off by the ads to not watch what could be an interesting video and which took quite a bit of effort to do! It's a sign of the times that ads pay the way for a number of services - internet sites, TV and TH-cam!
      However, in deference to the point you made, I've just gone in and *moved the ad* so that the first five minutes are ad free (just the promo). In future I will bear this in mind and see whether I should be manually placing ads despite Google's assurances. OK?

    • @Magic-Smoke
      @Magic-Smoke 3 ปีที่แล้ว +1

      @@RalphBacon Ralph, that's super-responsive :). Lol over expecting anything from Google! I saw the length of the video and I'll bet it is full of excellent and valuable knowledge. I reckon that your stats may show an uptick on 'dropoff rate' if there are less adverts in the early parts. Its always going to be a balance but I appreciate your moving the JLC ad (OTOH I'll get to see it again - lol - I bet I have almost as many orders with them as you do). I hope there's no hard feelings - I was just trying to point out an off putting glitch :)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      No hard feelings, John! I will deffo tell TH-cam where to put its mid-roll ads in future. So to speak. Now TH-cam puts them into videos over 8 minutes long (was 10), by default. Including all old videos. I guess they need more revenue. Don't we all.

  • @lezbriddon
    @lezbriddon 3 ปีที่แล้ว

    emmm i need to write to all the hdd companies that i have hard drives off in my old pc's, I find the sticky labels on them to use disgusting terminology for the jumper settings. ... maybe i should demand new hdd's.......

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Well, I would not be surprised if the HDD companies decided that their use of outdated and insensitive terminology should be replaced. For PR reasons, if nothing else. If they use Initiator and Responder I want my fair cut! Let's face it, if Lady Antebellum (a country rock group I've followed for years) can change their name, anything can happen.

  • @pirateman1966
    @pirateman1966 3 ปีที่แล้ว

    BT sucks and now I see why.
    Long live nrf24.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Harsh words there, PirateKitty! It's just that, for whatever reason, the BT chip makers decided on the Hayes "AT" instruction set, as it covered all bases. But once you have got a pair connected it's so simple. That's why everything from Smartphones to headphones are all BT enabled.
      Of course, nRF24L01+ modules are a viable alternative which is why I did a whole video about them in video #73 th-cam.com/video/JSHJ-RLbNJk/w-d-xo.html

  • @theonlymudgel
    @theonlymudgel 3 ปีที่แล้ว

    Surely I must be first. Yay for me. Now to watch the video.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Not sure you are first. Well, first in the service you provide, obviously, but lots of comments below this one. Perhaps I see them in a different order to you?

  • @indo_defence
    @indo_defence ปีที่แล้ว

    Is there an email address I can contact you on? Or your Facebook page to communicate with you.

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      My email details are in the video details (of more recent videos, anyway). Have a look!