Let's Make Robots!

high outpin for a long time

hi guys. 

i want to make my robot switch on its lights when  he encounters a dark room. i know how to do this (components i need, how to wire em up .....) but this is not i want to ask you. My concern with it is the following:

if i make such a circuit and attach it to an output pin on my picaxe, i'll have to keep that pin "high" for the whole time the robot goes around.

is that gonna drain out my batteries quickly?

if the led is not switched on (no current flowing in it) is it still gonna drain my batteries?


btw...this is the circuit ( + pole of the battery goes to the output pin) 


ps: do you know if there's a program to quickly draw circuits?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

No, it won't hurt anything to leave the output high for extended periods of time, and provided you choose appropriate resistors for that circuit, it shouldn't put any significant drain on the batteries. The Picaxe, like most microcontrollers, can only source about 25 mA maximum per output pin (usually you design your circuit to draw less than that). Rechargeable AA batteries typically have about 2000 mAh of capacity. For a 4-battery pack, that means you have about 8000 mAh total capacity, which could power that output pin (at 25 mA) for 320 hours (8000 mAh / 25 mA), which is about two weeks straight. The other loads in your circuit will far outweigh the LED circuit -- the Picaxe itself probably uses over 100 mA while it's running, and of course your motors will each consume anywhere from 50 to 2000 mA or more, depending on what motors you're using. So you don't really need to worry about the power consumed by the output pin.


Uh, 4 AA batteries in series would still only be 2000 mAh total, for 4.8 volts. Those same 4 connected in parallel would add to 8000 mAh, but only supply 1.2 volts.


Good call, thanks for catching that :)