GithubHelp home page GithubHelp logo

dk2jk / big_digital_clock Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5.79 MB

A big digital clock giving new life to an old 7-segment displays from a petrol station.

Python 100.00%
python gps 7-segment spi raspberry nmea

big_digital_clock's Introduction

big-clock

big_digital_clock

A big digital clock giving new life to an old 7-segment displays from a petrol station.

Description:

A 7-segment-display from a petrol station has been revived. This is an experiment with the language Python. The controller is a RaspberryPi Zero ; pyboard or ESP32 /esp8266-Boards with Micropython will work with some modifications. Time date comes from a GPS module. The timestamp in UTC ist extracted from GPS-sentence. The communication with the GPS-receiver has readable ASCII-format, so software is very simple. A 3.3V to 5V level converter is not essential, as the 3.3V CMOS outputs can also drive TTL. The display works with TPIC6B595 shift registers (similar to 74hc595), which has an SPI Bus (Serial Peripheral Interface); this can be controlled with 3 lines: data, clock and chipselect. The outputs of the 595 directly drive the LEDs.

Brightness control

  • The brightness may be controlled via PWM via the gate signal (G) of the 595. This is done here with a squarewave signal from an 555-Timer, because the PWM of the Raspi has too much jitter.
  • Hardware-pwm of raspi is a good solution . This is done via pigpio library pigpio daemon. Then the pwm works without jitter. The brightness is set from the command line as integer parameter in percent , see below.

Bill of material:

  • RaspberyPi
  • GPS receiver Modul
  • 4 Seven-segment-displays with SPI-Interface
  • Power supply 5V for Raspi, 12V for Display ( depends on the display )

Install and Run

The main python script is "grossuhr_gps.py". You need Python 3.x. Put all files in one directory eg. "/home/pi/clock". Start your Python-IDE ( I use Thonny) and select the file "grossuhr_gps.py", optionally set program argument and select "Run". You can program the board online with Thonny via SSH selecting "Remote Python 3 (SSH) " as interpreter.

Autostart

Edit:
sudo nano /etc/rc.local

  ...
  #start pigpio daemon
  sudo pigpiod
  #start clock with 15% brightness
  python3 /home/pi/clock/grossuhr_gps.py 15 &
  exit 0

big_digital_clock's People

Contributors

dk2jk avatar

Stargazers

 avatar

Watchers

 avatar

big_digital_clock's Issues

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.