Propeller-Driven RC Vehicle
I present you an easy STEM project to make in classroom.
It is a propeller driven RC vehicle that works with two micro:bits boards
It has been making using a plastic base designed with Tinkercad where I mount two DC motors with two propellers controlled by a micro:bit board through a L298N motor driver module.
The vehicle is driven from other micro:bit board mounted in a joystick:bit and it is able to move forward and backwards because the dc motors are mounted over servo motors that turn from 0 to 180 degrees
I hope you like this project.
Supplies
- One IOBit V2 expansion board for Micro:bit
- One joystick:bit
- Two micro:bit boards
- Two 6V-9V DC motors
- Two SG90 servo motors
- L298N motor driver module
- Two propellers (6 centimeters diameter)
- Four caster wheels
- 9V rechargeable battery (1A maximum)
- One L7805CV Voltage Regulator
- Dupont cables
- Hot silicone
- 3D printer
Print the Vehicle Base
Print the vehicle base available in TinkerCad.
Mark and Glue the Position of the Wheels
Glue the IOBit and the L298N and Connect Both Boards
Pinout:
- ENA pin to 3 pin (to control the velocity of rotation of the DC motor #1)
- IN1 pin to 1 pin (to control the direction of rotation of the DC motor #1)
- IN2 pin to 0 pin (to control the direction of rotation of the DC motor #1)
- IN3 pin to 2 pin (to control the direction of rotation of the DC motor #2)
- IN4 pin to 8 pin (to control the direction of rotation of the DC motor #2)
- ENB pin to 4 pin (to control the velocity of rotation of the DC motor #2)
Glue the Servo Motors and Connect Them to the IOBit
Pinout:
- Servo #1 (signal,voltage and ground pins) to 5 pin, 3V red pin and ground pin in the IOBit
- Servo #2 (signal,voltage and ground pins) to 6 pin , 3V red pin and ground pin in the IOBit
Solder Two Dupont Cables to Each DC Motor, Fix the Propellers and Connect to the L298N
Each propeller has a 6 centimeters diameter
Pinout:
- OUT1 and OUT2 pins of the L298N to DC motor #1
- OUT3 and OUT4 pins of the L298N to DC motor #2
Power Supply
LN298N power supply:
- GND pin to the battery GND
- +12V pin to the battery voltage (9V)
To power the IOBit you have to cut a mini USB cable and make the following connections:
- Connect the ground black cable and the ground pin of the voltage regulator (7805 in the image) to the ground of the battery
- Connect the voltage of the battery (9V) to the input pin of the voltage regulator
- Connect the output pin of the regulator (5V) to the voltage red cable
Programming With MakeCode (micro:bit)
The vehicle program (first image) is simple:
- To go forward or backwards you only need to control the angle of the servos (0 degrees or 180 degrees) (p5 and p6 outputs)
- To turn left or right you only need to control the velocity of the servos using the p3 and p4 outputs: for intance, if you want to turn right you have to increase the velocity of the motor placed in the left side and to reduce te velocity of the motor placed in the right side
This is not the only way to turn left or right, for instance, you can try stopping the motors to turn. It is up to you.
The joystick program (second image) is also simple:
- To turn right or left the program uses the position of the X and Y axis
- To go forward, keep pushed the D button
- To go backwards, keep pushed the E button
- To stop the vehicle, do not press any button
You can download both programs from here