Circuit Playground Combadge
2016-09-27 | By Adafruit Industries
License: See Original Project
Courtesy of Adafruit
Guide by Ruiz Brothers
Overview
What's a Combadge?
The combadge is a prop from Star Trek (originally appeared in The Next Generation) that is a combination of a badge and communicator. It is used to communicate with Starfleet personnel on-board the ship. When activiated, it makes a destinctive "Chirp" sound.
DIY Combadge
In this tutorial, you'll learn how to turn an Adafruit Circuit Playground into a Star Trek Combadge! When tapped, it'll make the "chirp" sound effect! It won't make any actual phone calls, but it does make a pretty sweet prop for cosplay!
If you do want to make actual phone calls (along with a monthly bill) we made a functional Star Trek Communicator :-)
How Does It Work?
The on-board accelerometer can sense being tapped, triggering a sound to the on-board mini speaker. No soldering is required! All of the components are already on the board. All you need to do is upload the code, plugin a battery, and tap!
Make It How You Want
This tutorial utilizes some special tools like CNC mills and 3D Printers. We understand, those might be hard to come by, but you can totally make the combadge out of any material. Foam, resin, cardboard, whatever you have access to - The point of this tutorial is to learn how to use the Circuit Playground board to make the "guts" of the combadge.
Parts
- Circuit Playground
- 100mAh Lithium Ion Polymer Battery
- 2x DX01-N52 Neodymium Disc Magnet
Tools & Supplies
- 3D Printer & Filament
- CNC Milling Machine
- 1/8" Flat-End Mill
- 1/32" Flat-End Mill
- 80º Engraving Bit
- 360 Brass, 6061 Aluminum
- Dremel Rotary Tool
- Polishing Wheels
- Scotch double-sided tape
- Nitto double-sided tape
Download Software
Add Circuit Playground to Arduino
Circuit Playground is not a default option available in Arduino, we need to add software support. This happens once, and will automatically update when we make improvements and upgrades
Open up Preferences Menu
After you have downloaded and installed the latest version (remember it must be 1.6.4 or higher), you will need to start the IDE and navigate to the Preferences menu. You can access it from the File menu in Windows or Linux, or the Arduino menu on OS X.
A dialog will pop up just like the one shown below.
We will be adding a URL to the new Additional Boards Manager URLs option. New Adafruit boards and updates to existing boards will automatically be picked up by the Board Manager each time it is opened. The URL points to index files that the Board Manager uses to build the list of available & installed boards.
Add the Adafruit Board Support package!
paste
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Into the "Additional Board Managers URLS" box
Click OK to save the new preference settings. Next we will look at installing boards with the Board Manager.
Manage Board Support
Adding the link to the Adafruit board support package does not actually install anything, it only tells the Arduino IDE where to find the software.
Now that you have added the appropriate URLs to the Arduino IDE preferences, you can open the Boards Manager by navigating to the Tools->Board menu.
Once the Board Manager opens, type Adafruit into the search box and locate the Adafruit AVR Boards item. Click on it and then click Install
Next, quit and reopen the Arduino IDE to ensure that all of the boards are properly installed.
You should now be able to see Circuit Playground listed in the Tools->Board menu in the Adafruit Boards section.
Add Circuit Playground Library
Lastly, we will add the library (collection of software) that gives you all the Circuit Playground goodies.
First, load up the Library Manager by going to the Sketch -> Include Library -> Manage Libraries menu
Then in the Search box in the top right corner, start typing Circuit Playground and you'll pretty quickly end up with the Adafruit Circuit Playground Library showing up:
Click that Install button!
Upload Code
Get Combadge Sketch
Grab the sketch by going to File > Examples > Adafruit Circuit Playground > comm_badge.
Choose Combadge Sound
Goto line 9 and add two "//" characters, essentially commenting out this line. Then, remove the two "//" from line 10. This tells the code which sound effect to use. The first one is a Mario coin sound, the second being the communicator sound we want.
Adjust Sensitivity
If you find the sensitivity of the accelerometer is too low, you can easy change it! Increase the sensitivity of the accelerometer by lowing the sensitivity value.
On line 28, change "127" to a lower value. I personally found "64" work well for this project.
Upload Code
Under the file menu Tools, select Board > Adafruit Circuit Playground. Then, Port > /dev/cu.usbmodem1421 (or similar).
Now you can upload the code by going to menu Sketch > Upload. You should see a progress bar indicating the upload.
3D Printing
Circuit Playground Mount
We'll need a mount to attach the Circuit Playground board to the combadge. The mount has four standoffs with little pegs that snap into the holes of the Circuit Playground. The standoffs will provide clearance to the base plate, since some of the components are tall.
Download Fusion 360 Source Files
3D Printing
The mount is pretty small, thus it should print on most FDM style, desktop 3D printers. It's a simple part with no overhangs, so no support material is needed. We suggest using PLA material, since it's the most friendly and doesn't require a heated bed.
Silce Settings
Here are some suggested silce settings for 3D printing. We used the Printrbot Play for this part.
- 40% Infill
- 2 Shells / Perimeters
- 4 Top/Bottom Layers
- 210C Extruder
- 60-80mm/s Print Speed
Tolerances
The pegs on the standoffs should be able to snap into the holes of the Circuit Playground board easily. If you find them too tight, you may need to tweak your slice settings. Lowering the "Extrusion Width" or the "Wall Thickness / Wall Line Count".
Proto-Pasta Magnetic Iron PLA
Use this filament to print the mag-mount.stl part. This filament is attracted to magnets and will be used to attach the combadge to your shirt. The filament doesn't require any special slice settings or a heated bed (standard PLA settings work just fine).
CNC Milling
Othermill Desktop CNC
The parts for the combadge were machined using the Othermill Desktop CNC, but they should be machinable on other mills, such as the Carvey, X-Carve or Shapeoko.
Stock Materials
We suggest getting the material from the Othermachine.co website because they're pre-cut and ready to machine. In this project, we used the following stock.
- 360 Brass - 4" x 4" x 0.25"
- 6061 Aluminum - 4" x 4" x 0.125"
Measure Stock Thickness
Use a caliper to measure the thickness of the brass and aluminum and note them down. If they are really close to the specified thickness, then you won't need to regenerate the GCODE. If they're off by /-0.05in, then we recommend regenerating the GCODE.
CAM and GCODE
Since stock material thickness tend to vary, you may need to regenerate GCODE for each part. If you're new to Fusion 360 and using CAM tools, don't worry! We'll guide you through the process.
Install Othermill Fusion 360 Tool Library
The Othermill Tool Library makes it easy to get started with CAM in Fusion 360. You'll need to download and import the file. To do so, we suggest following the guide on the Othermachine website. This will walk you through the process.
Othermill Fusion 360 Tool Library Tutorial
Changing Tools
Otherplan will prompt you when to change out tools. For this project, you'll need the following tools.
- 1/8" Flat-End Mill
- 1/32" Flat-End Mill
- 80º Engraving Bit
GCODE for Brass and Aluminum
Open up the Combadge Fusion 360 Archive and goto the CAM workspace. Right click on "Brass" under the Setups dropdown in the Browser panel. Then, in the Setup:Brass panel, goto the Stock tab. Look for the Height (Z) label and type in the thickness of the brass you measured with your calipers. Then, click "OK". Next, right-click on the "Brass" setup and choose "Generate Toolpath".
Click on the arrow next to the "Brass" setup, you'll see several items (Face1, 2D Pocket, 2D Contour, etc.). Now you can right-click on each item and select "Post Process". In the Post Process panel, choose othermill.cps in the Post processor section. Then, click OK. Rename the file, relative to the tool (ie. brass-face-1-8.nc). You can tell which sized tool is being used when you right-click to edit the item (ie. Face1) and see under the Tool tab. Do this for each item (export via post process).
Repeat this process for Aluminum.
Import GCODE into Otherplan
Open Otherplan and select the Generic profile under Material. Under the size dropown, type in the width, height and thickness of the stock. Under placement, set the X and Y to "0". For Z, measure the thickness of your double-sided tape and input that here. This will effectively "raise" the material to compensate for the extra thickness.
Under plans, select Open Files and choose the brass-face-1-8.nc file. Under tool, select Set or Change and choose the 1/8" flat-end mill. The Otherplan will then walk you through the tool changing process. Under the brass-face-1-8.nc plan, select the 1/8" flat-end mill tool under Milling Tools. Now you're ready to secure the stock to the spoilboard.
Secure Stock to Spoilboard
We suggest using Nitto tape to secure the stock to the spoildboard. 3 stips is plenty! Apply strips to surface of the stock and peel back the protection layer. Then, line up the corner of the stock with the lower left corner of the spoilboard. Firmly apply pressure to the spoilboard to secure the stock in place. Now you're ready to mill!
Milling Checklist
Before starting the job, make sure you run through the following checklist:
- Ensure 1/8" flat-end mill is installed correctly.
- Ensure material size and placement is set correctly.
- Ensure Brass is firmly secured to spoilboard.
- Ensure GCODE file is loaded.
If everything check outs, then you're ready to mill! Click the "Start Milling" button under the GCODE plan.
Order of GCODE
The order of milling gcode files is very important. We suggest following the order below.
360 Brass
1. Face
2. Pocket
3. Contour
4. Chamfer
6061 Aluminum
1. Pocket
2. Contour
3. Chamfer
Removing Parts from Stock
Do not remove the stock from the spoilboard until all of the GOCDE jobs have been preformed. Once they're complete, you can use a thin spatula to get underneath the stock to pry it loose. Be careful when doing this! Remove slowly. Once you've taken it off the bed, you should be able to remove the part from the stock.
Polishing Parts
When the parts have been milled, you'll notice they have patterns on the surface. These lines are results from the machining process. You can optionally remove them using a rotary tool and polishing wheels.
A few minutes with a scotchbrite wheel will remove the machining lines. A buffing wheel can give the surface a mirror like finish.
Assembly
Secure Metal Pieces
The base part has cut notches on the lip. The triangle shape should be able to fit in the notches. Use a piece of double-sided Scotch tape to secure the aluminum triangle piece onto the brass base.
Attach Mount to Circuit Playground Board
Place the 3D printed mount over the top of the Circuit Playground board - the notch cutout should be over the JST connector. Press the standoffs down so the pegs are fitted into the holes on the board.
Attach Mount to Combadge
Add a strip of double-sided tape to the back of the combadge. Then, secure it to the back front of the Circuit Playground mounting place. Firmly press the two together to secure them in place.
Connect Battery
Plugin the male JST connector from the 100mAh lipo battery into the female JST connector on the Circuit Playground board.
Secure Metal Backing
Add some strips of double-sided tape to the surface of the 3D printed metal backing, then stick it onto the back of the Circuit Playground board.
Mount Battery
Use a piece of double-sided tape or mounting putty/tack to the back of the battery and stick it on the back of the Circuit Playground board.
Add to Shirt!
Now you can add place the neodymium magnet underneath your shirt and place the combadge over it!
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum