micro:bit Dog Door Opener

​Do your pets trap themselves in rooms? Do you wish you could make your home more accessible for your furry* friends?? Now you can, hooray!!

This project uses a micro:bit microcontroller to pull open a door when a (pet-friendly) switch is pushed. We’ll need a micro:bit (probably helpful), a high-torque motor, and some mechanical parts and pieces to mount the motor and connect the motor to the door.

Read Time: ~15 min

Build time: ~30-45 min

Cost: ~$60

*This project can be used as a low-cast way to improve home, workplace, or other physical space accessibility for humans, too! Yay!!

 

Materials

  • ​micro:​bit 
  • microUSB cable (3ft or more)
  • ​Binary Bots Planet Totem Spider Kit​
    • If this is your first robotics project, I’d highly recommended to use this kit and follow the tutorial as-is. If you’ve done a few projects before, feel free to make adjustments and modifications. Here are two things to keep in mind:
      • This project requires a high torque motor to pull open our door. The motor control system and high torque mini DC motor from this kit were super helpful in building this project.
      • The assorted boards, nuts, and bolts were also handy, but could be replaced with similar mechanical parts from another robotics kit or directly from a manufacturer.
  • 2 lengths of 24 gauge stranded wire, 3 – 4ft (1 – 1.3m)
  • Fishing line, 4′ (1.3m)
  • Aluminum, 2″x3″ rectangle (5 – 7cm)
  • 8 small nails
  • 6 push pins
  • Wall sticky putty

Tools

  • ​Driver kit
    • Note: the Binary Bots kit does come with an M3 driver (and it’s magnetic, wooo!!!) and a tiny screwdriver.
  • Hammer
  • Wire Strippers
  • Hot Glue Dispenser (not pictured)
  • Scissors
  • Measuring Tape
  • Pencil

Prep and Aluminum Latch Cover

​1. Measure and record the width of your door (the inside part).

2. At a 45 deg angle, measure the distance from the door latch to the wall perpendicular to the door hinges.

Note: your particular room setup is likely different than mine. The key thing to keep in mind is that torque is the lowest when it is applied perpendicular. In other words, try to attach the motor as close to perpendicular as possible. A 45 deg angle is likely the smallest angle you’ll want, larger angles will be easier for the motor to pull open the door.

3. Cut a 2″x3″ piece of aluminum (e.g. from a recycled can).

 

Build it: Door Connection Mechanism!

Materials

To build this part, you’ll need the following pieces from the Binary Bots Kit:

  • 3 100x30cm boards
  • 2 2-hole 90deg brackets
  • 4 6mm M3 bolts
  • 4 lock nuts
  • 2 8mm M3 bolts
  • 2 M3 nuts

Procedure

1. Grab one of the boards. From the left edge, measure and mark the width of the door.

2. Grab a second board. Connect the second board to the first perpendicularly to each other, so that the second board is just to the right of the door width line.

To do this, use both brackets, 4 6mm M3 bolts, and 4 lock nuts.

3. Grab the third board and connect it to the second in a straight line using the longer (8mm) M3 bolts and rectangular M3 nuts.

Set aside and move on to the next part, woo!

Build it: Pet-Friendly Switch!

​Materials

To build this part, you’ll need the following pieces from the Binary Bots Kit:

  • 2 100x30cm boards
  • 4 6mm M3 bolts
  • 4 M3 nuts
  • 2 8mm nylon standoffs

You’ll also need:

  • 2 3-4ft (1-1.3m) of stranded 24 gauge wire
    • Remove about 1in (2.5cm) of the insulation from both ends​
  • 3 push pins

Procedure

1. Grab one of your boards and attach the nylon standoffs to the left side using two (2) M3 nuts.

2. Grab the second board and use two (2) M3 bolts to secure the second board to the first via the nylon standoffs.

3. Grab one of the M3 bolts and push it through a hole on the far right end of the top board. Wrap one end of the wire around the base of the bolt. 

4. Use an M3 nut to secure the bolt in place.

5. Repeat steps 3 and 4 for the bottom board, making sure that the second bolt is directly below the first.

When you close the switch (aka push the boards together), the top and bottom bolts should press together and make full contact.

Build it: Motor Mount!

Materials

​To build this part, you’ll need the following pieces from the Binary Bots Kit:

  • 1 100×100 cm board
  • 1 Tiny Motor with 2 tiny screws (so cute and yet so powerful!)
  • 1 Motor Mount (“web launcher”)
  • 1 reel set (“web reel”)
  • 6 6mm M3 bolts
  • 6 M3 nuts

You’ll also need:

  • 6 small nails
  • 1 pushpin​
  • 4ft (1.3m) of fishing line (or equally strong line)

Procedure


1. Insert and secure the motor into the motor mount with the two tiny screws (highly recommended to use a larger screwdriver if you have one..)

2. Grab the 100x100cm board and use the 6 M3 bolts and nuts to attach the motor on the left side in (roughly) the middle.

3. Grab the reel and fishing line. Thread one end of the fishing line through the middle of the reel, then wrap around the teeth. Secure with a dab of hot glue.

4. Push the two reel pieces together (pinching the thread between the two pieces), and insert into the motor drive shaft so that the web part faces outward. Secure with a dab of hot glue on the outside.

Connect it: Electronics!

Materials

  • micro:bit
  • microUSB cable
  • Binary Bots motor driver board
  • 3 AAA batteries

Procedure

1. Grab the Motor Mount setup you just put together, and plug in the motor to the motor driver board.

Connect the red motor wire to the left header pin labeled “Motor1”. Connect the black motor wire to the right header pin labeled “Motor1”.

2. Connect the pet-friendly switch! Connect one of the switch wires to the micro:bit P0 pin, and the other to the micro:bit GND pin (doesn’t matter which switch wire goes where).

3. Insert the micro:bit into the motor driver board so that the pushbuttons are facing outwards (away from the motor driver).

4. Insert the batteries into the motor driver board. Locate the power switch and move to “off”.

Code it: Motor Control!

Navigate to the Make Code website: www.MakeCode.org and select the micro:bit option, then “New Project”. It is recommended to rename your project to help you identify what it is doing, like “DogDoorOpener”.

Some background info: 

When Pin P0 is triggered (via the switch closing), we want to turn the motor so that it pulls open the door by spooling (aka reeling in) the fishing line. We also want to unspool the fishing line so we can shut the door again. It is also helpful to have a manual way to spool and unspool the motor, as well as to cut power to the motor.. just in case!

Since we are dealing with a DC motor, when we give power to one of the motor leads and ground the other, the motor will rotate in one direction. When we switch power to the motor leads, the motor will rotate in the other direction. Cutting power to both motor leads turns off the motor.

Let’s get started!

First Code Function: Motor Triggered by Doggo Switch

1. Pull out a “when pin is pressed” (input blocks) and make sure it is set to pin P0.

2. Inside the pin P0 block, use the digital write blocks to turn on micro:bit pin P13 (set to 1) and turn off micro:bit pin P14. This turns the motor on in one direction. 

The digital write blocks are found under Advanced –> Pins. Select the appropriate pins by clicking on the down arrow.

3. Add a pause for about 7s (7000 ms), then turn the motor off by setting P13 and P14 to 0.

Note: 7 seconds worked well for my setup and my doggo’s needs, but definitely check that this is enough (slash not too much) time to adequately open your door for your needs.

4. Unspool the motor (aka rotate it in the reverse direction) by using a digital write block to turn on P14 and turn off P13. Be sure to unspool the same amount of time as you spool.

5. Optional: use the LEDs to include a countdown/count-up timer to let you know when the motor will be turned on. Also recommended to add a pause between when the switch is pressed as well as when before the motor unspools.

Second Code Function: Manual Open

1. To make a manual switch, drag out a “On Button A pressed” (input blocks).

2.  Inside this block, use the digital write blocks to turn on micro:bit pin P13 (set to 1), and turn off micro:bit pin P14 (set to 0).

3. Add a pause block for ~3s (3000 ms).

4. Turn off the motor! (by setting the digital write blocks to 0)

5. Optional: Show an icon before you turn the motor on so you know which way the motor will be turning.

For mine, I chose a rectangle outline so indicate “open door”, choose something that makes sense to you and your brain.

Third Code Function: Manual Close

1. To make a manual switch, drag out a “On Button B pressed” (input blocks).

2.  Inside this block, use the digital write blocks to turn on micro:bit pin P13 (set to 0), and turn off micro:bit pin P14 (set to 1). 

3. Add a pause block for ~3s (3000 ms). 

4. Turn off the motor! (by setting both digital write blocks to 0)

5. Optional: Show an icon before you turn the motor on so you know which way the motor will be turning.

Fourth Code Function: Turn Off Motor

1. Pull out a “On Button A+B pressed” block.

2. Use two digital write blocks to set both P13 and P14 to 0.

Install it!

1. Use some of the wall sticky putty to wrap the aluminum around the door latch.

Bend the aluminum around the latch so that the door is able to fully close, but prevents it from sticking.

2. Using your hot glue dispenser, glue the short end of the door mechanism piece to the door width, just below the latch. Glue the longer piece to the door to provide extra stability.

3. Attach the motor mount and the motor controller board to the wall. Use the push pins temporarily to hold the pieces in place, then use 6 nails to secure the motor controller, and 2 to secure the motor controller board.

4. Use the wall sticky putty to attach the switch in a place that is convenient for whoever will be triggering the door to open. Since my dog is fairly large, I installed it about 1.5ft (0.5m) up from the floor so that doggo could press the switch with his nose.

I preferred to sticky putty so I could adjust the switch and remove things as necessary, but if you want to make this permanent you can use nails or hot glue.

5. Use the pushpins to secure the switch wires to the wall and prevent them from getting disconnected.

6. Attach the fishing line between the motor reel and the door mechanism. Close the door fully, then wrap the fishing line around the door mechanism a few times so that it is taught, then secure with hot glue.

Test & Deploy! And make your home more accessible, hooray!

​Huzzah!! Ready for the testing phase! Power up the micro:bit (via the microUSB cable) and turn on the motor controller board.

Trigger the switch and check that the motor pulls open the door enough for your furry friend to escape! And also that the motor unspools so you can close the door again.

Very likely something will need to be adjusted/fixed, so check all of the buttons, make sure the system is secure to the wall and does not block anything.

Once you’ve tested your Doggo Door Opener, show it to your pet! … And maybe train them, ha. I did this by using treats on top of the switch, so that my dog accidentally triggered the switch, then he saw that door opened. It took a few tries (I also ended up giving it a command of “get the switch”), but eventually he figured it out! And now I can leave my lovely but oh-so-anxious dog home alone without worrying he will trap himself (on purpose? I have no idea).

Hooray for using tech to make our own lives and the lives of others easier and better!

Let me know if you have any questions, run into any issues, or have other ideas for this project, I’d lovelovelove to see what you make so please share your creations!

Happy making, friends!

micro:bit magic wand (intermediate)

 

“Any sufficiently advanced technology is indistinguishable from magic.” (Arthur C. Clarke). Heck yes it is! What are we waiting for, let’s use technology to create our own kind of magic!!

This project uses two micro:bit microcontrollers, a household cooling fan, and a few small electronic parts to create our very own magical wand. I chose to use the Wingardium Leviosa gesture, but you can most certainly adapt this project to cast other spells!

Please note that this is an intermediate project because it involves high voltage and current. Use proper safety protocols and always have another adult nearby.

Difficulty: Intermediate

Read Time: 15 min

Build Time: ~ 1 hr

Cost: ~ $40

Materials

  • Wand!
    • You can purchase custom wands or get creative and make your own!
  • Feather (for floating!)
  • Glove (for hiding the micro:bit wand controller)
  • One (1) household cooling fan (4A or less)
    • We do not modify the cooling fan so grab one you have around the house or borrow one from a favorite human.
  • One (1) extension cord
    • We WILL modify the extension cord, so use an extra one you don’t need or buy a cheap one.
  • Two (2) micro:bits
  • Two (2) micro:bit battery packs and two (2) AAA batteries
    • If you get the micro:bit Go bundle, it comes with a battery pack and batteries 🙂
  • Two (2) microUSB cables
  • One (1) PCB
    • Mine is 2cm x 8cm, any similar or larger PCB will work (but definitely do NOT use a breadboard as it cannot handle the high current)
  • One (1) solid state relay (JZC-11F)
    • Rated for 5Vdc input and 220/250 Vac and 5A output. You can use a different relay as long as it can switch

Magic? What! How??

One of my favorite scenes from the first Harry Potter book was when Hermoine makes a feather float with the spell Wingardium Leviosa. This simple spell captures the essence of why we love magic: that literally at the flick of our wrist and a few choice words, we can instantly make surprising (and impressive) things happen.

Although we don’t have exactly that kind of magic, we do have technology that sometimes seems miraculous. So that sort of counts! To mimic my fav scene, I wanted to levitate a feather. How can we move feathers from afar in real life? With wind!!

After building a beginner version of this project, I wasn’t 100% satisfied. I wanted to reach Hermione-level wizard status! So I designed a second version that can switch power for a large household fan.

This version uses a solid state relay to switch AC power with a DC trigger. You can imitate my design or, better yet, create your own! There are TONS of variations for this project that you can make with this basic framework, find a spell that inspires you and bring it to life!

This tutorial will show you how to do the following:

1. Write a simple block-based code for a micro:bit wand controller

2. Build a circuit to switch power for a 12V, 4A hosuehold fan.

3. Write a simple block-based code for a magical receiver that is triggered with a radio signal (aka bluetooth)

Code it: Wand Controller!

Let’s start with our magic wand!
We are using block-based coding via the Make Code website, but if you have experience w/ coding you can also program the micro:bit using micropython or C++ in your fav coding environment (e.g. Idle, Visual Studio Code, etc.).

Step 1: In the On Start block, set the Radio Group number. We’ll use the same number for the magical receiver micro:bit.

Step 2: Decide how you want your wand to trigger action.

The micro:bit has a 3-axis accelerometer, we will use this to set a gesture trigger.

Quick solution: Use the “on shake” block!

 

More complex, gesture-based solution:

Explore how the accelerometer works by printing to the Serial port with the “Serial write value” blocks (under the Advanced section). Open the Arduino IDE Serial Monitor to observe the micro:bit output as you make gestures. Use your observations to set triggers. (Code No. 2)

The example in Code No. 2 is my attempt at a Wingardium Leviosa gesture: swish-and-flick! (down in the z-direction and left in the x-direction). Use as-is or as a starting point for your own fav magical gesture!

Helpful Tips:

(1) Since microcontrollers process information super quickly, the pause block gives us time to finish the first part of the gesture before the micro:bit checks for the second part. 

(2) I added axes labels on the micro:bit so I could more easily figure out how to get the right motion for Wingardium Leviosa spell — definitely recommend this!

Step 3: Use the gesture to send a radio number (or string, just be consistent).

The “radio send string” and “radio send number” blocks are found in the “radio” block set.

Step 4: Download and save the code onto the micro:bit!

Build it: Magical Receiver!

Grab your second micro:bit, your PCB, your soldering iron, and all of the electronic parts!

Quick overview: We are using the micro:bit 3.3V power out to trigger the DC side of the relay. The circuit is completed when the micro:bit P0 pin switches on the NPN transistor.

Step 1: Solder the relay and transistor to your PCB board.

Step 2: Solder the diode across the relay DC power pins to protect the micro:bit from stray voltage when the relay coils switch. The negative side of the diode (grey line) should connect to the relay DC positive power in pin.

Step 3: Solder one jumper wire to the relay DC positive power in pin. Connect an alligator clip between this wire and the micro:bit 3.3V output pad.

Step 4: Solder another jumper wire between relay DC power out (GND) pin and the transistor collector pin.

Step 5: Solder the third jumper wire to the transistor emitter pin. Connect an alligator clip between this wire and the micro:bit GND pad.

Step 6: Solder your resistor to the transistor base pin. Connect an alligator clip between the other end of the resistor and the micro:bit P0 pad.

Step 7: Remove 1/2″ (2 cm) of insulation from the 14 gauge wire on both sides. Solder one wire to the relay NO (normally open) pin and the other wire to the relay COM (or coil 2) pin.

Step 8: Cut the extension cord on one side only, and remove ~ 1/2″ (2cm) of insulation from side of the cut wire.

Step 9: Grab the 14 gauge wire and slide a piece of heat shrink tube onto each wire.

Step 10: Line up one end of the 14 gauge wire with one end of the extension cord wire, then twist the metal together. Secure the heat shrink tube with your fav. heat source (e.g. lighter, hair dryer, etc.). Repeat for the other wires and heat shrink tube.

Note: Orientation of the AC wires does not matter.

Code it: Magical Receiver!

Time to code our magical receiver!

Step 1: Set Radio Group to the same number as for the Wand Controller.

Step 2: Pull out a “on radio received” block and set it to “receivedNumber” (or “receivedString” if you used that for your Wand Controller).

Step 3: Drag a repeat block into the “on radio received” block and switch it to repeat 2 – 4 times.

Step 4: (Optional but recommended) Show an icon on the micro:bit to let you know if it received the string.

This is super duper helpful if/when you are debugging.

Step 5: Turn on Digital Pin 0! (aka “digital write pin P0” to 1)

This block is found under the “Pins” block under the Advanced tab.

Step 6: Pause for a few seconds.

I chose 2 seconds, you can keep this or adjust as desired.

Step 7: Turn off Digital Pin 0 (“digital write pin P0” to 0) and the micro:bit display.

Step 8: (Optional but recommended) Add a back-up trigger using micro:bit button A for testing and debugging purposes 🙂

Voila! Download the code onto your Magical Receiver micro:bit and we’re ready for the magical prop!

Test & Debug!

And now, for our favorite part: testing!!

Power up your micro:bits (via battery or microUSB), plug in the extension cord and plug the fan into the extension cord, then move your wand controller to check that the magical receiver turns on the fan.

When you are done testing, coat the magical receiver connections in hot glue to hold them in place. If you want an ultra-permanent solution, use epoxy (waterproof is a nice bonus feature). Recommended to avoid covering the micro:bit in glue so you can use it for future projects.

Not working as expected?

1. Power is the most common issue for makers of all experience levels. Double check that all the things are plugged in. Use the micro:bit controller quick trigger to test that the receiver shows the “got message” icon.

2. Fan not moving? When the relay switches, you will hear an audible click. Use the micro:bit controller quick trigger and listen for the sound.

I did notice that the micro:bit 2xAAA battery pack was insufficient power to trigger the relay. I ended up just using the microUSB cable but a 3xAAA battery pack should also do the trick.

3. Use a multimeter to check continuity of your solder joints and, if necessary, voltage across the relay DC coils.

Build your magical prop!

Now that you’ve tested and practiced your magical tech abilities, you’re ready to build your magical prop! Use gloves to hide the micro:bit wand controller + battery pack.

For the magical receiver: Where do you want to put the feather and how can you hide the fan?

For my demo, I just hid the fan off camera (shhhhh don’t tell!!), but if you are doing your magical performance in-person you can build an enclosure to hide the fan. I found that window screen mesh worked great to help hide the parts while still letting air flow through.

Want to do other kinds of magic? You can build different types of props! This same setup will work to turn on any low-power AC device like speakers or a screen! Just be sure that the maximum current draw is less than 5A.

Go forth and be magical!

Heck yes, wizard level: intermediate!! Practice your gesture so you can really impress all the people. And of course, teach others how to do this technological magic!

Leave a comment if you need some help, have any questions, or to show off your creations!

Happy making, friends!

micro:bit magic wand (Beginner)

 

While it is a bit tricky for us non-magical humans to levitate objects with our minds, words, or wands, we can use technology to do (basically) the same things!

This project uses two micro:bits, a few small electronic parts, and some everyday objects from around the house to create our very own magical wand.

I went for the Wingardium Leviosa spell, but you can most certainly adapt this project to cast other spells 🙂

Difficulty: Beginner+ (a lil’ bit of experience w/ coding and circuits is helpful)

Read Time: 10 min

Build Time: ~ 2 hrs

Cost: ~ $35

Materials

  • Wand!
    • You can purchase custom wands or make your own! Find a suitable stick and add some flair (or leave it bare!), or get creative and make one out of things you can find around the house!
  • Feather (for floating!)
  • Glove (for hiding the micro:bit wand controller)
  • Aluminum can
  • Small piece of cardboard (~ 2″ x 2″/5cm x 5cm)

What are we doing??

One of my favorite scenes from the first Harry Potter book was when, after all of the other students are struggling, Hermoine makes a feather float with the spell Wingardium Leviosa. This simple spell captures the essence of why we love magic: that literally at the flick of our wrist and a few choice words, we can instantly make surprising (and impressive) things happen.

Although we don’t have exactly that kind of magic, we do have technology that sometimes seems miraculous. So that sort of counts!

By now you’ve probably guessed: To mimic my fav scene, I wanted to levitate a feather. For that, we can use the power of wind! For this beginner-friendly tutorial, I chose to use a small 5V DC motor with fan blades made from an aluminum can. You can imitate my design or, better yet, create your own!

This tutorial will show you how to do the following:

1. Write a simple block-based code for a micro:bit wand controller

2. Build a circuit to control a small, 5V DC motor

3. Write a simple block-based code for a magical receiver that is triggered with a radio signal (aka bluetooth)

4. Build a setup to make our tech really look like magic!

 

Code it: Wand Controller!

Let’s start with our magic wand!

Since this is a beginner-friendly project, we are using block-based coding on the Make Code website. If you have more experience w/ coding you can also program the micro:bit using micropython or C++ in your fav coding environment (e.g. Idle, Visual Studio Code, etc.).

Alright, let’s get blockin’!

Step 1: In the On Start block, set the Radio Group number. 

Pick a number you love and will remember, since we’ll also need this for the receiver.

Step 2: Decide how you want your wand to trigger action.

The micro:bit has an accelerometer which measures changes in acceleration in our three spatial dimensions: up/down, left/right, and forwards/backwards.

Quick solution: Use the “on shake” block! (Code 1, above photo)

More complex, gesture-based solution: Explore how the accelerometer works and observe the output as you make gestures (open the Arduino IDE Serial Monitor to see the output, if you need help with this check out this tutorial). Use your observations to set triggers. (Code 2 in the above photo)

The example in Code 2 is my attempt at a Wingardium Leviosa gesture: swish-and-flick! (down and left) Use it as-is or as a starting point for your own fav magical gesture!

Helpful Tips:

(1) Since microcontrollers process information super quickly, the pause block gives us time to finish the first part of the gesture before the micro:bit checks for the second part.

(2) I added axes labels on the micro:bit so I could more easily figure out how to get the right motion for Wingardium Leviosa spell — definitely recommend this!

Step 3: Use the gesture to send a radio number.

The “radio send number” block is found in the “radio” block set. Any (rational, real, non-infinite) number will work!

Step 4: Download and save the code onto the micro:bit!

The micro:bit power lights will flash as this is happening, when they are done flashing the code is finished uploading.

Build it: Magical Receiver!

Grab your second micro:bit, your breadboard, and all the fun electronic parts and pieces!

Step 1: Insert your MOSFET transistor into the breadboard.

Recommended to have the black part of the transistor facing you so that pin references in these instructions are accurate 🙂

Step 2: Grab one of your pin-ended alligator clips and connect it from micro:bit pin P0 to an open row in the breadboard.

Step 3: Connect your resistor between the micro:bit P0 wire and the MOSFET Gate pin (leftmost pin).

Step 4: Connect a pin-ended alligator clip between micro:bit GND pin and the MOSFET source pin (rightmost pin).

Step 5: Using your two remaining pin-ended alligator clips, connect the motor leads to two open rows in the breadboard.

Step 6: Connect your jumper wire from one of the motor wires to the MOSFET drain pin (middle pin).

Step 7: Connect your diode across the motor terminals so that the negative side (w/ the stripe) connects to the remaining motor wire (yellow wire in photo).

Step 8: Connect the negative (black) battery lead to the MOSFET source pin (same row as micro:bit GND).

Step 9: Connect the positive (red) battery lead to the remaining motor wire (yellow wire).

Code it: Magical Receiver!

Step 1: Set Radio Group to be the same as for the Wand Controller.

Step 2: Pull out a “on radio received” block and set it to “receivedNumber”.

Step 3: Drag a repeat block into the “on radio received” block and switch it to repeat 2 – 3 times.

Step 4: (Optional but recommended) Show an icon on the micro:bit to let you know if it received the string.

This is super duper helpful for debugging.

Step 5: Turn on Digital Pin 0! (aka “digital write pin P0” to 1)

This block is found under the “Pins” block under the Advanced tab.

Step 6: Pause for a few seconds.

I chose 4 seconds, you can keep this or adjust as desired.

Step 7: Turn off Digital Pin 0 (“digital write pin P0” to 0) and the micro:bit display.

Step 8 (Optional but recommended): Add a back-up trigger using micro:bit button A for testing and debugging purposes 🙂

Voila! Download the code onto your Magical Receiver micro:bit and we’re ready for the magical prop!

Let’s make wind!

Let’s make a wind generator!! AKA a fan 🙂 Turn on a hot glue gun and grab your scissors, permanent marker, aluminum can, and some cardboard.

Step 1: Carefully cut out a rectangle of aluminum from an empty can and a small circle of cardboard about 1/2″ (1 cm) in diameter.

 

Step 2: Print out the paper fan template above at 50% to scale. Cut out one of the fan blades and trace it five (5) times onto the aluminum foil.

Step 3: Carefully cut out the aluminum fan blades and glue onto the cardboard circle at equal intervals.

Step 4: Glue the motor mount onto a piece of cardboard (I also added “legs’ made of wooden dowels to make it easier to connect the alligator clips).

Other options:

  • Use the motor drive shaft to spin objects or make some gears/levers to move things in different directions
  • If you connect micro:bit to speakers, it can also play sounds!
  • Start with something simple and play around to find something that makes you feel magical.

Test all the things!

And now, for our favorite part: testing!! Power up your micro:bits (and connect the battery) and move your wand controller (or use the quick button trigger) to test that our magical receiver moves the motor.

When you are done testing, coat the magical receiver connections in hot glue to hold them in place. If you want an ultra-permanent solution, use epoxy (waterproof is a nice bonus feature). Be careful to avoid getting glue (and especially epoxy) on your micro:bits so that you can still use them for future projects!

Note: When you first power everything up, the motor may start spinning without a signal. Trigger the wand controller and it should stop, then behave as expected.

Not working as expected?

Debugging is an almost inevitable part of building things, so congratulations! You are officially a maker! Here are some debugging tips:

1. Power is the most common issue for makers of all experience levels. Double check that the battery is properly connected and both the micro:bit power lights are on (those little yellow lights by the microUSB port).

2. Motor not moving? Be sure none of the wires or other objects are in the way.

3. Motor pulling the feather towards it rather than away? Swap the orientation of the motor leads. This will cause the motor to spin in the opposite direction and thus the air will be pushed in the opposite direction.

Make all the magic!

We’re basically wizards now! Use gloves to hide and hold the micro:bit wand controller and battery pack. Hide your magical receiver in a fantastical container to really impress all the people. I snagged a hollow book stack, cut a hole in the top, and glued my motor with the fan inside.

That’s it! Practice your spell and impress your friends with your new-found powers.

Questions, comments, creations? Leave a comment! Happy making, you magical beings!

(Quick & Easy) Micro:Bit Magic 8 Ball Costume

90s kids unite! And build this super fun, easy, and interactive costume!

Ask a (yes/no) question, shake the Micro:Bit, and it displays a fortune (obviously accurate) to your deepest most pressing questions, like what is life, how do we solve climate change, and why are pineapples so difficult to cut open. Except you’ll do a better job with phrasing your questions as yes/no 🙂

Anyway….

Here we go!

Read Time: 7 min.

Build Time: < 30 min.

Project Cost: $15 – $20

Materials

  • Micro:Bit 
  • 2xAAA Battery Case
  • 2 AAA Batteries (plus some extras if you plan to wear the costume for more than 3 hours)

… Seriously, that’s it!

Oh, and to make it all aesthetically pleasing and on point:

  • Cardboard (like a 4″ x 4″ square)
  • Blue Paint

Step 1: Program the Micro:Bit!

Step 1: Go to www.MakeCode.org and open a new Micro:Bit project.

Step 2: Write a program to display randomly generated messages of your choosing!

Need more info? Here’s a more detailed overview 🙂

Go to Variables and create a unique variable for each message you want to send (e.g. msg1msg2, …msg42, etc).

Go to Inputs and drag out the On shake block. In On shake, add “set item to” from Variables, then go to the Math blocks and connect the “pick random 0 to..Change the random number range (i.e. the 2nd number) to reflect the total number of messages you are showing (e.g. if you have 5 messages, the random number range is 0 to 4 because there are 5 possible numbers: 0, 1, 2, 3, 4).

Almost done! Add an “If – Then” from Loops. In the first if, set the condition to: item = 0, then display the first message (“show string” block w/ the variable name for your first message (e.g. msg1)). Recommended to repeat the message at least once ’cause scrolling letters can be hard to read! Repeat the if statement condition for each random number and message, and viola, c’est fini! You can test the code in the simulation on the left side of the screen by clicking the Play button and then Shake (:

When you’re ready, download the code, plug in your Micro:Bit, and then drag the (.hex) file onto the Micro:Bit drive. The code is loaded when the power lights are done flashing!

Step 2: Optional Triangle Cover

Step 1: Make a cardboard triangle & paint it blue!

For most accurate imitation, go for an equilateral triangle (geometry for the win, woot woot!).

Step 2: Cut a 1 in. x 1 in. (2.5 cm x 2.5 cm) hole in the center for Micro:Bit LEDs.

Step 3: Attach Micro:Bit on back of triangle w/ glue or tape.

If using hot glue, avoid the battery and USB connector.

Step 4: Wear it & Share it, pretty bby!

Attach the Micro:Bit (& cardboard combo) to yourself or your clothes! You can use velcro, tape, or hot glue (although probably avoid using this one on your actual skin..) Or make straps w/ string, twine, fabric, etc!

Put on your favorite black outfit & you’re done! Quick & awesome & comfy Halloween costume for the winnnn 😀

Feel free to ask any questions in the comments section. If you build this or a variation, please share your creations, I’d love to see what you make!!

Build an (easy) Floor Piano!

The household floor piano is a dream no more! The Makey Makey microcontroller makes it super easy (and affordable) to build your very own “foot-strument” out of common household materials.

Grab a Makey Makey kit, some cardboard, and your musician shoes and let’s get building!

  • Difficulty Level: Easy
  • Estimated Build Time: 60 minutes
  • Cost: $50 (for Makey Makey kit)

 

 

Materials & Tools

Materials

  • Makey Makey Kit
    • 16 Breadboard Jumper Wires
    • 4 Alligator Clips
  • Cardboard
  • Aluminum Foil
  • Plastic Trash Bag (stretchy is best)
  • Duct Tape

Tools

  • Scissors
  • Hot Glue Gun
  • Measuring Tape or Ruler

 

Build the Piano!

1. Build the piano base.

Cut a cardboard base for your keyboard, then divide it into 8 equally sized rectangles — these are the dimensions for your piano keys!

2. Make the piano keys!

Cut out 8 cardboard rectangles using the base dimensions and paint them white.

3. Build the key triggers for the piano.

Cut 16 cardboard rectangles of equal size or smaller than the cardboard piano keys.

Repeat the following for each pair of key triggers:

  • Cover both cardboard rectangles in aluminum foil.

  • Use copper tape to connect one wire to the aluminum foil on each of the key triggers, then cover the connection in duct tape to secure.

  • Cover one of the rectangles with a piece of the plastic trash bag so that the aluminum foil is completely covered. Secure with duct tape.
  • Sandwich the two key triggers together so that the trash bag is a barrier between the aluminum foil.

 

Connect to the Makey Makey!

1. Connect the wires to the Makey Makey – one of the wires goes to ground and the other goes to a keypad (doesn’t matter which wire).

2. Test that the Makey Makey is triggered when you put pressure on the cardboard.

3. Tape the key triggers to the bottom of the white cardboard piano keys. Secure them to the piano base with velcro or glue.

4. Connect one of the wires from each of the key trigger to the six header pins on the back of the Makey Makey board and to two of the arrow keys on the front.

5. Connect the other key trigger wires to the Makey Makey ground.

Recommended to connect the ground wires in two groups of 4, then use one alligator clip per each group of 4.

Write the Scratch Program!

We have 8 inputs, which means we can play an entire octave on our floor piano! (Yes, that was intentional).

Your job: Write a Scratch program that plays 8 successive keys starting at middle C (or wherever you prefer your piano octave to start) using the “play note” function. Or you can copy mine in the photo above 🙂

Aside from the program, just be mindful of what piano key is connected to what Makey Makey pin. It’s easy to get 8 wires a bit mixed up — consider labeling them to save yourself some time (& hair..).

Install & Play!

Consider coating the electrical connections in hot glue. Plug the Makey Makey into your computer, place your floor piano on, well, the floor, and have at it!

Enjoy making beautiful music by stomping on your custom creation.

Micro:Bit Puppet “Text Message” System

Intro

Nearly all of our wireless communication is done using radio waves*, including phone calls, text messages, and WiFi. With its built-in radio transmitters and receivers, the Micro:Bit microcontroller makes it super easy to build all sorts of projects with radio communication.

This particular project is a simple & quick way to send text messages between two Micro:Bit** microcontrollers – the sender writes a (short) message that is transmitted via radio to the receiving Micro:Bit, which shakes a lil’ puppet using a servo motor, and then displays the message on the Micro:Bit LED screen. Each Micro:Bit can be both a sender and receiver.

It’s sort of like a two-person Twitter.. if the tweet notified you via dancing cardboard robot puppet!

*Radio waves are long-wavelength light waves. Check out the electromagnetic spectrum here!

**A huge THANK YOU to Adafruit for donating the Micro:Bit microcontrollers used in this project for educational purposes! yayy thank you for supporting this educational endeavor!! 😀

Materials & Tools

Electronics

Puppet (or other Message Alert System) Materials

Tools

  • Hot Glue Gun
  • Scissors and/or utility knife (e.g. exacto knife)
  • Pencil
  • Ruler or other straightedge

Build the Incoming Message Alert Puppet!

Step 1: Build a cardboard puppet like the one shown in the photo or create your own! Use the paper fasteners to make joints.

Step 2: Build a mounting system to attach the puppet to the servo with skewers and cardboard.

I used a magnet to attach the puppet to the servo mounting system because magnets are awesome, but you can also use glue, tape, velcro, or a variety of other adhesives!

Step 3: Build a stand for the puppet.

  • On an approx. 6 in. x 12 in. cardboard sheet, measure, mark, and cut a hole for the servo body so that the arms of the servo rest against the front of the cardboard sheet.
  • Cut two triangles out of cardboard and glue them on the back of the stand so that the stand, well, stands upright!
  • Cut a hole for the Micro:Bit wires to thread through and add two pushpins on the front to hold the Micro:Bit.

 

 

 

 

 

 

 

Code the Two Micro:Bits!

To start, choose one Micro:Bit to be the sender and the other Micro:Bit to be the receiver. Once both are working as expected, add in the code for both roles.

Use the Make Code Micro:Bit website to program each Micro:Bit. As this is intended as a beginner project, the whole system can be built using the block-based programming language, although adaptations are encouraged and appreciated!

If there is more than one pair of Micro:Bits in the room (i.e. in a classroom setting), remember to set different radio group numbers for each pair.

The sender sends a (short) text based on user inputs over radio, like the example above. Pretty simple!

The receiver moves the servo when an incoming text is received, then scrolls the message text on the LED screen, like in the example below.

Press the reset button to stop sending/receiving the incoming message.

 

Connect the Servo!

Connect the servo red wire to the Micro:Bit 3V power pin, the servo black wire to Micro:Bit ground pin, and the servo white (or yellow) wire to the Micro:Bit input pin P0.

Send all the Messages!

Program both Micro:Bits to be both a sender and a receiver so you can communicate back and forth. Then switch power from the laptop to the battery pack and test out your wireless communication system! When the sender sends a message, the puppet will notify you to check the LED screen so that you can see the incoming message.

How far of a range can you get? Test it out!

There are tons of other extensions to this introductory project, here are some possibilities:

  • Add more message options by adding more inputs or changing how those inputs are read;
  • Instead of a table-top alert system, build a wearable alert system;
  • Send voice messages and/or other sounds.

Happy building!