ChipChop Support Forum
Log in
Log out
Join the forum
My Details
REPLIES: 7
VIEWS: 241
BACK
REPLY TO THIS POST
markfelix
25 Nov 2023
Can I run these through ESP32 without power supply
I'm new to all this and still figuring things out so don't crucify me if this is a stupid question!

I have found a small roll of these and from what I understand is that these can be color controlled from an esp32?
The question is if I only want to use like 2-3 leds to show visual feedback do I need an external power supply or can I connect them directly to the esp32 5V and run them like that?



It would be great if I can use these like that as there is probably about a 100 leds on this strip and would be much cheaper than buying individual leds on a board or using the ugly domed ones.


Attached images
MiniFish92
25 Nov 2023

Those look like ws2812b led strip so you can just use the Neo pixel library to change colours, not sure about using power from through the ESP, those are effectively 3 leds in one so it will depend how much they draw?
kennyFx
26 Nov 2023

yes you can all of the above. The esp can push maybe 10 without extrenal power supply but you should add a resistor on the data line, maybe something like ~470ohm
shafee
26 Nov 2023

I've done this few times and if you don't use a resistor then the first one in the chain will burn but then it will act as a regulator :-)
And yes, 10 seems to be a limit on an D1 Mini (8266), don't know about 32s though.

Also, I've found that it's best to wait for a few seconds before you init the neo pixels lib as the esp has a little surge when it starts and that can also burn the first one or two leds.

I normally don't start mine in the void setup() but rather create a timer variable and in the void loop() after maybe 3000 millis I do the pixels.begin() <= hey I've just discovered how to make text go blue here and small and small and blue!
markfelix
26 Nov 2023

@shafee

How do you create a timer? Sorry, it's all new to me and can't fine any timers or timeouts in Arduino.
shafee
27 Nov 2023

It's not a built in Arduino thing, you basically keep checking the elapsed time from when the program start using millis()




int started = 0; //need this so we can stop checking for the time once we reach what we want

void setup(){

}

void loop(){
    if(started == 0){
        if(millis() > 3000){ //this is our timeout and 3 seconds have passed from the start of the program
            ... stuff here will happen after 3 seconds from the start
            started = 1; //set this flag so this code block will only happen once
        }
    }    

}

markfelix
27 Nov 2023

ah that's what millis() are, now I get it :-)

thnx a ton
xxxx
15 Feb 2025

*** ChipChop Spam Bot ***

[...User reply removed with permanent user ban...]🖕