Following on from my previous post on my DIY timer I wanted to make something that I could mount to the wall and not have my wife be ashamed of it! In passing on one of the car forums I frequent I said that I could modify my original heating timer to be controlled by a google calendar for less than €100. As you know that timer died while experimenting so i was left having to make one from scratch if i was to come good on my claim. Thinking about it an arduino combined with an ethernet shield and touchscreen shield could come together to make a very nice controller with a tidy looking interface. The hardware for that should come in under €100. 20 each for the shields and arduino and a further 10 for a solid state relay. It was while browsing DX.com i came across this. A 4.3″ touchscreen android tablet for less than 35 euro delivered – mind blown, I knew what i had to do.
Hardware wise I needed a way of allowing the tablet to turn on the relay. I couldn’t use bluetooth as the tablet didn’t have it and it would be too unreliable anyway. The next choice for getting an output would be the vibration motor but again, the tablet didn’t have one. All that i was left with was using the speaker output to trigger the heater. To do this i had the software (detailed later) output two tones. Depending on the frequency of this tone we would know if the heating should be on or off. The speaker output is passed into an op-amp used as a comparator to give a nice 5v square wave that is input into an Attiny85 via one of the Boards.ie keyrings/dev boards i had made up. The attiny measures the incoming pulse and decides whether to turn the output on or not. The solid state relay can be directly controlled with an attiny pin. Here you can see the hardware during the prototype stage.
The 5v power adapter from the old heating setup is reused to power the attiny board and I used 4 core alarm wire to send 5v to the tablet mounted on the wall , it also has the ground and speaker output connections. The alarm wire passes through the back of the tablet and the wires soldered directly to points on the board. This means the tablet is constantly on charge, it has been live for six weeks now without any problems.
The user interface for the controller was made in app inventor. From the main screen we have a number of different features
- An indicator to show whether the heating is on or not
- A button to manually turn the heating on
- The current/next heating time
- The current weather graphic
- The current weather text (tapping will cycle between today, tonight and tomorrows weather)
- The current temp
Tapping the weather icon will bring up detailed weather information.
Also on the main screen are AA and camera icons. The camera icon will bring up and image from the wifi camera mounted in our daughters bedroom, she’s 3 so needs quite a lot of “tucking in” at night so it’d nice to be able to check on her while passing the timer.
The AA button will display the traffic conditions relevant to our commutes if any are available. There wasn’t anything exciting when i had taken this pic (typically!)
The weather text for the main screen is parsed from the met eireann site. The icons and detailed weather are parsed from Meteo Europ although this is formatted and parsed by a script on this server as it was easier than doing it from within the android. Similarly the AA report comes from the AA Roadwatch site and is parsed on the server. These were done using PHP the same way as i posted about before.
This app is actually nothing more than a front end for the awesomely powerful Tasker App. Tasker is used to check the google calendar and handles the downloading of the images from the camera. The heating app just checks the contents of a file written by tasker to know if the heating should be on. Tasker was also used to make the app that pops up set the heating on manually. What this app does is creates a new calendar entry for the specified amount of hours. The best thing is that by installing this app on any android phone with permissions to write to this calendar the heating can be turned on remotely from anywhere.
Leave a Reply