Searching Transistor which transforms 3.3v to 12v (level shifting problem)

Thread Starter

noname1234

Joined Feb 20, 2021
8
Hello there,
I am trying to control my ws2811 led strip with my raspberry pi 4. But unfortunately the strip requires 12v and the gpio pins of the raspberry pi can only provide 3.3v. Thats why I am looking for a transistor that can take 12v (I have a 12v powersupply) and switch it on and off with 3.3v. I am pretty new to this electronics thing so please be patient.
Thanks a lot for your advices!
 

DickCappels

Joined Aug 21, 2008
10,153
1613827178190.png

The selection of the transistor depends upon how much current it will have to supply to the LEDs (you can use the calculator to which Eric linked to find the total current for a string of LEDs) and the base resistor can be calculated from the transistor's datasheet. Vss is +12V
 

Papabravo

Joined Feb 24, 2006
21,157
Hello there,
I am trying to control my ws2811 led strip with my raspberry pi 4. But unfortunately the strip requires 12v and the gpio pins of the raspberry pi can only provide 3.3v. Thats why I am looking for a transistor that can take 12v (I have a 12v powersupply) and switch it on and off with 3.3v. I am pretty new to this electronics thing so please be patient.
Thanks a lot for your advices!
Just to put a fine pedagogical point on the TS question. The transistor is not transforming anything in the sense that it can't make a 3.3 V supply produce +12 V all by itself. If you have a 3.3 V supply and a +12 V supply, then a 3.3 volt signal can control a transistor that allows current to flow from the +12V supply through the load (LED string) to ground. No transformations, just control.

There is a circuit called a "DC-DC Boost converter" that will perform that transformation, but it requires more than a single transistor and has certain tradeoffs. That is a topic for another day.
 

crutschow

Joined Mar 14, 2008
34,280
Depending upon the LED current, you may need a Darlington transistor configuration or a logic-level MOSFET to drive the LEDs.
 

BobaMosfet

Joined Jul 1, 2009
2,110
Hello there,
I am trying to control my ws2811 led strip with my raspberry pi 4. But unfortunately the strip requires 12v and the gpio pins of the raspberry pi can only provide 3.3v. Thats why I am looking for a transistor that can take 12v (I have a 12v powersupply) and switch it on and off with 3.3v. I am pretty new to this electronics thing so please be patient.
Thanks a lot for your advices!
Here are a few vendors you can peruse as you continue along your electronics adventure:

Code:
+-------------------------------------------------+------------------------------------------------------------------------------+
| vend_name_                                      | vend_weburi_                                                                 |
+-------------------------------------------------+------------------------------------------------------------------------------+
| All Electronics                                 | https://www.allelectronics.com/                                              |
| Allied Electronics, Inc.                        | https://www.alliedelec.com/                                                  |
| AND Technologies Co. Ltd                        | http://http://and-global.com/                                                |
| Arrow Advantage                                 | https://www.arrow.com/                                                       |
| Arrow NAC                                       | https://www.arrow.com/                                                       |
| Circuit Specialists                             | https://www.circuitspecialists.com/                                          |
| Clockworks                                      | http://www.clockworks.com                                                    |
| Future Electronics                              | https://www.futureelectronics.com/                                           |
| HEBEI INTERNATIONAL TRADING (SHANGHAI) Co. LTD. | http://www.ledz.com                                                          |
| Hobby World                                     | https://www.aliexpress.com/store/833384?spm=a2g0s.9042311.0.0.45ef4c4dO5Hl9b |
| icmarket2009                                    | https://www.ebay.com                                                         |
| Jameco Electronics                              | https://www.jameco.com/                                                      |
| KingTech                                        | https://kingtechlcd.com/                                                     |
| Meritage Sales, Inc.                            | https://www.meritagesales.com/                                               |
| MicroChip Direct                                | https://www.microchipdirect.com/                                             |
| MPJA Electronics                                | https://www.mpja.com/                                                        |
| Newark / Element4                               | https://www.newark.com                                                       |
| Pololu                                          | https://www.pololu.com/                                                      |
| ScanTool.net LLC                                | https://obd2cables.com                                                       |
| Sparkfun                                        | https://www.sparkfun.com/                                                    |
| SRA Soldering Products                          | https://sra-solder.com                                                       |
| Surplus-Electronics-Sales                       | https://www.surplus-electroncs-sales.com                                     |
| Tayda Electronics                               | https://www.taydaelectronics.com/                                            |
| The Electronic Goldmine                         | https://www.goldmine-elec-products.com                                       |
| Unusual Electronics                             | http://www.unusualelectronics.co.uk                                          |
+-------------------------------------------------+------------------------------------------------------------------------------+
 

ApacheKid

Joined Jan 12, 2015
1,533
Hello there,
I am trying to control my ws2811 led strip with my raspberry pi 4. But unfortunately the strip requires 12v and the gpio pins of the raspberry pi can only provide 3.3v. Thats why I am looking for a transistor that can take 12v (I have a 12v powersupply) and switch it on and off with 3.3v. I am pretty new to this electronics thing so please be patient.
Thanks a lot for your advices!
I came across this:

1613843954346.png

Its discussed in detail here.

This is using a MOSFET (perhaps a "power" MOSFET, not sure what it takes to make one a "power" MOSFET though).

These devices are attractive because they draw close to zero current into their Gate, so easy to drive right from weak sources.

There are people here far more expert than I so they may have more information on this.
 

Thread Starter

noname1234

Joined Feb 20, 2021
8
Thanks a lot for the lot of great answers! Unfortunately i couldn’t figure out how much curent one ws2811 led consumes but I know that my strip is around 3m in length and it is 30 Leds per meter.
 

DickCappels

Joined Aug 21, 2008
10,153
Are all the LEDs the same color?

Do you have any other information, like what connections are available and any voltage specifications.

Do you have some basic electronic tools like a voltmeter or current meter?

Through a little experimenting we can probably figure out a good drive scheme.
 

Thread Starter

noname1234

Joined Feb 20, 2021
8
No I don’t have any „basic electronic tools“ but I can tell you the details I know about the strip and send you a picture: It is an addressable RGB Led strip with 3 inputs: 12v, Din, Gnd -> power, data, ground. Each 3 Leds have an own controller so you can control the colors of always 3 together (for ex. first 3 Leds: red, second 3 leds blue and so on.)
 

Attachments

Thread Starter

noname1234

Joined Feb 20, 2021
8
hi 1234,
This should be able to drive the strip.
The MOSFET is high power, with a Logic Gate voltage.
E
Hi Ericgibbs,
Thanks for your advice I am still new to electronics so could you please explain how I should connect the 3 inputs on my strip to a GPIO port on my pi and my 12v powersupply? Do I need any other components? Like resistors?
 

MrSalts

Joined Apr 2, 2020
2,767
I was able to control a ws2811 strip with a Raspberry pi using Python code directly from 3.3v pins. No need for 5-volt logic.
Connect the 12VDC power to the power pins on the ws2811, connect the ground of the Raspberry pi to the (-) pins of your 12VDC supply and then drive the logic pin of the strip from your pi.
 

Thread Starter

noname1234

Joined Feb 20, 2021
8
I was able to control a ws2811 strip with a Raspberry pi using Python code directly from 3.3v pins. No need for 5-volt logic.
Connect the 12VDC power to the power pins on the ws2811, connect the ground of the Raspberry pi to the (-) pins of your 12VDC supply and then drive the logic pin of the strip from your pi.
Really? I‘ve read that you have to feed 12v into all pins in order for it to work.
 
Top