GithubHelp home page GithubHelp logo

berkays / stm32vfd Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 637 KB

Variable frequency SVPWM Driver for STM32 MCUs.

License: MIT License

C 99.24% Python 0.10% Assembly 0.40% Shell 0.02% C++ 0.24%
stm32 svpwm variable-frequency-drive vfd

stm32vfd's Introduction

Summary

Variable frequency SVPWM driver(VFD) prototype for STM32 MCUs. Default values and drivers are designed to run on a blue pill module with STM32F103C8T6. Since the project uses CubeMx HAL drivers, It can easily be ported to other STM32 microprocessors. Default lookup tables are constructed using 0x7FFFh(32.767) as peak value and k=0.15 for third harmonic coefficent.

Value Default Value Description
TIM1 Clock 72Mhz
TIM2 Clock 72Mhz
Prescaler 2 - 1 Used for TIM1 and TIM2
TIM1 Period 32767 Lookup tables need to be adjusted accordingly.
PWM frequency needs to be tweaked for your driver circuit.
PWM Frequency ~1KHz 72MHz / (2 * 32767)
TIM2 Period N/A Dynamically adjusted using potentiometer.
LUT_STEP 1 Defines how much the pointer will step in single interrupt.
Higher LUT step will result in higher frequencies without touching TIM2 period.
Depending on the value, it can skip some values entirely wasting flash space.

Peripherals

  • Timer1 with complementary pwm outputs and deadtime support.
  • Timer2 Simple timer for sinewave lookup table stepping.
  • ADC Reading frequency input from a potentiometer

CubeMx Script

CubeMx generated folder structure can automatically be imported using the import.sh script.

Generated folder root path must be provided as an argument:

./scripts/import.sh ~/CubeMxWorkSpace/VFD

stm32vfd's People

Contributors

berkays avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

linzhong1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.