By Andy Yeh
Previously I made a Arduino bluetooth remote control car using HC-05 Bluetooth module and L298N Dual H-Bridge motor driver. The HC-05 is BLE 2.0 and is not compatible with iOS BLE. The L298N is a big module, and seem to consume more power with a drop down of 1.5 volt.
In this second attempt of building an Arduino remote control car, I downsized the car from 4 DC motors (4 wheels) to 2 DC motors (2 wheels) with a small caster wheel. And the main changes are the use of HM-10 BLE (4.0) module, which is compatible with most current mobile devices, and the TB6612FNG H-Bridge motor controller, which is more power efficient, with PWM ports for speed control, and very small in size.
Below are some pictures of this car.
Arduino Nano
HM-10 BLE 4 module (MLT-BT05)
TB6612FNG
2 x 14500 (3.7v) batteries and case (with a switch)
2 x DC motors and wheels
1 caster wheel
2 x small breadboards
Some wires/dupont cables, some M3 nuts and bolts
3D printed chassis (https://www.thingiverse.com/thing:1316755)
The TB6612FNG has a clone or fake one on eBay, which lacks PWM ports (A & B). I initially used the fake one unaware. And later I found out because I could not change the speed of this car. Below are pictures of these two. Be aware not to get the fake one.
Left: Fake one with smaller IC. Right: TB6612FNG
Left: two NC ports (fake). Right: with PWMA and PWMB
I also learnt that there are a few clones of HM-10 BLE modules on eBay, although using the chip (CC2541), they behave differently. I tried two modules with BLE names: JDY-10-v2.5 and MLT-BT05, and I found the MLT-BT05 works but not the JDY-10. The JDY-10 module has a default BAUD rate 115200, and its connection to devices can be unstable. The MLT-BT05 has a default BAUD rate 9600 and when set to different rates it still connects and transmits data well. Therefore, I recommend buying and using the MLT-BT05. Below are pictures of these two. Of course, I have limited tests so if you have different experience, please leave a comment at the end of this page.
Left: JDY-10 Right: MLT-BT05
Left: JDY-10 Right: MLT-BT05
I tested connections with two iOS apps: ArduinoBlue and Dabble. Each app has its own Arduino library for programming. Eventually, I chose to use Dabble to complete this project.
The main codes are borrowed from this Dronebot workshop, which has the wring information and downloading of required library for TB6612FNG.
Based on the sample codes from the above workshop and the example codes from Dabble, I am able to program easily the control of the two interfaces of Dabble's Gamepad.
Digital Mode
Joystick Mode
The Joystick mode is particularly interesting. I think programming the car's movement with the Joystick is a good maths and computational thinking exercise. I will write up a STEM activity later for this. Here is the Arduino program I wrote.