Skip to content
Adaptive AgroTech NetworkUniversity of Southern Denmark · SDU Drone Center
Cover for Arduino Grow-Light Timer | DS3231 Clock & MOSFET Control

Video by Adaptive AgroTech. If the embedded player is unavailable, open the original video ↗.

Arduino Grow-Light Timer | DS3231 Clock & MOSFET Control

A DS3231 supplies the wall-clock time for an Arduino grow-light schedule. A MOSFET switches the lighting load according to whether the current time falls inside the programmed interval.

Understand the concept

The key idea

Comparing the current time with the schedule lets the controller recover the proper state after a restart. An interval that extends past midnight needs logic covering both portions of the day.

What to remember

  • Distinguish calendar time from elapsed time since startup.
  • Re-evaluate the desired light state when the controller restarts.
Pause & think

Check your understanding

If a controller reboots midway through the lighting period, what should it do?

Show the explanation

Read the clock and apply the state specified for the current time.