When I made my line-following robot it had 2 powered wheels and a caster. I steered it by having an LM393 comparator chip compare inputs from two photoresistors on either side of the line, and then signal the corresponding motor to turn until the inputs change. Even though only one motor turns at a time, it is able to oscilate quickly and stay on the line fairly well.
i've got other opinion in using servo motor with the control of a relay. i think this will be simpler. currently working on it still. anyway thanks for the advice bro!
i've tested on my relay and servo motor. but it seems like the motor is drawing a very high current at about 200mA in order to work. my relay isn't working or rather there's no clicking sound at lower current.
anyone can tell me what is the problem?
it is impossible to supply that high current to power up the motor since my PIC 16F877A can only gives maximum 25mA.
i've tested on my relay and servo motor. but it seems like the motor is drawing a very high current at about 200mA in order to work. my relay isn't working or rather there's no clicking sound at lower current.
Try this it's a typical L293D circuit. The RA0 thru RA3 can be any digital output pin from the PIC. It also has the clamp diodes you need on the motors **broken link removed**