Upgrading a traditional heater ...This is a Traditional Appliance waiting for Upgrade (a heater):
there are two Relay control two Heating element, and one Triac control the Fan.
This is an 3G router we using as our main control board (mips based cpu), before dismantling:
After dismantling (right):
and the left is a hand made MCU board (51 based).
These two board are assembled inside the heater under the LED panel at last, by hot melt glue.
The MPR-A2 board is responsible for Wifi connection (AP and STA mode), local web server, sync data from cloud (GAE) and control the MCU board.
The MCU board is responsible for sensor reading, heating elements and fan's power control, LED panel display.
The MPR-A2 board are flashed with OpenWrt, there are no more free GPIO on MPR-A2, so we reuse these two LED indicator's pin as I2C bus communicate with the MCU, so these two LED will blink during data transfer. (The main function of MCU is used as GPIO expander)
By using kernel gpio lib, no need to write linux driver, using a userspace program to control the MCU through "/sys" interface.
So the MPR-A2 board can read temperature & humidity from MCU, set desired temperature to MCU, MCU compare desired temperature with current temperature, then control the relays and the fan (using top left three LED instead in the picture).
The LED panel board are controlled by an ASIC, then by the default assembled samsung MCU controlled, we disconnect the wire form the ASIC to samsung MCU, and jump wire to our MCU board (SPI interface).
The ASIC here is TM1668, a memory mapping LED driver control circuit with keyboard scan interface.
Temperature sensor with humidity is SHT10.
There are two way to control the heater:
- connect a phone or PC to the same home network, then visit the web server inside MPR-A2 board: http://hearter.local
- or visit the GAE cloud, e.g.: http://heater.dukelec.com, the web page are very same as the previous one.
The web server inside MPR-A2 board are build by busybox httpd and haserl, another blog page on my site is talking about this.
All code of this project: https://code.google.com/p/heater-diy/
Tips: MPR-A2 board cannot startup without battery, you can jump a wire as shown to lift restrictions.