Diagram refer to https://drive.google.com/file/d/1GftXj1wRVfeXw1TXiMxFTLpWIenMEfcP/view?usp=sharing
miaomiaogao / stepmotor_inf Goto Github PK
View Code? Open in Web Editor NEWAn interface based on STM32 to control step motor
An interface based on STM32 to control step motor
Create a entry frame to include:
Requirement: select a STM32 microcontroller with 7MHZ running frequency, 4KB RAM, 32KB flash.
Modification: select STM32L071CBTx based on my hardware board(8M HSE, 20KB RAM, 128KB flash), configure the running frequency to 6MHZ, and only use 4KB RAM, 32KB flash.
ports:
Add AES encryption in python GUI transmitter.
Add decryption in microcontroller to decrypt the message.
Debug the system with encrypted communication.
There are 3 paramters can be defined by user:
Send command with python GUI
Receive command with STM32 microcontroller
Control step motor with 3 pins
Monitor 3 pins with logic analyzer
Configure the project with compiler gcc and debug tool openocd.
Debug simulator is STLINK2.
Create sourcecode structure:
root(src + target + script)
src(app + common)
app(app_main.h/c etc)
target(stepmotor)
The motor is 18 degrees per step (20 steps per revolution)
Constraints: The stepper motor cannot do more than 600 RPM
600 RPM -> 10 RPS -> at least 100ms for one revolution -> 5ms one step
As uTick of this microcontroller is 10 milliseconds, which is slower than the requirement, a timer is needed here
Assume PRM_NUM is defined by user, this number is between 1 to 600 (1 <= PRM_NUM <= 600)
Calculation:
one step period (ms) = (60 * 1000ms) / (PRM_NUM * 20) = 3000/PRM_NUM
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.