Step One: Gather materials.
- Tissue box free 1.
- Box cardboard (corrugated) free 2 pieces that fit in the bottom of the box for stiffening.
- Solid core wire minimal Enough for the wiring for the project.
- BBC micro:bit retail 2 - one for a transmitter, one for the car controller.
- micro:bit GPIO Edge Connector $6.00 to 15.00 US 1.
- Geared Motor /wheel $3.00 US each 2.
- Mini breadboard $0.75 US 1.
- 9Volt Battery clip $0.25 US 1.
- SN754410NE Motor Chip $0.40 US 1.
- Ping Pong Ball minimal 1.
- Ball caster (optional) $1.20 US 1 - can use half a ping pong ball or marble instead.
- Two-sided foam tape $2 at dollar store 1roll - for mounting the motors to the base.
- White glue.
- A ruler.
- A small utility Knife.
- Hot Glue Gun (optional).
- Paper clip or compass for piercing small holes in the tissue box.
- Rotary cutting tool(optional) or razor saw to cut the ping pong ball in half.
Step Two: Robot Construction.
- Place the tissue box on the corrugated cardboard sheet so the long side of the box is in line with the ridges of the cardboard. Trace the base of the tissue box on the cardboard. The user will need two pieces. Carefully cut out the pieces with the knife and ruler. The user should trim them so they will fit flat inside the box. Carefully open one end of the tissue box to test fit the cardboard sheets.
- Use white glue or carpenter's glue to glue one piece of the cardboard to the inside base of the box. Put some heavy objects like batteries inside the box to weigh down the cardboard so it will fasten securely to the box. Let it dry.
- Before we go further, the user may wish to solder short lengths of solid-core wire onto their motor wires and 9-volt battery clip wires. Then cover the joints with heat shrink tubing.
- Now start laying out the parts on the other piece of cardboard. Try to mount the breadboard towards the end that will be the rear of the car so the micro:bit and edge connector fit.
- Hot glue is good for attaching the breadboard. Then the user can easily remove it if their want to use it for another project. Do not use the two sided tape on the bottom of the breadboard. It holds the metal connections inside the breadboard. If the user pulls it away, it'll wreck the breadboard.
Step Four: Attach the Micro:bit Edge Connector.
- Now attach the edge connector to the breadboard with the connector pointing to the front of the robot. The pins should straddle the trough(ravine) that runs along the middle of the breadboard.
Step Five: Install the SN754410NE Motor Control Chip.
- Carefully install the SN754410NE motor chip on the breadboard. The small notch should be pointed towards the edge connector.
Step Six: Wire the Motor Chip.
- If the user looks down on the motor chip from above, with the notch on the right, the pins on top are numbered 1 to 8 from right to left and then the pins on the bottom are numbered from 9 to 16. An explanation of how the motor chip works will be provided at the end of this project. Use small lengths of wire to join.
- Pin 1 to the red rail
- Pin 8 to the red rail
- Pin 9 to the red rail
- Pin 16 to the red rail
- Use a short length of wire to join the edge connector ground to the blue rail of the breadboard. Use a small length wire to join the top-side blue rail to pin 4 OR 5 of the motor chip. It's the chip's ground point and the user will only need to ground the chip with one wire.
Step 7: Wire Motor Directional Pins.
- This project is using micro:Bit pins 13,14,15 and 16 for two reasons. First, they're all together on the board for convenient wiring. Secondly, they are not used for other purposes by the micro:Bit so the user won't be disabling features like the LED array should they wish to use it in their final design. A link to the pin wiring assignments is at the end of this project for the user’s future reference.
- Join edge connector pin 13 to pin 7 on the motor chip.
- Join edge connector pin 14 to pin 2 on the motor chip.
- Join edge connector pin 15 to pin 10 on the motor chip.
- Join edge connector pin 16 to pin 15 on the motor chip.
- Join the red rail on one side of the breadboard to the red rail on the other side with a length of wire. Join the blue rail on one side of the breadboard to the blue rail on the other side with a length of wire. These wires carry voltage to both sides of the circuit and ground source to both sides of the circuit.
Step 8: Wire the Motors.
- Put the green(black) wire of the left-hand motor to pin 3 on the motor chip.
- Put the red wire of the left-hand motor to pin 6 on the motor chip.
- Put the red wire of the right-hand motor to pin 14 on the motor chip.
- Put the green(black) wire of the right-hand motor to pin 11 on the motor chip.
Step 9: Attach the 9 Volt Battery Clip.
- The 9-volt battery will power both the motors and the motor control chip.
- Attach the black wire of the 9-volt battery clip to the ground rail of the breadboard.
- Attach the red wire of the 9-volt battery clip to pin 16 of the motor chip.
- The wiring is done.
- Take a few minutes to double-check the user’s work. It may save some cooked batteries or worse, circuits, if the user catches the errors and correct them before powering up the car.
Step Ten: Wiring Diagram.
- There is a picture of Wiring Diagram shown below.
- The wiring diagram is provided here for the user to check their wiring so far.
Step Eleven: Coding the Micro:bit Transmitter and Micro:bit Receiver/Robot Control
- This project is going to use one micro:bit as their remote control and a second micro:bit as the receiver/robot controller.
- In the transmitter, this project uses the accelerometer to measure the forward/backward tilt of the micro:Bit to make the car go forwards or backwards or stop. To create, the user uses the A and B buttons to modify forward/backward to include left/right turning.
Step Twelve: Final Assembly - Pre-install Test and Ping Pong Ball Installation.
- After the user has uploaded their codeBlocks to the transmitter and robot-control micro:bits, plug the robot-receiver micro:bit into the edge-connector and turn it on. Turn on the transmitter and try to drive the car just by moving the transmitter and pressing the A and B buttons. If all works, proceed. if not, go back through the wiring and check your connections. Are your batteries all okay?
- Carefully cut a ping-pong ball in half. Invert the box and then hot glue the half-ball to the underside of the box. This is the product’s 'third wheel'. If the user wants a better solution, buy the steel ball caster mentioned in the first step and mount it with hot glue or use wire poked through the bottom of the box.
Step Thirteen: Motor Fitting and Installation.
- Now, mount the motors to the base and box.
- One at a time, orient each motor so that the small circular protrusion is facing outwards.
- Then on the bottom of each motor, put a piece of two-sided tape.
- Insert the component board into the tissue box.
- Next, rotate the motor so the little circular protrusion is facing outwards.
- Then, press the back of the motor against the side of the box so a small dimple appears on the outside. If the user puts their thumb on the outside of the box and presses against the axle, they'll get a deeper dimple that's easy to see.
- Use a small knife to cut out the dimple. This will be where the axle exits the box.
- Next, press the motor against the side of the box again, so that the small circular protrusion makes a dimple.
- Cut out this dimple as well.
- If the user gets their receiver micro:Bit programmed, they install it in the edge connector and attach the battery pack with the power switch off. Slide the cardboard base with all the components carefully into the tissue box.
Step Fourteen: Mount the Motors to the Cardboard Base.
- Remove the backing from the two-sided tape and press each motor down to secure them against the base of the user’s component board.
- Insert a compass or un-bent paper clip into the two screw holes in each motor and push outwards to pierce the box.
- Now, cut two pieces of solid-core wire, each about 8 centimeters long. Bend like a 'U' shape and feed the wire ends into the motors from the outside. Twist them to secure the motors against the sides of the tissue box.
Step 15: Final Connections and Let's Drive!
- The 9-volt battery now sits between the motors.
- The negative wire plugs into a blue ground rail and the red wire plugs into Pin 16 of the motor control chip.
- If the user likes, they can use a male/female Dupont-type wire to allow the connecting/disconnecting of the 9-volt battery from the circuit when not in use.
- Plug the male end of the Dupont wire into Pin 16 on the motor chip and leave the female end free. Then you just plug the red 9-volt wire into the female end of the Dupont wire and your robot is energized.
- Attach the wheels to the robot and the user is done.
- If the user wishes to decorate the robot they can, here.
Step Seventeen: Frequently Asked Questions.
- Why aren't you using an L293D or L298 Motor Controller IC?
- The micro:bit is a 3-volt logic level device. It cannot supply the 5 volts necessary to activate an L293D or L298. The SN754410NE also requires 5 to 7 volts to activate, but the chip's design is robust enough to handle a Vcc of 9 volts. So we use the 9-volt battery to power both the motor chip and the motors. Thanks to Learning Developments for this insight. Having said this, it may be possible to come across an L293D that can activate on 3V, but it's not compliant to the original design specification for the chip.
Where can I learn more about the SN754410NE Motor Controller IC?
- Check out this lesson based on the L293D. The SN754410NE has an identical pin arrangement and works the same way.
My motors run the reverse to the instructions. How do I fix it?
- Just swap the wires on your motors to the opposite pins. Red to pin x and Black to pin y becomes Red to pin y and Black to pin x.
How can I cut a ping pong ball in half?
- You can use a rotary cutting tool or a small hobbyist saw (like X-acto) to carefully cut the ball.
Why are the reverse direction pin values the opposite of the forward pin values?
- We hard-wired the enable pins on the motor chip permanently HIGH so that we use two fewer pins on the micro:Bit. As a result, the way we do reverse requires us to do 1023 minus value to get the desired speeds. Hence full speed 1023 in forward needs to be 1023 minus 1023 (ie. 0) to get full speed in reverse.
Why are we using pins 13,14,15 and 16 for the motor control pins? Couldn't we use lower numbered pins?
- Yes, you can. However you'll see from this pinout diagram, that different pins serve other purposes on the micro:bit. For example, the LED array on the micro:bit uses pins 3,4,6,7,9 and 10. So if you want to also access the LED array, you can't use the pins shared by the array. Using those pins deactivates the LED array.
Why should I delete the LED display commands from my busReceiver code?
- Turning ON/OFF LEDs takes processing time and it slows down the responsiveness of your transmitter and receiver. Leave the LED display commands in your code if you wish.