Lego Micro:bit Clock

by ang_yu_heng_4 in Circuits > Clocks

219 Views, 1 Favorites, 0 Comments

Lego Micro:bit Clock

Media.png
Media.png

I built this clock as part of my STEM project to learn how coding and electronics can come together in everyday life.

Using a Micro:bit, a real-time clock module (DS3231), and a TM1637 display, I made a working desk clock that shows the current time. My design follows the inspiration of a bungalow with a balcony and planter. The planter is the pencil holder, the balcony is the phone holder and the bungalow is where all the parts are hidden.

Supplies

Media (1).png
  1. 1 × Micro:bit
  2. 1 × Keyes expansion board (or Micro:bit breakout board)
  3. 1 × DS3231 Real Time Clock (RTC) module
  4. 1 × TM1637 4-digit display module
  5. Jumper wires
  6. LEGO bricks (or recycled cardboard for clock body)
  7. USB cable and battery pack

Wire the Compartments

Media (2).png
  1. Connect the Micro:bit to the expansion board
  2. Connect USB cable to the Micro:bit
  3. Connect the batteries pack to the Micro:bit
  4. Connect RTC to P19 and P20 of expansion board
  5. Connect the 7 Segment Display to P0 and P1 of expansion board

Code the Micro:bit

Code the Micro:bit to set the time.


To see the code, please refer to the link below:

https://makecode.microbit.org/S09961-04275-65817-70530

Building the Clock Body

Media (1).png

I built the clock body in such a way that it has a clock, a pencil holder and a phone holder. The main objective is also to hide the electrical compartments that are used to power the clock, hence the bungalow shape. This clock is made up of Lego blocks. Afterwards, the product is finished.