Hi there,
electronic noob here. This is related to a previous post. I've made a circuit to control a Peltier in both cooling and heating using two IRLZ14 logic nMOSFET (rated Vds=60 V, Rds=0.2 Ohm) and relays to invert the current (see figure). The relays are a block of 4 relays optically isolated (tested and working well). R4 and R3 relays invert the current flow. I use R2 as a switch to open close the whole 12 V circuit and R1 to enable one or the other nMOSFET.
I've put an RC filter to smooth the PWM signal from the Arduino, which here controls the Vgs tension through a PID library and the input from a MAX31855 thermocouple. I'm using pin 5 and 6 (980 Hz) to get a smoother signal.
For some reason that is still not clear to me, even when the tension at the gates is zero, there is a current flowing on the Peltier. I know about all the problems related to Peltiers, so I did a test with a PTC element and the problem is the same. I'm now testing with a PTC plate.
When I simulate the circuit it seem to be working fine.
Please can you tell me what am I doing wrong?
Thanks!
So the advantageously low Rds(on) is thrown out in the garbage and you're purposefully driving the MOSFET into its linear region, making it dissipate loads of power.
Why not simplify matters into something like this:
Of course in the switching logic you need to ensure that the relays don't short 12V to GND. You could implement this in hardware or (more easily) in software.
Alternatively use a H-bridge instead of two relays.
Use a low value for R2; something like 220R or so. Or just leave it out. Use a high value for R3, like 100k. Don't use a capacitor there to smooth out the PWM because all it accomplishes is that you burn loads of power in the MOSFET, heating it up, making the entire circuit inefficient and possibly defying the purpose of having a Peltier to begin with (depending on physical layout).
I want to use the circuit not as on/off but to finely tune the voltage at the gate in the linear region so to better stabilize temperature near ambient. That's why I'm using the RC circuit. Probably highly inefficient but that is not the main problem I think. Even with Vgs=0 I still have current on the PTC/Pelletier. Has it to do with how I'm grounding the circuit? Should I connect the Arduino ground to the ( - ) of the power supply?
YES!
And please do not smooth the input to the peltier.
Unless you want to control temperature at 0.01 degC accuracy (maybe).
On/off control usually achieves sufficient accuracy, even if you have a relais that does only one switch in seconds (as compared to your 960 switches per second).
The thermal inertia of the Peltier itself, let alone anything it's connected to, will make any attempt at linear control irrelevant from a temperature control accuracy viewpoint. It's moot.
Driving the Peltier linearly will be more efficient, but of course the efficiency from a systems-perspective will still be quite poor in your setup due to the losses in the MOSFET.
Depending on the current you need, you could repurpose a buck LED driver to power the Peltier. I'm quite fond of MP24894 because it allows to scale the current/power as desired over a large range by selecting an appropriate MOSFET and sense resistor. There are of course plenty of alternatives.
Yes.
I'd also recommend to simplify your circuit as suggested earlier, since there's IMO no benefit to be had in adding two more relays and an extra MOSFET.
So I connected the "-" of the power supply to the Arduino ground in the circuit. All good initially. The temperature rises, the nMOS slowly increases the current until setpoint. However, if I a go above a certain limit the current on the PTC does not quickly go to zero, as expected from my small capacity. Instead, it slowely fades to zero over several minutes, even when I set Vgs to zero (or I simply remove the pin).
I also bypassed the relay circuit to a single nMOS, same problem. Idem if I bypass the RC filter and connect directly Arduino pin to gate and then to ground through a resistor. I don't see what I'm doing wrong
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Please not the "diagram" like in post #1.
Take your time and please hand draw it, showing ALL component labels and names.
I use one of these which will allow you to reverse polarity and PWM. They work great as LED drivers and should work with the peltier diodes.
You do not want to run Peltier diodes with PWM, particularly in cooling applications. True the cooling effect is proportional to current, but the internal heating due to IR losses is proportional to the square of the current. As the current increases so does the losses and you will reach a point where cooling rapidly decreases. I suggest you add a low pass filter (it appears you have) and keep the ripple around 5%.
Here's a simple 2 relay reversing circuit. Replace the motor (M) with your Peltier. I've read that Peltiers don't last long with PWM in the kHz range. Duty cycle control (slow PWM) would probably work better.
Thank you, at least I know that what I'm doing is not wrong. I'll check again for wiring errors and replace the nMOS just to be sure. Hopefully, that will do