Electronic Dog (laser Following Robot)
by FerrelA in Circuits > Robots
7689 Views, 18 Favorites, 0 Comments
Electronic Dog (laser Following Robot)
This instructable provides information on how to construct a laser guided car. Like a dog or a cat, this little car will follow a laser around the room. With this more controlled companion, you can retrieve something on the other side of the room (as long as someone else is willing to place that something on the car) without having to stand up.
Downloads
Materials
- Arduino Uno
- laser pointer
- 80 * 80 solder board
- 4 photodiodes
- 4 3.9 MOhm resistors
- Red LED
- Green LED
- 2 1kOhm resistors
- H-bridge
- 1 9V battery
- 5 AA batteries
- 1 switch (2 in 2 out)
- sparkfun multichassis (see step 2)
- wires and solder
- tin foil
Order and Construct Chassis
We used the multichassis kit from sparkfun. This tank-like chassis is a durable option that will be able to handle rough terrain. It also provides a solid base for the electronic’s mount.
Here is the link: https://www.sparkfun.com/products/12091
We used the instructions provided to construct the chassis. Due to the speed at which the batteries were drained by the motors, we did put on the bottom plate and only zip tied the battery pack underneath.
Chassis/Arduino Mount
The yellow and pink plastic pieces shown in the photo above were 3d printed. These pieces house the Arduino, the wiring for the motors and Arduino, and the photodiodes.
We drilled holes into the Arduino mount in order to screw it onto the chassis using some of the extra screws provided in the kit. The long flat part that protrudes from the housing should extend out past the chassis in order to be able to slide the photodiode mounts into them.
If you do not have access to a 3D printer you can skip this step. The rest of this instructable is based on using this 3D printed mount but the circuit diagram is provided in the second to last step.
H-Bridge Setup
The H-bridge was first centered in the solder board. We then soldered leads to pegs numbered 2, 3, 6, 7, 10, 11, 14, and 15 as shown in the picture below. This held the H-bridge in place. Stripped wires for ground, 7.5 Volts, and 5 Volts were added to the underside of the board as well. Pins numbered 1, 8, 9, and 16 were connected with wire to the 7.5 volt wire and pin number 5 was connected to ground.
Photodiode Setup
Three of the photodiodes were attached to the underside of the board near the front so they would stick out past the front. Each photodiode was soldered to wire first to allow for more manipulation. They were each put in series with a 3.9 MOhm resistor to create a voltage divider so the Arduino could know when one of the photodiodes had light incident on it. The photodiodes were soldered to the 5 volt wire and the resistors were soldered to ground. A lead was soldered between the photodiode and the resistor for the Arduino to measure the voltage changes. The last photodiode was set up the same way except the bulb was placed on the top side of the board in the back.
LED Setup
Both LEDs were also soldered to leads so they would be more movable. They were connected in series with a 1 KOhm resistor which was connected to ground. Underneath the board, the other end of the LED was connected to a wire which will reach down to the Arduino.
Switch Setup
The two output ends of the switch were soldered to wires, one of which was soldered to the 7.5 volt wire on top side of the board.
Attach and Code Arduino
First download the code and upload it to the Arduino. Then slide the 9 V battery into the 3d mold so its leads come out of the hold where the Arduino will sit.
The next step is to connect the solder board setup to the Arduino.
Attach the leads connected to the left photodiode, center photodiode, right photodiode, and top photodiode to the A4, A3, A5, and A2 inputs in the Arduino respectively.
Attach the lead that comes from the red LED to pin number 6, and the lead that comes from the green LED to pin number 9.
Attach the lead connected to H-bridge peg 2 to Arduino input 3. Attach the lead connected to peg 7 to Arduino input 5. Attach the lead connected to peg 10 to Arduino input 11. Attach the lead connected to peg 15 to Arduino input 10.
Attach the lead coming from the ground wire to the ground input in the Arduino and the lead coming from the 5V wire to the 5V output of the Arduino.
Attach the switch output not connected to the 7.5 V wire to the Vin input in the Arduino.
At this point the Arduino should rest underneath the solder board with 3 photodiodes coming out between them and a switch, photodiode, and red and green LED above the board.
Above is a circuit diagram of the entire setup, including the last few steps.
Downloads
Construct the Setup
Once the Arduino, switch, and board are connected, place the Arduino into the case. Use wire to connect the 7.5 V wire switch input to the positive end of the battery pack and to connect the positive end of the 9 V battery to the Vin switch input. The ground for the 9 V battery can be placed in the other ground slot in the Arduino and the battery pack ground can be soldered to the ground line on the board. Lastly, solder peg 3 to the right motor’s black wire and peg 6 to the right motor’s red wire. Solder peg 14 to the left motor’s black wire and peg 11 to the left motor’s red wire.
The switch can then be placed in the top 3d printed piece along with the LEDs, so it can cover the wiring. The top photodiode should come out the back of this and fit snuggly inside the cone. The back piece then slides into place. Slide one of the front pieces into place and fit the proper photodiode into place. Then, partially slide the next piece in so the photodiodes can be fit into it. Once they are fit, slide it all the way to fit snug with the Arduino mount. We then covered the cones holding the photodiodes with a tin foil layer to help light hit them more effectively.
This completes the process for creating an electronic dog.