Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Washing Machine Control Panel (STM32 Nucleo-64)

A simulated smart washing machine control panel developed in C++ using Mbed OS on an STM32 Nucleo-64 microcontroller. The project demonstrates embedded systems concepts including GPIO, ADC, PWM, sensor integration, user interfaces, and state-based control logic.


Overview

photo

This project simulates the front panel of a washing machine using physical buttons, potentiometers, LEDs, sensors, a 7-segment display, and a buzzer.

Users can:

  • Power the washing machine on/off
  • Select washing mode
  • Set washing time
  • Select water temperature
  • Start a washing cycle
  • Monitor system status
  • Receive warnings for overloads or incorrect operating conditions

The project was developed using Mbed Studio and programmed in C++.


Features

Power Control

  • Toggle washing machine ON/OFF
  • Green LED indicates power status
  • Startup and shutdown buzzer tones
  • Prevents interaction while powered off

Run Function

  • Starts washing cycle
  • Red LED indicates machine running
  • Checks:
    • Water temperature matches user selection
    • Enough clothes detected
  • Completion melody after cycle finishes

Washing Modes

Three selectable washing modes:

Mode Motor Cycle
A 100 Cycle
B 200 Cycle
C 300 Cycle

Displayed on the 7-segment display.


Timer Selection

Three wash durations:

Display Time
2 20 Minutes
4 40 Minutes
6 60 Minutes

Temperature Selection

RGB LED indicates selected temperature.

Colour Temperature
🔵 Blue Cold
🟠 Orange Warm
🔴 Red Hot

Sensor Monitoring

Light Sensor (LDR)

  • Detects clothing level
  • Warns when overloaded
  • Activates:
    • Red warning LED
    • Buzzer
    • Serial warning message

Temperature Sensor

  • Detects water temperature
  • Green LED indicates water has reached desired temperature

Force Sensitive Resistor (FSR)

  • Detects whether enough clothes are inside
  • Green LED confirms sufficient load

Hardware Used

  • STM32 Nucleo-64
  • Breadboard
  • Push Buttons ×3
  • Potentiometers ×3
  • RGB LED
  • Green LEDs ×3
  • Red LED
  • Passive Buzzer
  • 7-Segment Display
  • Light Dependent Resistor (LDR)
  • Temperature Sensor
  • Force Sensitive Resistor (FSR)
  • Jumper Wires

Pin Configuration

Component Pin
Button 1 PC_10
Button 2 PC_11
Button 3 PD_2
Potentiometer 1 PA_5
Potentiometer 2 PA_6
Potentiometer 3 PA_7
LDR PC_2
Temperature Sensor PC_3
Force Sensor PA_1
Green LED 1 PC_1
Green LED 2 PB_0
Green LED 3 PA_4
Red LED PC_0
RGB LED PB_3, PB_4, PB_5
Buzzer PA_15
7-Segment Display PA_11, PA_12, PB_1, PB_15, PB_14, PB_12, PB_11

Software

  • Mbed Studio
  • Mbed OS
  • C++
  • CoolTerm (Serial Monitor)

Project Structure

│── main.cpp
│── structure.txt
│── .gitattributes
│
├── docs
│   ├── block diagram.png
│   ├── photo of the breadboard layout.jpg
│   └── Pin Allocation - Unit 4.jpg
│
└── media
    └── demo.mp4

System Logic

Power ON
      │
      ▼
Select Mode
      │
      ▼
Select Time
      │
      ▼
Select Temperature
      │
      ▼
Read Sensors
      │
      ▼
Conditions Met?
      │
 ┌────┴────┐
 │         │
Yes        No
 │         │
 ▼         ▼
Run      Wait
Cycle    Display Warning
 │
 ▼
Complete

Example Console Output

***** POWER ON - SELECT MODE, TEMPERATURE AND TIME *****

***** MODE A SELECTED *****

***** TIME SET TO 20 MINUTES *****

***** TEMPERATURE SET TO HOT *****

***** MACHINE RUNNING... *****

MODE SELECTED = A
TEMPERATURE = HOT
TIME = 1200000 ms
MOTOR = 100 CYCLE

Learning Outcomes

This project demonstrates practical experience with:

  • Embedded C++
  • STM32 Nucleo Development
  • Mbed OS
  • GPIO
  • ADC
  • PWM
  • Sensor interfacing
  • State machine design
  • Serial communication
  • Modular programming
  • Hardware debugging
  • Breadboard prototyping

Future Improvements

  • Implement actual DC motor control
  • LCD/OLED display interface
  • EEPROM for saving user settings
  • Real-time countdown timer
  • Interrupt-driven button handling
  • Non-blocking software timers
  • Improved debounce logic
  • Finite State Machine (FSM) architecture
  • Low-power operating modes
  • PCB implementation

Demonstration

A demonstration video of the project is available here:

https://youtu.be/1zN7lUB0z4U


Author

**Atiq Mufaqqir **


License

This project is intended for educational purposes as part of the ELEC1620 Embedded Systems coursework.

About

STM32 Nucleo-64 smart washing machine controller using C++, Mbed OS, GPIO, ADC, PWM, and sensor interfacing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages