3D Printed Flip Clock Design and Code

Overview

Smart Flip Clock

3D printed smart clock that puts a new twist on old technology.

Smart Flip Clock

Making The Smart Flip Clock

The first thing that must be done for this project is to obtain all the materials that will be used. The list of things needed in this project are:

  • Raspberry Pi Zero W (or any raspberry pi)
  • Adequate Power Supply for Pi
  • Stepper Motors (linked below)
  • 3D printer and filament
  • Wire
  • Ability to Solder
  • Glue
  • Mechanical key switch from a keyboard

This design uses 4 stepper motors that can be powered using a Raspberry Pi. An external power supply is better, however they will work fine without one. The motors that I used in this project are the 28byj-48 steppers. They can be powered using 5v.

They can be found on Amazon at this link. https://www.amazon.com/gp/product/B015RQ97W8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

The entire construction of this clock is 3D printed, including the numbers and symbols on the flaps. Drawing on the flaps, or using stickers would be much easier however.

After printing the parts that are found on this GitHub, they can be assembled to fit together. The only thing that needs adjustment is the very small piece of plastic that is used to hold each flap in position. By design, this piece is meant to be bent after the fact to an amount that holds them sufficiently. Here's the correct number of parts that you'll need for the full assembly. If they are not listed, you only need 1 of them.

  • 56 Flaps
  • 4 Drive Plates
  • 4 Top Rings (to hold each of the 14 flaps onto their central shaft)
  • 4 Flap Gear shafts
  • 4 Drive Gears
  • 4 Idle Gears
  • 4 Idle Gear Holders (look like washers)
  • 8 Bolts (printed)
  • 4 Frame braces (optional if you're using the flap restrictor)

For the larger parts, I've included 2 options for those who are trying to print this with a smaller print bed. Option 1 is to come up with something on your own, and use the STEP files that are in the STEP files folder. Option 2 is to use the parts labeled clock_part_split0.stl. These are cut up to fit onto beds that are 150mm, to make sure that everyone can print them.

In the code (and before putting labels on), make sure to test the code after plugging in the motors. If they do not rotate smoothly, you have likely ordered the pins incorrectly. Add a time.sleep(1) command where the clock increments each step of the motor. This will indicate what stage in the step that the motor is in. The LEDs on the controller board should light up to reflect its current stage. They should follow this order. 1 for on, 0 for off.

0: 1 0 0 0
1: 1 1 0 0
2: 0 1 0 0
3: 0 1 1 0
4: 0 0 1 0
5: 0 0 1 1
6: 0 0 0 1
7: 1 0 0 1

If this is not true, ensure that the correct pins are in order in the code.

After this holds true for all 4 steppers, then you are good to attack the motors to the clock frame with the plastic bolts and glue.

A button is also included, I used an old mechanical key switch that was laying around. This is used to operate the clock.

Make sure that the following packages are installed on the system, so that the code is able to locate itself and give accurate weather information. This is done with the following commands. sudo pip3 install geocoder For the Pi Zero, the following command must be run to obtain the GPIO package. sudo apt-get update sudo apt-get install rpi.gpio

Before the code will run, you must first obtain an API key from https://openweathermap.org/api (free). This is needed to fetch the weather for your area. Take the key that is generated from your account, and put it in the place of api_key = "YOUR_API_KEY_HERE" in the code (line 122). This will give the python code access to the weather data.

Upload the code to the Pi, and run the command sudo nohup flipclock.py. This will get the code to run in the background on the pi.

There are 4 "modes" of the clock. Right as the script starts, it's in its default mode of showing the time. When the button is pressed, it will show the weather for an amount of time you can set for yourself, default is 10 seconds. To pause the clock, hold the button for more than 2 seconds but less than 10. To unpause, just press the button again. To set the flaps back to their 'resting' state, 0000, hold the button for 10 seconds. This will also end the python script.

If you want to read more about my time designing this and printing it, read some more about it on my website.

Owner
Thomas
Computer Engineering senior student at University of Cincinnati
Thomas
Wunderland desktop wallpaper and Microsoft Teams background.

Wunderland Professional Impress your colleagues, friends and family with this edition of the "Wunderland" wallpaper. With the nostalgic feel of the or

3 Dec 14, 2022
Paxos in Python, tested with Jepsen

Python implementation of Multi-Paxos with a stable leader and reconfiguration, roughly following "Paxos Made Moderately Complex". Run python3 paxos/st

A. Jesse Jiryu Davis 25 Dec 15, 2022
The last walk-through project in code institute diploma course

Welcome Rocky.C, This is the Code Institute student template for Gitpod. We have preinstalled all of the tools you need to get started. It's perfectly

Rocky.C 1 Jan 31, 2022
An electron application to check battery of bluetooth devices connected to linux devices.

bluetooth-battery-electron An electron application to check battery of bluetooth devices connected to linux devices. This project provides an electron

Vasu Sharma 15 Dec 03, 2022
Robotic hamster to give you financial advice

hampp Robotic hamster to give you financial advice. I am not liable for any advice that the hamster gives. Follow at your own peril. Description Hampp

1 Nov 17, 2021
HSPyLib is a Python library that will elevate your experience to another level.

HomeSetup Python Library - HSPyLib Your mature python application HSPyLib is a Python library that will elevate your experience to another level. It r

Hugo Saporetti Junior 4 Dec 14, 2022
Block when attacker want to bypass the limit of request

Block when attacker want to bypass the limit of request

iFanpS 1 Dec 01, 2021
dbt adapter for Firebolt

dbt-firebolt dbt adapter for Firebolt dbt-firebolt supports dbt 0.21 and newer Installation First, download the JDBC driver and place it wherever you'

23 Dec 14, 2022
An Insurance firm providing tour insurance is facing higher claim frequency

An Insurance firm providing tour insurance is facing higher claim frequency. Data is collected from the past few years. Made a model which predicts the claim status using CART, RF & ANN and compare t

1 Jan 27, 2022
Extract gene length based on featureCount calculation gene nonredundant exon length method.

Extract gene length based on featureCount calculation gene nonredundant exon length method.

laojunjun 12 Nov 21, 2022
A Snakemake workflow for standardised sc/snRNAseq analysis

single_snake_sequencing - sc/snRNAseq Snakemake Workflow A Snakemake workflow for standardised sc/snRNAseq analysis. Every single cell analysis is sli

IMS Bio2Core Facility 1 Nov 02, 2021
Library for RadiaCode-101

RadiaCode Библиотека для работы с дозиметром RadiaCode-101, находится в разработке - API не стабилен и возможны изменения. Пример использования (backe

Maxim Andreev 56 Nov 29, 2022
Small scripts to learn about GNOME internals

gnome-hacks This is a collection of APIs that allow programmatic manipulation of the GNOME shell. If you use GNOME (the default graphical shell in Ubu

Alex Nichol 5 Oct 22, 2021
PythonCalculator - A simple Calculator made in python using tkinter for GUI

PythonCalculator A simple Calculator made in python using tkinter for GUI. For P

ʀᴇxɪɴᴀᴢᴏʀ 1 Jan 01, 2022
A data driven app for bicycle hiring in London(UK)

bicycle_hiring_app_deployed A data driven app for bicycle hiring in London(UK). It predicts expected number of bicycle hire in London. It asks users t

Rajarshi Roy Raju 1 Dec 10, 2021
Object-oriented programming exercise session held in Petnica.

OOP vežba ⚠️ The code in this repo is used for a OOP practice session held in Petnica. All instructions in the README file are written in Serbian. Ops

Pavle Ćirić 1 Jan 30, 2022
Static bytecode simulator

SEA Static bytecode simulator for creating dependency/dependant based experimental bytecode format for CPython. Example a = random() if a = 5.0:

Batuhan Taskaya 23 Jun 10, 2022
A tool to help the Poly copy-reading process! :D

PolyBot A tool to help the Poly copy-reading process! :D Let's face it-computers are better are repeatitive tasks. And, in spite of what one may want

1 Jan 10, 2022
Advanced Keylogger in Python

Advanced Keylogger in Python Important Disclaimer: The author will not be held r

Suvanth Erranki 1 Feb 07, 2022
Kunai Shitty Raider Leaked LMFAO

Kunai-Raider-Leaked Kunai Shitty Raider Leaked LMFA

5 Nov 24, 2021