Photovore Robot

Thread Starter

Aristotle

Joined Dec 26, 2010
1
I am stuck... I am trying to use a quad comparator to compare 2 voltages that both went through photoresistors first, but I do not understand how to get one motor or another to go depending on which photoresistors lets the most through... help would be much appreciated.
 

wayneh

Joined Sep 9, 2010
17,498
I am stuck... I am trying to use a quad comparator to compare 2 voltages that both went through photoresistors first, but I do not understand how to get one motor or another to go depending on which photoresistors lets the most through... help would be much appreciated.
Sarge is right - more info is needed to give you much help.

The reason you use a comparator is to convert the analog photoresistor voltage into a "binary" on or off signal. Most common comparators go "low" by opening a path to ground and thereby becoming a sink for current. So voltage goes to near ground when the comparator is low. They go "high" by opening that path. An external resistor to Vcc is required to pull up the output voltage to the high state.

Your differential comparator will produce a high or low signal, depending on the PR voltages. That signal is what will control your motor direction (more details needed before we can talk about that). BUT, you're going to need hysteresis to keep the robot from chattering from one state to another when the two PR voltages are similar.
 
Top