Hi im pretty new to the arduino scene...so i have quite a few basic questions id like to ask that hopefully someone has done the same thing im trying to do.
Ive built a wheeled robot consisting of an arduino mega microcontroller a power and relay circuit that i built from scracth to power and control the arduino and 2 24v gear motors. My control circuit which consists of 3 5v relays DPDT that will be controlled by 3 analog output pins one to each relay giving me my forward, reverse and spin. I also have 2 IR diffuse sensors ( ones that read off of any surface up to 11 inches away) they are pretty much either on or off depending on if it see something in its 11 inch range or not.
Here is my question...I want to control the 3 analog output pins based on the front and rear sensor input. Now the sensors are both sinking or sourcing depending on what wires i will be using and they output what ever voltage i use to power them...right now its 12V dc, and they have an operating voltage of 10-30v DC. can i use the analog inputs by sinking the output voltage from the sensors...and if so what is the tolerance on that input voltage...if i need to use an external resistance to bring the voltage down to say 5v DC that is no problem. Thanks