Electronic – arduino – way to use Arduino PWM signal to supply a varying large current through a restive heating element

arduinocurrent-sourcepwm

enter image description hereI am working on a simple Arduino based project where I will use PID to modulate the PWM signal of an Arduino microcontroller, so the PWM values will vary from 0 to 255, as that is the resolution. I will be using AnalogWrite ( PWM voltage ) to out varied voltages. So my question is this, suppose I need a 12 V power supply that is connected to a resistive heating element, how would I control the amount of current flowing through a heating element. Note that I have already developed a on/off system that supplies maximial current, when I set the PWM to 100 % duty cycle and zero current, when I set the PWM to 0 % duty cycle.

I talked to my supervisor and he told me to connect the PWM to a mosfet and vary the PWM which will allow a varying current to flow through the heating element ( resistive).

Is this a good idea and will this work?

Best Answer

As drawn, you would need a P channel fet and you would never be able to turn it off as the gate voltage from your arduino would be 3.3V or 5V, no where near the 12V source voltage.

Use a n channel mosfet, switching the "valve" with the heater, would work. Of course, you need a mosfet that can allow x amount of current your heater needs, at y gate voltage, where y is your arduino voltage. Google low side driver circuit.

Or you can use a mosfet driver to enable or disable a P channel fet. Added complexity.