Radar Rubber Band Shooter Using Microbit

by kidzlogic in Circuits > Microcontrollers

375 Views, 3 Favorites, 0 Comments

Radar Rubber Band Shooter Using Microbit

20240116_214959.jpg

Hey,

Back in elementary school, my buddy threw down a challenge: create a turret. I have no Arduino board, just a microbit in hand. Took it on, started tinkering, and you won't believe what happened – ended up with something super cool! Ah, the adventures of elementary school, huh? By the way, I'm Dhairya from Alice Brown Elementary, rocking it in Grade 5.

Supplies

To make this project you'll need.


  • Microbit
  • Breakout Board
  • 2 Servos
  • Ultrasonic Sensor
  • Medium sized box
  • 4 Wires to connect to pins on Breakout Board
  • 3d printer
  • Handful of mini screws and nuts
  • 7 - 9v battery or connect with port
  • Battery connection wire
  • Rubber Bands


After you get these you can get started.

Print the Top

The main component of this project is 3D printed. The sonar holder is positioned beneath the rubber band hook, and at the bottom, you'll find the servo horn holder. On the topmost part, there's the second servo holder where you can secure both sides with screws. Print this.

Print the Fitting Horn

As evident from the bottom, there's room allocated for a servo horn, though it's specifically designed for a 3D printed horn, not a real one. Go ahead and print this, and you'll be on step 3.

Attach Horn to Top

20240114_143147.jpg

Attach the horn to the bottom holder. It might be a bit tricky to get it in, but it's doable with a little patience and effort.

Attach to Servo

20240114_144758.jpg
20240114_145058.jpg
20240114_145102.jpg

Attach the sonar to the bottom of the horn, and position it under the hole located just above the horn. Secure it in place by screwing in a screw to ensure it's firmly held in position.

Attach Shooting Servo

20240114_151342.jpg
20240114_151403.jpg
20240114_152102.jpg

First, pull the servo's wire through the hole. Then, position the servo in the middle of the two holed spots and screw in screws through both the hole and the screw holders on the servo to secure it in place.

Print Out Horn Hook

I made a hook designed to secure the rubber band when the system is in stop mode. This will play a crucial role in keeping everything in place and functioning as intended.

Attach Hook to Servo

20240114_163812.jpg

Once the hook is printed, attach it to the servo and securely screw it in place. This step is essential for ensuring the proper functioning of the system.

Attach Sonar

20240114_191156.jpg
20240114_191149.jpg

Flip the sonar upside down and thread the wire connectors through the square hole. Position the sonar's transmitter and receiver in their designated holes. Be prepared for a bit of a challenge in inserting them. Despite the difficulty, the end result is definitely worth it. It's optional to use screws because its already a good fit in.

Print Servo Holder

To attach a servo to a lid, we'll need a holder for the servo. Please proceed to 3D print it.

Connect to Servo

20240116_213323.jpg

Secure the servo in place by screwing in on both sides, ensuring the wire comes out from the hole at the bottom.

Make Holes in Lid

20240116_194609.jpg
20240116_210818.jpg
a lid hole sheet.png

Draw a sketch on the lid to replicate the setup exactly as I've done or print out the paint document, then proceed to cut holes in those marked spots accordingly. I used a drill and it worked great.

Attach Holder to Lid

20240117_175433.jpg
20240117_175416.jpg

After cutting the holes, you need to attach the holder to the lid. First, bring the bottom servo wire out through the middle hole in the lid. Then, screw in both sides of the holder, and finally, tape the bottom to prevent any short circuits.

Bring Wire Down

Copy lid hole sheet.png

Guide the diagonal servos wire down through the hole in the left corner. Connect the wires to the sonar and bring them down through the hole in front of the servo holder.

Wiring

Capture.PNG

Let's talk wiring. Attach the microbit to the Breakout board. It's a breeze with a Breakout board. The servo situated underneath connects to pin 0, while the servo flipped sideways links to pin 1. When dealing with servos, remember: brown wire for GND, red for VCC, and yellow for S.

Now, for the Sonar, it's equally straightforward. Connect GND to GND 2, Echo to S 2, Trig to S 3, and VCC to VCC 3. Keep it simple.

Add the Code

My Microbit project is located at https://makecode.microbit.org/_7eAPDieX6X6P. Upload it to your Microbit. Once the project is uploaded, please turn off your Microbit in case it starts running.

Put Board and Microbit and Battery in Box

20240118_121618.jpg

Ensure that everything beneath the lid is placed inside the box. Create space to accommodate a battery, then insert the battery into the designated area.

Connect to Battery

20240118_121710.jpg

Lastly, connect a wire from the Microbit to the battery and then securely close the box.

Prank Your Friends

20240116_214959.jpg

Position this on a desk, and when someone walks past, a rubber band will fling at them. I hope you had fun making this with me.

P.S. I will make a reloading adapter

Thanks