I saw someone else had the idea of a brainless line following robot. The creator of it was BigRick. Click on the link to see his design. https://www.robotshop.com/letsmakerobots/node/8396. This was my insperation to create the Zombie Line Follower. I was looking at his and I saw some ways to improve it. Instead of only two sensors why not have four. The extra sensor act like "Safety Net" incase the first pair miss it. There is also a variable resistor to control the ir emitter to dim and to bright. The sixty-five ohm resistor acts as a "Safety Net" if you where to turn it all the way down. The toggle switch is wired to swap the motor to change line color such as a black line with a white background and vice versa. To build follow theschematics at the top of the page. There is two 150Ω resistors missing. These would be in front of the colored L.E.D.s.
Componant List:
4x Fairchild QRD1114 Reflective Object Sensors or ir emitter and transistor
2x 10kΩ resistors
1x 65Ω resistor
2x PNP transistors
1x Toggle Switch
2x DC motors
1x 9V Battery holder
3x colored l.e.d.s
3x colored l.e.d.s
1x 5v voltage regulater
This is the wired toggle switch to This is the backside of the This is the front sid of the unfinished
pick preferences and for power. unfinished circuit board circuit board
Works This works because the PNP transistor turns on when negative power is supplied. As you may see there are two pairs of photo transistors per side. These close and open the circuit there for applying negative power to the PNP powering the motor.
Towlieboy78, there are still a few problems with your design. Have you breadboarded and tested it?
I see you are intending to vary the PNP base resistance to vary the emitter/collector current, and hence the motor speed. This is a poor method of control which wastes power (as heat in the trasistor), and is heavily dependant on the beta of the transistor.
You should be trying for an on/off control of the motors. This would be best implemented with a pulse-width-modulation circuit, but your simple design should try to steer the robot by turning off one motor at a time to correct its heading.
By connecting the base of the PNP to the junction of the 10k resistor and the phototransistors, and tweaking the value of the resistor, you should be able to achieve a sharp on/off action of the motors as the light level varies. A two transistor arrangement would be better, but you should try this first.
The other major problem is that you still have three LEDs in parallel with each motor. Assuming these are red LEDs, with a forward voltage drop of around 2V each, the voltage across your motors will be clamped at 6V. The rest of the voltage (~3V) will be dropped across the PNP transistor. If you intend these LEDs to show which motor is currently active, please place a current limiting resistor in series with them.