I'm working with Chris to create some designs that operate without a microcontroller, Inspired by the SpurtBot designs from Rostock University and my own work in this area. (Search Instructables for 'SpurtBot'.)
These designs are based on Rocket Brand Studios' Tadpole Educational model, with the Spurt add-on to the chassis to allow the solderless breadboard to be extended in front of the robot and inverted so sensors can point to the floor. You can easily flip the robot over to work on the circuit.
This Instructable only covers the circuit. To build your Tadpole robot kit, go to this Instructable.
SpurtBots use a simple BEAM-like electronic circuit to create a robotic behavior. odeling robot behaviors in terms humans can easily understand is a helpful way to look at it. This robot's circuit makes it seek light. It will turn towards the brightest local source of light. M
If you like this robot, you can experiment with the other Spurt circuit designs, listed below. Or create your own! Be sure to let Chris and I know if you do, so we can link back to you.
- Spurt Line Follower (coming soon!)
- Spurt Shadow Runner (coming soon!)
Step 1: Getting Started
For the light following robot, you will need:
- (2) BC337 NPN transistors
- (2) Light Dependent Resistors (LDRs) (I used Jameco Part #202403, rated 200k Ohm in dark)
- (2) 2-pin male-male headers for connecting motor leads to breadboard
- (2) 1-pin male-male headers for connecting power and ground
- Some male-male jumpers or solid core hook up wire for making connections on the breadboard
OK. Let's make a robot.
Step 2: Assembly
The first picture is the schematic for the circuit. In case you'd like to know how the circuit actually works, here's how.
Each motor is controlled by an LDR and driven by a transistor. When the LDR is in darkness, its resistance is high. When it is in light, the resistance goes down. Given enough light, the voltage across the LDR into the transistor's base will turn the transistor on. The more light, the more "turned on" the transistor will be. When it is fully on, it will drive the controlled motor at full speed.
Note that the Light Dependent Resistor (LDR) on the right side of the robot is connected to the motor on the left, and vice-versa. This is so that when one of the LDRs detects light, it turns on the opposite wheel, turning the robot towards the light.
You will assemble the circuit on the solderless mini-breadboard that comes with the Tadpole robot kit. When it is all done, it should look like the second picture.
The third picture shows a diagram of the breadboard layout. The top of the picture is towards the front of your robot.
You can look at the pictures and the schematic and assemble the circuit by eye, or follow the step-by-step instructions below. If you are new to electronics, I suggest following the step-by-step. This will help you to check your build against the pictures, since you will be guided to assemble the circuit just as it is shown.
- The red wire at the bottom right corner is from the positive side of the battery box of the Tadpole. Leave it disconnected until you are ready to test your robot. This is your "on/off switch".
- The red wires in the diagram are everywhere positive voltage from the battery runs. Go ahead and connect all of the red wires you see except for the one running to the battery box itself.
- The black wire at the bottom left corner is from the negative side of the battery box.
- The black wires in the diagram are everywhere the negative voltage (or ground) are needed. You can connect those wires now. Note that the backwards L shaped black wire in the diagram is only connected at the two ends, not in the middle.
- Insert the two 2-pin male headers into the top row. One inserts into the two left-most holes and the other inserts into the two right-most holes. This is where you will connect the wires from the Tadpole's motors.
- Insert the left LDR. One lead (either one) goes in the left-most row just below the header pin. The other lead of the left LDR goes in the third row from the left, just to the right of the 2-pin header at the top-left corner.
- Insert the right LDR. One lead (either one) goes in the right-most row just below the header pin. The other lead of the right LDR goes in the third row from the right, just to the left of the 2-pin header at the top-right corner.
- Insert the left transistor. Be sure that the rounded side of the transistor is facing the top of the breadboard (front of the robot). The left-most pin of the transistor goes in the second row from the left, just below the 2-pin header. The center pin goes in the third row from the left. The right pin goes in the fourth row from the left.
- Insert the right transistor. Be sure that the rounded side of the transistor is facing the bottom of the breadboard (back of the robot). The left-most pin of the transistor goes in the fourth row from the right. The center pin goes in the third row from the right. The right pin goes in the second row from the right, just below the 2-pin header.
- Now, carefully bend both LDRs so that they stick out to the front and slightly to the sides. Be careful not to short any of the component leads. This will allow your robot to "see" when you turn it over to run it.
- Connect the right motor to the 2-pin header on the left. Yes, left. You have to cross the motors, so that your robot will follow light. Otherwise, it will always turn away from light. The red wire should be on the left-most pin of the 2-pin header.
- Connect the left motor to the 2-pin header on the right. The red wire should be on the left-most pin of the 2-pin header.
Step 3: Testing
You will need a well lit room, or a dark room and a bright flashlight.
Remember that red wire from the battery holder I told you not to connect? Time to connect it. It needs to go in the bottom right-most row of the breadboard (see the picture). Hold the robot with the breadboard facing you while you connect the battery, then flip it right side up (breadboard down) and place it on a nice smooth floor.
In a well lit room, the robot should start driving forwards. It should tend to seek the closest bright spot.
If you are in a dark room with a flashlight, try shining the light into one LDR and then the other. The robot should turn towards the light. If you shine it in both LDRs at once, the robot will drive forward. You may need to adjust the position of the LDRs to get the behavior you want.
Have fun, and don't forget to try some of the other Spurt circuits below, or add a microcontroller from Rocket Brand Studios and move into software programmable robots.
- Spurt Line Follower (coming soon!)
- Spurt Shadow Runner (coming soon!)
If your robot was upside-down (breadboard facing up) it will not work right. The wheels will turn the wrong way. Turn your robot back over with the breadboard facing down.
If either motor spins backwards instead of forwards, you connected the red and black motor wires to the 2-pin header backwards. Swap the red and black wires for just the motor that spins backwards, and you should be all set.
If one or both motors don't spin when their LDR is under light, you should double-check your circuit. Make sure all the connections are correct and try again.