ESP8266 5v RGB none programmable Led strip controls. 3.3v?

Hello I'm a little stuck i have a few 1m none programmable led strips i bought from Walmart. I would like to add my esp8266 to it but what i'm stuck on sense the esp8266 is a 3.3v logic level and the strips are at 5v. I couldn't find anything online to bring it down to 3.3v level then using resistors however because of the current i don't think it's best. So the second thing i was thinking to use 2n2222 transistor. but i don't know if at 3.3v the gate will be fully open for the brightness of each color? Can someone please help me on figuring this out?

joseph

Non-programmable? As in basic LED strips?
Then you need a PWM driver. Standard low side transistor switch will do, as long as the transistor can handle the current.

Hello wvmarle i did in the past used 2n2222 transistors using a arduino uno which is at 5v logic level and that worked with no problem. But being at the esp8266 is at 3.3v logic level I don't know if i can get the max brightness out of it.

Just make sure you supply sufficient base current to saturate that transistor (but not more than the 10 mA the ESP8266 can supply).

hello yes the power supply is more then enough for the led strip. and ESP8266. Thank you.

No matter how much your power supply can supply, an ESP8266 pin can't sink/source more than 10 mA.

So it looks like the Esp8266 pin going to the transistor is not enough to put full the led strip to full brightness. If i use a 5v signal to the transistor that does put the led strip to full brightness.

So pick a different transistor. Maybe a MOSFET.

mosfets i do not have and Transistors this is the only one i do have is the 2n2222.

One of the parameters of a BJT is the “Beta” or “DC Current Gain”. Wikipedia says the 2N2222: “All variations have a beta or current gain (hfe) of at least 100 in optimal conditions.” That means to switch the full 800 mA load a 2N2222 is capable of, you only have to put 8 mA into the Base. Since the ESP8266 can source 10 mA you can switch it easily. Subtract the transistors Base-Emitter forward voltage drop from 3.3V and calculate what resistor will pass 8 mA at that voltage (just like calculating the resistor for an LED). Put that resistor between the ESP8266 pin and the Base of the transistor.

As said many times on this site,
Beta of a transistor is not relevant for switching.
With 10mA base current you can switch <=200mA with a 2N2222.

johnwasser:
That means to switch the full 800 mA load a 2N2222 is capable of…

You are forgetting that a non-saturated transistor can have >=1volt across.
The heat generated by that could be enough to make the transistor pop it’s top.
Leo…

Wawa:
As said many times on this site, Beta of a transistor is not relevant for switching.
With 10mA base current you can switch <=200mA with a 2N2222.

OK, I see now. Beta is used for linear operation. Divide the current being switched by 10 or 20 to get the base current required to saturate the transistor.

We need to know how much current the LED strips draw. “5V strips from Walmart” does not include enough information to calculate current draw.

If the current draw is more than 200 mA you will need different transistors or drivers between the ESP8266 and the transistors.

Hello sorry for the late update. Me and my wife got sick with a bad flu that is going around. I measure the current for each strip sense i cut it down to 26 leds for each strip.

red led is 148.3 ohms
blue is 100 ohms
green is 100ohms

total current for all 3 colors on 5v is the multimeter comes up as 880ma
my multimeter might be a little off it's a cheap meter.

So... are there six wires or four? If four, is the 'common' wire positive or negative. You should hope for 'positive'.

Hello its common anode and there is 4 wires.

josephchrzempiec:
Hello its common anode 4 wires.

Excellent! Now you just need some NPN transistors or N-Channel MOSFETs that can do the switching. It’s looking like the 2n2222 won’t do the trick.
I wonder if a ULN2003 Darlington Array would work. Each 16-pin package has 7 drivers so you could get two RGB strips on each chip plus an additional strip for each three chips. Seven strips (21 channels) would take three chips.

johnwasser:
I wonder if a ULN2003 Darlington Array would work. Each 16-pin package has 7 drivers so you could get two RGB strips on each chip plus an additional strip for each three chips. Seven strips (21 channels) would take three chips.

Oh, not again! :astonished: :astonished: :astonished:

Please do not advise people to use those obsolete ICs!

His LEDs operate from 5 V and he is concerned about the brightness. The Darlingtons will lose about 1.5 V bringing the LED strip voltage down to 3.5. These chips are not suitable for controlling 5 V devices, and only barely suitable for 12 V devices where you can allow for the voltage loss. Please consider them simply obsolete; replacement/ repair parts only!

Joseph says he has no MOSFETs. When the shops open, he needs to get some Logic Level FETs, not go out and get (albeit cheap) obsolete ICs of little use. The discussion here should focus on which FETs fill this requirement and are available.

If PWM was not required, then the TPIC6A595 would be the preferred approach as you can control all the LEDs in multiple banks from just three pins.

In the meantime however, he can use his 2N2222s, two at a time in a “not Darlington” pair configuration something like this:

(Only diagram that I can find to illustrate this configuration!) Note that not explicitly included in this diagram, you require a current limit resistor in series with the first base, 1k or so should be fine. The resistor in the collector of the first transistor (which goes to your 5 V, not 3.3) sets the base current of the second, so we are looking at 30 mA for a 300 mA final load, 180 Ohm. The load resistor illustrated will be incorporated int the LED strip.

Hello Paul__B Thank you. That actually helped me a lot and parts i do have at the moment. I will be ordering order stuff soon after the new years when I'm able to but for now this is only what i have available to me. Thank you again for the diagram. after Christmas i will try it out. That's if my wife will let me work on my arduino/Esp8266 projects lol

josephchrzempiec:
That's if my wife will let me work on my arduino/Esp8266 projects :grinning:

Depends on what you gave her for Christmas. :astonished:

We got 4 kids isn't that enough :smiley: ;D :fearful: :smiling_imp: :smiling_imp: