Skip to content
Rene Hopf edited this page Oct 6, 2015 · 12 revisions

####Does it work with DC Servos? Yes, but a UHU servo is probably the better choice. DC servos usually operate at a much lower voltage, and the IGBT module we use is not very efficient at low voltages. ####Does it work with Stepper motors? No. ####Why do you use 2 CPUs? The driver is designed to run of rectified mains, without a transformer. Therefore the high voltage side has to be fully isolated. Here we need to supply about 8 digital I/Os, and measure many analog values. The cheapest way of doing this is to use a second CPU, and only isolate a UART. The communication is running at 5Mbit, but 10Mbit is possible. ####Does it work with +-10V? No. ####What's up with the .comp files? We implemented a system similar to linuxcnc HAL: http://linuxcnc.org/docs/html/hal/intro.html#_hal_concepts The functionality is spread over multiple modules (.comp files in src/comps/), they communicate over pins (shared floats) All pins can be linked arbitrarily at runtime. comps are calculated in realtime at 5KHz or in the main loop, defined by the function name in the comp, RT for realtime, NRT for non-realtime. the order of including (https://github.com/rene-dev/stmbl/blob/master/src/main.c#L123-L159) defines the order of calculation. the basic linking and parameter setting is done in link_pid() and set_MOTOR_XYZ() in the src/link.c the main signal flow is: read inputs, error/state handling(adc.comp, enc.comp, res.comp, fault.comp); reverse, feedback offset and speed calculation(rev.comp, cauto.comp, pderiv.comp); pid loop(pid.comp); current pid and motor model(curpid.comp, pmsm.comp); inverse park, output(idq.comp, pwm2uart.comp) low speed IO and terminal is done in non-realtime (term.comp, led.comp, fan.comp, brake.comp) the current layout (motsim branch, a bit different from master): http://crinq.de/stmbl/test.pdf

Clone this wiki locally