0
\$\begingroup\$

I'm looking to power a 50W 12V heating element via the PWM pin of my Raspberrypi. For this, I have a MOSFET (STP9NB60) and a power supply. Of course this MOSFET's threshold voltage is at least 3V, likely more. A RPi I/O pin is high at 3V3. So it is unlikely that I can switch on the MOSFET properly. So I figure, that I should make another circuit to deliver 12V to the gate, using a regular transistor, and then switching that one with my RPi. I have some of type BC547. Can I use it for this? I imagine the circuit as follows: enter image description here

Would it work this way?

EDIT

Alternatively, I have H-Bridges (L293DNE) that I have tried this with, following this tutorial. It went well and I was able to control a 12V Fan perfectly, but when I plugged in the 50W heating element, the H-Bridge went really hot really fast ... Since I have around 20 of these H-Bridges I was wondering if it's possible to wire them in parallel (or maybe just layer them on top of each other so the pins touch) to allow for higher amperage? This is all only necessary if it cannot be done with the MOSFET above ;)

\$\endgroup\$
6
  • 1
    \$\begingroup\$ That circuit is not good. Google is your friend and if you search this site you will get decent driver ideas too. \$\endgroup\$ – Andy aka Dec 12 '19 at 14:32
  • \$\begingroup\$ Thanks for your input. The problem is, that I will most likely not find a solution to my specific problem this way. I have tried this approach and got working circuits that I used to power a 12V fan. But something drawing as much current as my heating element (50W) is a special case. \$\endgroup\$ – cheesus Dec 12 '19 at 15:07
  • 1
    \$\begingroup\$ You need to look at something like this: gammon.com.au/images/MOSFET_high_side_driver.png \$\endgroup\$ – Andy aka Dec 12 '19 at 15:20
  • 1
    \$\begingroup\$ Your schematic is all mixed up to the point where it's not possible to tell what is a design mistake and what a drawing one. Redraw your schematic with ground on the bottom on power on the top, and label your power supply with its polarity rather than abusing a battery cell symbol. Or just look at the schematic of any open source 3d printer bed heater circuit. \$\endgroup\$ – Chris Stratton Dec 12 '19 at 18:16
  • \$\begingroup\$ @Andyaka I built the circuit like this and the mosfet went really hot... I assume the arrows pointing down, (as well das the RPi with a GND pin) have to be connected to GND \$\endgroup\$ – cheesus Dec 13 '19 at 8:20
2
\$\begingroup\$

No, this will not work. You have drawn a high side driver using a PNP. The emitter of the PNP is at 12V, so to drive the PNP into cutoff (turn off the heater) you must bring the base voltage close to 12V. The output of the Raspberry Pi can't tolerate, nor produce, a voltage that high on an output pin.

You need a proper low side driver.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks! Check out the edit in the picture. Did you mean it like this? \$\endgroup\$ – cheesus Dec 12 '19 at 15:25
1
\$\begingroup\$

Why switch power when you don't have to? You can use any COTS LED-strip amplifier to do the heavy switching.

This the EE forum. You shouldn't be saying 'just use a consumer product'; there has to be some EE involved. Don't worry; there is!

The thing is -- the LED-strip universe is positive-ground. That means you'll need to invert your LED strip's positive-of-common PWM output into a negative-of-common PWM output.

You can't just pulse the "+" line of the amplifier's PWM input; the amplifier would never see it. + is just bussed with all the other + lines in the device. It's looking for the PWM signal on the "-" line.

So you'll need to make a simple transistor inverter to turn the Raspberry Pi negative-ground signal into a positive-ground signal of a few milliamps.

By the way, in lieu of PWM, another option is to have multiple heating elements, and either shunt a heating element on and off, or switch them series to parallel. Then you'd use a simple contactor-- I mean relay. (we're only dealing with 50W here lol).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.