EWPlus Controller Programming

Programming the ATMega32A on an EWPlus 974 Temperature Controller

Recently, through a generous friend, I acquired several of these temperature controller modules.
These looked similar to the eco_cool modules but were actually the entire controller not just the display.
Hoping to once again find a programmable MCU inside I immediately took one apart.
(Unfortunately in my zeal to reveal the MCU I destroyed the board just a bit)

Here's what I found...

My old pal the ATMega32A!!

This is the MCU that I first got involved with many years ago.
As before with the eco_cool module, I sorted out the necessary
connections for my USBASP programmer (VCC, GND, MISO, MOSI, SCK and RESET).
Sadly none were available on any existing connector but I found some test points
that allowed fairly easy access. Once again the manufacturer had the lock bits set
so there was no way to save or investigate the original programming.

The controller is built with the CPU and display on one PCB attached at a right
angle to the main PCB containing a 12v power supply, 3 relays and a small speaker.
It's this front PCB that I damaged during removal but it still worked when +5v
was applied so I worked with this part initially. I traced out the connections to the display part and wrote a quick program to simply blink one of the 7 segment digits. From there it was a simple but tedious process of mapping out most of the other pins and their connections to other devices.
Soon I had the display counting with all 3 digits.
Later I programmed a complete (non-destroyed) module and added options to drive the relays and speaker as well as an option to

display the voltage on one of the probe inputs. (see screenshot of menu)

UPDATE 1/11/2020

I've modified a version of the optiboot bootloader to work with this device and allow you to program it with only a usb-serial adapter and a modified Arduino 1.5.5-r2 environment (NOTE: newer versions don't seem to work with this chip)

see the attached file EWP974_With_Arduino_Bootloader.zip for all the details.

NOTE: If you have not been given a pre-programmed device you of course must program the bootloader using an ISP.


The ISP Connections

An Example of the ISP wiring

the Serial Demo Menu

Reprogrammed and counting

Here's a link to the ATMega32 datasheet:

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8155-8-bit-Microcontroller-AVR-ATmega32A_Datasheet.pdf

Download Link Details:

EWP974_With_Arduino_Bootloader.zip Details for using the bootloader enabled version of this device.
This package includes the bootloader instructions and source
files.

EWPlus_Details.doc Details connecting and programming the controller and what
bits control which feature.

EWPmenu.zip Source code for a demo program that includes a serial menu to
control relays & other stuff.
(see the included Readme.txt file for full instructions)