Giter VIP home page Giter VIP logo

clock-dcf-pi-pico's Introduction

components

YouTube Channel Views

Clock

Reinvigorating a handsome old clock and making it super-accurate, without any internet. Uses a Raspberry Pi Pico, a radio antenna and a couple of components to emulate a signal from a Mother clock. You can define the pulse interval as a parameter, so it works with a broad range of clocks (most take 60 seconds intervals, but some take 30 second or 1 second pulses).

The DCF77 signal is a radio signal that carries information from some Atomic Clocks. The signal covers most of Europe and is accurate to within a second over about 300,000 years (the DCF77 signal has been broadcasting the time since 1973 and in 2021 it was agreed to be continued for at least 10 more years).

(The United States uses WWVB, United Kingdom uses MSF and Japan uses JJY. You could easily adapt the code to any of those signals)

Hardware

  • Old 'nebenuhr' clock with secondary mechanism (a mechanism that is controlled by pulses from the mother-clock)
  • A ferrite receiver (for the DCF77 signal)
  • A microcontroller (Raspberry Pi Pico)
  • Real time clock (RTC) (backup for any radio signal issues)
  • H bridge (LN298), for the polarity switch that triggers the clock mechanism
  • Step-up module to send correct voltage pulse to the clock (or a dc power supply, as used in the video)

Videos

An overview of how the clcok works:

Explainer vid

How the pieces are assembled:

Explainer vid II

Building your own clock

Assemble the Pico, step up transformer and H bridge. Note that the voltage of the step up tranformer may vary depending on the clock you're using.

Schematic

The antenna also needs 3.3V power and GND. They were omitted in order to keep the diagram tidy. If you're sending more than 12V (we used 24V) to the clock then make sure you remove the 5v jumper from the h-bridge. schematic

Copy the files from this repository

  git clone https://github.com/veebch/clock
  cd clock

then send them your Pico using ampy

  sudo ampy -p /dev/ttyACM0 put ./*

Edit the file firstruntime.txt to show the time that the clock is showing before the first run. This should be the only time you need to do this, the code will keep track of time after power-off.

Running

The code in main.py executes as soon as the pico is powered on, but if you run while connected to Thonny then you will see the terminal output showing the signal as it is decoded. If the bars look irregular or have gaps in, then there is an issue with the dcf77 signal. A clear signal will look something like this:

Action Shot

Code used

The DCF77 part of the code was based on demogorgi/set-rtc-using-dcf77-via-dcf1.

Licence

GPL 3.0

clock-dcf-pi-pico's People

Contributors

veebch avatar choromanski 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.