Powering a potentiometer with a digital pin

I have a project in which I'm controlling a set of LEDs which will be powered through the 5V pin on the board. I have sufficient amperage for them, but I'm using a potentiometer to set the delay before the LEDs turn on.

Because of this I'm concerned that if I also power the pot through the 5V pin that I won't have enough current for the LEDs. Is it feasible to connect the power end of the pot to a digital pin instead of 5V and power the pin using digitalWrite(pin,HIGH) only when I need to take a reading?

If your potentiometer is 10k

5v / 10k = 500ua

This is a very small value.

How much current do your LEDs draw? Can you show us your circuit?

Yes you can do this but your reason for doing so is bogus. Half a mA is not going to make a jot of difference to your system.

The LEDs are a 12 pixel Neopixel ring. Each RGB can potentially draw 54 ma, but I'm only ever going to power 2 of the 3 pixels on each RGB LED.

So, I'm using a Trinket Pro 5V (which is more than I need, but cheap). I'm powering the Neopixel via the 5v pad and controlling it through digital pin 6. I'm running the pot into one of the analog pins, reading it for 30 seconds at the beginning so that the ring can display how many hours of delay are set (and so that adjustments can be made), then it only reads the pot once per minute (so that if my daughter wakes up and wants the light on, she can slide the pot all the way to one side and turn on the light right away).

My main concern wasn't about when the pot was turned all the way up to 10k but rather when it was on the low end, resistance wise.

I'm not experienced enough to know how to display my schematic here.

Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

If you use REPLY rather than QUICK REPLY and it has an attachment facility, so you can post your files as attachments,

Tom... :slight_smile:

The LEDs are a 12 pixel Neopixel ring. Each RGB can potentially draw 54 ma, but I'm only ever going to power 2 of the 3 pixels on each RGB LED.

So, I get 434mA. I'd say that's a probably bit high for the Arduino's on-board regulator. I can't tell you what the limit is because I haven't carefully researched it, and there are some unknowns. It gets complicated, because the more voltage you "drop" across the regulator the hotter it gets and the higher the ambient temperature, the hotter it gets.

My main concern wasn't about when the pot was turned all the way up to 10k but rather when it was on the low end, resistance wise.

NOT an issue... Since there's essentially zero-current out of the pot's wiper and into the Arduino's analog input, the wiper position doesn't affect current flow. The resistance between 5V and ground is constant (assuming the pot is wired correctly. :wink: )

So, I guess I need to hook up a separate 5v power source for the LEDs. This project is quickly transforming from simple to nightmare. 434ma is the max. When the LEDs turn on, they turn on at quarter brightness and move up to the 434ma maximum over the course of four hours, then turn off.

Projects always surpass cost estimates by a factor of 2 or 3 :wink:

.

I think I'm just going to only power the pixels at 3/4 of max. That will bring maximum amperage down to about 300 milliamps.

I'll try to post a schematic after work.

I think I'm just going to only power the pixels at 3/4 of max.

Your project might do this. But when the LEDs are first powered on, and before the Arduino has time to send out any control information then the LEDs can be in any state.
From my experience this can sometimes be all off ( good ) but sometimes cyan, which means 40mA per LED. Your power supply has to be capable of powering the LEDs in this state, otherwise the voltage will dip below 5V and when you apply a 5V signal to it you will fry the first one in the chain.
See how many people have fried the first LED with these.

Projects are NEVER as simple as they at first seem.