0
\$\begingroup\$

I m making a small RC car and to control it, I m using a HC05 Bluetooth module. My car is rear wheel drive using two dc motors and the front wheels will just turn left or right for navigation. Can the Bluetooth module take more than one command at a time so that I can turn the car while moving as it happens to be in RC car toys found in market? If not, please suggest me on how do I achieve this objective of turning while moving at the same time. P.S. I am using arduino nano in this project. For navigation, I m using MG995 servo motor.

\$\endgroup\$

put on hold as too broad by Finbarr, RoyC, Huisman, laptop2d, Dmitry Grigoryev 11 hours ago

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ You don't want blueooth for this, but something more like the nRF24 (a huge number of actual RC systems use things compatible with that, the rest use similar but incompatible competitors). The reason is that you don't want to retry sending old data, but rather to have some of the command packets get through, but only while they are current. Use different bytes in the packet for different functions. \$\endgroup\$ – Chris Stratton Feb 26 '18 at 14:30
1
\$\begingroup\$

The HC-05 blurb states this: -

This class 2 Bluetooth module comes programmed with firmware that allows it to pass the output of a serial communications port (default is 9600 baud) over a Bluetooth wireless connection with no software configuration

So, if you can create a data frame that uses say 5 bytes (or less) that incorporates speed and direction then keep sending that frame, you get a payload data update rate of 9600/(5 x 8) = 240 times per second.

So the problem isn't really about turning and moving at the same time but all about how quickly you can update speed and direction information.

Updating this information at 240 times per second should be OK for practically any RC car I would imagine.

\$\endgroup\$
  • \$\begingroup\$ Consider however that these pre-made bluetooth modules have non-existent real-time performance and built-in latency. Then there's the issue with lost radio connection because of 2.4GHz disturbances, range, obstacles etc. I would use much higher baudrates and preferably a MCU with DMA on the UART input. \$\endgroup\$ – Lundin Feb 26 '18 at 12:53
  • \$\begingroup\$ @Lundin I wouldn't use bluetooth for those reasons you give - a much too contaminated region! The receiver sensitivity implies a data rate of Mbpsec yet it only achieves 9600 bps for payload - it is vulnerable for sure. \$\endgroup\$ – Andy aka Feb 26 '18 at 12:56
  • \$\begingroup\$ @Andyaka so u say speed and direction data frame should be of 5 bytes? How do I set it? Or should I get a much advanced gear? Plz suggest \$\endgroup\$ – Ankit Mallick Feb 26 '18 at 14:25
  • 1
    \$\begingroup\$ You make a frame of several bytes with the first byte being a recognizable header. Probably the last two bytes in the frame are for a checksum to give you transmission confidence. The 2 or 3 other bytes would be your payload data that correspond with speed and direction. An arduino nano can package the data into a frame and at the receiver end a similar nano can unpackage the data if the checksum is right. The header has to be uniquely identifiable from data so your receiver can sync to transmissions. If you don't understand this then you are probably in too deep and need to learn! \$\endgroup\$ – Andy aka Feb 26 '18 at 14:35
  • \$\begingroup\$ @Andyaka yes u r right. This is my first time with arduino and I cant understand properly. I will get an arduino expert to understand this. BTW thnx for the suggestion. \$\endgroup\$ – Ankit Mallick Feb 26 '18 at 14:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.