Temperature control using PID arduino

Hey everyone
I need help, I am new user of arduino uno r3 and my project is to control the temperature using thermoelectric cooler/peltier which supply voltage is 7.9vdc and Imax is 4.0A. My PID code is working fine with simple LED on pmw pin 3 but I want to use peltier now instead of LED so since I need an external power and dont want to use relay so what electronics device should I use between arduino and peltier so that it can work perfectly ? If I have to use transistor so which one will be better to use ? Please help me

Likely a logic-level mosfet would do the job.
See comments in this thread:

Skip down to post #11.

1 Like

How can I connect it ?

Diagram in post #9 is a collection of typical circuits. You probably want the one second from left, at the top, which shows a logic level Mosfet powering a DC motor. Replace the motor with your Peltier; be sure to use the gate resistors as depicted, to protect your Arduino. I think that will do it, though I'm no Mosfet or Peltier user.

@LarryD Might have more advice.

1 Like

The schematics offered will work well.

An IRF3708 (or similar) would be a good choice for the N channel MOSFET.

Should still be readily available, about $10.00 for ten, on Amazon.

Data sheet:

1 Like

Will I simply have to connect the arduino pmw pin directly to the gate of the mosfet and pletier with an external power supply to the Drain and source or will have to add some resistance or any other equipments ?
Do you have any similar transistor suggestion since I don’t have any background of electronics ?

IRF540
IRF630
IRF 9640
I have These three mosfet available, I was trying IRF540 but it didn’t work for me.
Please help me

Looks like your Peltier element is ~ 2 ohms.

These are some Logic Level MOSFETs I often use:

Logic Level MOSFETs 20 07 17.pdf (1.3 MB)

Thank you so much . It will be more kind if you let me know which available transistor I mentioned above can be useful for my project and also if you can define this mosfet logic diagram on the text … please Sir :pray:

Your MOSFETs are not appropriate.

1 Like

What are you asking :thinking: ?

Is it necessary to connect mosfet with both external supply and arduino gnd. Because when I was using transistor since it was my first day doing this praticle so I just gave pmw out to mosfet gate and drain, source connected to the power supply with peltier .

Why did you use 10k resistance between gnd and pmw pin ?

Please draw what you think you were doing. Words are just inadequate. pencil, paper, photo.

1 Like

[quote="rao4u, post:11, topic:1137299"]
Is it necessary to connect mosfet with both external supply and arduino gnd.
[/quote

Yes, in the schematic offered there needs to be a common connection between the Arduino GND and the 8v power supply GND.


However, if you drive the MOSFET with an opto isolator, there would be no need for this GND to GND connection.


The 10k resistor holds the MOSFET OFF when the Arduino is first powered up.

This is what I did…. I just grounded the mosfet with external power supply but didnt connect it with arduino …

Larry Sir I really appreciate that I am learning a lot from your reply , I will do the practical again with the same mosfet which I have because it will take few days to receive the transistor that you suggested, so I will be using IRF540 again for experiment to see the result.. should I use 10k resistance between pmw and gnd with this or not ?

The way that might work is if your Arduino were powered via USB, and your computer was grounded, and the power supply was grounded. That establishes a return path. Otherwise, how does current flow?

Is that a reason why the transistor was not working ?

The arduino was connected via usb with the laptop

If the IRF540 stays cool and Peltier element works as you want, your IRF540 is okay to use.

Yes, add the 10k resistor as shown.

You must have the GNDs connected in the circuit offered.