~mrp/EC155_controller

4416264814f43552209ea126601bee5987bdf04b — Mark Penner 3 years ago e87278b
edit readme
2 files changed, 3 insertions(+), 5 deletions(-)

M LICENSE -rw-r--r-- => -rwxr-xr-x
M readme.md
M LICENSE => LICENSE +0 -0
M readme.md => readme.md +3 -5
@@ 13,14 13,12 @@ Microcontroller
The microcontroller I'm using is an Atmega328p. I built a custom board for it that is
similar to an Arduino Uno but runs at 3.3v and 12 MHz. The screen and thermocouple board
require 3.3v, and because of the lower voltage I dropped the clock speed to 12 MHz. The
MiniCore (link) project makes it easy to set voltage and clock speed from the Arduino IDE.
[MiniCore](https://github.com/MCUdude/MiniCore) Arduino core makes it easy to set voltage
and clock speed from the Arduino IDE.

PID Algorithm and Tuning
------------------------
I used this form of the PID algorithm:
output = proportional_gain * (error + (1.0 / integration_time * integrated_error) -
                             (derivative_time * temperature_derivative))
Since the boiler on my machine is fairly small, I set the proportional_gain to be quite a
Since the boiler on my machine is fairly small, I set the proportional gain to be quite a
bit higher when the pump is on to counteract the incoming cooler water.

So, if after reading this you're asking yourself, "Why would I build this instead of