Remote Controlled Robot Car

by CCmine8 in Circuits > Arduino

316 Views, 3 Favorites, 0 Comments

Remote Controlled Robot Car

9FC9F201-309D-43D1-A917-AED6D3B7BF28.jpeg
E2C4920B-8422-40B7-BBE0-4912DFE103D1.jpeg
259145FB-2C57-4E46-AFE8-82344EF250EA.jpeg
679EAEB4-935D-45BD-9CBD-5946D7D41054.jpeg

Whether you're an absolute beginner, or a robotics 4 master, this robot car is sure to be a great build project! It has minimal parts, and can be assembled and disassembled with relative ease.

The robot car itself is loaded with sensors. It has an Opto-interrupter for detecting the car's rpm, an ultrasonic sensor for checking the distance to an object, Infrared sensors for detecting objects in front of it, TCR5000s for following lines, and even the robot's power. You can also control the car's direction, speed, and two onboard LED's.

The car has a Arduino board with a breakout to maximize how many functions of the car you can use at once, and with a bit of programming experience, you can get to programming this car in no time!

In this Instructable, I'm going to be showing you how to assemble, code, and remotely-control this robot-car!

To start off, you're going to need some supplies.

I have both an BOM with accompanying assembly available for download at the bottom of this step, and a link to a CAD version of the robot (with restraints!) if you run into any problems while trying to assemble the robot here.

Supplies

Here's what your going to need:

Tools:

  • Access to a 3D printer
  • Access to a laser cutter
  • Access to a Soldering Iron
  • M3 Wrench
  • Android phone (Required for Bluetooth Control)
  • Cura (Or any 3D - slicing software that you are comfortable with) - Download Cura

Parts:

  • Arduino UNO
  • Arduino R3 Sensor Shield
  • 2 Infrared Obstacle Avoidance Sensor Modules
  • SG0 9G Micro Servo
  • HC-SR04 Ultrasonic Sensor
  • 2 TCR5000s
  • 2 L298N Motors & accompanying Wheels
  • 2 Adafruit 3782 Encoder Disks
  • 2 Opto-Interrupters
  • 2 WS2812 LEDs
  • 40mm Swivel Caster Wheel
  • Power Switch
  • L298N Motor Driver
  • 18650 Dual Battery Holder
  • 2 18650 rechargeable lithium ion battery
  • HC-05 Bluetooth Module
  • 1 20kΩ and 33kΩ Resistors
  • 2 Encoder Disks
  • 6 PH Countersunk flat head screws:
    • 2 M3x0.5 x 12 mm (Stainless steel)
    • 4 M3x0.5 x 30 mm
  • 8 PH Pan head screws M3x0.5 x 10 mm
  • 9 Slotted cheese head screws:
    • 6 M3x0.5 x 16 mm
    • 3 M3x0.5 x 25 mm
  • 2 PH Raised countersunk head screw M1.6x0.35 x 10mm (Stainless Steel)
  • 1 PH Countersunk flat head screw M1.6x0.35 x 8mm (Stainless Steel)
  • 4 Female/Female Standoff M3x0.5 x 12mm
  • 15 Hex thin nut grade A & B M3
  • 2 Prevailing torque nut/Nylon lock nut M3x0.5
  • 2 Plastic Fasteners (Zip-ties)
  • Nylon Spacers
    • 2 (13 mm)
    • 6 (10 mm)
    • 2 (6 mm)
    • 3 (4 mm)
    • 2 (2 mm)
  • Jumper Wires (I recommend having more available than strictly needed)
    • 26 Female - Female
    • 1 Male - Male

Please note that unless explicitly stated, screws can be either Nylon or Stainless Steel, but ensure that the corresponding nut is of the same material.

3D Printed parts:

  • Opto-Interrupter Mount
  • Ultrasonic Mount
  • Motor Mounts:
    • 2 Inside Motor Mount
    • 2 Outside Motor Mount
  • Bluetooth Mount
    • Bluetooth / LED Mount
  • Wire clip (Optional - but it's nice to keep wires sorted)

Laser-cut part:

  • Chassis (Wood or Acrylic is fine)

Opto-Interrupter Assembly

40D6186E-3708-41CC-A13C-C5DB21301BF0.jpeg
A4E5C8EA-303F-469C-A274-D4DEC29C70DD.jpeg
A4B24FFE-DE3E-40C7-A995-B642A9C14188.jpeg
7C77A154-C60B-44C3-9942-A1D66186CDF5.jpeg
5474127F-5D59-43E1-8D12-4173647F5DBC.jpeg
A146C033-EC5B-492C-BEC5-4E0410DBE2EB.jpeg
E607C997-683B-4E58-8FD4-FE3F09C1D9FC.jpeg

For the first step, you will need:

  • 2 Opto-Interrupters
  • Chassis
  • Opto-Interrupter Mount

First, snap each of the Opto-Interrupters into the Opto-Interrupter Mount. Then snap the Opto-Interrupter Mount into the holes on the back of the Chassis as shown in the photo, making sure that they aren't put in backwards. After that, route the wires through the wire hole, and you've finished the first step!

Do note that the rest of the photos will show the Opto-Interrupters missing from the robot for the sake of simplicity in the photos, but you do not need to remove them for the rest of the assembly.

Attach Motor Driver

745908D9-8124-4762-A521-976DF026874D.jpeg
E3A29358-5A6C-4628-B691-AD4986A9E829.jpeg
F983C8A1-C996-4577-9B30-656EEA332ED0.jpeg
E38B897E-FB1A-499D-A554-C091BA24F349.jpeg
AD93C914-DC2A-4D15-862A-48C6E756417D.jpeg
1C32D71F-64D2-430C-8475-0E887ECC34EA.jpeg

For this step, you will need:

  • 1 Motor Driver
  • 2 Inner Motor Mounts
  • 4 10mm Nylon Spacers
  • 4 Slotted Cheese Head screws M3x0.5 x 16mm
  • 4 3mm Nuts

First, and this is one of the only steps in the entire process where it is necessary that you do these in order, make sure that you put the two inner Motor Mounts in BEFORE the Motor Driver. I've had to make off my Motor Driver a few times because I made this mistake. Once you put the two in, Take the screws and spacers and put them on the Driver as pictured. Then, attach the Motor Driver on the same side as the Opto-Interrupter Mount, and fasten the screws with the Nuts to finish off this step.

Assemble the Motor

88E871A0-FD82-47C4-9916-74C53EFA6E95.jpeg
71B1021C-94CD-423E-AAC8-7DEDBC2E0748.jpeg
42EFF4E6-87FE-4F73-81EF-E796D3C32EE1.jpeg
17581F27-CA0D-4A9E-B17D-BBC464A53212.jpeg
EA206B4E-325A-4727-A639-1D4A9A5EB1F0.jpeg
7EC9AD6D-82B5-4899-A1B7-F0FD627A0C91.jpeg
76DD8EC1-151A-4503-9191-0F8A045A7940.jpeg
1D875D2E-A0C3-43DA-A26F-AF8E4C2D6C92.jpeg
841FBB8C-78F3-4B82-9404-8F4B6AB73960.jpeg
D973EC92-2F51-4D70-B17B-C46C87044CA4.jpeg

For this step, you will need:

  • 2 L298 Motors
  • 2 Outer Motor Mounts
  • 1 Switch
  • 2 Wheels
  • 2 Encoder Disks
  • 4 PH Countersunk Flathead Screw M3x0.5 x 30mm
  • 4 M3 Nuts

Before Assembling the car, you will need to solder wires to the metal parts of the Motors as show in the 5th photo. I also recommend that you zip-tie the wires to the motor to receive stain on those little metal tabs, because they can break off easily. You don't need to solder the switch right now, but if you do skip to the wiring step for instructions on how to solder it.

Once you've that, you can assemble all the parts. Start by taking your switch and attaching it to the back of the car. If you have soldered the wires, make sure you route them through the little hole under the Motor Driver. Once you've done that, run the screws through the outer motor mount and motor as pictured in the 4th photo. Although Make sure that you do that in the correct orientation. Although it is not pictured, MAKE SURE you attach the you attach the encoder disks to the motor BEFORE you put them on as shown in photo 7 if you still have the Opto-Interrupters attached. After that, snap the outer motor mount into place and run the rest of the screw through the inner motor mount. Make sure that you route the wires for the motor through the hole above them. To finish it off, use nuts to fasten the whole piece together. Repeat the step for the other side, and you will be finished with the Motor Assembly.

Mount the Bluetooth Module / Battery / LEDs

C79D373D-31CE-45C2-962D-89C1D89AF27D.jpeg
36F7C656-0C3B-4C7C-A70F-0F037EF50D03.jpeg
2FA4A315-AA4B-4B52-B041-027EBF7F6898.jpeg
F0712C8F-246C-400D-A2D9-D695503E2890.jpeg
90702BF4-190D-4D2C-821B-41A7B5B91930.jpeg
E9AFB503-82E9-4D9E-821A-DB81A7700DB1.jpeg

For this step, you will need:

  • 18650 dual battery holder
  • 2 WS2812 LEDs
  • Bluetooth / LED Mount
  • LED Cover
  • HC-05 Bluetooth Module
  • 2 PH Countersunk Flathead screws M3x0.5 12mm
  • 2 M3 Nuts

Before assembling, you should solder the LEDs with a wire as pictured so that the LED can be programmed and powered.

First, take the Bluetooth/LED Mount and friction-fit the two LEDs into place as pictured, and use the LED Mount to cover the two LEDs. Then take the battery holder and put the two screws through the holes. Then, with the LEDs facing AWAY from the battery holder, and the Bluetooth Module facing AWAY from the Motors, thread the screws through the Bluetooth Mount and finally fasten them with the 2 Nuts.

!! NOTE !!: All following photos will show the Bluetooth /LED mount in the incorrect orientation, as I put it in the wrong way during assembly. Please ignore this and install it as it is described in this step only.

Attach the Arduino

0E77C4E9-B9DF-4BDB-934C-7143814CAB7E.jpeg
93A3BFF4-775A-47E2-9164-03ACB56E033C.jpeg
A286DDE2-8EFB-47EF-979B-F908D17AB3FD.jpeg
F641F57C-FF63-4D34-AE9C-1F4BA491BDF5.jpeg
41A7A4B0-4E00-45A4-9F64-11A0A7B64A8F.jpeg

For this step, you will need:

  • Arduino Uno
  • Arduino R3 Sensor Shield
  • 3 Slotted Cheese Head Screws M3x0.5 25mm
  • 3 4mm Nylon Spacers
  • 3 M3 nuts

First, attach the Arduino Uno to the Sensor Shield as shown. Then, take the three screws and thread them through the Arduino and Sensor shield with the Nylon Spacers at the end. Finally, fasten the Arduino to the Chassis with the 3 M3 nuts.

Mount the Remaining Sensors

6D2BDBE9-BDAE-4647-B32F-B7E2F19C092A.jpeg
9AF9B870-A594-43EF-B2EE-BACCC8A9BE93.jpeg
4799C01F-285C-4498-AC3C-D6C20E751866.jpeg
03AF518D-E4DD-48E4-9FCA-1C63BE9C590E.jpeg
B71C81BF-ADCC-404D-B9A2-4D85FBF57337.jpeg
4DA36D97-DE8D-4E34-A22E-A2AE353019AC.jpeg
F766C73B-B803-4238-9E86-BAC9C17557FA.jpeg
7AB6FD6B-1BC5-40D1-9323-804186E678BA.jpeg
9E13D2AC-900C-496E-86A2-F791A7099E72.jpeg
04AB77C0-A8C6-4503-A52A-3BD7AE55A23A.jpeg
554AE4AD-47A3-48DB-817B-C03B19E18FE2.jpeg
80F9E065-901F-45FA-B13B-DAFEE21EA436.jpeg
6F37270D-9118-4071-B513-4D0CBD007DE2.jpeg
4EA12BDE-886D-46C4-92F0-46CC93A854D0.jpeg

For this step, you will need:

  • 2 TRC5000s
  • 2 Infrared Obstacle Avoidance Modules
  • 1 Ultrasonic Sensor
  • Ultrasonic Mount
  • 2 13 mm Nylon Spacers
  • 2 10 mm Nylon Spacers
  • 2 6 mm Nylon Spacers
  • 2 2 mm Nylon Spacers
  • SG0 9G Micro Servo
  • 2 PH Raised Countersunk Flathead screw M1.6x0.35 x 10 mm
  • 1 PH Raised Countersunk Flathead screw M1.6x0.35 x 8 mm
  • 2 Slotted Cheese Head screws M3x0.5 16 mm
  • 2 Hex Screws M3x0.5 30 mm
  • 2 M3 nuts
  • 2 M3 lock-nuts

First, take the M1.6x0.35 8 mm screw, Ultrasonic Mount, and Servo as fasten them together as pictured above. Then take the Ultrasonic Sensor and friction-fit it into the Ultrasonic Mount. After that, take the Servo-assembly and thread the wire through the two holes shown in the picture, and screw the Servo into the Chasis using the M1.6x0.35 10mm screws. For the TCR5000L assembly, take the Hex screw, 13mm, 10mm, and 6mm Nylon Spacers, and the lock-nut. Put the Hex screw through the Chassis, and the thread the Nylon Spacers through the screw. Attach a TCR facing downwards onto the screw, and tighten a Lock-nut until the TRC is sturdy but able to move. Do not tighten the lock-nuts too tight or you can damage the TRC. Repeat this with the other side. Finally, take the Infrared Obstacle Avoidance Modules, Slotted Cheese head screws, and nuts. Thread the Cheese head screws through the Infrared modules, and attach the 2 mm Nylon spacer. Fasten the module to the Chassis using the nuts, and finish by repeating for the other side.

Fasten the Caster Wheel

2EE1CCBC-C707-4DE3-B313-17BCA793CC97.jpeg
C9EB6C35-84D9-4139-BC9F-302FDA329924.jpeg
667A1E2E-6BA5-4B3D-87F2-3C5EADD1C1E3.jpeg
E22D3074-9121-4B60-B203-74BB5E36A167.jpeg
6456279A-E05B-4093-A33F-985EBDAEAB23.jpeg

For this step, you will need:

  • 8 PH Pan head screws M3x0.5 10 mm
  • 4 Hex Fasteners M3 12 mm
  • Caster 40mm Swivel Plate

First, take 4 of the Screws and thread them through the four holes of the Swivel plate, and fasten them with the Hex Fasteners. To finish it off, do the same thing with the final four screws between the Chassis and the Hex fasteners, and you've finished assembling your robot car!

Wire the Robot

6D34D431-0C0F-4D87-B246-5C0487003607.jpeg

This is the step that you will need the Soldering Iron, Wires, and Jumper Cables for. Soldering the Voltage Divider is not required, but is definitely recommended as it helps you keep track of the battery of the Robot. You will need to Solder wires to the tabs of the Motors, although it doesn’t matter in what order that you solder them.

Programming the Bluetooth Control

Robot Car Joystick Demonstration
7B0CAAB0-A1E7-4095-9855-11A16C7A9A14.jpeg
3B4C8CC8-4B05-4A91-B30A-A2A5FB242C24.jpeg

Once you've got everything together, you can finally get to actually controlling the car!

You will need to download the latest version of Arduino, so if you haven't already done so you can download it here.

You will also need the Software Serial Library, which can be directly downloaded through Arduino.

All you need to do for the robot car is upload the provided file at the bottom of this step onto the Arduino. To connect the Bluetooth module to the phone, while holding the button on the Bluetooth module, go into the phone's settings and connect to the Bluetooth module. If you are successful, the light on the Bluetooth module should blink. Once you have done that, open the joystick app on the phone and click the Bluetooth icon in the top right corner. Select the name of the Bluetooth module, and it will tell you once it has connected. Once it has, you should be able to drive around the car by moving the joystick icon in the middle!

Challenge: Battery Charge LED

Once you've gotten the joystick working, you can go onto an optional challenge: Hooking up the voltage monitor to display the battery's charge using an LED!

Just upload the code, hook up the LED, and download the FastLED library to get it all working!