Coder Social home page Coder Social logo

elfema-ntp's Introduction

Elfema NTP Clock

I saved this clock from the trash. This is a clock manufactured from the GDR company called Elfema. It's a slave clock from a clock network system. Since the original master clock is too bulky, here is a updated version with new nifty features:

  • NTP based time synchronisation
  • HTTP-Interface
  • automatic daylight saving time
  • 12V power supply

Hardware

Used components:

  • ESP-03 (ESP8266)
  • 2N3906 Transitor
  • CD40109 Low-to-High Voltage Level Shifter
  • 1N4001 Diode
  • SZ508 Zener Diode
  • BY133 Diode
  • โ€ฅ some resistors and a capacitor

Equipment:

  • USB-to-Serial Adapter for programming (e.g. CP2102)

Schematic

Scan of the sketched schematic.

Images

The Elfema clock front.

The soldered board with the ESP-03 board (ESP8266) on the backside.

Build

Install platformio and checkout the repository.

$ echo -e "myssid\tsupersecretwifipassword" > secret
$ source env/activate               # set $PLATFORMIO_BUILD_FLAGS
$ platformio run --target upload    # build and upload to ESP8266

Use

Power up the clock and wait some seconds. The clock indicates complete network and time setup by moving the minute clockhand. Now tell the clock it's current clockhand settings.

# determine the ip adress, here it's 192.168.42.106
$ curl "192.168.42.106/time"  # check the clock time
ntp time and date: 23:46:11 27.10.2016
# read the clockhands
$ curl "192.168.42.106/set?H=18&M=24"
ok got it!

After that the clock will set itself to the current time. Please do not use this in public / unsecure network environment. Otherwise someone is going to mess up the time and clock.

Ideas

  • add a spare AM2302 sensor on GPIO16
  • Secure HTTP interface with challenge-response authentication
  • OTA Updates
  • build some nifty mobile app (apache cordova?)

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.