README.md

Overview

A firmware (an Arduino sketch) written for the LGT8F328P (SSOP20) “pseudo-Pro Mini”-based electronic clock I made in 2022.

Concept

I had made this half-baked clock and written the initial functional sketch for the LGT8F328P-based “pseudo-Pro Mini” board in 2022, and it works okay, but in order to improve the device’s maintainability I wrote the updated firmware and the docs. If you like this project for some reason, feel free to use the code and the docs as you please.

The sketch:

  • Drives a multiplexed 7-segment display using a single 74HC595 shift register IC and a set of 4 GPIO-driven transistors.
  • Interfaces with a DS3231 RTC IC (breakout board) to track time.

1.png

2.png

3.png

Schematic

It’s like on this picture (taken from a similar project), but it differs in what microcontroller pins are used, in the wiring order between the display and the 595, and in button count (this project has two instead of three). It’s all reflected in the sketch.

As it’s drawn, the schematic is far from perfect anyway: base drive resistors should have higher values, pull-down resistors should be added to bases, etc. But hey, it works.

circuit_diagram_(schematic).png

Hint: charging circuit removal

It is a common knowledge that most cheap DS3231 breakout boards have a backup battery charging circuit that is, first, designed for rechargeable batteries (like ML2032), and second, designed rather poorly. Since I use a non-rechargeable CR2032 battery, I followed a common advice and removed the diode and the resistor that constitute the said circuit (removing any of them would be enough, but I removed both anyway). I suspect that it improves battery health and makes RTC time update on backup power more reliable.

4.png

5.png

Dependencies

See the sketch file include directives, see the links below.

License

This stuff is licensed under the MIT License (see LICENSE here).

Links

Git repositories

This project

Drv7SegQ595 by ErlingSigurdson

SegMap595 by ErlingSigurdson

uButton by AlexGyver

GyverDS3231 by AlexGyver

Miscellaneous

Contact details

Author — Dmitriy Efimov aka Erling Sigurdson

Описание
A firmware (an Arduino sketch) written for the LGT8F328P (SSOP20) "pseudo-Pro Mini"-based electronic clock I made in 2022.
Конвейеры
0 успешных
0 с ошибкой
Разработчики