Smiley Face CPX Wearable Wristband With Servo Spin Motion

by jferrandino in Circuits > Wearables

350 Views, 1 Favorites, 0 Comments

Smiley Face CPX Wearable Wristband With Servo Spin Motion

IMG-3797.jpg

For this project we created a battery-powered wearable device using the CPX device that includes a 3D printed part, circuit python code, and motion using a servo. We worked in a group of three to brainstorm different ideas on how we could combine so many different components into one final product that would accomplish the designated criteria and constraints. Along with collaboration and organization, we learned other important skills such as 3D printing and basic coding on the computer. For access to our 3D printed or coded components, please see the attached links or files listed in future sections with the corresponding instructions on how to make the various elements of the project come to life!

Supplies

2 Supplies Pic.png

For this project, we used a whole spectrum of supplies including a circuit playground express, a piece of cardboard, a servo motor, a can of gorilla glue, a rechargeable battery, two small googly eyes, a puffy red pompom, a blue rubbed band, three alligator clips of various colors, 6 nuts, 6 bolts, a length of black elastic wire, a glue gun, a 3D printer, a knife, a ruler, and a pencil. Most of these materials can be found at your local craft, electronics, or home goods stores. However, for the more complex technological components, please see the list of links for supplies below..

Links for Supplies:

Circuit Playground Express: https://www.adafruit.com/product/3333

Continuous Rotation Servo: https://www.adafruit.com/product/2442

USB-A or USB-C to micro-B data cable: USB size should fit your computer, various options available at Adafruit: https://www.adafruit.com/product/2185

Li-Ion battery: https://www.adafruit.com/product/258 

Alligator Clips: https://www.adafruit.com/product/3255

Screws and Bolts: https://www.adafruit.com/product/4685

Elastic Band: https://www.amazon.com/dp/B082FZQSFC/ref=sspa_dk_detail_2?pd_rd_i=B082FZQSFC&pd_rd_w=bD8Ns&content-id=amzn1.sym.88097cb9-5064-44ef-891b-abfacbc1c44b&pf_rd_p=88097cb9-5064-44ef-891b-abfacbc1c44b&pf_rd_r=EBFEJ1WZH8DX8VGS1MGP&pd_rd_wg=2V0EI&pd_rd_r=d9a9c24e-6224-4920-bee9-76cd928a39f4&s=arts-crafts&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWw&th=1

All other materials should be purchased at local craft, electronics, or home good stores.

3D Print a CPX Holder and a Battery Pack

IMG-3844.jpg

For this step of the project, students should first download the.stl files that are attached to this step of the project below. Then, they should take the designs for both the CPX holder and battery pack and upload them to the following website: https://cloudprint.makerbot.com/print. For this website, they should click the import button in the top left corner of the screen and the select the desired .stl file from their computer's downloads folder. After, there should be an image loaded onto the platform that represents these 3D printed components of the project. To prepare this for printing, you then must switch the section (Printer by Type) to Sketch which is located on the top of your screen. Once you do that, you are able to go to the bottom right corner of your screen and click none for base layer and none for support type. This prepares your 3D models for printing, and now you must click export in the top right corner to make a .makerbot file. This file can be exported to a thumb drive, which can then be simply plugged into a 3D printer and selected so that you can print out your products. When both of these components for the project are done printing, you can then move on to further steps.

Download Continuous Circuit Python Code

Cpx Servo Code pic.png

For this step of the project, students should install and set up the circuit python bootloader onto their computers and then work through the steps to obtain the code for this project. They will then be able to control the CPX using the code.py file which will eventually cause the servo to express its desired motion. Steps for downloading and setting up the code for this project can be found by visiting the following link: https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express/first-things-first. There are essentially 3 things that students need to do to have success with this aspect of the project. First, download and install the Mu editor: https://codewith.mu/. Second, download the CircuitPython Bootloader from https://circuitpython.org/board/circuitplayground_express/ and drag it to your CPX (CPLAYBOOT), it will change to CIRCUITPY. Third, set up your CircuitPython Library by extracting the folder onto your own computer from the following link: https://circuitpython.org/libraries. Students should find the files titled adafruit_circuitplayground & adafruit_motor in the lib folder and copy them  into your CPX lib folder. Keep track of the location of this big folder later as it will be helpful if you wish to move other libraries onto the CPX. Once you have all of this stuff setup, you can download the continuous servo code from https://learn.adafruit.com/circuitpython-essentials/circuitpython-servo which will be used to make the smiley face in our design spin in future steps. This is the second section of code on this website so be sure to copy and paste that one and not the first one into your Mu editor before loading it onto your CPX in future steps.

Attach CPX Device to 3D Printed Case With Screws and Nuts

4 CPX nails down.png

For this step of the project, students should attach the CPX device to the 3D printed CPX case using the various nuts and bolts. They should do this by putting these metal pieces through the spots on the CPX case labeled as GND, Volt, and A2, as well as anywhere else that allows the CPX to stay connected to the case. This will allow for the electricity to be transferred properly in future steps which will make the design run effectively.

Load Circuit Python Code From Computer to CPX Device

5 COmputer Using Code.png

For this step of the project, students should transfer the code that is stored on their computer into the CPX device using a USB A micro cable or any other compatible cable. They should follow the instructions underneath our coding section above in order to have the proper type of code on their CPX device. This will allow for the CPX to control the servo’s motion for the future steps of our project.

Place Battery Into the Battery Pack

6 Battery Pack.png

For this step of the project, students should place the battery into the 3D printed battery pack and allow the wire to go through the open slot on the end. This will assure that the battery is stable and can be used to power the motion of our servo through the CPX device in future steps.

Attach CPX Holder to Battery Pack With Rubber Band

7 Band Tigether 2 Prints.png

For this step of the project, students should twist a rubber band 2 times around both the CPX case and the battery pack to connect them together. This will assure that these two components of our design stay locked together so that they can function properly alongside each other. Also, the rubber band in this position will later act as a holder for the wristband that we will be adding in future steps.

Attach Alligator Clips to Sirvo Extension Wires

8 Alligator CLips.png

For this step of the project, students should attach the alligator clips to the servo’s extension wires in any order that they please by simply sliding the wire into the slot. In our pictured example, the white clip goes to the brown wire, the blue clip goes to the red wire and the green clip goes to the orange wire. These combinations will be important to remember when we attach the other end of the alligator clips into our CPX to allow for the servo to obtain the code for its desired motion.

Wrap the Extension Wires to Form the Wristband

9 Wrap Band.png

For this step of the project, students should take an unbelievably lengthy portion of the black elastic band and wrap it along the servo and alligator clip wires to form the wristband for this design. They should do this by first tying a knot at the servo end of the wires, then double wrapping the black elastic band along the length of the servo wires, and then finally tying another knot at the alligator clip end of the wires. This will allow for a durable, comfortable, and adjustable wristband design that can be wrapped around the wrist and connected to the CPX case in future steps of the project.

Gorilla Glue Sirvo Attachment to Battery Pack

10 Sirvo Glued to Battery.png

For this step of the project, students need to put a layer of gorilla glue or hot glue on the side of the servo and press it onto the side of the battery pack. They should hold these two pieces together for a minimum of 3 minutes to ensure that proper adhesion takes place between these two components of the project. This will allow for the CPX device, battery, and servo to all be interconnected in one device that can be worn around the wrist once the wristband is completely attached in future steps.



Wrap Wire Around Wrist and Under the Rubber Band

11 Run Wires Through.png

For this step of the project, students should turn the wires from the servo that are wrapped in black elastic band into a wristband. They should do so by forming the wires into a circular shape that could fit around an average human wrist, and then by tying the connector part of the wiring securely under the main rubber band on the design. This will allow for the entire device to be wearable and it will also  keep the entire design compact and connected.

Wrap Wire Around Back of CPX Holder Under the Rubber Band and Up

12 Tuck Wires In.png

For this step of the project, students should wrap the wires connected to the alligator clips around the back of the CPX holder on the servo side, and then under the rubber band on the opposite side to complete the loop. They should do so by carefully tucking the wires into the gap that exists between the servo and the CPX holder as well as tightly securing the end of the wires between the CPX holder and the rubber band. This will allow for the alligator clips to be securely attached to the CPX holder and will allow for the entire design to be more compact overall.

Attach the Alligator Clips to the Corresponding Nuts and Bolts

13 Attach The Alli Clips.png

For this step of the project, students should attach the alligator clips to the corresponding nuts and bolts that will allow for the uploaded code to be transferred from the CPX device to the servo so that motion can occur. They should do so by recalling their color coded wires from the previous steps and then lining them up based on what their code calls for. In our pictured example, the white clip attaches to A2, the green clip attaches to GND, and the blue clip attaches to VOUT, and students should reference this image to make sure the wires are connected correctly. This will allow for the code to be properly transferred from the CPX device to the servo once the battery is connected in a future step, allowing for the desired motion to occur.

Build the Smiley Face Using the Glue Gun

14 Make the Face.png

For this step of the project, students should cut out a piece of cardboard that is the same size as the CPX device, and then use the glue gun or gorilla glue to attach eyes and a nose to the cardboard to make a smiley face. This will allow for the design to have a creative element as the piece of cardboard will later be attached to the servo so that it can have a spin motion in a future step.

Attach the Smiley Face to the Sirvo With Hot Glue

15 Glue Head On.png

For this step of the project, students should glue the back of the cardboard holding the smiley face to the top of the servo using the glue gun or gorilla glue. They should do so by holding it down for 3 minutes to ensure it sticks on tight and then giving it a light shake to make sure the glue has strong adhesives. This will allow for the smiley face to spin once the code is transferred from the CPX device to the servo after being powered by the battery that will be attached in a future step.

Plug in the Battery to Make It Work

16 Plug Battery.png

For this step of the project, students should plug in the white end of the battery into the black outlet on the CPX device. This will allow for the CPX device to successfully send the code we created to the servo which in turn will make the smiley face spin since our battery will be acting as a source of electrical energy.

Safely Enjoy Your Smiley Face Wristband!

17 Play Have Fun.png

For this step of the project, students should enjoy their completed design! They now have an amazing, wearable wristband that includes a 3D printed component, a servo motor, a CPX device, and an adorable little smiley face. Their hard work and persistence has paid off and now they have something really cool to show off to their friends!