Hi /diy/, I'm hoping you can tell me why OP is such a fag here. Tldr : I'm having trouble switching a thermoelectric cooler with a MOSFET and an arduino
Long story: I'm trying to switch this tec unit with an arduino, but I'm running into a couple of problems along the way. My idea was to read an analog value from a pot and use that to set the duty cycle of PWM on an output pin, and ultimately use the PWM signal to switch a MOSFET and apply power to the tec. So I setup some serial.print commands to view the analog input, the analog input divided by 4, and the state of the output. When the tec is replaced with an led then everything works great. The pot works, the divide by 4 works, and the output works. When I plug the tec in to the circuit then I start getting garbage data and the performance of the TEC is unpredictable. It's off for a few seconds, then it is on, then it is off, then it sticks on for too long and starts overheating, etc.
So then I figured the PWM output is wonky, so I manually configured a duty cycle using code. I changed the output to digital, then wrote a little code so that it would check the pot value and tec state every milisecond or so, and it would stay on for the first part of a second and off during the last part of a second. Again the code worked as expected, but the tec was unpredictable. It would switch correctly at first, but would end up sticking ON and beginning to overheat. (I should mention that I have heatsinks and multiple tec units to play with).
Anyway, after manually configuring the duty cycle and it still not working, I figure my problem is somewhere else, which is where I was hoping you can help.
*Is my MOSFET circuit configured correctly?
*is 5V enough to reliably turn the mosfet on and off? (It's actually more like 4.7V coming out of the digital pin on the arduino nano)
*is there something that I don't know about TEC units? (Are they inductive or something)
*is there something else that I'm entirely overlooking?
>>1040514
Forgot to draw the potentiometer in the schematic above, but it's connected to the 5v (really 4.7 volt) pin on the nano, common ground, and the wiper is connected to one of the analog pins. Again, the pot seems to be working correctly according to the serial data output, but I wanted to clarify that it's there but not in the schematic.
http://electronics.stackexchange.com/questions/118536/thermistor-control-of-peltier-voltage-with-arduino-for-dslr-chill-box-project
I think this will help you figure it out. I don't know much about this subject but it seems like thermometric coolers don't like rapid on/off. LEDs don't give a crap and their resistance isn't changing so I think that's why your circuit works as expected with the LED but not with the cooler.
Also you should post this in /ohm/ general thread for more responses.
>>1040514
>*is 5V enough to reliably turn the mosfet on and off?
absolutely not
This most likely won't help but I think R1 should be much smaller. I think R1 is there to prevent blowing through the CGS capacitance in case of spikes in the driver and such right? I've usually seen values of like 10-50 Ohms. I've also often seen diode in parallel with R1 to allow the Cgs/Cgd capacitance to discharge itself quickly but Arduino pins can't sink current anyway as far as I know. Could more knowledgeable anons confirm/correct my thoughts?
Also AFAIK whether or not 5V is enough for you depends on how much current you want the MOSFET to pass (graph above says 10-20 amps at 5V which might be perfectly fine for you, thats for you to decide I have no experience with TECs).
>>1040514
>garbage data
>TEC is unpredictable
Sounds like a problem with power supply, grounding or overly long wires.
>is 5V enough to reliably turn the mosfet on and off?
Not really, even though it's probably not a problem here.
OP here. Thank you for your help.
>>1040537
This is very helpful. I'm going to put a low pass filter on it and see if that fixes the problem.
>>1040550
I like the idea of adding a protection diode as you mentioned. Definitely going to try that out. I don't suspect that that will solve my problem, but more protection never hurts.
>>1040576
You make a good point about the quality of the power. The 12 volts is coming from a wall wort, so I'll check to see how clean it is with a scope and probably end up filtering it.
As far as activating the gate with 5 volts, I'm only going to need around 2 amps regularly, and never more than 5 or 6 amps max. Am I wasting power or creating unnecessary heat by only partially activating the gate, or is that not a problem here?
Thanks again for your help guys!
>>1041776
just use another transistor (specs don't really matter here) to drive the gate with 12V