Arduino inputs

Is there a way to input into the arduino without the input device running off the arduino 5v or 3v power?

Just so we’re clear… I have a motion sensor… it runs off batteries. All it does is light up a LED when it sees motion (its for closets and the like).

I’d like to use the power to the LED to be a digital input for the Ardiuno…

When I run the motion sensor off the Arduino’s 5v power it works great.

When I run it off external power, I get nothing.

Now, the theory of it makes sense to me… but is there a way to use external power? Can I splice the grounds together possibly?

Just did a little test… I jumped the ground from the external power to the ground on the arduino, then touched the digital input lead to the LED positive, and it showed up 1… so it looks like it can be another power source, as long as the grounds are spliced?

Is there any danger to the equipment of doing that? I’m basically pushing 3v from the LED into the digital in, but it’s from another source and not the arduino board.

Thoughts?

InfernusDoleo,

As long as you tie the grounds together (as you’ve already learned) and the voltage from the external source is in the proper range for the Arduino you’re using, this should work. In general, for digital signals, this approach is reasonable. The input current of an Arduino DI is so low it’s unlikely to be a significant load on your external device.

For analog signals, using the same power source to drive the analog to digital converter (ADC) and to drive the sensor has the advantage that you don’t get a calibration error if the two power supplies aren’t (or don’t stay) matched. (In most applications, folks appear to use the internal ADCs in the Arduinos, so it helps to use the Arduino’s power to run analog sensors.)

Have Fun,

Eric