As an Amazon Associate we earn from qualifying purchases.
Leaving a clothes iron switched on is a common cause of household accidents. A hot soleplate resting on fabric can scorch it, and in the worst case it can start a fire. This project adds a simple safety layer: an accelerometer detects whether the iron is being handled, and an Arduino Pro Mini cuts the power through a relay when the iron has been still for too long.
The video above shows the project working. Below is an explanation of the idea, the parts you need, the control logic and the safety points to respect before you connect anything to mains power.
How the automatic turn off system works
When someone irons clothes, the iron is constantly moving. When it is forgotten, it sits still. An accelerometer measures acceleration on its axes, so even small movements change its readings. The Arduino reads those values continuously and decides whether the iron is in use.
If the readings stay almost constant for a set period, the Arduino treats the iron as abandoned and switches off the relay that feeds the heating element. Moving the iron again, or pressing a reset button, can bring the power back.
Components you need
- Arduino Pro Mini as the controller. It is small enough to fit inside or next to an iron housing.
- Accelerometer module, such as an analog ADXL335 or an I2C module like the MPU6050.
- Relay module rated for the iron’s current, with a driver transistor if the module does not include one.
- Buzzer or LED to warn the user before the power is cut.
- Power supply for the electronics, such as an isolated mains-to-DC adapter.
- Push button for reset or manual restart.
- Wires, a small board and an insulated enclosure.
The Pro Mini comes in 3.3 V and 5 V versions. Check which one you have and make sure the accelerometer and relay driver match that voltage. The Pro Mini also has no USB port, so you will need a USB-to-serial adapter to upload code.
Basic wiring
- Connect the accelerometer’s power and ground pins to the Pro Mini’s supply and ground.
- For an analog sensor, connect the X, Y and Z outputs to analog inputs A0, A1 and A2. For an I2C sensor, use SDA and SCL (A4 and A5 on the Pro Mini).
- Connect a digital output pin to the relay input, through a transistor if needed.
- Connect the buzzer or LED to another digital pin with a suitable resistor for the LED.
- Connect the push button to a digital input, using the internal pull-up resistor.
If you are soldering the board yourself, a good soldering iron makes neat, reliable joints a lot easier.
The control logic
The program is short and follows a few steps:
- Read the three axis values every fraction of a second.
- Compare each reading with the previous one. If the difference is above a small threshold, the iron has moved.
- When movement is detected, reset an inactivity timer.
- When no movement is detected, let the timer count up.
- When the timer reaches a warning time, sound the buzzer.
- When it reaches the cut-off time, switch the relay off.
Choosing the threshold and delay
Sensor noise means the readings will never be perfectly still, so the threshold has to be a little above the noise level. Print the values to the Serial Monitor with the iron resting and while ironing, then pick a value in between.
The cut-off time is a trade-off. Too short and the iron turns off when you pause to rearrange a shirt; too long and the safety benefit shrinks. Keep both values as constants at the top of your code so you can adjust them easily.
Avoiding false readings
Averaging a few samples smooths out noise. Looking at the change in all three axes, rather than one, also helps, because an iron can be moved in any direction. If you want extra protection, you can also use the sensor’s orientation to detect when the iron is lying face down, and apply a shorter timeout in that position.
Safety when working with mains power
The Arduino side of this project is low voltage, but the relay switches mains voltage, which can be dangerous.
- Keep the low-voltage and mains sections physically separated, and use a relay rated above the iron’s current.
- Fully insulate all mains connections and mount everything in a closed enclosure.
- Never touch the circuit while it is plugged in, and unplug it before making changes.
- Keep the electronics away from the hot soleplate and steam. Heat and moisture can damage the sensor and the board.
- If you are not experienced with mains wiring, build and test the circuit with a low-voltage lamp or a bench load first, or ask a qualified person to check it.
A homemade add-on is not a replacement for a certified safety feature. Treat it as an extra layer, and still unplug the iron when you finish.
Ideas for improving the project
- Add a small display or LEDs that show the countdown to cut-off.
- Use a temperature sensor to cut power if the soleplate gets too hot.
- Try the energy saving version of this project, which uses the same sensor idea to reduce power use.
The same motion-sensing approach appears in other builds, such as an accelerometer based earthquake alert system and an accelerometer based wheel chair project. They are useful to read if you want to get more comfortable with reading and filtering accelerometer data.
Frequently asked questions
Can I use a different Arduino board?
Yes. An Arduino Uno or Nano runs the same logic. The Pro Mini is chosen mainly because it is small and uses little power.
Which accelerometer works best?
Both analog modules like the ADXL335 and digital ones like the MPU6050 work. Analog sensors are simpler to read, while I2C sensors give cleaner data and often include extra features.
Will the iron turn off while I am ironing slowly?
It can if the movement falls below your threshold for longer than the delay. Lower the threshold slightly or lengthen the delay, and the buzzer warning gives you time to move the iron.
Is it safe to build at home?
The low-voltage electronics are beginner friendly. The mains relay connection is the risky part, so use proper insulation, an enclosure and the precautions listed above, or get help from someone qualified.