Git Product home page Git Product logo

wallclock's Introduction

ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Summary

It is worth to change factory firmware on your clock under the name of "Baiyangshu 1902 Wifi Clock K2 02" if the always on Wifi access point bothers you too or the missing automatic day light saving capability or if you just simply want to use an open-source software you can extend with any features whenever you need something new.

Features of Halacs's firmware

  • Web user interface.
  • Wifi AP turns off after configuration.
  • NTP time synchronization. Server can be set via web UI.
  • Backup battery backed time source if NTP fails.
  • Optional blinking second LEDs.
  • Optional leading zeros.
  • Displaying numbers in a clever way.
  • Static brightness control.
  • Time zone management with automatic DST support.
  • OTA of Arduino IDE. Password is the same as the name of the AP.
  • Automatic brightness controll.
  • Syslog capabilities.
  • Drop down choice as time zone selector (instead of the current simple tex box)
  • Find out why firmware update via the web UI doesn't work.
  • Password protected web UI.
  • MQTT client capabilities

The Device

Hardware

The PCB is nice and clean, simple to program. Full schematic can be found here.

An ESP12-F microcontroller controls the display via a serial-to-paralel shift register array consists of four 74HC595D chip. Each segment made of 4 parallel LEDs. Second LEDs are also controlled from the array.

There is a DS3231SM Real Time Clock (RTC) chip managed via I2C. It has a temperature sensor with +/- 3 C precision. Original firmware offers displaying temperature but it never mentions the precision of the sensor which was originally designed to keep the clock precise within the RTC chip. No other temperature sensore on the PCB.

Display brightness can be set by PWM via the Output Enable (OE) pin of the shift registers. There is an environment light sensor too connected to the ADC pin of the ESP. It can help to set the right brightness if static one is not fit for your needs.

There is an unplaced connector with 6 pins for programming:

  1. FLASH
  2. RST
  3. GND
  4. RDX0
  5. TXD0
  6. +5V

Sixth pin is the closest one to the ESP12-F microcontroller.

After flashing your clock, at the first boot, WiFi AP turns on under the name of halclock.... . SSID is fixed but the second part depends on the MAC address of the microcontroller. There has a hardcoded magic password: password. AP also turns on if WiFi client connection fails.

main

Halacs's firmware

My development environment

  • Ubuntu 22.04.4 LTS (jammy)
  • Arduino IDE 2.3.2
  • Wemos D1 mini as development test board

Landing page

main

Clock

clock

Wifi

wifi

Factory firmware

My factory firmware is available here.

It was extracted the way as shown on the below screenshot.

main

Landing page

main

Clock Base Setup

clock

Light Pwm Setup

brightness

Auto Power Setup

auto

NTP Server Setup

ntp

WIFI Connect Setup

wifi

Load Factory Default

loadfactorydefault

Entropy analysis

entropy

Contribution

Feel free to open pull request against my repository.

When you do so please describe the change itself (e.g. feature you implemented) and the way how you have tested your changes.

Try to follow industry best practices :)

wallclock's People

Contributors

halacs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.