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.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet