MCU IO pin directly drives DC motor

Publisher:创意火舞Latest update time:2022-06-30 Source: csdnKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The pin output current of the microcontroller is very small, generally around 10~20mA, while the driving current of the DC motor is above 100mA.

In the high-level output state, although the voltage does not change much, the current is very small, which makes it impossible for the microcontroller pin to directly drive the DC motor.


If you only drive one motor to achieve a simple start-stop function, there is no need to use a motor drive module. It can be achieved with a small transistor.


Use a transistor to make a switch driver.

Circuit diagram↓

I/O is used for control: high level turns on, low level stops.

When the IO port is at a high level: the collector and emitter of the transistor are turned on, and the motor energy comes from the VCC input, which is sufficient to meet the motor's work.


The disadvantage of this circuit is that it can only control rotation in one direction.

The SS14 Schottky diode is mainly used to prevent the motor inductance from changing suddenly when the circuit is disconnected, thereby burning out the transistor. By utilizing the characteristics of the Schottky diode such as fast working speed and large current, the circuit is continued to flow when the circuit is disconnected, and this large current with nowhere to go is consumed through the motor for the second time.


Expand content↓

Considering that some people need the forward and reverse function of the motor, the forward and reverse circuit diagram is also released.


Simulation picture↓

Both 5V and 12V power supplies can be used, but the 5V drive power is smaller.


A and B ports are connected to the microcontroller pins


When port A gives a high level and port B gives a low level, the motor rotates forward, otherwise the motor rotates reversely.


Keywords:MCU Reference address:MCU IO pin directly drives DC motor

Previous article:【51 MCU】 A4988 driver module drives four-wire stepper motor
Next article:[51 MCU] ULN2003 module drives stepper motor (5-wire) forward and reverse code and wiring diagram

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号