- Cheap RC car
- Arduino Uno/Mega board
- Bluetooth Module (The one I bought)
Connecting Arduino to RC Car's Internal Dual H-Bridge:
When you first open the car unscrewing the bottom screws and take the top of the car off, you'll find a simple circuit like the one below:
It basically consists of 3 elements:
Now that we know what and where is the RX-2 chip, we must know the pin configuration it works with, so the best way to know is to look for its datasheet in my case the chip was the SM6135W and the next image will show the pin configuration it has.
When you find your chip configuration you'll realize there are 2 pins controlling each H-bridge, the pins 6 & 7 control the turning and the pins 10 & 11 control the forward and backward car's direction by just letting current go through those pins.
To let arduino command to the H-bridge through bluetooth, we could do 2 things:
What arduino pins should I connect to the car?
Well, now that you've done all this, you're almost ready to have your mini rc car difting, what's next is to download the arduino code (in the External Links section, on the left column look for Arduino code RC CAR, I'll explain later why there is another arduino code called H-Bridge); there you'll notice the pins to connect to the car circuit:
All those pins are PWM enabled to vary the pulse using analogWrite() letting you gently change the motor's speed while going forward, backward, etc.
This H-Bridge is capable to handle more power to the motors (i. e. for bigger cars or just bigger motors to different purposes), this is unnecessary for some mini Radio controlled cars because, as I explained before, they have internal H-Bridge we can use.
I used this circuit in a bigger car (I could have used the internal h-bridge though, but I wanted to try this :P) and it worked just fine.
The difference in code was that I incluided a new pin (motorPin - 9) to manage the PWM functionality on "A enable" and just switching the input A and B of motor 1 to On or Off ( HIGH or LOW ).
The next video shows a toy car that used the L298N H-BRIDGE and Arduino UNO
Is Bluino used only to command toy cars?
Bluino was designed to control RC cars using an Old school interface (like an old RC controller) instead of just buttons, but it could be used to command any kind of circuit purposes, for example dimming leds, etc. Thats why in the option menu of the android application you can change the MAX values each bar will handle (x2 because the midPoint acts like 0).
For example the PWM functionality may vary 1 byte ( 0 - 255 ) that's why the Left bar max value should be the double: 510. Any value over 255 will write an analog value to 'x' pin, a value lower than 255 will write an analog value to a different pin, but while in the midpoint, arduino will write LOW on both pins.
If you'd like to "truncate" a led brightness, a motor speed, etc, you could change the max value from a certain bar to a lower limit (i. e. to 180, the mid point would be 90, which for arduino it'll be 0), and instead of varying the voltage cycle to 255 different values, it would just vary 90 (about 1/3).
This video shows how bluino is used to control a small servo