Final Project In AMIT Learning Embedded Systems Diploma.
This Project is a part of the AMIT Learning Embedded Diploma. It aims to demostrate the proficincy of writing bare metal derivers and interfacing with different inter and external MCU peripherals.
The project is based on the Microchip ATmega32 Microcontroller. Which allows the user to set a desired temprature via push buttons and 7 Segment Display and then the device will control the Heating and Cooling Elements to reach the desired temprature and maintain it. Various compentnets of the ATmega32 have been utilized. Timers, ADC, DIO, EPPROM and Interrputs, just to name a few.
- “Up” or “Down” buttons are used to change the required water temperature (set temperature).
- Pressing “Up” or “Down” button, enters the temperature setting mode.
- After entering temperature setting mode, a single “Up” button press increase the set temperature by 5 degrees.
- After entering temperature setting mode, a single “Down” button press decrease the set temperature by 5 degrees.
- Minimum possible set temperature is 35 degrees.
- Maximum possible set temperature is 75 degrees.
- “External E2PROM” should save the set temperature once set.
- If the electric water heater is turned OFF then ON, the stored set temperature should be retrieved from the “External E2PROM”.
- The initial set temperature is 60 degrees.
- If power is connected to the heater, the electric water heater is in OFF state.
- If the “ON/OFF” button is released and the electric water heater is in OFF state, the electric water heater goes to ON state.
- If the “ON/OFF” button is released and the electric water heater is in ON state, the electric water heater goes to OFF state.
- In the OFF state, all display should be turned OFF.
- The temperature sensor measures the water temperature.
- The water temperature should increase, if the “Heating Element” is ON.
- The water temperature should decrease, if the “Cooling Element” is ON.
- Temperature should be sensed once every 100 ms.
- The decision to turn ON or OFF either the “Heating Element” or the “Cooling Element” based on the average of the last 10 temperature readings.
- The “Heating Element” should be turned ON, if the current water temperature is less than the set temperature by 5 degrees.
- The “Cooling Element ” should be turned OFF, if the current water temperature is less than the set temperature by 5 degrees.
- The “Heating Element ” should be turned OFF, if the current water temperature is greater than the set temperature by 5 degrees.
- The “Cooling Element” should be turned ON, if the current water temperature is greater than the set temperature by 5 degrees.
- Seven segment by default show the current water temperature or the set temperature.
- By default, the 2 seven segment display are show the current water temperature.
- If the electric water heater is in the temperature setting mode, the 2 seven segment displays should blink every 1 second and show the set temperature.
- In the temperature setting mode, every change in the set temperature should be reflected on the 2 seven segment displays.
- The 2 seven segment display should exit the temperature setting mode, if the “UP” and “Down” buttons are not pressed for 5 seconds.
- If the “Heating Element” is ON, the “Heating Element Led” should blink every 1 second.
- If the “Cooling Element” is OB, the “Heating Element Led” should be ON.
MicroChip Stdio was used as a software development environment.Impelemting the Software Layed Achiturcre and Writing each layer from scratch.
Protues was used as a Circuit Simultion software.