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.

You might also like...
A collection of design patterns and idioms in Python (With tests!).

Python Patterns Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayP

Here is my Senior Design Project that I implemented to graduate from Computer Engineering.
Here is my Senior Design Project that I implemented to graduate from Computer Engineering.

Here is my Senior Design Project that I implemented to graduate from Computer Engineering. It is a chatbot made in RASA and helps the user to plan their vacation in the Turkish language. In order to plan the user's vacation, it provides reservations by asking various questions for hotel, flight, or event.

An app about keyboards, originating from the design of u/Sonnenschirm

keebapp-backend An app about keyboards, originating from the design of u/Sonnenschirm Setup Firstly, ensure that the environment for python is install

An addin for Autodesk Fusion 360 that lets you view your design in a Looking Glass Portrait 3D display

An addin for Autodesk Fusion 360 that lets you view your design in a Looking Glass Portrait 3D display

Random pass word generator made with python. PyQt5 module is used to design GUI.

Differences in this GUI program : Default titlebar removed Custom Minimize,Maximize and Close Buttons Drag & move window from any point Program work l

This is a library which aiming to save all my code about cpp. It will help me to code conveniently.

This is a library which aiming to save all my code about cpp. It will help me to code conveniently.

Code and yara rules to detect and analyze Cobalt Strike

Cobalt Strike Resources This repository contains: analyze.py: a script to analyze a Cobalt Strike beacon (python analyze.py BEACON) extract.py; extrac

My sister is a GR of her class. She had to mark attendance of students from screenshots of teams meeting on an excel sheet. I resolved her problem by reading names from screenshots using PyTesseract and marking them present on the excel using Pandas in Python. It took me 1hr to write the code and it is saving half an hour everyday. 💻 Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your DSA journey.📰🔥 This repository contains the REST APIs of the application.✨
💻 Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your DSA journey.📰🔥 This repository contains the REST APIs of the application.✨

Algo-Phantom-Backend 💻 Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your D

Comments
  • Clock reset.

    Clock reset.

    Hey your project looks awesome! I'm just peeking at your code and wanted to ask something. If you unplug the clock without putting it at 'rest' position (i.e. holding the button for 10 seconds), does the clock function properly after re-plugging it in? Thanks!

    opened by nicknamemok 2
  • How to synchronize flaps position with time and weather

    How to synchronize flaps position with time and weather

    Hi! First of all, great project! I think it looks really cool and it's a fun thing to print or to gift.

    That said, I'm having a bit of an hard time trying to synchronize the position of the flaps with the time and the weather symbols. I tried assembling everything together, then holding the button for 10s to bring the flaps to their resting state, marking this position with 0 and starting the script again but the time shown is not what I expected. Is the resting state meant to be all blank on flaps or the number zero? Also, if the Pi loses power (and so the motors) when I turn on the clock again, it obviously resets and shows the incorrect numbers, is there a solution for this?

    Thank you so much for the project!

    opened by nickzocchi 1
Owner
Thomas
Computer Engineering senior student at University of Cincinnati
Thomas
Script to automate the scanning of "old printed photos"

photoscanner Script to automate the scanning of "old printed photos" Just run: ./scan_photos.py The script is prepared to be run by fades. Otherw

Facundo Batista 2 Jan 21, 2022
An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to art and design.

Awesome AI for Art & Design An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to a

Margaret Maynard-Reid 20 Dec 21, 2022
System Design Assignments as part of Arpit's System Design Masterclass

System Design Assignments The repository contains a set of problem statements around Software Architecture and System Design as conducted by Arpit's S

Relog 1.1k Jan 9, 2023
Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

shironeko(Hazel) 4 Jan 1, 2022
Clock in automatically in SCU.

auto_clock_in Clock in automatically in SCU. Features send logs to Telegram bot How to use? pip install -r requirements.txt () edit user_list, token_A

null 2 Dec 13, 2021
A funny alarm clock I made in python

Wacky-Alarm-Clock Basically, I kept forgetting to take my medications, so I thought it would be a fun project to code my own alarm clock and make it r

null 1 Nov 18, 2021
A clock widget for linux ez to use no need for cmd line ;)

A clock widget in LINUX A clock widget for linux ez to use no need for cmd line ;) How to install? oh its ez just go to realese! what are the paltform

null 1 Feb 15, 2022
A clock purely made with python(turtle)...

Clock A clock purely made with python(turtle)... Requirements Pythone3 IDE or any other IDE Installation Clone this repository Running Open this proje

Abhyush 1 Jan 11, 2022
This is a simple analogue clock made with turtle in python...

Analogue-Clock This is a simple analogue clock made with turtle in python... Requirements None, only you need to have windows ?? ...Enjoy! Installatio

Abhyush 3 Jan 14, 2022
A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

MindSphere 3 Jun 3, 2022