Giter Site home page Giter Site logo

rene-dev / stmbl Goto Github PK

View Code? Open in Web Editor NEW
819.0 162.0 402.0 41.68 MB

AC Servo Driver for STM32F4

License: GNU General Public License v3.0

Shell 0.01% C++ 0.01% AGS Script 0.13% C 96.19% Makefile 0.21% Assembly 0.73% HTML 1.71% VHDL 0.13% OpenSCAD 0.70% Python 0.20%
motor machinery cnc servo-driver servodrive servo-motor cnc-machine

stmbl's Introduction

Build Status Join the chat at https://gitter.im/rene-dev/stmbl

Build Log: https://travis-ci.org/rene-dev/stmbl

DISCLAIMER

THE AUTHORS OF THIS SOFTWARE ACCEPT ABSOLUTELY NO LIABILITY FOR ANY HARM OR LOSS RESULTING FROM ITS USE. IT IS EXTREMELY UNWISE TO RELY ON SOFTWARE ALONE FOR SAFETY. Any machinery capable of harming persons must have provisions for completely removing power from all motors, etc, before persons enter any danger area. All machinery must be designed to comply with local and national safety codes, and the authors of this software can not, and do not, take any responsibility for such compliance.

This software is released under the GPLv3.

STMBL

There is work in progress on documentation: https://github.com/rene-dev/stmbl/blob/master/docs/src/Getting%20Started.adoc

IRC: #stmbl on irc.hackint.eu https://webirc.hackint.org/#stmbl

STMBL is an open source servo drive designed for Retrofitting CNC machines and Robots. It supports Industrial AC and DC servos with up to 320V and 2kW (see specs for details).

Documentation about the PCB and pinout of the feedback connector:

https://github.com/rene-dev/stmbl/wiki/Pinouts

https://github.com/rene-dev/stmbl/wiki/PCB

Hardware version 4.1

top bot case1 case2

Driving a Bosch Turboscara

https://www.youtube.com/watch?v=d6NH1W7DUnQ
https://www.youtube.com/watch?v=oTllxnYAgFc

Driving a Manutec Robot

https://www.youtube.com/watch?v=gwgnAeGjZrA
https://www.youtube.com/watch?v=wXLcAZwjlzE

Driving a Weeke BP12 VMC

https://www.youtube.com/watch?v=24LftGNp4MI

Driving a Haas VF0 (Spindle + Axes)

https://www.youtube.com/watch?v=kqenepupJIs

Drivetest

https://www.youtube.com/watch?v=-E1o_5cFyto

Supported Motors

  • Synchronous AC Servos
  • Asynchronous AC Servos
  • DC Servos
  • 2 Phase HF spindle motors

Supported Feedback systems

  • Resolvers
  • Incremental encoders
  • sin/cos encoder interpolation
  • Mitsubishi absolute encoders
  • Sanyo Denki absolute encoders
  • Yaskawa absolute encoders
  • Sick HIPERFACE®
  • Tamagawa SmartAbs
Planned:
  • EnDat
  • BiSS
  • SSI
  • Sanyo Denki wire-saving incremental encoder

Supported Position/Velocity Commands Inputs:

  • Smartserial
  • Quadrature
  • Step/direction
  • RS485

TODO

  • Sensorless FOC

Directories

  • hw/spice/ Spice simulation for resolver interface
  • hw/kicad/v4.0/ kicad files for version 4
  • src/ STM32F4 code, command, feedback and control loop
  • stm32f303/ STM32F3 code, running on the HV side, generating PWM
Commercial Applications

Should you find the GPL license insufficient for your needs, other licenses can be purchased from my company.

Likewise, please contact us should you wish to fund the further development of this project, or are interesed in custom hardware, software, or commercial support.

stmbl's People

Contributors

andypugh avatar c-morley avatar crinq avatar fdarling avatar gitter-badger avatar jcdammeyer avatar netzpfuscher avatar pl4nkton avatar rene-dev avatar saeugetier avatar sync- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stmbl's Issues

Value of IC1 in res.sch

Hi Rene
I want to build the res.sch board but I cannot find any reference to what IC1 is.

hal rework

  • rtos for nrt
  • more rt threads
    • merge rt and frt
    • more rt funcs / comp
    • rt_prio 2.0
  • - volatile?
  • hal_parse 2.0
    • expr parser (pin * const, const + const, ...)
    • CMD return as const
    • units
  • more stats
  • restart hal
  • clear hal
  • hw abstraction at load time #58
  • relink pin (b = a, c = b, relink c => b = a, c = a)
  • hal instance index < 0, vel[-1].en => vel[#vel - 1].en
  • hw abstraction lib

step/dir support

  • test implementation
  • add to include, check links
  • merge with encoder comp

WHERE BUY A FULL STMBL

 HELLOW FRENDS , IM FROM BRAZIL , AND I WANT BUY A FULL STMBL , WHERE I CAN BUY AND SEND MI TO BRAZIL ?

Is PCB still available?

Hi rene! I'd like to know if there is still some PCB available? Sorry for posting this as an issue, I can't find your email address on github. And btw, my email is [email protected], Thanks very much!

XRay1111

redo kicad lib

  • rounded pads
  • include 3d files
  • fix orientation and scale
  • fix pdf export
  • fix pad 0
  • fix generator script

Power-up current control

When a rectified high voltage DC is applied to the STMBL in his actual topology, a very large inrush current will result to charge the on-board big capacitor, this may damage the rectifier diodes and/or PCB tracks ( and power connectors sometimes). An inrush current control circuit is highly recommended on STMBL board ( if it's not yet implemented on the rectifier side ), this can be a simple resistor which will be bypassed by a relay switch when the capacitor voltage reaches two-thirds of DC bus voltage.

stmbl

the PCB' avaiable now?

hi, i want to build one cnc machine for router woodworking, last time i using stepper to driven, so sometime lost step, this is not good, and also i check the price at ebay, but very expensive, therefore, i want to build that one. Could you pls help me to provide PCB's , driver BOB, plan etc..
Tell me by my email [email protected] about price and your supported when i start my project, Thanks so much for your undstanding with my English

stmbl with Keil µvision v5 IDE

hi,
I am trying to compile the whole project using Keil µvision v5 but I have a little errors that I am not able to resolve, the compiler reports 28 error messages like this:

"src\comps/brake.comp(18): error: #29: expected an expression" .

when clicking on the message, the line containing "INIT(" , "NRT(" and "RT(" lines are highlighted in all .comp files.

The f103 project compile with no error ( after activating --C99 option for compiler and adding USE_STDPERIPH_DRIVER macro ).

Any one have an idea how to resolve this ?
thanks.

How to deal with different encoder type with the same protocol?

I made a custom hardware based on the stmbl V4, and I managed it to work with Yaskawa servomotor. As my servomotor use 13bit incremental encoder instead of 16bits absolute encoder, the received frame data from this encoder is different, and contain more interesting data field like the Hal sensors state, compensation data and status bit that indicate if this last field is valid or no.

position 7: one bit indicate if Z index has been observed at least once since powering up the encoder, this is used to indicate if the compensation data is valid, ( 1: data not valid, 0: data is valid ) the absolute shaft angle can be calculated by subtract the compensation data from the incremental position data counter.

Position 58, 59 and 60 are the Hal sensors state ( U, V, and W ), can take six value (2, 3,1, 5, 4 and 6 ) this sequence repeat 3 times per revolution ( All Sigma II SGMAH series are 3 pole-pairs motors ) this signal can be used to do initial phasing without enabling auto-phasing feature .

Position 67: 13 bits of incremental position data.

position 81: 11 bits of compensation data ( need to be 2bits left shifted if used as absolute offset from Z index)

My question is how to deal with this kind of situation, 16bits absolute, 17bits incremental, 13bit incremental or absolute, 20bit and higher for Sigma III and Sigma V.. and the same situation with Mitsubishi encoders.

Is it doable to make each encoder type in separate .COMP file and rename it some thing like:

"Yaskawa_13b_inc.comp", "Mitsubishi_17b_abs.comp"...

or may be use only one .comps file that can handle all types but in this case each protocol must have sub-non-volatile parameter to indicate how to decode data frame.

Here a .comp file that handle Yaskawa Sigma II 13bits incremental encoder ( SGMAH series ) using FB0_45 ( some optimization still to be done ) and the config file for SGMAH-04-AAA .

yaskawa_13b_inc_FB0_45.txt
Yaskawa_SGMAH-04AAA.txt

servoterm 3.0

  • draw on refresh
  • ringbuf
  • trigger
  • gain
  • scrolling
  • higher res
  • auto timescale
  • wizzards
    • conf
    • setup
      • motor conf calc
    • fw update
    • help
    • hal graph

pcb version

In hw subdirectory is comment v 3.4 but it contain v3.3 files only

restructure git for better multi platform support

FW repo structure:

  • lib
    • cmsis
    • ...
  • shared
    • conf
    • comps
    • hal
    • stmbltalk
    • cpus
      • Makefile
      • main
  • platforms
    • major versions
      • Makefile
      • cpus
        • pinout/periph/hw mapping
        • conf
        • comps
        • Makefile source list
        • hw_setup.c
  • tools
    • python foo
    • base.mak
  • doc
    • stuff generated from code
    • ...

HW repo structure:

  • shared
    • stmbl kicad lib
  • plattforms
    • major versions
      • kicad
      • ltspice
      • hw stuff
      • doc

Move to https://github.com/stmbl/

File issues

I'm pretty new to github, and even to this project.
I'm not really understand where I can have the current(V4.1?) board files, to be able to make them.
I click trough every single folder in the project I think, but found only 3.4 or older, and some kicad files with 4.0 tags, but kicad unable to open them in my pc.
I'm really confused about it. Or the project lost its contributors?

autofoo

  • measure r
  • measure l
  • measure psi
  • measure j
  • measure polecount
  • measure fb_res
  • measure fb_rev
  • measure sin/cos gain/offset/phase
  • measure bandwidth
  • min motion autophase

update doc

  • delete old stuff
  • reorganize pages
  • write documentation

Can't open Kicad files with current version of KiCad

I tried to open the pcbnew file of the STMBL V4.0 with KiCad Version 4.0.2 and 4.0.6 (latest version). The file could not be parsed. The error is:

PARSE_ERROR: Expecting 'clearance, trace_width, via_dia, via_drill, uvia_dia, uvia_drill, or add_net' in input/source
'..../source/stmbl/hw/kicad/v4.0/stmbl_4.0.kicad_pcb'
line 336
offset 6
from /build/kicad-BIvGIy/kicad-4.0.2+dfsg1/common/dsnlexer.cpp : Expecting() : line 369

It seems that there are unexpected properties in the file.

  (diff_pair_gap 0.25)
    (diff_pair_width 0.2)

Which version are you using?

documentation of torque constant - different units used.

On this page:
https://github.com/rene-dev/stmbl/wiki/motor-parameters
mentions torque constant (conf0.psi) in v*s/rad units

This page:
https://github.com/rene-dev/stmbl/blob/master/docs/src/Getting%20Started.adoc
under motor parameters mentions torque constant (conf0.psi) in Nm/a units

  1. I believe conf0.psi units is Ke with units of volts/rad/second which seems to be voltage constant.
    This can be rms voltage or peak? voltage - does the stmbl use peak voltage?

  2. The description to use stml to do a PSI test doesn't seem to work - after pasting code servoterm complains = no psi0.max_psi

usb on HV board

Would it make sense to alter the orientation of the usb socket on the HV board to point to the side rather than the fan end - not a issue as such but perhaps a tweak in the next release of the board

port to libopencm3

Stuff working with libopencm3. Work in Progress in cm3 branch.

  • CRC unit
  • Bootloader
  • Sysinfo
  • Save to Flash
  • USB
  • Term
  • hv code
  • hv comp
  • FB comps
  • CMD comps
  • get systick to work
  • bootloader not working, use make flash target
  • adc not working, but dma tc interrupt is called

Does not build with most recent gcc-arm-none-eabi 4.9.3 x64

Tested with ubuntu wily x64, a standard apt-get gcc-arm-none-eabi yields version 4.9.3.

/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: error: hv_firmware.o: Conflicting CPU architectures 13/0
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file hv_firmware.o
collect2: error: ld returned 1 exit status
Makefile:72: recipe for target 'main.elf' failed
make: *** [main.elf] Error 1

FYI: Makefile from https://github.com/synthetos/g2 downloads an older gcc-arm-none-eabi in 32bit, hard linking to it for compilation, then libz32 is needed on x64 systems.

Issue with kicad

The version 4.0.6 of kicad (last one) can't open files which you gave in kicad folder. The error said that we need a recent version of kicad compatible with the version 2016 but we have the last version possible. Can you post the BOM and the gerber files to produce some boards for version 4.0 ?
This is my mail for contact: [email protected]

Thank you.

U$2 ic name?

i have a question, what is U$2 ic name?
thanks you

Capacitor voltage rating

I apologize if I have overlooked something.

Reading through the BOM, I cannot find voltage specifications for capacitors. This is not labeled on the schematic either from what I can tell (in KiCAD).

Are the majority of the capacitors a set voltage? If so, what voltage specification should I work toward?

Thank you for the development of this amazing project. I look forward to implementing this in many applications.

math foo

  • multi mass system
  • resonance suppression
  • load + j observer
  • rms error sat
  • sensorless foc
  • async motor model
  • max_ac_cur -> cont_ac_current + max_overload + time_constant
  • max_dc_cur, min_dc_cur adaptive limit (dc volt limit, power / regen limit)
  • high_dc_volt -> only limit brake current
  • max_power
  • curpid sat
  • curpid complex limit ud uq
  • curpid integrator period
  • curpid predictor
  • fix curpid max_cur clamp for volt mode
  • dq axis decoupling
  • fix stp
  • multi axis lookahead planner
  • stp 2.0
  • plc + motion + io + magic comp
  • velbuf for cmd
  • observer bandwidth (critically damped)
  • afc (bemf ripple, torque ripple, r, l, j, load, mag enc)
  • e-stop comp
  • disable pos error for autophase
  • adc sat error

stmbl with Keil µvision v5 IDE

hi,
I am trying to compile the whole project using Keil µvision v5 but I have a little errors that I am not able to resolve.

compiling main.c...
..\src\comps/adc.comp(29): error: #65: expected a ";"
RT(
..\src\main.c: 0 warnings, 1 error

Error from makefile

Hi
I pulled the latest release and when I did the make this error came up.

[ 33%] Building CXX object CMakeFiles/Servoterm.dir/main.cpp.o
cc1plus: error: unrecognized command line option "-std=c++11"
make[2]: *** [CMakeFiles/Servoterm.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Servoterm.dir/all] Error 2
make: *** [all] Error 2

hw test fw

  • save calib data + HW version in bootloader

STMBL is

Does stmbl support sensorless control?

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.