Introduction
Have you been trying to catch a Leprechaun, but he always gets away? This year try using a distance sensor to instantly sense the presence of a Leprechaun on St. Patrick's Day so that you can trap him and get 3 wishes!
Parts
- micro:bit
- Crazy Circuits Bit Board
- Distance Sensor
- Brick Compatible 270 Degree Servo
- LEGO Technic Beam 3 x 3.8 x 7 Beam Bent 45 Double (32009 / 41486)
- LEGO Brick 2 x 2 with Pins and Axlehole (30000 / 65514)
- LEGO Bricks
- Jumper Wires
- 2 AAA Battery Holder
- Top Hat
- Paper
- Cotton Balls
- Gold Coins or Shiny Objects
- Foam Core
Video Overview
-
-
The first thing you'll need is a trap chamber. We used a green top hat, but you could also use a small cardboard box.
-
To entice the Leprechaun, you'll need something that looks like gold. We used some plastic gold coins that look very shiny - they could be real! We put them in a small pot.
-
To make the trap visible from afar, use a rainbow! We all know that gold can be found at the end of a rainbow, so the Leprechaun will surely be lured into your trap. We made ours from paper and cotton balls.
-
-
-
Cut a hole in the back of the hat. This will allow the sensor to "see inside" the hat, and for the LEGO Beam motor arm to grab onto.
-
-
-
Cut a piece of foam core about 5 inches larger than the size of the hat.
-
Staple the hat's brim to the foam core to make a hinge as shown. (If you're using a cardboard box, cut off all but one of the flaps and staple the remaining flap to the foam core.)
-
-
-
Use LEGO Bricks to create a structure that holds the distance sensor up in a way that it points through the hole in the hat.
-
Add LEGO parts to create a spot for the Bit Board.
-
-
-
On top of the distance sensor, add another layer of LEGO to mount the servo motor. Use the LEGO Brick 2 x 2 with Pins and Axlehole (30000 / 65514) to mount the motor on its side, as shown.
-
-
-
Connect the 2AAA battery pack to the screw terminals.
-
Connect:
-
VCC to +
-
Trig to P14
-
Echo to P13
-
GND to -
-
Servo Motor to P1, + and -
-
-
-
Download the code to the micro:bit https://makecode.microbit.org/_Tx4ap637E...
-
This code sets the servo motor to the "Start Angle" and keeps it there until the distance sensor senses a Leprechaun coming within 3 inches of the sensor. When it does, it moves the servo to the "Capture Angle" to drop the hat over the Leprechaun and trap him inside!
-
-
-
Press Button "A" to move the motor to the Start Angle. Place the LEGO Beam motor arm on the motor shaft in the location where it will hold the hat up.
-
Press Button "B" to test that the LEGO Beam doesn't hit the LEGO Bricks when it moves to the Capture Angle.
-
-
-
Place the trap in a location where a Leprechaun could see it easily, preferably on a dresser or nightstand so that the Leprechaun will think you are asleep and try to sneak in to steal your gold!
-
Press the "A" button to move the motor to the "Start Angle" and place the hat over the motor arm.
-
Decorate the area around the trap with gold. Make sure that there is a lot of gold under the hat, but nothing within 3 inches of the sensor.
-
Add rainbow embellishments or a sign that says "FREE GOLD!".
-
-
-
With the tap set the night before St. Patrick's day, go to bed as usual.
-
If you hear the trap go off, wake up! Tell your Leprechaun that you will let him go if he grants you 3 wishes.
-
MAKE 3 WISHES! What will you wish for?
-