Go Down

Topic: The Sarduinostat : an automated & web based heater controller / thermostat (Read 2 times) previous topic - next topic

elric91

Inspired by some nice (and well documented) projects found on the forum, I finally managed to release my first version of the Sarduinostat
(as you may have guessed, the project fits in a sardine / pilchard box)

Apart from being fully functionnal, the goal was to make it small enough to fit it in a sardine box (nicely painted by the way as it will be put on the wall)
I used mainly semi built parts (i.e. including required caps & resitors) to keep the project simple (no soldering required)
As it is my first real arduino project (and I am new to C), I suspect part of the code can be optimized / cleaned ...

Parts :
- a sardine box
- Arduino nano clone
- DS18B20 temperature sensor
- TM1638 based 8X Seven Segments Display
- ENC28J60 based ethernet card
- a server for some of the enhanced functionnalities (i.e. collectd monitoring, access to http services)
(less than 35€ if I did not make any mistake in calculations, all ordered from dx)


What it can already do
- activate / deactivate the heater through a relay
- multi-mode control : day, night, auto (program per 10 min step), off, force (force heating)
- general status on a visible 8 x 7 segments display or simple web page
- clear heating status through leds
- manageable through panel buttons or through http services
- dhcp / ntp enabled
- interface to collectd / RRD for constant temperature monitoring

What it may do in the future
- more (and cleaned) http services
- allow to change program through a web page
- manage a different program for each day of the week
- more functions through the included web page (I need to free some memory)

It will also look nicer than on the pictures once painted and the cable fitted inside. 8)










Thanks to all people on the forum I've stolen code from :)

Collectd snippet
Code: [Select]

LoadPlugin curl

<Plugin curl>
        <Page "thermostat">
        URL "http://thermos/status"
        <Match>
                Regex "Temperature : ([0-9]+)"
                DSType "GaugeLast"
                Type "temperature"
                Instance "Thermostat"
        </Match>
        <Match>
                Regex "Ref : ([0-9]+)"
                DSType "GaugeLast"
                Type "temperature"
                Instance "Reference"
        </Match>
        </Page>
</Plugin>



Server page snippet (jquery based page)
Code: [Select]
$('.thermos_button').click(function() {
      $.ajax({type:'GET',
              url:'http://thermos/'+this.id,
              success: function (resp) { alert(resp); }
      })


Code: [Select]

<iframe src="http://thermos" id="thermos_status" width=400 height=230 frameborder=0>Thermos status</iframe><br>
    Change mode to :
    <button id="?mode=DAY" class="thermos_button">Day</button>
    <button id="?mode=NIGHT" class="thermos_button">Night</button>
    <button id="?mode=AUTO" class="thermos_button">Auto</button>
    <button id="?mode=OFF" class="thermos_button">Off</button>
    <button id="?mode=FORCE" class="thermos_button">Force</button><br/>
    Day temp :
    <button id="?dtemp+" class="thermos_button">+</button>
    <button id="?dtemp-" class="thermos_button">-</button><br/>
    Night temp :
    <button id="?ntemp+" class="thermos_button">+</button>
    <button id="?ntemp-" class="thermos_button">-</button><br/>


Go Up