My first project with the Arduino is to flag an LED on when the input from a Sharp IR sensor goes low (GP2Y0D810Z0F). I've written the most basic of programs to get the input and using an if statement, but it doesn't seem to be working. The LED is either always on or off leding me to believe that the translation of the input is not working.
My question is - what value does the input have to be for the Arduino to assign a HIGH or LOW value? the input from my sensors are either 5.6V or 1.05V. Will this translate to HIGH and LOW or do I have to regulate the input somehow?
Normally an input will be seen as LOW if smaller than 3 volts (approximately) and HIGH if above 3 volts. Your sensor should produce clean HIGHs and LOWs. Best is to post your code so we can have a look over it.
According to the data sheet the 168 the minimum you can have a logic 1 is 0.8 of Vcc. So if the arduino is running at 5V then this is 4V. The highest a logic zero can be is 0.2 of Vcc so that puts it at 1V for a 5V arduino.
So 1.05V might be just too high to be seen as a zero.
That darn ground wire will get you every time! Yes, I'm using a separate power source. Otakon2K - you're right it's 3V. I found that on the reference section today.
I made a wiring harness from an R/C receiver switch assembly, and six male servo leads which will hold my six sensors. I connected all of the power lines together to power the sensors from a 6V input through the switch. I separated the signal output lines and will use them with the Arduino to help control the robot's motion.
The platform....My old E-MAXX. Can't wait to get this together.
Thanks for all the great input here. will post pics soon.
Ohhhhh! I accidentally put 24 V in a Digital input (I know is a big mistake). jejeje.... My Arduino Diecmila does not start and the light power will light a point and stops. Can I do something? Or I sould buy another Arduino?
Buy another.
I don't use mini/nano when developing, so that if I do fry the MCU's tiny little mind, I can remove it from the socket and replace it. Much better than having to buy a new board, or trying to replace a surface mounted part.