This repository contains simulation links and code for an Automatic Heater Control System.
Created as an assignment for the upliance.ai Embedded Systems Internship.
- BLE cannot be simulated on Wokwi. To test BLE functionality, hardware implementation is required.
main.cppcontains the code without BLE support.main(BLE).cppcontains the code with BLE support.
- DS18B20 Temperature Sensor
- ESP32
- Servo Motor
- LED
- 4x4 Keypad
- Resistors
- Target Temperature: Temperature set by the user using the keypad.
- MAX_TEMP: Temperature above which overheating is detected.
- Download the ZIP or clone the repository.
- Open the folder in PlatformIO (VS Code) and initialize it as a PlatformIO project.
- Click Build to compile the code.
- Click Upload to flash the code to your ESP32.
- Use the Serial Monitor to view real-time debug messages and instructions.
- Open the simulation link provided above.
- Enter the Target Temperature using the keypad.
- Follow the instructions shown on the Serial Monitor.
- Based on the temperature and input, the system will behave as follows:
| State | Conditions | Action |
|---|---|---|
| HEATING | Target temperature entered, sensor temp < target | LED ON, Servo rotates |
| OVERHEATING | Sensor temp > MAX_TEMP (e.g., >100°C) | LED OFF, Servo rotates to 0 |
| TARGET_REACHED | Temp within target ± threshold | LED OFF, Servo rotates to 0 |
| IDLE | No target temp set or sensor temp > target | LED OFF, Servo rotates to 0 |
| STABILIZING | Temp near target but still adjusting | LED/Servo state depends on temperature |
Feel free to test the simulation or flash it to actual hardware