Solar Powered Car With Micro:Bit
by caitlin v in Workshop > Electric Vehicles
534 Views, 1 Favorites, 0 Comments
Solar Powered Car With Micro:Bit
This is a simple step by step guide to assist in creating a basic solar car with micro:bit coding. The materials and equipment listed are the ones we used, however, you can substitute components or use completely different materials to make a more customised and personalised car.
Supplies
In order to create this simple car, you will need:
- 5+ zip-ties
- 1 microbit
- 1 small sized solar panel
- 1 simple steering servo (this is optional)
- 2 metal axels (can be substituted for different materials such as wooden skewers)
- 4+ crocodile clips
- 2+ bearings (depending on how many your car design requires use more)
- 1 capacitor
- 2 small recycled (these will be used for the front)
- 2 larger 3D printed wheels (these are required for the rear)
- 1 breadboard
- 1 roll of double sided tape
- 1 hot glue gun
- 2 hot glue gun sticks
- 1 motor
- 3 'power-rails'
- 1 medium sized piece of acrylic (recommended dimensions: 30cmx30cm)
* In order to complete this project, it is preferred that you have a 3D printer and/or laser cutter available and accessible, however, recycled materials or other substitutes should also work.
Laser Cutting a Chassis
To begin creating the car first you will need to create a 'chassis', this serves as a base for your care. Open up an application such as Onshape, create a square shape with an added semi circle on one side. Ensure that your design has the dimensions of 15cm x 25cm in length and width or an equivalent ratio.
Following this, create cut outs within your shape (this is crucial as it will ensure the car is aerodynamic), one following the outline on the semicircle as well as a couple thin, long rectangular strips throughout the chassis. As well as ensuring aerodynamics, this will also make the car significantly lighter. Using the above example as a reference, make sure your dimensions are correct and work for when it comes time for printing.
Once this is complete download your chassis and upload it to the software of your choice for laser printing. You may choose to use acrylic, wood or any other type of material, as long as it durable as this will serve as the base of your car.
3D Printed Components (Optional)
Using an application such as Onshape or Tinkercad, create two larger rear wheels. You should consider to include cutouts in the wheels as well, in order to maximise grip and minimise the weight of the wheels.
Extra: You also may want to consider experimenting with other materials against the outline of the 'tire' (including elastic/rubber bands, rubber, recycled tire bits etc.)
Note: If you do not have a 3D printing option available then consider using recycled materials to substitute.
* The attached image of a wheel is an example with the dimensions we used, you may like to follow this as a guide. *Notes that the measurements are in mm.
Setting Up and Coding the Microbit
This next step involves setting up and coding the microbit to allow the car to function. To do this you first will need to plug your microbit into the computer and open a new project in the Microbit website to begin creating your code. Firstly you will need to download the DF-driver extension pack which can be found when the extensions button is clicked, then search the name of it. Press download and then it can be found along the side bar of your microbit. From here you can begin:
- Using the pink ' on button A press', drag 'motor dir speed' into the input. Select 'M1', 'CW' and change the speed on this block to 225.
- Under the basic tab, select pause and change the number to 5000
- Select DF-Driver and drag the 'servo' under the 'pause' feature. After this, change the variables to 'S1' and 90 degrees
- Repeat step 2 of changing the number to 5000
- Select 'servo..degree...' and select 'M1' degree '0'
- Finally locate motor stop after the setting to 'M1'
This step is now complete! Use the above image as a reference to how your Microbit should appear.
Assembly
The next step to completing the car is the assembly of all the components. You may want to consider some alternate ways to bind your car together which may include: hot-glue, double-sided tape, zip-ties, bluetack etc.
Using a hot glue gun (or any other alternatives such as the ones mentioned), create a thin film of glue on the middle of the base of the chassis, gently placing the two parts together. Once this has dried and you are happy with the positioning, use either or both of zip-ties and double-sided sticky tape to secure the microbit, capacitor, DF-Driver, MPPT (solar panel) and breadboard all in place, ensuring none of them fall off if touched.
Wiring
In order to wire the car properly and so everything works make sure you:
- Screw the positive and negative wires from the solar panel into the inputs of the MPPT's longer side
- *red = positive and black = negative
- On the shorter side of the MPPT, connect the positive wire to the capacitor mentioned earlier
- Using the positive and negative wires from the capacitor, connect them to the expansion board
- Make sure the wires are screwed shut to avoid them from falling out whilst the car is in operation
- Connect the servo (this should be down on the opposite of the microbit)
- From here is the easier step of connecting the breadboard to the remainder of the wiring
Notes: Ensure you are using materials such as wood, plastic and any other insulators which are non-conductive as this will prevent a short circuit.
Attaching the Axel, Front Wheels and Servo
To ensure that the servo is stable, use a hot-glue gun to hot glue one edge of the servo to the front of the chassis, then use hot glue on the other bracket to attach a metal axel in the middle (if you dont have this, you may want to use a wooden skewer); this is crucial since the purpose of this is to allow the servo to be connected to the front wheels and remain stable.
From here, using zip ties (or hot glue etc.) to a 3D printed or recycled cylinder. Then thread the bearing on either sides of the metal axel (we used 3 on each side but you can use however many needed according to your dimensions). After putting the bearings on, attach the servo tube and block this with the two small wheels on both sides of the tube.
Finalising and Adding Finishing Touches
Now you have to attach the solar panel to the car, we recommend propping the solar panel flat and above the car, you can achieve this by using any scrap pieces from the 3D printed acrylic or other recycled materials to hold it up, doing so will ensure that the solar panel will be exposed to maximum sunlight allowing it to run smoothly and efficiently.
* To make sure it is secured to the chassis you can use either hot glue, superglue or double sided sticky tape as these will be the best ways to hold it down without it falling off
* Before attaching your solar panel, use either any extra zip ties, tape or blue tack to make sure all wires and cables around the care are secured and tidied up.
Your solar car is now complete!