Forum URL: http://www.hngamers.com/threads/ice-the-ice-machine-laser-chiller.829/
Hardware Requirements:
You may substitute the appropriate cheaper alternative for these devices.
http://www.sainsmart.com/arduino-pro-mini.html
http://www.sainsmart.com/atmel-atmega328-au-mini-usb-cable-full-compatible-for-arduino-nano-3-0-a021.html
I designed this controller firmware to work with the Arduino nano based on the ATMega328P processor; however, any Arduino that is based off of this chip will work out of the box. It's possible that others will work with little to no modification.
Arduino Pin D6 connects to IN1 on the Relay
Arduino Pin D7 connects to IN2 on the Relay
Arduino Ground pin connects to Relay ground
Arduino 5V pin connects to Relay VCC
Arduino Pin A0 connects to Thermistor 1 for the water temperature sensor system
Arduino Pin A1 connects to Thermistor 2 for the cooling fan sensor system (if equipped)
Arduino Pin A2 connects to the water sensor (if equipped)
All settings can be adjusted in the config section of the Arduino sketch. It would be recommended to not change anything other then the Pins and temperature settings.
// ############## CONFIG SECTION ##############
// resistance at 25 degrees C
define THERMISTORNOMINAL 10000
// temp. for nominal resistance (almost always 25 C)
define TEMPERATURENOMINAL 25
// how many samples to take and average, more takes longer
// but is more 'smooth'
define NUMSAMPLES 5
// The beta coefficient of the thermistor (usually 3000-4000)
define BCOEFFICIENT 3950
// the value of the 'other' resistor
define SERIESRESISTOR 10000
define BAUD_RATE 9600
define TERM_CHAR '\n'
define BUF_LEN 128
define hotgascycle 480000 //480000
define hotgascycleoff 10000
//Pins
define RELAY1 6
define RELAY2 7
define THERMISTOR1PIN A0
define THERMISTOR2PIN A1
define WATERSENSORPIN A2
define WATERSENSOR waterSensor
int lowerTemperatureControl=15.0;
int upperTemperatureControl=18.0;
bool waterSensor=false;