0
\$\begingroup\$

I want to turn on/off the following lights using an LPC810: 3-led bike lights These lights are powered using two AAA batteries. This would provide 3 volts. I do not have the lights yet, so I cannot measure the current draw. However, as the LPC810 only allows for a couple of milliamps on it's digital output, I think it would not be clever to push the current through the chip.

https://www.nxp.com/docs/en/data-sheet/LPC81XM.pdf

To solve this I'm thinking of hooking the lights up as follows:

schematic

simulate this circuit – Schematic created using CircuitLab

This should turn on the lights when P1 and P2 go low, and turn them off when they go high.

Will this work? Will this be efficient, or will this result in quite a high current draw while the lights are off?

Am I reading the documentation correctly in that only 4 mA (I-oh) can be pulled from the pins, or can I simply hook up the positive side of the lights to P1 and P2?

\$\endgroup\$
9
  • 3
    \$\begingroup\$ A standard approach is to use a suitably rated transistor to switch the lights supply on and off; is there a particular reason why you've ruled that out? \$\endgroup\$
    – nanofarad
    Jul 7 '21 at 16:09
  • \$\begingroup\$ Yes. The reason is: I'm a noob that usually only has to deal with digital signals and hadn't even thought of them... I'm gonna see if I can find the right ones, thanks for pointing me in the right direction! \$\endgroup\$ Jul 7 '21 at 16:15
  • 1
    \$\begingroup\$ No problem, an n-channel MOSFET is probably suitable here as the easiest option. I'll have to look around to find a post that discusses how to select it based on its parameters but with such loads you might be able to get away with a "logic-level MOSFET" that can handle enough current (they almost always handle way more than 4 mA when used as a switch, depending on the size of the package perhaps as much as 4 or even 40 A) \$\endgroup\$
    – nanofarad
    Jul 7 '21 at 16:22
  • \$\begingroup\$ Take a look at this arduinodiy.wordpress.com/2012/05/02/… It will let you drive a lamp from a 3-volt processor. However, don't expect a very long operating life if you're working from AAA batteries. Also, you'll need to pretty much restrict yourself to red LEDs. White LEDs typically take more than 3 volts to light up brightly. \$\endgroup\$ Jul 7 '21 at 17:22
  • \$\begingroup\$ yes, a GPIO can typically sink more current than it can source, but not a whole lot more; use a transistor as a switch. \$\endgroup\$
    – dandavis
    Jul 7 '21 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.