In this post, I will be showing you my step up design to drive the data signal on a WS2812b LED strip. If you are using a different strip, please refer to the datasheet so you know what voltage you will need.
I needed this because I have an Arduino Nano 33 IoT that puts out 3.3v logic signals at a maximum of 10mA and is NOT 5v tolerant. I needed a way to drive the data signal to 5v. (see my other post about driving a P-channel MOSFET here My P-Channel MOSFET Driver)
What you'll need:
- 2x 2N3904 (NPN BJT's)
- 1x 10k Ohm, 1x 4.7k Ohm, and 1x 330 Ohm resistors
- Arduino using 3.3v Logic
The first NPN BJT amplifies a little, but what it's really there for is to invert the signal and reduce drain on the Arduino since can't draw very much. The second one does most of the amplifying and driving but it returns the signal to high is on and low is off. The first transistor is on if the signal is high and turns off when the signal is off. This pulls the gate of the second one low, turning off the transistor. Current then flows through R2 and the signal is transmitted to data out at 5v.
Alternatively, when the first transistor gets pulled low, the transistor turns off. This turns on the second transistor because current now flows through R1 and opens the gate. This draws the current away from the data line.
Beware though. If you need to drive more current than the 4.7k resistor can supply, you can lower the value. The 3904 is rated for a max of 200mA IIRC, so dont go below 25 Ohms. I wouldn't recommend anything below 220 though as in my project, unless I drove these gates from the output of my MOSFET.