splitFlapClockRadio

por iz2k

Ficheiros imprimíveis (19)

  • stl

    support-stepper-R.stl

    36 Ko · 220 descargas

    Descarregar
  • stl

    support-stepper-L.stl

    36 Ko · 221 descargas

    Descarregar
  • stl

    axle.stl

    44 Ko · 220 descargas

    Descarregar
  • stl

    ui_Control_Wheel.stl

    75 Ko · 221 descargas

    Descarregar
  • stl

    Frontal.stl

    84 Ko · 220 descargas

    Descarregar
  • stl

    cover.stl

    804 Ko · 222 descargas

    Descarregar
  • stl

    flap-holder-24.stl

    170 Ko · 222 descargas

    Descarregar
  • stl

    flap-24.stl

    32 Ko · 225 descargas

    Descarregar
  • stl

    floor.stl

    135 Ko · 221 descargas

    Descarregar
  • stl

    support-drum-bridge-24.stl

    5 Ko · 221 descargas

    Descarregar
  • stl

    flap-60.stl

    29 Ko · 228 descargas

    Descarregar
  • stl

    support-drum-bridge-60.stl

    5 Ko · 220 descargas

    Descarregar
  • stl

    support-drum-R.stl

    79 Ko · 220 descargas

    Descarregar
  • stl

    footer.stl

    25 Ko · 221 descargas

    Descarregar
  • stl

    ui_Volume_Wheel.stl

    76 Ko · 220 descargas

    Descarregar
  • stl

    gear-axle.stl

    446 Ko · 221 descargas

    Descarregar
  • stl

    flap-holder-60.stl

    350 Ko · 220 descargas

    Descarregar
  • stl

    gear-stepper.stl

    445 Ko · 220 descargas

    Descarregar
  • stl

    support-drum-L.stl

    79 Ko · 219 descargas

    Descarregar

Descrição

splitFlapClockRadio

GitHub Page: https://github.com/iz2k/splitFlapClockRadio

The splitFlapClockRadio is an old stylish, classic alarm clock with up to date features, such as automatic time adjustment, weather forecast, air quality sensors, FM radio or Spotify playback. This is an updated version of the Flip-Clock, with slight modifications on the split-flap mechanics and integrated electronics. This device has been designed for DIY hobbists and can be manufactured for 100$ BOM.

OutsideInside

The splitFlapClockRadio features the following characteristics:

  • Local time and weather on 3D printed split-flaps.
  • 2W I2S Class-D Stereo Amplifier
  • FM radio
  • Spotify
  • Air Quality measurements (eCO2 and TVOC)
  • 32 x RGB LED array light
  • Spoken weather forecasts (openWeatherMap + TTS)
  • Volume and Media control rotary encoder wheels
  • Powered by a Raspberry Pi 3A+

The project is divided in four main sections: 3D design, electronics hardware design, split-flap controller MCU firmware (C++) and main software (Python backend + Angular frontend).

DIY brief

  • [ ] Print 3D parts
  • [ ] Manufacture PCB (<20$ with JLCPB)
  • [ ] Populate PCB with Hot Air Gun
  • [ ] Flash MSP430 MCU
  • [ ] Set-up fresh RaspberryPiOS Lite SD card (tutorial)
  • [ ] Install splitFlapClockRadio barebone:
    wget -O - https://raw.githubusercontent.com/iz2k/splitFlapClockRadio/master/sw/shInstall/barebone.sh | bash
  • [ ] Reboot and enjoy!

3D design

SplitFlapDigit

Each split-flap digit consists of a support structure with two bearings. The axle is placed inside the bearings holding two flap holders. All the flaps are mounted within those holders. The movement of the digit is achieved with a stepper motor and two gears. A reflective IR sensor is used to detect falling flaps, and a hall sensor to synchronize the absolute position of the drum.

In order to get numbers and weather icons painted into the flaps, custom stencils have been designed and printed. The stencil design is avaiable at iz2k/splitFlap-stencil repository.

Cover

The cover consist on 3 main parts and 2 control wheels:

  • Floor
  • Top cover
  • Frontal
  • Volume wheel
  • Media wheel
Front RightFront LeftRear

Electronics hardware

The electronics hardware integrates the following components:

  • AC/DC converter
  • MSP430FR2476 MCU as splitFlap controller
  • 3 x ULN2003 stepper driver
  • 3 x OPB733 reflective IR sensor
  • 3 x DRV5055 hall sensor
  • 1 x Si4731 FM radio tuner
  • 2 x MAX98357 I2S audio amplifier (stereo)
  • 32 x WS2812-2020 RGB LED
  • Air Quality sensors: 1 x BME680 + 1 x SGP30/SGP40

SplitFlap controller firmware

The firmware runs on a MSP430 MCU and controls the driver of the three integrated stepper motors. The firmware keeps track of the falling flaps based on the reflected IR detector and synchronizes every cycle based on a hall efect sensor. The MCU can be commanded through I2C bus using SMBUS commands.

Main Control Software

Tha main functionality of the clock is controlled by the Python backend. It controlls all the peripherals and makes the system work upon user interface with the rotary encoders or the orders triggered through the frontend.

The frontend is an Angular application that allows checking and modifying the current status and configuration of the system. It is accesible withtin the WLAN through a web browser ponting to the configured hostname of the Raspberry Pi.

Python backend

The backend is divided in different packages to control specific peripherals of the systems:

  • Alarm: controls activation of the configured alarms.
  • Audio: controls the alsa sound system to trigger sounds and control volume.
  • Clock: controls the split-flap controller via SMBUS.
  • Config: controls the configuration file.
  • DB: interfaces a MariaDB database to log periodic weather and Air Quality data.
  • OsInfo: passes current OS infor to the frontend.
  • RadioTuner: controls the integrated Si4731 FM tuner IC
  • RgbStrip: controls the WS2812 RGB LED strip.
  • SpotifyPlayer: activates raspotify device and controls the playback of spotify via spotify-cli.
  • UserInterface: controls the Volume and Media rotary encoders.
  • WeatherStation: gets weather information through OpenWeatherMap API and controls Air Quality sensors.
  • WebServer: integrated Flask webserver to connect with the frontend via REST requests and/or websockets.

The backend is by default installed as a system service (autostart enabled), but can be stopped and launched manually to check its output.

sudo service splitFlapClockRadioBackend stopsudo splitFlapClockRadioBackend

Angular Frontend

The frontend is also divided in different modules:

Dashboard

  • Quik view of current status

Clock

  • Current time and alarm list
  • SplitFlap calibration
  • Alarm configuration

Radio

  • FM radio tuner control and stored station list.

Spotify

  • Playback control and stored media item list
  • Authentication
  • Music search

Sensors

  • Air Quality sensor data and calibration.

Weather

  • Weather data, location configuration and API keys.

Historic

  • Logged weather and Air Quality data

Etiquetas