splitFlapClockRadio
par iz2k
Fichiers imprimables (19)
-
stlsupport-stepper-R.stl
36 Ko · 220 téléchargements
-
stlsupport-stepper-L.stl
36 Ko · 221 téléchargements
-
stlaxle.stl
44 Ko · 220 téléchargements
-
stlui_Control_Wheel.stl
75 Ko · 221 téléchargements
-
stlFrontal.stl
84 Ko · 220 téléchargements
-
stlcover.stl
804 Ko · 222 téléchargements
-
stlflap-holder-24.stl
170 Ko · 222 téléchargements
-
stlflap-24.stl
32 Ko · 225 téléchargements
-
stlfloor.stl
135 Ko · 221 téléchargements
-
stlsupport-drum-bridge-24.stl
5 Ko · 221 téléchargements
-
stlflap-60.stl
29 Ko · 228 téléchargements
-
stlsupport-drum-bridge-60.stl
5 Ko · 220 téléchargements
-
stlsupport-drum-R.stl
79 Ko · 220 téléchargements
-
stlfooter.stl
25 Ko · 221 téléchargements
-
stlui_Volume_Wheel.stl
76 Ko · 220 téléchargements
-
stlgear-axle.stl
446 Ko · 221 téléchargements
-
stlflap-holder-60.stl
350 Ko · 220 téléchargements
-
stlgear-stepper.stl
445 Ko · 220 téléchargements
-
stlsupport-drum-L.stl
79 Ko · 219 téléchargements
Description
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.
OutsideInsideThe 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
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 splitFlapClockRadioBackendAngular 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