Overview

Shark Week cometh

A little cardboard goes a long way. This DIY cardboard shark mask turns the wearer into a fearsome creature from the deep. Using the small microphone on the Circuit Playground Express board, this mask is able to detect loud sounds and start chomping its mouth in response.

Easy project for people who are new to coding and electronics, or anyone who loves cardboard construction.

Parts

Circuit Playground Express

PRODUCT ID: 3333
Circuit Playground Express is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and...
$24.95
IN STOCK

USB cable - USB A to Micro-B

PRODUCT ID: 592
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or...
$2.95
IN STOCK

Standard servo - TowerPro SG-5010

PRODUCT ID: 155
This high-torque standard servo can rotate approximately 180 degrees (90 in each direction). You can use any servo code, hardware or library to control these servos. Good for beginners...
$12.00
IN STOCK

Lithium Ion Cylindrical Battery - 3.7v 2200mAh

PRODUCT ID: 1781
Need a big battery for your project? This lithium ion battery contains a 2200mAh and a protection circuit that provides over-voltage, under-voltage and over-current protection. Yet, it...
$9.95
IN STOCK

Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces

PRODUCT ID: 3448
When working with unusual non-header-friendly surfaces, these handy cables will be your best friends! No longer will you have long, cumbersome strands of alligator clips. These...
$3.95
IN STOCK

Materials

In addition to the electronics, for this project you will also need:

  • Scrap cardboard
  • Hot glue gun
  • Scissors or hobby knife
  • Wooden dowel
  • Double side foam tape
  • Ping pong ball (optional)

Read on to learn how to build your own!

MakeCode

Getting Familiar

This project runs a simple Microsoft MakeCode sketch to control the helmet, and is easy to play with if you want to make changes.

Microsoft MakeCode for Adafruit is a web-based code editor that provides a block editor, similar to Scratch or Code.org, and also a JavaScript editor for more advanced users.

If you've never used the Circuit Playground Express with MakeCode before, this guide is a good place to start.

How to Upload Code

To upload code to Circuit Playground Express, follow these instructions:

1) Connect your Circuit Playground Express to your computer using a micro USB cable and press the small reset button in the center of the board. All the LEDs will flash red briefly, then turn green. Your computer should now show a removable drive called CPLAYBOOT. 

2) Click the Download button in the code window below to download the .UF2 file to your computer.

3) Now drag and drop the .UF2 file onto the CPLAYBOOT drive in your computer's file explorer or finder.

Once the file is dragged onto CPLAYBOOT the drive will automatically eject itself (your computer may give you a "failed to eject drive correctly" error, you can ignore this). The code is now on your Circuit Playground Express and ready to run!

Note: If you get a drive named CIRCUITPY, no worries! Press the reset button twice to get a flash drive named CPLAYBOOT. The project will not run if copied onto the CIRCUITPY drive as it is for CircuitPython.

The Code

The code is shown below. For browser viewing, you may need to enable content. For example, in Chrome, click "Show Embedded Content" as the material is fed not from Adafruit but from Microsoft's MakeCode site.

To download the code, click the download link at the bottom of the window. To edit the code in MakeCode, click the box with arrow icon in the upper right corner of the window.

Adjusting Sensitivity

Getting your mask to react to the sound of your voice may take some trial and error. Sound levels in MakeCode are measured on a scale of 0-255. You can adjust the value at which the mask will start chomping by increasing the value in the while sound level ≥ 140 field to 150 (less sensitive) or down to 130 (more sensitive). 

Circuit Diagram

Note the yellow clip is connected to pad A1. Pad A0 is usually dedicated to audio and is not used in this tutorial.

Powering the shark

Circuit Playground Express can use a variety of power sources, anywhere between 3V-5V is safe. This compact 2200mAh lithium ion cylindrical battery is excellent for powering projects like this. 

A set of 3 AAA batteries also provides ample power, if that option is more convenient. If you're using a AAAx3 battery pack, check that the switch on the battery pack is set to "ON".

Adafruit Micro Lipo - USB LiIon/LiPoly charger

PRODUCT ID: 1304
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a...
$5.95
IN STOCK

Lithium Ion Cylindrical Battery - 3.7v 2200mAh

PRODUCT ID: 1781
Need a big battery for your project? This lithium ion battery contains a 2200mAh and a protection circuit that provides over-voltage, under-voltage and over-current protection. Yet, it...
$9.95
IN STOCK

- OR -

3 x AAA Battery Holder with On/Off Switch and 2-Pin JST

PRODUCT ID: 727
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about...
$1.95
IN STOCK

Alkaline AAA batteries - 3 pack

PRODUCT ID: 3520
Battery power for your portable project! These batteries are good quality at a good price, and work fantastic with any of the kits or projects in the shop that use AAA's. This is a...
$1.50
IN STOCK

Assemble and Test

With your pieces not mounted yet, you may want to assemble the circuit, put the code on, and test.

When working, speaking into the Circuit Playground Express microphone will cause the servo motor to activate. If you put the one arm horn on the servo, you can see the movement easier. That is also the horn used in the actual build. The other various horns that come with the servo can be saved for another project.

Shark Mask

Cardboard Construction

This mask will be constructed from two large pieces of cardboard, each of which will be folded up origami-style and glued together to create the top and bottom halves.

Shark head template

Cut out template for top of shark head:

This should be a rectangle about 12" long by 10" wide, with 4" flaps extending outwards.

Angle the side flaps downward slightly and extend the back flap back an extra inch. This will create the top section of our shark mask.

Teeth!

Cut out some teeth. Make them big and fearsome.

Finish upper jaw

Fold up the flaps and use hot glue to hold them in place, creating a rigid boxy structure.

Lower jaw

Cut out a pattern for the lower jaw, keeping dimensions in line with the upper jaw.

Unlike the top part, this one must include a large cut away space to allow room for your head and neck while wearing it.

Finish lower jaw

Add teeth to bottom jaw.

Fold and glue the flaps of the jaw in place.

Add a hinge. A 3/8" wooden dowel works well for this purpose, but any sufficiently stiff rod will do.

Connect the halves

Connect the top and bottom halves of the shark head using a dowel.

At this point you can add a cardboard washer to hold the dowel in place.

Skull cap

Cut out a rectangular piece of cardboard and round out one side.

Fold this into a small bowl shape. This will fit over the top of your head and allow you to wear the mask.

String it together

Thread a piece of string or fishing line through the bottom edge of the lower jaw.

Tie off one of the the line with a knot and tie the other end to the servo arm.

Motorize it

Get the servo connector (horn) with the circular part and one arm. Attach it to the servo motor but don't screw it down yet. You may need to make adjustments as the horn can fit in different positions.

Glue servo motor inside the mask. A large dollop of hot glue or piece of double sided foam tape works well for this.

Now is a good time to test out the code and make sure the servo arm doesn't bump into anything as it's moving If it is bumping, adjust the horn placed on top of the servo to another angle until the movement is close to being correct. Fine adjustments can be changed in code by changing the numbers used for close and open mouth movements.

Power

On the other side of the mask, glue a short piece of cardboard in place to hold a battery in place.

This will allow you to easily remove the battery if necessary for charging.

Shark fin

Cut out a large shark fin and glue it to the top of the mask.

 

This small detail will instantly distinguish you as the deep sea predator that you are.

Shark eyes (optional)

Cut a ping pong ball in half to create some eyes.

Glue the unblinking eyes to the side of the shark's head.

Blank stare

Draw some large ovals in the center of each eye, re-creating the terrifying blank stare of a shark.

Final steps

At this point you can stick the Circuit Playground Express board somewhere safely inside the mask, using double sided foam tape to hold it in place. 

Place it somewhere close to where your mouth will be, which will make it easy to trigger on command, but make sure there is still a way to connect it to your computer via the micro USB port in case you wan to make changes to the code later.

You shark mask should now contain all the necessary electronics hidden sneakily away inside, while looking quite intimidating from the outside.

Land shark ahoy!

This guide was first published on Jul 22, 2019. It was last updated on Jul 22, 2019.