1
\$\begingroup\$

I'd like to control a 3.5W heater using an ESP8266 GPIO pin, but I'm both a complete beginner and I'm unsure about the best setup to use.

I'm powering the circuit at 5v, which includes a nodemcu (with it's own 3.3v regulator) and the heater (an 8ohm resistor) which I'm using in a feedback loop and which I'd like to switch at a frequency of at most 1hz. I was hoping to avoid a relay for this reason, and use an NPN transistor to control the heater:

schematic

simulate this circuit – Schematic created using CircuitLab

I never had to switch that much power before, so I've got some questions related to both transistors and the circuit in general. The ESP8266 GPIO output pins are at 3.3v and can source at most 12mA. Can I actually use a 2N2222A BJT in this situation? The 2N2222A is rated for a total power dissipation of 500mW, which I understand I'm going to exceed in this configuration.

Do I have to use a power transistor/mosfet? In this case, what would you suggest that could be easily put into saturation just by what's provided by the GPIO pin?

To actually power the circuit I'm using a regular 5v/1.5A switched power supply. Do I also need to worry about voltage drops that could be caused by switching on the heater in this scenario?

\$\endgroup\$
3
\$\begingroup\$

For switching "heavier" loads you definitely need a MOSFET, for example IRLZ44N. 3,3V from GPIO is more than enough to turn it fully on.

When it comes to power supply: your resistor will consume 0,625A (I=U/R = 5 V / 8 Ohm), ESP will consume next to nothing, so a 1,5A power supply is enough.

\$\endgroup\$
  • \$\begingroup\$ If the OP is not able to find exactly IRLZ44N he should look for a logic level N-channel MOSFET with Rdson < 0.5 ohm and Vgt < 2.5V. A 1A schottky diode (like 1N5819) in reverse parallel with the load will be good, because it is not defined how much is the inductivity of the heater. \$\endgroup\$ – Todor Simeonov May 26 '17 at 17:06
  • \$\begingroup\$ Thanks for the answer. Was my understanding correct in this case that the power rating of the transistor is the maximum power that runs through CE, independently of the maximum rated voltage/amperage? \$\endgroup\$ – user150303 May 26 '17 at 17:10
  • \$\begingroup\$ Or use the NPN as a driver for a common 5V mosfet like irf530. \$\endgroup\$ – Passerby May 26 '17 at 17:10
  • \$\begingroup\$ @user no, it is how much power the c-e junction drops. A 100 mW transistor can switch a 10 Watt load, of the C-E voltage drop is significantly low. Same with mosfets. \$\endgroup\$ – Passerby May 26 '17 at 17:12
  • \$\begingroup\$ @user no, it is how much power the c-e junction drops. A 100 mW transistor can switch a 10 Watt load, of the C-E voltage drop is significantly low. Same with mosfets. \$\endgroup\$ – Passerby May 26 '17 at 17:13

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.