soldering station PID

Hello everyone,
I'm trying to control a soldering iron using PID algorithm on an arduino nano with a logic level mosfet.
A 18.5V power supply provides power on an LM317 wchich is regulating to 12V and powers up the raw pin on the nano.
A dual op-amp get power from the nano's 5V regulator.

I discovered this project but it's not working as expected. If I turn on the heater, the temp data become inconsistent. When I turn off the heater everything looks fine on the screen. The temp starts dropping gradually.
Also if I turn on the heater using "digitalWrite(HEATER, HIGH)"" and not the PID algorithm everything is ok. The temp on the screen increases gradually without overshooting issues.

What could possibly go wrong with the PID and Timer One libraries that affects the temp readings? I tried to add a 100n cap on the op-amp output which helped but the problem is not solved completely.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile: