MarcoGPS
Published © LGPL

Renewing the Nikko Turbo 2 RC Car

Vintage 1980s Nikko remote control RC car mascot.

BeginnerFull instructions provided8,073
Renewing the Nikko Turbo 2 RC Car

Things used in this project

Hardware components

5 mm LED: Red
5 mm LED: Red
×1
5 mm LED: Green
5 mm LED: Green
×1
Arduino Nano R3
Arduino Nano R3
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
HC-06 Bluetooth Module
if using another model should verify compatibility.
×1
Buzzer, Piezo
Buzzer, Piezo
×1
Resistor 221 ohm
Resistor 221 ohm
×2

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Flux, Soldering
Solder Flux, Soldering
Hot glue gun (generic)
Hot glue gun (generic)
Drill / Driver, Cordless
Drill / Driver, Cordless

Story

Read more

Custom parts and enclosures

Protoboard for Nikko Turbo II RC Car

The components are approximated from the actual ones used.

Schematics

Wiring diagram for Nikko Turbo II RC Car

Engine 2 is the steering system, Battery are used by Nikko.

Code

Arduino code for the NIKKO Turbo II RC Car

Arduino
Engine 2 is the Magnetic steering system used in NIKKO. If another type is needed, the necessary changes must be made.
//including the libraries
#include <SoftwareSerial.h> // TX RX software library for bluetooth

//Defining pins for RGB led
#define GREEN 12
#define RED 11
#define delayTime 3

//Initializing pins for bluetooth Module
int bluetoothTx = 8; // bluetooth tx to 2 pin
int bluetoothRx = 7; // bluetooth rx to 3 pin
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
//Front Motor Pins  
int Enable1 = 3;
int Motor1_Pin1 = 2;  
int Motor1_Pin2 = 4;  
//Back Motor Pins      
int Motor2_Pin1 = 5; 
int Motor2_Pin2 = 9;
int Enable2 = 10;
//Front Light pins   
int front_light1 = GREEN;
//Back light pins
int back_light1 = RED;
int horn = 6;
char command ; //variable to store the data
int velocity = 0; //Variable to control the speed of motor
void setup() 
{       
  //Set the baud rate of serial communication and bluetooth module at same rate.
  Serial.begin(9600);  
  bluetooth.begin(9600);
  //Setting the L298N, LED and RGB LED pins as output pins.
  pinMode(Motor1_Pin1, OUTPUT);  
  pinMode(Motor1_Pin2, OUTPUT);
  pinMode(Enable1, OUTPUT);
  pinMode(Motor2_Pin1, OUTPUT);  
  pinMode(Motor2_Pin2, OUTPUT);
  pinMode(Enable2, OUTPUT); 
  pinMode(front_light1, OUTPUT);  
  pinMode(back_light1, OUTPUT);
  pinMode(horn, OUTPUT);
  pinMode(GREEN, OUTPUT);
  pinMode(RED, OUTPUT);
  //Setting the enable and LED pins as HIGH.
  digitalWrite(GREEN, HIGH);
  digitalWrite(RED, HIGH);
  digitalWrite(Enable2, HIGH);
  digitalWrite(back_light1, LOW);
  digitalWrite(front_light1, LOW);
}
void loop(){
  if(bluetooth.available() > 0){  //Checking if there is some data available or not
    command = bluetooth.read();   //Storing the data in the 'command' variable
    Serial.println(command);      //Printing it on the serial monitor
    
    //Change pin mode only if new command is different from previous.   
    switch(command){
    case 'F':  //Moving the Car Forward
      digitalWrite(Motor1_Pin1, LOW);
      digitalWrite(Motor1_Pin2, HIGH);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      break;
    case 'L':  //Moving the Car Forward Left90
      digitalWrite(Motor1_Pin1, LOW);
      digitalWrite(Motor1_Pin2, HIGH);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, HIGH);
      delay (30);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      break;
    case 'G':  //Moving the Car Forward Left45
      digitalWrite(Motor1_Pin1, LOW);
      digitalWrite(Motor1_Pin2, HIGH);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, HIGH);
      delay (30);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      break; 
    case 'R':   //Moving the Car Forward Right90
      digitalWrite(Motor1_Pin1, LOW);
      digitalWrite(Motor1_Pin2, HIGH);  
      digitalWrite(Motor2_Pin1, HIGH);
      digitalWrite(Motor2_Pin2, LOW);
      delay (30);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      break;
    case 'I':  //Moving the Car Forward Right45
      digitalWrite(Motor1_Pin1, LOW);
      digitalWrite(Motor1_Pin2, HIGH);
      digitalWrite(Motor2_Pin1, HIGH);
      digitalWrite(Motor2_Pin2, LOW);
      delay (30);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      break; 
    case 'S':   //Stop
      digitalWrite(Motor1_Pin2, LOW);
      digitalWrite(Motor1_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      digitalWrite(Motor2_Pin1, LOW);
      break; 
    case 'B':  //Moving the Car Backward
      digitalWrite(Motor1_Pin1, HIGH);
      digitalWrite(Motor1_Pin2, LOW);
      break;
    case 'J':  //Moving the Car backward Right90
      digitalWrite(Motor1_Pin2, LOW);
      digitalWrite(Motor1_Pin1, HIGH);
      digitalWrite(Motor2_Pin1, HIGH);
      digitalWrite(Motor2_Pin2, LOW);
      delay (30);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      break;        
   case 'H':  //Moving the Car backward Left90
      digitalWrite(Motor1_Pin1, HIGH);
      digitalWrite(Motor1_Pin2, LOW);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, HIGH);
      delay (30);
      digitalWrite(Motor2_Pin1, LOW);
      digitalWrite(Motor2_Pin2, LOW);
      break;
    case 'W':  //Front light ON 
      digitalWrite(front_light1, HIGH);
      break;
    case 'w':  //Front light OFF
      digitalWrite(front_light1, LOW);
      break;
    case 'U':  //Back light ON 
      digitalWrite(back_light1, HIGH);
      break;
    case 'u':  //Back light OFF 
      digitalWrite(back_light1, LOW);
      break; 
    case 'V':  //Horn On
{
  int i = 200; // The starting pitch
  while(i < 800) {
    i++;
    tone(horn, i); // Emit the noise
    delay(5);
  }
  delay(100); // A short break in between each whoop
}
      break; 
    case 'v':  //Horn OFF 
       noTone(horn);
      break;   
    case 'x': //Turn ON Everything
    break;
    case 'X': //Turn OFF Everything
      break;
  
    //Controlling the Speed of Car  
default:  //Get velocity
      if(command=='q'){
        velocity = 255;  //Full velocity
        analogWrite(Enable1, velocity);
      }
      else{ 
        //Chars '0' - '9' have an integer equivalence of 48 - 57, accordingly.
        if((command >= 48) && (command <= 57)){ 
          //Subtracting 48 changes the range from 48-57 to 0-9.
          //Multiplying by 25 changes the range from 0-9 to 0-225.
          velocity = (command - 48)*25;       
          analogWrite(Enable1, velocity);
        }
      }
      }
  }
}

Credits

MarcoGPS

MarcoGPS

0 projects • 0 followers

Comments