Clock With IR Remote Control for Time/Date Settings

Introduction: Clock With IR Remote Control for Time/Date Settings

This is a simple clock made using readily available components. The Microcontroller used is an inexpensive STM32F030F4P6. The display is a 16x2 LCD with I2C backpack (PCF8574).

The clock circuit can be built using small prototyping boards and a TSSOP28 adapter board, as shown.

Step 1: Materials

  • STM32F030F4P6 MCU
  • PCF8563 RTC or get the ready-made module
  • LCD 1602 with I2C backpack
  • prototyping boards
  • IR Remote control from a Bluetooth/MP3 player module - IR Remote
  • 38KHz IR Receiver - TSOP1738
  • Crystals (12MHz for MCU, 32.768KHz for RTC)
  • Various components as detailed in the schematic
  • wires, connectors, etc.

A USB serial adapter is required for flashing the program into the MCU.

Step 2: Schematic and Source Code

Step 3: Programming the MCU

After wiring up the MCU as per the schematic, the program can be flashed into MCU easily using a USB serial adapter.

Connect the USB Serial adapter's TX to MCU's PA10 (USART1_RX), and the adapter's RX to MCU's PA9 (USART1_TX).

Use a jumper to short Pins 1 and 2 of the P1 header (refer to schematic, only Boot0 pin needs to be configured as Boot1 pin is not present in this MCU), and power up the circuit to bring the MCU into serial bootloading mode.

A good reference for programming STM32 MCU is in this instructable: Flashing STM32

After flashing the program, remove the short from Pins 1 and 2 of P1, and short Pins 2 and Pin 3, then power cycle the board, and the MCU should start executing the flashed program.

Step 4: Setting the Time and Date

To set the Date/Time, press the MENU button on the remote (refer to the remote control picture for key maps).

The LCD displays * Set Time and Set Date. The * points to the current selection.

Use the INCREASE/DECREASE (+/-) buttons to move the * pointer. These 2 buttons are also used for changing the time/date values.

Use SELECT button to select.

The LEFT/RIGHT buttons are to move the cursor to the time/date positions, followed by INCREASE/DECREASE buttons to change the corresponding value. To lock in the change, press the SELECT button.

The RETURN button is used to exit time/date setting.

Step 5: Go Ahead and Build One, It Is Inexpensive and Good Fun.

Well, the title says it all. After gathering the materials, it shouldn't take more than half-a-day to build.

Next.. Put it in a nice casing, power it using a power bank..

Thanks for reading.



    • Water Contest

      Water Contest
    • Metalworking Contest

      Metalworking Contest
    • Tiny Home Contest

      Tiny Home Contest

    2 Discussions

    Hi, thanks for the interest. I basically used point-to-point soldering for the wire connections. If you intend to reuse the MCU and Realtime-clock, then you can put header pins on them, like what I did.