Control a DC motor with Micro:bit
Автор: Robotique Site
Загружено: 2021-04-18
Просмотров: 7199
Описание:
For more details you can see this article:
https://www.robotique.site/tutorial/u...
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.
A DC motor is an electric motor that converts direct current (DC) electrical energy into mechanical energy. DC motors are widely used in a variety of applications, such as electric vehicles, robotics, appliances, and tools.
A relay is an electrically operated switch that is used to control an electrical circuit by a smaller current signal, for example, from a microcontroller like a Micro:bit. It allows a low power circuit to switch a higher power circuit, such as turning on a light or a motor with a button press.
A DC motor can also be controlled using a relay and a Micro:bit. A relay is an electrically operated switch that can be controlled by a small current from a Micro:bit to switch on or off a larger current that powers the DC motor.
Here are the general steps to control a DC motor with a relay and Micro:bit:
1- Connect the relay to the Micro:bit. The relay typically has control pins that can be connected to the Micro:bit‘s digital I/O pins.
2- Connect the DC motor to the relay. The relay has normally open (NO) and normally closed (NC) terminals that can be connected to the positive and negative terminals of the DC motor.
3- Write a program on the Micro:bit to control the relay. The program can use the Micro:bit‘s digital I/O pins to send control signals to the relay. For example, to turn on the motor, the program can set the digital I/O pin connected to the relay’s control pin to a high state.
4- Upload the program to the Micro:bit and test the motor’s functionality.
This method is simple, but has a drawback of not having a control over the speed of the motor. The motor will be either on or off, no in-between. The relay is not a good option for controlling the speed of the motor. Also, when working with relays, it is important to be aware of the safety precautions, such as disconnecting the power supply before connecting or disconnecting the relay.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: