Arduino Pickup Truck With Light and Distance Sensor




About: Writer - former programmer. Author of Macadam, La Gran Monterrey, El Sueño Colbert, Crónicas de Motos

In this tutorial I will explain how to build this Arduino Cardboard Pick Up Truck with obstacle avoidance and a cool red light. It’s low cost and has more than just robot movement.

Another advantage is the power usage: only 4 AA batteries for DC motors + Arduino juice.

Let's start!

Step 1: Materials

  1. Arduino UNO
  2. Motor Shield L293 V1 for Arduino ($5.50) with free shipping
  3. Robot Car Chasis with DC motors ($18) with free shipping
  4. HC-SR04 Ultrasonic distance sensor ($3.96)
  5. 1 red led (cents)
  6. 1 220k resistor (cents)
  7. 1 switch (cents)
  8. Some cables, glue and cardboard cents4 AA bateries

Step 2: Mounting

  1. Mount the car chassis with the motors and wheels (instructions included with the chasis)
  2. Connect motor cables (one red and one black cable to each motor)
  3. Connect 4 cables to the HC SR04 sensor

Step 3: Motor Shield Preparation

Motor shield V1 comes ready for Arduino stacking, but since we need extra pins for the sensor and led, we will have to add those pins to the Shield Board with a little soldering.

Basically we will have to add a pin for 5v, a pin for Ground connection, a pin for Digital 2, a pin for Analog5 and a pin for Analog2. By default all those are holes.

Step 4: Wiring and Circuit

Now we connect all the wires: motors to M1 and M2, led to Digital Pin2 and ground, Sensor to 5v, ground, trigger to A2 and Signal to A5. Finally, power ground from the battery pack to ground in the Motor Shield, power red to the switch and the other side of the switch to Motor Shield Power.

Step 5: Software

Now we upload the software piece to Arduino.

Step 6: Cardboard Truck Design

Using scissors, cardboard and some glue you can create this Pickup Truck structure. Don't forget to put the Led in the top.

Step 7: Testing

Put the batteries, open the switch and have fun!



    • Backyard Contest

      Backyard Contest
    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Fandom Contest

      Fandom Contest

    2 Discussions