Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science

 Homemade Soldering Station 2 (AVR) AuthorHercules TrapierakisJanuary 15, 2012

PAGE 3 of 5 - The Controller

The controller is based on the Avr ATMEGA8 and varies the time that the soldering iron is power on every cycle, the period of each cycle is 1sec

the output is calculated with the following equation

SetPoint is the selected temperature

Tip is the temperature of the soldering iron

On each Cycle:

Error = SetPoint - Tip

Total_Error = Total_Error + Error

P = Kp * Error Or P = Kp * Error * Tip

I = Ki * Total_Error

D = Kd * ( Error - Previous_Error )

PID_out = P + I + D

PID_out is limited in range of -500 to +500

PID_out = PID_out + 500

And now we power the soldering Iron for PID_out milliseconds

Previous_Error = Error

Pontesiometer R5 varies the Kd factor from 0.00 to 100.00

Pontesiometer R6 varies the Ki factor from 0.00 to 100.00

Pontesiometer R7 varies the Kp factor from 0.00 to 100.00

Pontesiometer R8 varies the max temperature from 0 degrees C to 512 degrees C

Pontesiometer R9 varies the safe time from 0sec to 900sec

Lfuse = E4h
Hfuse = D9h