Electronics > Beginners
Microcontroller, DAC and Mosfet to control TEC?
(1/5) > >>
moonie223:
Hello everyone!

I am looking to control a small TEC to keep ~200mW of laser diode at a set temperature. I do not need super accurate temperature control, I am just looking to keep a diode near room temperature. I do not need full bridge control, just cooling. This particular TEC has a forward voltage range around 0-2V from 0-2A with both plates near room temp.

I have a super simple circuit consisting of a IRF540, a thermistor, and a potentiometer. While it does roughly work, it's pretty dang inefficient due to the low forward voltage of my TEC compared to the voltages needed from a divider to make the mosfet work. 

I'm about to instead try using an arduino to control a DAC with a buit in opamp to switch the mosfet. This will allow me to keep the mosfet voltage much closer to the TEC voltage range. Since I am using a thermistor for feedback with some kind of PID running on the arduino I think I might be able to get away without any kind of current feedback to control the mosfet. Does this seem a reasonable plan? I don't mind having an arduino or similar in my project, I can use it for other things as well.

I would prefer to avoid full PWM control of the TEC, I hear it's bad for them although it would be a heck of a lot easier to set up! 

I wouldn't mind more reading on current feedback control of a mosfet, though, if anyone has any good links or google searches they're willing to share! I've drawn a few in LTCspice, but I'm just copying application specific work without understating how it really works. 

Thanks for reading!
MarkF:
The devil is in the details. 

Show us you current circuit.  Part/model numbers would help.
Which TEC are you using?

Do you already have an Arduino or MCU you would like to use or are familiar with?
I was just looking at a pic12f1840 8-pin MCU for a solar panel battery charge controller that sounds like it would be a good fit.
Ian.M:
The problem with TECs and PWM is Joule heating, which is proportional to the square of the current, therefore 10% PWM at the TEC's max rated current has ten time the self-heating losses vs running it at a steady 10% of its max current.

Its easy to solve - simply filter the PWM well enough to get DC with only a few percent ripple.   A large choke in series with the TEC may be sufficient, rated to carry the max current without saturation, + a path for the current to continue to flow through both the choke and the TEC during the PWM off period.  If you are driving it with an H-bridge so it can heat or cool it may already have suitable anti-parallel diodes, but if you are using a single transistor, you'll need to add a free-wheeling diode.

What TECs really don't like is 'bang-bang' control - the thermal cycling and resulting differential thermal expansion and contraction can mechanically fatigue the thermocouple elements and junctions till they go high resistance or even open circuit.
Kleinstein:
A 2 A TEC is still relatively small. So one could use linear control, even starting from a 5 V supply. Linear control is no perfect but still much better than direct PWM or on/off to the TEC. With 2 A and only 2 V at the TEC the worst cast heat for the controlling transistor would be at about 6 W - so it would need quite some heat sink, but not too much.  For linear control the IRF540 MOSFET is however not that suitable. The more suitable part would be a NPN Darlington in TO220 case (e.g. TIP120 or similar).

The setup could be something like PWM from the µC  -  Filter (RC) and than the  NPN as a emiter-follower to drive the TEC.

moonie223:
Here's a very rough schematic for a very rough circuit. Due to VGs being around 4V, I have to run this circuit at ~7.2V to get any real current from the mosfet. I don't do this long, I doubt there's a heatsink big enough!



I am familiar with a wide range of micros, I've built a few PCBs that actually work. My latest contains a 328PB that reads serial data from a wideband controller, data from a 3 axis accelerometer, a MAX31855 for EGT and a few ADCs. It sends all this data to an aftermarket ECU in realtime via a custom canbus protocol. I built a logic analyzer from a cypress chip and sigrock, I wrote my own bits of code for serial data from the wideband controller, the thermocouple over SPI, and the accelerometer via i2c. I tried to leave enough space to run a OLED display I made that fit in place of useless instrument cluster gauges, but RAM is too tight and I only halfway know what I'm doing to fix that! I need to move from the MCP2515 library and write more dedicated code, but still don't think it'll be enough. I have another more complicated board that uses a teensy 3.6 that runs that display great, though! I've enough knowledge to map pins on that thing, plus use a few of the modules like the FTM to read wheel speed sensors in a language ECUs understand, although that's cheating as much work as Paul's put into that whole kit.

I think I can handle the microcontroller part, and would probably build a custom board that ran on a 328PB since they're so dang cheap! I might try and seed the TEC current PID control by reading an average of the last analog voltage that relates to laser output power, plus I'd be able to shut the laser off completely if either the hotside heatsink or coldside diode got too hot. All of this is going into a custom built laser projector, so I'll have three of these little TECs to drive. I'd like to do it independently, mainly because I want to run the red diode as cold as I can while the other diodes can stay at room temperature. I'd also run a fan off a little PWM circuit, to keep the hotside cold and quiet as possible.

Since I'd like to make this a compact projector, I'd like to avoid large inductors for filters. I don't know squat about analog, but I've ran a few online calculators and think I'd need quite large inductors right, if I wanted a smooth 3-4V to power a mosfet? I guess low setting time won't hurt much in this application, though, can I just use a large capacitor instead?

The TEC I am using is a 12x12mm TES1-1704, described as 4A max and Vmax of 2.05V, TC max of 67c, QCmax of 4.8W. The block these TECs will be cooling is a small lump of brass, 12x12x15mm. The hotside will be a relatively large aluminum plate, with a finned extruded heatsink mounted underneath. I think this arrangement should work well, and shouldn't stress these TECs too hard. Another reason I'd like to avoid unfiltered PWM or worse bang-bang is because these TECs will be under laser diodes, I've seen what bang-bang does to 3d prints and I don't want anything like that with my laser alignment!!

I've ran these things off a constant current bench supply using massive aluminum plates for heatsinks to try and maintain equal temp on both sides of the plate. I've measured the operating voltage to be around 0V to ~2V at 2A. At 4A, they jump to 3.6V. I am not sure how this changes with temperature, but I am sure it does.

Also, a mosfet should be able to switch voltages lower than the control signal right? Within reason of G-S ratings, at least? So if I manage to build a switching supply that runs much closer to 2V, my mosfet won't waste as much heat, letting the more efficient switching supply do that.

I also have no real reason to use a IRF540 other than I have some here, either!

Thanks for reading everyone, and for the tips! Sorry for writing a book!





   
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod