Arduino clock
Arduino does not know the real time and forgets it when switched off, so a battery-backed clock module is used. Connect it with an LCD on the I2C bus and show the time on screen.
Make a device that acts at a set time. A stepper motor turns its shaft to an exact angle: convert steps to degrees and build an analog clock and an automatic fish feeder.
In this lab
- clock module (RTC)
- I2C and LCD
- stepper motor
- school bell and analog clock
What you learn
Many devices run on time: an alarm clock, a street light, a watering schedule. The Arduino does not know the exact time by itself and loses it when switched off, so a separate battery-backed clock module is used. The second topic is precise motion: a stepper motor turns its shaft to exactly the angle you need. The aim is to read and set the time and to learn how steps relate to angle.
Tasks
- Put the clock module on the I2C bus together with the LCD
- Read, set and display the time
- Build a device that acts at a set time
- Convert a number of steps into an angle
- See how a rounding error builds up
What you can build
- School bell — The buzzer rings at the timetable times.
- Analog clock — A stepper drives the minute hand and the clock module keeps it right.
- Fish feeder — Twice a day the motor turns the box 60° to drop food.
- Sun tracker — The panel turns 15° every hour.
- Pill reminder — Light and sound at a set time until the button is pressed.
- Rotating display — Every 10 seconds the stand turns exactly 45°.