Wearable CPX Safety Device

by bgagnon3 in Circuits > Microcontrollers

23 Views, 1 Favorites, 0 Comments

Wearable CPX Safety Device

Screenshot 2025-04-02 144518.png

This is a CPX wearable device meant to attach to a hand bag or backpack of your choice. Using multiple different buttons and combination of buttons you will make the CPX spin, light up and make noise. The design is very compact and requires some preciseness when building.

Supplies

Screenshot 2025-04-02 144020.png
Screenshot 2025-04-02 144136.png
Screenshot 2025-04-02 144122.png
OIP.jpg
Screenshot 2025-04-03 at 7.33.03 PM.png

Print Out the Casing

Screenshot 2025-04-09 140902.png
Screenshot 2025-04-09 140910.png

Using Revit or TinkerCad design a cilinder shaped casing that is (insert dimensions). Design some type of attatchment point on the casing that you case use to attach a carabiner so you are able to attach it to a bag of your choosing. Along with the casing you should print out a top for the casing that allows you to see the CPX and use all of the functions i.e. buttons and sensors.

Print Out the CPX Holder

IMG_2080.jpg
IMG_2078.jpg
Screenshot 2025-04-09 141020.png

Using Revit or TinkerCad design or holder for the CPX. This should be slightly smaller than the casing as it will need to fit inside of the casing and spin. There should be enough space under the CPX to put some extra wires and the small battery pack. Make sure when you print CPX holder there is a hole on the bottom for wires to fit through but it can not be too big or else the servo motor will not have any attachment point.

Downloads

Make the Code

Screenshot 2025-04-13 at 12.59.25 PM.png
Screenshot 2025-04-14 110543.png

Coding is one of the most important steps to get right. For this step you can either use MakeCode (block code) or Circut Python to code the device. The goal of this device is to make the CPX light up as well as make it spin 180 degrees back and fourth

There are multiple functions of the device and it will take mutliple different blocks of code to work.

  1. The Program starts with the LEDs set to white
  2. Button A: Turns the servo motor on and off. (When on, the motor will spin back and fourth until manually shut off)
  3. Button B: Toggles the LED ring between a red and green flashing pattern a few times then turns off
  4. Buttons A+B (TOGETHER): Toggles a siren sound which will sound 6 times then shut off automatically.

Hint:

MakeCode

You will use the following blocks to start: You will insert code into these blocks to complete the functions

  1. On start
  2. Forever
  3. On Button A, click
  4. On Button B, click
  5. On buttons A+B, click

Soldering

Screenshot 2025-04-09 141444.png
Screenshot 2025-04-09 141632.png

After you have all of your designs printed out. Take the wires that are connected to the servor motor, seperate the colored wires from each other and strip the ends of the wires so you have a bare metal wire. Then solder the wires to the following CPX connection points: Red wire to VOUT, Brown wire to GND and Yellow wire to A1. You want to make sure you solder the wire to the BOTTOM of the CPX so they fit inside of the CPX holder.

Assembly (Step 1)

Screenshot 2025-04-03 at 7.34.41 PM.png

Once the wires are Soldered, place the battery in the CPX holder and leave the part of the battery wire out of the holder so you are able to atttach it to the CPX later on.

Then put the CPX in the case, make sure it snaps into place with the attachment points (it will be a tight fit).

Assembly (step 2)

Screenshot 2025-04-03 at 7.34.13 PM.png

After the CPX holder is assembled. Use hot glue to attach the servo motor to the CPX casing. You do not need to use a lot of hot glue and you want to make sure that the glue is only touching the top of the servo motor and the bottom of the CPX holder so you are able to disasemble if needed.

Make sure all of the buttons

Assembly (step 3)

Screenshot 2025-04-03 at 7.35.11 PM.png
Screenshot 2025-04-03 at 7.35.32 PM.png

Once the CPX holder and servo motor are connected you have reached the final step.

Apply a decent amount of hot glue into the bottom of the CPX casing and insert the servo motor and CPX holder into the CPX casing. You want to make sure the CPX is centered in the casing so it will be able to spin. (there will be very little room on either side of the CPX)

Once the CPX and servo motor are in the casing you can test it by pressing the buttons to make sure all of the functions still work.

Then place the top on the CPX casing.

You have completed the device.