他们逼我做卧底

Slide Rail 2020 V1.1

 
Overview

For specific details, please see the video I uploaded https://www.bilibili.com/video/BV1Yi4y1s7dr/ In this project, I used the Attiny series microcontroller attiny13a, which has 1kB programmable flash, 64bytes eeprom, and 64bytes of memory. You can buy it at Moubao for the price of a pack of spicy strips. The microcontroller has a total of 6 programmable ports. If the rst pin is used, the microcontroller cannot be programmed again. Three of the remaining 5 ports are used as stepper motor drive modules, one is used to indicate the direction of movement of the motor, and the other port implements the functions of starting, stopping, reversing and speed regulation of the motor. I mainly analyze how I use a port to complete the functions of starting and stopping the motor, changing direction, and regulating speed. First, let’s take a look at this circuit diagram. The vf1 here is connected to the AD conversion end of the microcontroller. If both buttons are After disconnecting, the voltage read by vf1 can be adjusted through the potentiometer, and the voltage value can be converted into the speed value of the motor accordingly. If button 1 is pressed, the voltage will jump positive to around 5v. If button 2 is pressed, the voltage will be negative. Jump to near 0v. The actual threshold value must be set according to the potentiometer. The adjustable range of my potentiometer is about 3%-97%, which can satisfy any adjustment of the potentiometer without triggering the button. After the button is released, the microcontroller reads the voltage of the port again to determine the speed value of the motor.20200509_163056_1.00_00_01_25.Still001.jpg

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 22:47:37

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号