CPX 3D Printed Countdown Timer

This CPX countdown timer fulfills the need for a timer for family games. With the Makecode, the timer can be set to 10, 20, or 30 seconds. Pressing the Left button adds 10 seconds to the timer, you can press it up to 3 times. The Right button starts the timer, cueing the servo, lights, and sounds. Pressing both buttons at the same time resets the timer to 0. When the timer ends, the lights will flash and the CPX will make an alarm noise.
Supplies
All necessary supplies and equipment are provided with links. Photo(s) of the supplies are shown
- 180º Rotation Micro Servo (note that using CircuitPython on a Micro Servo will not result in complete 180º rotation)
- Makerbot Sketch 3D Printer
- Hot Glue and Hot Glue gun
The Code (MakeCode or CircuitPython)
Makecode:
MakeCode is a website that explains how to code in step-by-step instructions. It is very easy to learn because of the block function showing exactly what a code does and what it can incorporate. What our code consists of is a code that needs the buttons on the CPX to be pressed for the code to begin. It starts a countdown of a 30-second timer that has a servo showing the time on a clock with noises counting down the last 10 seconds and an alarm when the clock strikes 0. There are also lights that change every second when the timer is counting down; the CPX lights change each second with the lights going out at the end showing the timer is finished.
To download Makecode file:
After attaching CPX to laptop with provided cord, if it is “CIRCUITPY” in the drives section of your files browser, press the reset button twice.
Adafruit Makecode Instructions
- Download attached MakeCode file here
- Drag and drop the file onto the “CircuitPlayboot” drive when CPX is plugged into computer.
CircuitPython:
- Follow these instructions to install CircuitPython onto your CPX: https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
- Connect your CPX to your computer and save code.py onto it
This code is similar to the Makecode code, but only has the possibility for a 10 second timer. When the left button is pressed, the timer sets to 10 seconds. When the right button is pressed, the timer starts, ticking down and having a light and beep on each second. Pressing both buttons simultaneously resets the timer.
To download CircuitPython file:
- Download attached code.py file
- Drag and drop code.py file onto “CIRCUITPY” drive.
- Make sure that there is only one “code.py” file on the CPX
Downloads
Printing the Parts
All parts for this project were designed in Revit, and are created to be printed in 4 separate Makerbot Sketch Print Jobs.
- Download all the.stl files attached, except: if using the circuit python code, download the “0-10” file, and if using the MakeCode code (recommended) download the 0-30 file.
- Load parts into Makerbot CloudPrint, setting up print for a “Sketch” printer
- For all prints, turn off rafts. For all prints EXCEPT CPX BUILD DAY 3 FILE, turn off breakaway supports.
- Download cloud print files onto a USB drive, and print on Sketch printer using USB drive.
- Remove supports from the peices of the “BUILD DAY 3” print.
Wiring the CPX and Servo
PLEASE GET HELP/SPECIFIC INSTRUCTION FROM A PROFESSOR/KNOWLEDGEABLE ADULT FOR THIS STEP.
If you would not like to solder, using only alligator clips will work, although it will not fit quite as well.
- The CPX device has three specific outputs: A1, VOUT, and GND. We will use the solder tool and alligator clips to the servo motor to connect these outputs to the servo. First, connect the yellow wire to the A1 port, sautering the alligator clip to the VOUT port. To solder you need to clip the end of an alligator clip and that will be the end you solder onto the CPX.
- Next, repeat the first step with the brown wire, using the solder and wire to connect it to the VOUT port circle.
- Then, connect the black wire to the GND port circle, again, using the solder and wire.
- The next step is to connect the battery pack to the CPX charging port. Simply plug the battery pack into the CPX charging port.
Assembling the Print
BUILDING THE PRINT:
The overall print will have 7 total separate pieces:
- Base
- Front side w light openings
- Backside w servo hole
- Clock attachment
- Horizontal extender supports
- 2 buttons
1. First, tape the battery pack onto the bottom of the base, in between the two open slots. You want to tape it accordingly so the “on/off” switch is facing upwards. Don't forget to turn it on! (Taping the battery pack will make it easier to maneuver around the structure, without the battery pack sliding back and forth).
2. Next, place the circular buttons in between the circular slot spaces. You want to do this so the “wings” of the side are sticking up towards you.
3. This is where you place your CPX; you want to align the buttons of the CPX with the buttons you just placed. There is a ledge halfway through this side, which is where the wires of the CPX will show through, and this helps you line up the buttons of the CPX with the printed buttons.
3a. Place the triangular CPX support on the CPX so the three legs of the triangular side are gently holding the CPX. Then, place the second side of the box on top of the first side so that the inside face is touching the other legs of the CPX support. Once you verify that everything is lined up accordingly
4. Now, place the entire front side onto the base. There are two slots in the base, and we recommend you place this front side closest to the side of the on/off switch. (That way, the wires are not bending as much).
5. Now, you will hot glue the “clock” attachment into the two holes printed into the back side. This will attach the clock attachment to the entire side)
6. Once glued, you also want to glue the clock “hand” onto the servo motor. Make sure the servo is showing the yellow label upwards, while gluing the “hand” onto the motor. (if glued the wrong way, the clock “hand” will rotate upside-down!)
7. Now, place the servo motor onto the ledge created on the back side. (it should fit perfectly, like a puzzle piece!)
8. Once everything is glued and connected to the back side, place it on the other slot on the base. You will notice that both the front and back sides have arms that help attach to each other- this will help you place them correctly.
9. Finally, place the dome-like lid on top. The top structure of the lid will grip both the front and back sides of the structure. You may glue the top gripping structure to the arch for more support.