12V Ride-On Truck With Remote Modification

About: Students at Wichita State University run a program that modifies off-the-shelf ride-on toy cars for kids with disabilities. Our cars feature more technical builds with joysticks and arduinos. We post our ins...

Listed below are the materials and tools required for modifying the truck. Most of the hardware may be purchased from Home Depot.

Supplies:

1. Best Choice Products 12V Ride On Car Truck w/ Remote Control, 3 Speeds, Spring Suspension, LED Lights, Red

https://www.walmart.com/ip/Best-Choice-Products-12...

2. Mini Mountable Analog Joystick

https://shop.pimoroni.com/products/mini-analog-joy...

3. 3 Wooden Boards

4. 2 Wooden Right Triangles

5. 4 Hinge Clamps

6. Velcro Strips

7. 1 Metal Strip

8. 2 SPST Switches

9. 1 Wooden Block

10. Electrical Wires

11. Tubing

12. Washers

13. 1 Metal Wire

14. Sensor

15. Screws

16. Bolts

17. Metal Tape

Tools:

1. Measuring Tape

2. Dremel tool Drill Drill Bits - 3/16", 1/4", 1/8"

3. Screwdrivers

4. Wrenches

5. Hack Saw

6. Pliers

7. Wire Strippers

8. Wire Cutters

9. Wire Crimpers

10. Soldering Iron

11. Solder

Supplies:

Step 1: Assemble the Truck

Follow the assembly instructions that comes with the truck. Disregard the steps for installing the seat.

Step 2: Install the First SPST Switch (Kill Switch)

1. Drill a hole into the back of the car through the plastic.

2. Connect two wires to the switch.

3. Marry the two wires with wires already connected to the battery.

4. Feed the two wires and the switch along the left side of the car.

5. Run the toggle through the hole.

6. Screw on the cover for the toggle.

7. Add On/Off labels respectively to the top and bottom of the toggle.

Step 3: Construct the Backrest

1. Position the two wooden triangles on top of the smaller of the wooden boards, spaced apart and with the longer side facing the front of the board. Drill two nails, one for each triangle, through the wooden board and into the triangles.

2. Place the board in the seating space with the triangles in the back of the car. Drill four screws through the board into plastic.

3. Lay the larger wooden board against the triangles until it reclines at 30 degrees. Drill two nails, one for each triangle, through the board into the triangles.

4. Apply Velcro strips across headlights and the back of the board. Let the board rest against the headlights.

Step 4: Construct the Tray

1. Attach two hinge clamps to a side door and screw them closed. Apply Velcro strips to the top of the hinges.

2. Drill a hole approximately the diameter of the joystick in the center of the wooden board.

3. Bend the metal strip into a rectangle approximately the width and depth of the joystick with one of the connectors facing inward.

4. Apply Velcro strips along the bottom of the metal strip facing upward and on one side. Apply the corresponding Velcro strips along the bottom and a non-connector side of the joystick.

5. Align the metal strip to the center of the joystick and attach by the Velcro.

6. Place the joystick and its band on the bottom of the wooden board and center them at the hole. The analog stick must go through the hole and maintain its full axis. Drill two nails through the metal strip, one at each end, and into the wooden board.

7. Drill the last two hinge clamps into one end of the bottom of the wooden board. Snap them onto the opposite side door and screw them closed.

8. Apply a line of Velcro strips to the other end of the wooden board. They should match the strips on the other hinges.

9. Lower tray.

Step 5: Assemble and Wire the Joystick

1. Attach electrical wires to the connectors on the joystick.

2. Feed the wires through the tube.

3. Thread the exposed ends of the wires through openings underneath the dashboard and connected them to the Arduino.

4. Attach a makeshift handle to the analog stick.

Step 6: Install the Second SPST Switch (Controller Switch)

1. Drill a hole into the side of the car under the hood next to the battery.

2. Connect two wires to the switch.

3. Marry the two wires with wires already connected to the battery.

4. Feed the two wires and the switch along the left side of the car.

5. Run the toggle through the hole.

6. Screw on the cover for the toggle.

7. Add Joystick/Remote labels respectively to the top and bottom of the toggle.

Step 7: Attach the Sensor / Miscellaneous

1. Place the sensor light on the center of the wooden block. Drill a small screw though the hole present on the sensor through the block.

2. Add metallic tape to the steering bar.

3. Position the block so that the sensor light is situated above the tape by a few centimeters. Drill screws into the block through the plastic.

4. Wrap metal wire around the wheel bar and steering bar. This will prevent the steering bar from moving away from the sensor.

5. Add washers to the end of the steering bar emerging from the dashboard. Seal with a metal wire.

Step 8: Upload Arduino Code

int ForwardReverse = A2; // Analog value from joystick.
int Forward = 3;

int Reverse = 4; int joystick_y = 1;

int leftright_input = A5;

int left_output_pin = 5;

int right_output_pin = 6;

int joystick_x = 1; int line_sensor_pin = 7;

int line_sensor_value = 0;

int turned_right = 0;

int turned_left = 0;

char currentstate = 0;

int speed_pin = 9;

int ramp = 0;

int deceleration = 0; int LED = 13;

//limit for deadzone

const int right_limit = 750;

const int left_limit = 250;

const int forward_limit = 250;

const int reverse_limit = 750;

const int speed_value = 100;

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

pinMode(ForwardReverse,INPUT);

pinMode(Forward, OUTPUT);

pinMode(Reverse, OUTPUT);

pinMode(leftright_input, INPUT);

pinMode(left_output_pin, OUTPUT);

pinMode(right_output_pin, OUTPUT);

pinMode(line_sensor_pin,INPUT);

pinMode (speed_pin, OUTPUT); }

//reset

void settozero(){

//digitalWrite(Forward, LOW);

//digitalWrite(Reverse, LOW);

digitalWrite(right_output_pin, LOW);

digitalWrite(left_output_pin, LOW);

analogWrite(speed_pin, 0);

}

void drivemode(char mode) {

switch (mode){

case 'F':

settozero();

digitalWrite(Forward,HIGH);

analogWrite (speed_pin,ramp++);

if(ramp>speed_value){ramp=speed_value;}

deceleration=1;

break;

case 'B':

settozero();

digitalWrite(Reverse,HIGH);

analogWrite (speed_pin,ramp++);

if(ramp>speed_value){ramp=speed_value;}

deceleration=1;

break;

case 'L':

settozero();

digitalWrite(left_output_pin,HIGH);

break;

case 'R':

settozero();

digitalWrite(right_output_pin,HIGH);

break;

case 1:

settozero();

digitalWrite(Forward,HIGH);

digitalWrite(left_output_pin,HIGH);

analogWrite (speed_pin,ramp++);

if(ramp>speed_value){ramp=speed_value;}

deceleration=1;

break;

case 2:

settozero();

digitalWrite(Forward,HIGH);

digitalWrite(right_output_pin,HIGH);

analogWrite (speed_pin,ramp++);

if(ramp>speed_value){ramp=speed_value;}

deceleration=1;

break;

case 3:

settozero();

digitalWrite(Reverse,HIGH);

digitalWrite(left_output_pin,HIGH);

analogWrite (speed_pin,ramp++);

if(ramp>speed_value){ramp=speed_value;}

deceleration=1;

break;

case 4:

settozero();

digitalWrite(Reverse,HIGH);

digitalWrite(right_output_pin,HIGH);

analogWrite (speed_pin,ramp++);

if(ramp>speed_value){ramp=speed_value;}

deceleration=1;

break;

case 0:

settozero();

if (currentstate == 1 || currentstate == 'L' || currentstate == 3) {

while ( line_sensor_value > 0 ) {

digitalWrite(right_output_pin, HIGH);

line_sensor_value = digitalRead(line_sensor_pin);

}

settozero();

currentstate = 0;

}

if (currentstate == 2 || currentstate == 'R' || currentstate == 4) {

while ( line_sensor_value > 0 ) {

digitalWrite(left_output_pin, HIGH);

line_sensor_value = digitalRead(line_sensor_pin);

Serial.println("what here");

}

settozero();

currentstate = 0;

}

analogWrite(speed_pin,0);

ramp = 0;

if (deceleration > 0) {

digitalWrite(LED,HIGH);

delay(1000);

digitalWrite(LED,LOW);

}

digitalWrite(Forward, LOW);

digitalWrite(Reverse, LOW);

deceleration = 0;

break;

}

currentstate = mode; }

void loop() { // put your main code here, to run repeatedly:

delay(25);

joystick_y = analogRead(ForwardReverse);

joystick_x = analogRead(leftright_input);

line_sensor_value = digitalRead(line_sensor_pin);

if (joystick_y < forward_limit) {

if ( joystick_x < left_limit) {

drivemode(1);

}

else if ( joystick_x >= left_limit && joystick_x <= right_limit){

drivemode('F');

}

else if (joystick_x > right_limit ) {

drivemode(2);

}

}

if ( joystick_y >= forward_limit && joystick_y <= reverse_limit) {

if ( joystick_x < left_limit) {

drivemode('L');

}

else if ( joystick_x >= left_limit && joystick_x <= right_limit){

drivemode(0);

}

else if (joystick_x > right_limit ) {

drivemode('R');

}

}

if ( joystick_y > reverse_limit) {

if ( joystick_x < left_limit) {

drivemode(3);

}

else if ( joystick_x >= left_limit && joystick_x <= right_limit){

drivemode('B');

}

else if (joystick_x > right_limit ) {

drivemode(4);

}

}

}

Share

    Recommendations

    • Party Challenge

      Party Challenge
    • Woodworking Contest

      Woodworking Contest
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    Discussions