PWM control of two 150W devices depending on temperature, where to start?

dc42:

zYxMa:
MCP1407 should be delivered to me tomorrow so I’ll try with my existing MOSFETs first. Will I need any resistor, diodes? My local store should have these things.

I suggest the following:

  • A good decoupling capacitor between the Vdd and Gnd terminals of the MCP1407. I suggest 1uF ceramic.
  • A 10K resistor between the MCP1407 input and ground. This is to ensure that the MCP1407 (and hence the mosfet) stays off until the Arduino output pin mode has been set.
  • A resistor between the MCP1407 output and the mosfet gate, to limit the peak gate current and control ringing if your layout is less than ideal. I suggest 10 ohms, perhaps less if/when you use fast PWM. If you have a singls MCP1407 driving 2 mosfets, use a separate resistor for each mosfet.

You should position the MCP1407 close to the mosfet(s), so that the wiring (in particular the wire between the mosfet source terminal and MCP1407 Gnd) is kept as short as reasonably possible.

zYxMa:
When I asked what is better for me I probably meant what is easier, but reliable at the same time.

I suggest you start with simple on/off control then. You can upgrade to smoothed PWM later.

The driver has arrived today, much later than expected, and on top of that my local store don’t have any capacitors or resistors…

I’m off tomorrow so I’ll be on a mission… only if I knew I would have ordered it online already. Anyways…

dc42, when you say decoupling capacitor 1uF ceramic, do you mean 1000nF or 0.1uF/100nF? My local store only have 0.1uF in their catalogue, but the guy said they’re out of stock. However their website says they have plenty.
Is any of these caps any good? http://www.maplin.co.uk/decoupling-ceramic-disc-capacitors-318

I will be visiting my local RS Components branch http://uk.rs-online.com/web/ to get all this, but I am having difficulties finding 1uF decoupling capacitor there too.

I’ve done my best with the fritzing diagram. I think I need to learn it more :]

PWM control.fzz (24.3 KB)

zYxMa: dc42, when you say decoupling capacitor 1uF ceramic, do you mean 1000nF or 0.1uF/100nF? My local store only have 0.1uF in their catalogue, but the guy said they're out of stock. However their website says they have plenty. Is any of these caps any good? http://www.maplin.co.uk/decoupling-ceramic-disc-capacitors-318

I will be visiting my local RS Components branch http://uk.rs-online.com/web/ to get all this, but I am having difficulties finding 1uF decoupling capacitor there too.

I meant 1uF, which is 1000nF. Although 0.1uF decouplig capacitors are just fine for standard logic ICs, the mosfet drivers can supply several amps peak gate current, so larger capacitors are preferred. The highest value ceramic capacitors that Maplin sells appear to be 0.22uF, so use those if you can't get 1uF. RS sells them, for example 699-5137 or 538-1578.

zYxMa:

dc42:

zYxMa: MCP1407 should be delivered to me tomorrow so I'll try with my existing MOSFETs first. Will I need any resistor, diodes? My local store should have these things.

I suggest the following:

  • A good decoupling capacitor between the Vdd and Gnd terminals of the MCP1407. I suggest 1uF ceramic.
  • A 10K resistor between the MCP1407 input and ground. This is to ensure that the MCP1407 (and hence the mosfet) stays off until the Arduino output pin mode has been set.
  • A resistor between the MCP1407 output and the mosfet gate, to limit the peak gate current and control ringing if your layout is less than ideal. I suggest 10 ohms, perhaps less if/when you use fast PWM. If you have a singls MCP1407 driving 2 mosfets, use a separate resistor for each mosfet.

You should position the MCP1407 close to the mosfet(s), so that the wiring (in particular the wire between the mosfet source terminal and MCP1407 Gnd) is kept as short as reasonably possible.

zYxMa: When I asked what is better for me I probably meant what is easier, but reliable at the same time.

I suggest you start with simple on/off control then. You can upgrade to smoothed PWM later.

The driver has arrived today, much later than expected, and on top of that my local store don't have any capacitors or resistors...

I'm off tomorrow so I'll be on a mission... only if I knew I would have ordered it online already. Anyways..

dc42, when you say decoupling capacitor 1uF ceramic, do you mean 1000nF or 0.1uF/100nF? My local store only have 0.1uF in their catalogue, but the guy said they're out of stock. However their website says they have plenty. Is any of these caps any good? http://www.maplin.co.uk/decoupling-ceramic-disc-capacitors-318

I will be visiting my local RS Components branch http://uk.rs-online.com/web/ to get all this, but I am having difficulties finding 1uF decoupling capacitor there too.

I've done my best with the fritzing diagram. I think I need to learn it more :]

Unless you are really tight on space you can do all of this with a couple of Solid State Relays (Opto Isolated). You have no need to worry about protecting the Arduino from Spikes etc and all the extra components go away - simply drive them from a digital pin on the Arduino.

You will not need PWM, simply turn them on an off in a tight loop - as they are DC you do not need to worry about Zero Crossing issues etc.

Craig

It looks like even RS is out of stock. I can't believe I have to do it all online. Now I have to wait till next week unless I try that Solid State Relay. Do I need any particular specs? (Not that any of the stores will have it in stock… ok Maplin only sells Solid State Drives and they haven't heard of Solid State Relays… looks I'm waiting a few more days…

Thank you all.

If you have a local Maplin store, then I suggest you use a couple of the 0.22uF capacitors from Maplin in parallel, or even just one. That should be adequate if you are not using PWM and use a 10 or 22 ohm resistor in series with each mosfet gate.

I expect Farnell have 1uF cermic capacitors in stock, but they (like RS I believe) have a minimum order charge. I found some on ebay: http://www.ebay.co.uk/itm/2-5mm-Y5V-Dielect-Ceramic-Capacitor-1uf-50V-10-Pk-/290985724292?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item43c019c984.

dc42: If you have a local Maplin store, then I suggest you use a couple of the 0.22uF capacitors from Maplin in parallel, or even just one. That should be adequate if you are not using PWM and use a 10 or 22 ohm resistor in series with each mosfet gate.

I expect Farnell have 1uF cermic capacitors in stock, but they (like RS I believe) have a minimum order charge. I found some on ebay: http://www.ebay.co.uk/itm/2-5mm-Y5V-Dielect-Ceramic-Capacitor-1uf-50V-10-Pk-/290985724292?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item43c019c984.

I'm not going to Maplin any more, they never have anything I need in stock. I will order those from eBay. Maybe they'll be delivered tomorrow. Thanks for finding it. I was gonna get it all on ebay as RS charges £4.95+VAT for P&P unless I order parts for more than £20 :~

Lately, no matter what I do, I always end up on eBay :| edit: both , the capacitors and resistors are now marked as dispatched :grin:

I would still like to use PWM, even if it is just 0% 25% 50% 75% and 100%, but I might end up with just ON/OFF we shall see.

I soldered the peltiers to the PSU and the power cable going from the PSU to the peltier was getting incredibly hot.

I'd like to a PCD, but what kind will be strong enough?

zYxMa: I soldered the peltiers to the PSU and the power cable going from the PSU to the peltier was getting incredibly hot.

10A is a lot of current - you need to use cable that is designed to take that amount.

zYxMa: I'd like to a PCD, but what kind will be strong enough?

What do you mean by PCD?

zYxMa: I soldered the peltiers to the PSU and the power cable going from the PSU to the peltier was getting incredibly hot.

I'd like to a PCD, but what kind will be strong enough?

Hold on - you soldered the peltiers to the PSU ? WTF ? Now you are trying to use the Peltiers to cool down the power supply that is providing power to the peltiers - this make no sense - why would you do this ?

Craig

dc42:

zYxMa: I soldered the peltiers to the PSU and the power cable going from the PSU to the peltier was getting incredibly hot.

10A is a lot of current - you need to use cable that is designed to take that amount.

zYxMa: I'd like to a PCD, but what kind will be strong enough?

What do you mean by PCD?

Sorry, I meant a PCB board :]

craigcurtin:

zYxMa: I soldered the peltiers to the PSU and the power cable going from the PSU to the peltier was getting incredibly hot.

I'd like to a PCD, but what kind will be strong enough?

Hold on - you soldered the peltiers to the PSU ? WTF ? Now you are trying to use the Peltiers to cool down the power supply that is providing power to the peltiers - this make no sense - why would you do this ?

Craig

No I didn't say that at all.

zYxMa:

zYxMa: I'd like to a PCD, but what kind will be strong enough?

Sorry, I meant a PCB board :]

See e.g. http://circuitcalculator.com/wordpress/2006/01/31/pcb-trace-width-calculator/ to work out how wide the PCB trace will need to be to carry 10A or 12A.

Hello again,

dc42, I followed your advise regarding the capacitors and 10 ohm resistors.

dc42:

zYxMa: MCP1407 should be delivered to me tomorrow so I'll try with my existing MOSFETs first. Will I need any resistor, diodes? My local store should have these things.

I suggest the following:

  • A good decoupling capacitor between the Vdd and Gnd terminals of the MCP1407. I suggest 1uF ceramic.
  • A 10K resistor between the MCP1407 input and ground. This is to ensure that the MCP1407 (and hence the mosfet) stays off until the Arduino output pin mode has been set.
  • A resistor between the MCP1407 output and the mosfet gate, to limit the peak gate current and control ringing if your layout is less than ideal. I suggest 10 ohms, perhaps less if/when you use fast PWM. If you have a singls MCP1407 driving 2 mosfets, use a separate resistor for each mosfet.

You should position the MCP1407 close to the mosfet(s), so that the wiring (in particular the wire between the mosfet source terminal and MCP1407 Gnd) is kept as short as reasonably possible.

I've managed to launch my little project tonight. I'm still using the breadboard for thermistors and an LCD screen and I built a separate power supply circuit.

Unfortunately, something is not right. One of the MOSFETs gets warm and the other doesn't. Additionally, the MOSFET that does get hot, gets hot even when arduino is off, but when power supply for TECs is on.

15V is coming out from both MOSFETs when the arduino is on or off.

Also, not sure about the MCP1407, but only one OUTPUT seems to be live 5.50V ~ 5.85V, the bottom one. The top OUTPUT seems to be dead... or perhaps I'm doing something wrong. This is at PWM 255.

I tested my code with an LED, and now the PWM signal goes to MCP1407 INPUT.

MCP1407 has 5V and 0V provided from arduino board. Should I connect PSU GND to arduino GND?

Arduino board currently has its own 12V 2A PSU.

zYxMa: Unfortunately, something is not right. One of the MOSFETs gets warm and the other doesn't. Additionally, the MOSFET that does get hot, gets hot even when arduino is off, but when power supply for TECs is on.

15V is coming out from both MOSFETs when the arduino is on or off.

That strongly suggests there is a wiring error.

zYxMa: MCP1407 has 5V and 0V provided from arduino board.

I've lost track of which mosfets you are using, however I suggest you power the MCP1407 from +12V and GND, so as to give the mosfets 12V drive voltage. Connect both output pins of the MCP1407 together, that's what the datasheet says you must do.

zYxMa: Should I connect PSU GND to arduino GND?

Yes, definitely!

dc42:

zYxMa: Unfortunately, something is not right. One of the MOSFETs gets warm and the other doesn't. Additionally, the MOSFET that does get hot, gets hot even when arduino is off, but when power supply for TECs is on.

15V is coming out from both MOSFETs when the arduino is on or off.

That strongly suggests there is a wiring error.

zYxMa: MCP1407 has 5V and 0V provided from arduino board.

I've lost track of which mosfets you are using, however I suggest you power the MCP1407 from +12V and GND, so as to give the mosfets 12V drive voltage. Connect both output pins of the MCP1407 together, that's what the datasheet says you must do.

zYxMa: Should I connect PSU GND to arduino GND?

Yes, definitely!

I'm using the STP60NF10 MOSFETs and I triple checked and I think all is connected correctly. I used a PSB board, but I soldered 1.5 copper wires right next to MOSFET pins. Both wires, the source and the drain are really close to each other. Could this be an issue?

zYxMa: I used a PSB board, but I soldered 1.5 copper wires right next to MOSFET pins. Both wires, the source and the drain are really close to each other. Could this be an issue?

A short between source and drain would turn the associated Peltier permanently on, and the associated mosfet would be cold. Disconnect the power supply and use a mutlimeter to check whether there is a short.

dc42:

zYxMa: I used a PSB board, but I soldered 1.5 copper wires right next to MOSFET pins. Both wires, the source and the drain are really close to each other. Could this be an issue?

A short between source and drain would turn the associated Peltier permanently on, and the associated mosfet would be cold. Disconnect the power supply and use a mutlimeter to check whether there is a short.

I just cleaned the connections and I checked the MOSFET drain and multimeter shows nothing, but that was when +15V was disconnected. As soon as I connect the + back, the peltiers get hot. Faulty/Damaged MOSFETs?

I checked it again, and one MOSFET still seems to be ON constantly.

Have you connected the power supply ground and Arduino ground yet?

dc42: Have you connected the power supply ground and Arduino ground yet?

Yes I did.

What I did just now was I turn the PSU ON without powering arduino and one of the MOSFETs got red hot (with those huge heatisinks).

PWM is fine for controlling heating and cooling, especially if you have multiple things to cool and heat. The only caveat is that you may need to pulse at higher frequencies. Also, it is no more expensive.

I actually control Peltiers and heaters using PWM with this chip... It is sort of pricey, but it can handle up to 40 or so amps. I actually used it to control a peltier that needed 20 amps at one point...

http://www.infineon.com/cms/en/product/automotive-ics/motor-drivers-automotive/integrated-high-current-motor-drivers-novalithic-tm/trilith-ic/BTN7960B/productType.html?productType=db3a304413719f72011372e9554e00da

It worked well and I just use the PID library to control with temperature feedback.

http://www.robotpower.com/products/MegaMotoPlus_info.html

zYxMa: What I did just now was I turn the PSU ON without powering arduino and one of the MOSFETs got red hot (with those huge heatisinks).

Do you have resistors of about 10K connected between each mosfets gate (or the Arduino side of the resistor connected to the mosfet gate) and ground, to ensure that the mosfets stay off when the Arduino is not connected?

It might be easier to help you if you post photos of your PCB and wiring.