Introduction: CAR-INO: Total Conversion of an Old RC Car With Arduino and Bluetooth Control
Introduction
Hi, in my first instructionables I would like to share with you my experience with converting an old rc car from 1990 to something new. It was xsmas 1990 when Santa gave me this Ferrari F40, the fastest car in the world!...at that time.
This superb car was equipped with a rc remote control but with one button only... :|
yes, this car can go only forward and backward! this was very frustrating to drive so i used it rarely...for this reason this toy is still alive!
I found it in my attic stil in the original box so i was struck by lightning! I can use my extra module of arduino to convert the car!
I decided to call the project CAR-INO for two reasons, I'm going to use arduINO, and in italian carino means "nice", because the final result will be...nice! :)
The features implemented are:
- steering(of course!)
- speed control
- headlight control
- backlight control
- horn
let's start!
Step 1: Component List
- arduino nano 1.8€
- DC motor driver (I used L298n board) 1.5€
- servo motor sg90 1€
- bluethoot module (like HC-05) 3€
- active buzzer <<1€
- 3 white leds <<1€
- micro switch <<1€
- capacitor at least 320uF <<1€
- colored wires <<1€
- old 1990 car with working DC motor.
The prices are taken from Aliexpress.
TOOLS
- welder
- tin
- twizers
- wire striper
- hot glue
Step 2: Mechanical Modifications
When I opened the car I realyzed that this was a cheap version of another series of rc car because it has a space for the servo, and the axis that links the wheels has a junction for servo but is reverse assembled to lock the head wheels.
I cut a little plastic to make space for servo SG90 and I glued it, I glued also a screw on the servo arm to create a junction with the axis (see the photo). I removed the old electronic board and cut the extra plastic that was holding it.
Step 3: Assembling the Car
The backlight leds are connected directrly on pin 13 that is the output dedicated to led, so you do not need a resistor.
The front led needs a resistor to limitate the current you can use a 220\250 ohm resistor. I didn't have the white led so in my case I used a RGB led as white led.
In my project i can't use pin 9 and 10 as PWM out because the servo library (that we are going to use in the code to control the servo motor) disables the PWM on these pins.
The best way is to use two different power suppliers, one for the logic (arduino) another one for motors(like dual supply scheme), but in my car there is not enough space (I had a lot of problem with inserting the driver board and servo) so I decided to use a big capacitor to filter the low peak of voltage that makes arduino shout down during the activation of motor.
I used the microswitch to disables the power on other components.
during the flashing, the other components linked to arduino can create problems during this operation.
Before assembling choose a good layout to place the components and make sure that the car body fits well! I weld the wires (following the scheme) directly on the arduino but maybe it is better to use the headers!
I used hot glue to fix all the components becouse it is strong enough, easy to remove and doesn't make a mess.
Step 4: The Code
17/03/2018 NEW VERSION - BIG UPDATE!
For the new code I based the comunication on the "Arduino Joystick Controller", a free app on playstore.
WARNING: When you connect arduino on PC be sure to power off the battery supply!!!!!!
Download the L293 library and unzip it in arduino directory "libreries"
you can configure easily your car creating a personal profile in the app. at the begin of code you can set the pinout according your preferences (do not use pin 9 and 10 as pwm). If on power on the servo steering goes under range you can insert a custom center angle removing the comment at:
//#define centro
This software includes new features like:
- analog steering angle
- parameters settable via app
- possibility to read analog sensors (battery, temperature etc..)
- possibility to add and control other 2 servos (i.e. for camera gimbal) Enjoy!
Enjoy!
OLD VERSION
For the code I based the comunication on the "Arduino Bluetooth RC Car APP", a free app on playstore.
WARNING: When you connect arduino on PC be sure to power off the battery supply!!!!!!
You can configure easily your car at the begin of the code there are 2 section:
- Pinout definition: you can chose the pinout (NB do not use pin 9 and 10 as pwm).
Calibration: set you steering degree (right, left and center) and minimum PWM to move the car.
Now flash the ino file on your nano and enjoy!
UPDATE 15/03/2018 : solved a bug for speed calculation.
Step 5: Future Improvment
I'm thinking to other awesome features:
- add battery voltage sensor
- add temperature sensor
- headlight color menagement
I will update this instructables as soon as possible.
17 Comments
2 years ago
Bien, todo trabaja muy bien gracias a esto pude revivir un viejo rc de mi hijo. Gracias.
Reply 2 years ago
Gracias por los comentarios! Estoy feliz de haberte ayudado especialmente en estos días difíciles para todo el mundo. (traducción con google del italiano)
5 years ago on Step 5
merci daniloS19 j'ai compilé a ca a tres bien marcher bon travail, bonne continuation
Reply 5 years ago
génial! Je suis heureux ... pendant mon temps libre, je travaille sur un nouveau code qui est plus efficace et avec plus de fonctionnalités. J'espère mettre à jour la page d'ici la fin du mois. (sorry google translate)
Reply 5 years ago
Les SALUT DaniloS19 j'ai un problème de compilation avec le car2.ino il donne ce message: 'class L293' n'a aucun membre nommé 'IN1_1W' et sur le programme l'erreur est ici ligne 66 ( redCar.forward_1W (commandes [1]));
qe dois-je faire merci pour tout ce que vous faite
Reply 5 years ago
Per car2.ino devi necessariamente installare la libreria L293.h. Estrai il contenuto di L293.zip nella cartella libreries di arduino.
Reply 5 years ago
Les salut Danilo pour mieux comprennent le lbrairie L293 je peus pas installer la votre ,la page n'ouvre pour pouvoir telecharger alors j'a reinstallé l'original qui est dans ma librairie et j'ai toujours le meme probleme , dois-je ajouter quelque chose ???? merci
Reply 5 years ago
Bonjour AbdourrahimG, malheureusement la bibliothèque du magasin d'arduino ne fonctionne pas avec ce code (j'ai aussi essayé) vous devez installer les librairies que j'ai uploadées sur le site. J'ai vérifié et ils fonctionnent, vous devez copier le contenu dans \ Arduino \ libraries \ L293. Pour plus d'informations, visitez le site du propriétaire https://sites.google.com/site/bluetoothrccar/home...
Danilo
Ciao AbdourrahimG, purtroppo libreria dello store di arduino non funziona con questo codice (ho provato anche io) è necessario installare le librerie che ho caricato sul sito. Ho controllato e funzionano, devi copiare il contenuto in \Arduino\libraries\L293. Per maggiori info consulta il sito del proprietario https://sites.google.com/site/bluetoothrccar/home...
Danilo
Reply 5 years ago
Les Salut mon ami ! pour la libraire L293 le zip c'est bon et grace a ton aide j'ai reussi a faire revivre une ancienne voiture de formula one qui a rendue mon fils le plus heureux du moment et encore merci pour votre travail, je t'enverai une video prochainement.....
Reply 5 years ago
Grande! aspetto il video :)
Reply 5 years ago
Les/ * PRINCIPALES ------------------------- ---------------------- --- * /
Boucle vide ()
{
if (Serial.available () == 4) {
timer2 = millis (); // Mémorise l'heure à laquelle la dernière commande a été reçue
memcpy (prevCommands, commandes, 4); // Stockage des commandes reçues
commandes [0] = Serial.read (); // Direction
commandes [1] = Serial.read (); // Vitesse
commandes [2] = Serial.read (); // Angle
commandes [3] = Serial.read (); // Lumières et états des boutons
/ *
Depuis le dernier octet donne l'angle du servo (entre 0-180), il ne peut jamais être 255. Parfois, les deux
les commandes précédentes ramassent des valeurs incorrectes pour la vitesse et l'angle. Ce qui signifie qu'ils obtiennent la direction
corriger 100% du temps mais obtenir parfois 255 pour la vitesse.
* /
if ((commandes [2] <= 0xB4) && ((commandes [0] <= 0xF5) && (commandes [0]> = 0xF1))) {
// Assurez-vous que la commande reçue implique le contrôle des moteurs de la voiture (0xf1,0xf2,0xf3)
if (commandes [0] <= 0xf3) {
if (commands [0] == 0xf1) {// Vérifie si la commande move forward a été reçue
if (prevCommands [0]! = 0xf1) {// Changer l'état de la broche pour avancer seulement si l'état précédent n'était pas avancé
redCar.forwardPin_1W (commandes [1]);
//Serial.println("Direction mise à jour FWD ");
}
exit status 1
'class L293' has no member named 'forwardPin_1W'
5 years ago
That's a neat mod :) Thanks for sharing!
Reply 5 years ago
thanks!
5 years ago
Code compiled fine . Good one ,thats the way to present arduino.
Reply 5 years ago
Let me know!
5 years ago
Ill look closer as I need to do this with an old helicopter.
One thing I notice though is it seems you could save space and weight and get extra power by using one 18650 lithium ion or LiPo battery
Reply 5 years ago
Yes, good point! Im looking also for a 2s lipo battery