+21622886281
Car Micro:bit Project

Development of a remote control car with Micro:bit

A robot car, also known as an autonomous car or self-driving car, is a vehicle that is capable of sensing its environment and navigating without human input. These cars use a combination of sensors, such as cameras, lidar, radar, and ultrasonic sensors, to collect data about their surroundings. This data is then processed by onboard computers and algorithms, which determine the car’s next actions, such as braking, accelerating, and steering.

Robot cars are designed to improve transportation efficiency, reduce human error, and increase safety on the roads. They can be used for a variety of applications, such as personal transportation, ride-sharing, logistics, and even delivery. Companies such as Waymo, Tesla and Uber are working on developing autonomous cars.

An infrared remote control car with Micro:bit is a type of robot car that can be controlled using an infrared remote control and is powered by a Micro:bit microcontroller. The Micro:bit is a small, low-cost computer that is designed for educational purposes and can be programmed using a variety of programming languages such as Python and JavaScript.

In an infrared remote control car with Micro:bit, the Micro:bit is used to control the car’s motors and receive commands from the infrared remote control. The infrared remote control sends signals to the Micro:bit, which interpret the signals and control the car’s movement. The Micro:bit can also be programmed to add additional functionality, such as obstacle avoidance, automatic movement, and more.

Purpose of this project:

In this project we will build a remotely controlled car (by infrared) controllable by the Micro:bit card.

The user will be able to drive the car by a remote control in three directions (front, right and left) and stop it.

Required components

Micro:bit 

Micro:bit is a small, low-cost microcontroller board that was developed by the Micro:bit Educational Foundation for use in computer education. It is designed to be easy to use and accessible to a wide range of users, including children and beginners. The Micro:bit board measures about 4cm by 5cm and features a 25-pin edge connector, a 5×5 LED matrix, two programmable buttons, an accelerometer, a compass, a Bluetooth Low Energy (BLE) module, and a USB connector.

The Micro:bit is programmed using a variety of programming languages such as Python, JavaScript, and Microsoft Block Editor. It can be used to control a wide range of devices and projects, including robots, drones, lights, and more. The board can be powered by a USB cable or a 3V coin cell battery and can be programmed using a computer or mobile device.

The Micro:bit is widely used in education, providing a hands-on learning experience for students of all ages to learn computer programming, logic, and problem-solving. It’s also used by hobbyist and makers to create fun and interactive projects.

Micro:bit board a GPIO board

A Micro:bit GPIO (General Purpose Input/Output) Expansion Board is an accessory that can be used to extend the capabilities of a Micro:bit by providing additional input/output (I/O) pins. These pins can be used to connect sensors and actuators, such as LEDs, buttons, motors, and other electronic components.

The expansion board typically connects to the Micro:bit using a standard edge connector and provides a set of male headers that can be used to connect external components.

two relays

In a robot car, relays are used to control the motors that drive the wheels of the car. A relay is an electronic switch that is controlled by a low-voltage input signal, and it is used to turn the motors on and off. The relay typically consists of an electromagnet, a switch, and a set of contacts. The electromagnet is activated by the low-voltage input signal, which causes the switch to close or open the contacts, allowing or cutting off power to the motors.

When the relay receives a signal from the microcontroller to move forward, for example, it will close the contacts to the motor, allowing power to flow to the motor, and the car will move forward. When the signal to stop is received, the relay will open the contacts, cutting off power to the motor, and the car will stop. This allows for the motors to be controlled remotely or by a microcontroller, such as Micro:bit.

A robot car may have multiple relays, one for each motor or one for each set of motors (front and back or left and right). Relays can also be used to control other electronic devices in the robot car such as lights, sensors or cameras.

infrared remote control

An infrared remote control for a robot car is a device that allows a user to remotely control the movement of the robot car. It works by sending infrared signals to the robot car‘s microcontroller, which interprets the signals and controls the movement of the robot car’s motors.

An infrared remote control typically consists of a set of buttons or a joystick that a user can press or move to control the robot car‘s movement. Each button or direction on the joystick corresponds to a specific movement command, such as forward, backward, left, or right. When a button is pressed or a joystick is moved, the remote control sends an infrared signal to the robot car‘s microcontroller, which interprets the signal and controls the motors accordingly.

The infrared remote control and the robot car‘s microcontroller must be designed to work together and use the same infrared protocol. The microcontroller typically has an infrared receiver that is able to receive and interpret the signals sent by the remote control. There are multiple infrared protocols, such as NEC, RC5, and RC6, that are commonly used in remote control applications.

KY-032 infrared sensor

The KY-032 is an infrared sensor module that can be used in a robot car to detect obstacles or other objects in its path. It uses infrared reflection to detect objects and can be used to create a simple obstacle avoidance system for the robot car.

The KY-032 module consists of an infrared transmitter and an infrared receiver. The transmitter sends out infrared light, and when the light hits an object, it is reflected back to the receiver. The receiver then converts the received infrared light into an electrical signal that can be read by a microcontroller, such as a Micro:bit.

The electrical signal from the receiver can be used to determine the distance of the object from the sensor. When the sensor detects an obstacle, the microcontroller can be programmed to respond by stopping the robot car or taking evasive action.

The KY-032 infrared sensor can be easily connected to the robot car’s microcontroller using simple wiring. Once connected, the sensor can be programmed to work with the robot car’s control system. The sensor can be mounted on the front, back, or sides of the robot car, depending on the desired range of detection and the specific requirements of the robot car’s control system.

2 wheel car robot kit

A 2-wheel car robot kit is a collection of components that can be used to build a small, autonomous robot that moves on two wheels. These kits typically include a microcontroller, such as a ESP32 card, to control the robot’s movements, as well as motors, wheels, and other hardware to enable the robot to move and navigate.

2-wheel car robots are often used as educational tools, as they can be used to teach basic principles of robotics, electronics, and programming. They can also be used as a platform for experimenting with different control algorithms, sensors, and other hardware.

This robot kit is composed of:

  • car chassis.

  • 2 gear motors (1:48)

  • 2 car tires

  • 1 universal wheel

9V battery

A 9V battery is a type of primary cell battery that is commonly used in small electronic devices such as remote controls, smoke detectors, and portable radios. It is known for its compact size and relatively high voltage output. The 9V battery is also known as a “transistor battery” because it was originally designed for use in portable transistor radios.

connecting wires

Connecting wires are used to connect various components in an electronic circuit. They allow for the transfer of electricity, data, or signals between different devices and components.

When connecting wires to an Arduino or other microcontroller, it is important to pay attention to the correct pinout. The pinout refers to the arrangement of pins on the microcontroller and the corresponding function of each pin. The Arduino pinout can be found in the documentation provided by the manufacturer, or in various resources available online.

test plate

A test plate, also known as a test jig, is a device used to test electronic circuits and components. It is a board or plate that has been designed to hold and connect various components and devices in a specific configuration, allowing for the easy testing and measurement of their performance.

A test plate can be used to test various types of electronic circuits and components, such as microcontrollers, sensors, and actuators. It typically includes connectors and sockets for connecting wires, power supply and measurement devices such as multimeters, oscilloscopes, and power supplies.

 

Construction of the car

Assembling the car with Micro:bit

To make the assembling, one can connect

For the first relay:

  • pin S to pin P0 of the Micro:bit board
  • the pin (+) to pin 3.3V of the Micro:bit board
  • the pin (-) to the GND of the Micro:bit board
  • the pin ON to an energy of 5V

For the second relay:

  • pin S to pin P1 of the Micro:bit board
  • pin (+) to pin 3.3V of the Micro:bit board
  • pin (-) to the GND of the Micro:bit board
  • pin ON to an energy of 5V

For each of the two motors:

  • the first terminal to the COM pin of the relay
  • the second terminal to the GND terminal of the Micro:bit board

For IR Infra Sensor:

  • Pin OUT to pin P2 of
  • Micro:bit board Pin (+) to pin 3.3V of Micro:bit board
  • Pin GND to GND of Micro:bit board

Makecode program

Here is the makecode program for the micro:bit card connected to the car.




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top