Coder Social home page Coder Social logo

andrewytf / bldc-drive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pekkaroi/bldc-drive

0.0 1.0 0.0 925 KB

Cheap and simple brushless DC motor driver designed for CNC applications using STM32 microcontroller

License: GNU General Public License v2.0

C++ 0.11% C 67.79% Python 0.27% KiCad Layout 31.83%

bldc-drive's Introduction

bldc-drive

This is a project developing a simple BLDC servo controller. It is based on an STM32F103 microcontroller.

Some parts, especially the PID control loop is based on development done by user mcm_xyz in cnczone.com forum. Thank you! Check the thread http://www.cnczone.com/forums/open-source-controller-boards/283428-cnc.html

Disclaimer

This software and hardware is provided "AS IS", WITHOUT ANY WARRANTY. The software is released under GPL v2. Authors accept no liability for any harm or loss resulting from use of this hardware or software.

Authors & Contributors

Firmware

Firmware is a work-in-progress (and will be for a while :), however following features are included:

  • Trapezoidal BLDC commutation using either HALL sensors or quadrature encoder.
  • Step+Dir input interface with PID position control loop.
  • PWM+Dir input interface in velocity mode.
  • USART communitacation for configuration. Configuration settings saved to flash memory.
  • TODO: Motor Test Mode to simply activate a Motor with a fixed frequency, no encoder needed

Update 1st May 2016

Some updates to the firmware.

  • ADC current limiting implemented. Appears to work OK
  • I created a quick and ugly Python gui for tuning
  • Updated the PID loop to have feedfoward coefficients FF1 and FF2 (like LinuxCNC). This means that the PID output can be adjusted by the requested speed and the requested acceleration. This made the PID tuning a lot easier for me at least, I'm able to get a motor to follow the requested position very well also during acceleration and during constant drive.

Hardware:

First prototype hardware is built and it is working well. However, there are couple of known issues:

  • 6n137 optocoupler is not officially supporting 3.3V supply voltage which is used in the board. In reality they seem to work, but the optocoupler should be changed or additional levelshifting circuitry added on next revision. Also, the optocoupler input circuit supports only push-pull-type encoder output. Many encoders seem to have open drain output. :(
  • Few connectors in the layout missed solder stop openings. They were bit painfull to solder. :)
  • The current amplifier INA27x connection is wrong. The IN+ and IN- should be swapped.

STATUS QUO:

Second hardware revision with the above findings fixed is published. There are no known issues, two servo drives are succesfully driving my CNC router. Pics and videos to come..

HARDWARE TODOs:

  • verify all part-values into the schematic

bldc-drive's People

Contributors

pekkaroi avatar

Watchers

 avatar

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.