ThLdN

ADC-PWM module with motor speed control or LED dimming

 
Overview
This is a small toy with a very simple circuit. I haven't touched a 51 microcontroller in a long time; I bought quite a few 51s and STM8s that have been gathering dust. I made a small tool to use them.
The microcontroller reads the I/O port voltage via ADC, converts the voltage into a PWM output with a fixed duty cycle to drive a MOSFET. The recommended operating voltage is 6.5V-20V (maximum 35V; LDOs seem to be 35V, be aware of high voltage difference causing overheating).
You can choose a suitable MOSFET; this one can withstand up to 60V, but it's unnecessary to use such a high voltage. This one was chosen mainly because it's cheap, costing around 30 cents. If you have the resources, you can use an easier-to-drive one.
Considering the microcontroller's driving capability isn't very good, the output frequency is set relatively low to reduce switching losses, but you definitely won't see flickering when driving LEDs.
Note: There is no reverse connection protection; pay attention to polarity.
 
 
The output was tested using three 10R 3W metal film resistors connected in parallel, equivalent to 3.3R. With a 12V power supply and a duty cycle set to around 60%, the board did not overheat. Currently, I don't have a motor on hand. If you have LEDs, I recommend connecting a small resistor in series.
 
Adjust the PWM
 
using a potentiometer. ... For programming, use STC_ISP. Download link: https://download.ihsdus.cn/down/2022down/1/21/TCICP.rar?timestamp=655c6678&auth_key=1d8fd78df58a3b8e9e9f7be34fc1ff5a
After opening, please set the parameters as shown in the image. You can then use any serial port programming tool to program it.
To program the circuit board, connect the DuPont wires to +5V GND RXD TXD. Configure the serial port as shown in the image, paying attention to the selected options. Refer to the tutorial: https://zhuanlan.zhihu.com/p/593000651.
Finally, connect the wires according to the silkscreen markings on the board.
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-23 14:21:18
  • The difference between multilayer PCB and LTCC
  • Are there any STM and uCOS training courses during the National Day?
  • The basis of the difference between TTL and CMOS
  • FDS3572
  • USB driver installation
  • Introduction to msp430f5529 (1) - Clock module DCO

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号