Difference between revisions of "STMBL v4 Servo Drives"
(initial page creation) |
(added more SmartSerial idle voltages information) |
||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
− | Open source servo drives made by Rene Hopf. | + | Open source servo drives made by Rene Hopf. The name STMBL comes from "STM32" and "BrushLess". |
== Software == | == Software == | ||
Line 24: | Line 24: | ||
| style="background: repeating-linear-gradient(45deg, #ff8000, #ff8000 10px, #ffffff 10px, #ffffff 20px);" | orange-stripe | | style="background: repeating-linear-gradient(45deg, #ff8000, #ff8000 10px, #ffffff 10px, #ffffff 20px);" | orange-stripe | ||
| STEP+ | | STEP+ | ||
− | | RX | + | | RX- |
|- | |- | ||
| 2 | | 2 | ||
| style="background-color: #ff8000" | orange | | style="background-color: #ff8000" | orange | ||
| STEP- | | STEP- | ||
− | | RX | + | | RX+ |
|- | |- | ||
| 3 | | 3 | ||
| style="background: repeating-linear-gradient(45deg, #00ff80, #00ff80 10px, #ffffff 10px, #ffffff 20px);" | green-stripe | | style="background: repeating-linear-gradient(45deg, #00ff80, #00ff80 10px, #ffffff 10px, #ffffff 20px);" | green-stripe | ||
| DIR+ | | DIR+ | ||
− | | | + | | TX- |
|- | |- | ||
| 4 | | 4 | ||
| style="background-color: #0080ff" | blue | | style="background-color: #0080ff" | blue | ||
| FAULT- | | FAULT- | ||
− | | | + | | GND |
|- | |- | ||
| 5 | | 5 | ||
| style="background: repeating-linear-gradient(45deg, #0080ff, #0080ff 10px, #ffffff 10px, #ffffff 20px);" | blue-stripe | | style="background: repeating-linear-gradient(45deg, #0080ff, #0080ff 10px, #ffffff 10px, #ffffff 20px);" | blue-stripe | ||
| FAULT+ | | FAULT+ | ||
− | | | + | | GND |
|- | |- | ||
| 6 | | 6 | ||
| style="background-color: #00ff80" | green | | style="background-color: #00ff80" | green | ||
| DIR- | | DIR- | ||
− | | | + | | TX+ |
|- | |- | ||
| 7 | | 7 | ||
| style="background: repeating-linear-gradient(45deg, #8b4513, #8b4513 10px, #ffffff 10px, #ffffff 20px);" | brown-stripe | | style="background: repeating-linear-gradient(45deg, #8b4513, #8b4513 10px, #ffffff 10px, #ffffff 20px);" | brown-stripe | ||
− | | | + | | EN+ |
| VCC | | VCC | ||
|- | |- | ||
| 8 | | 8 | ||
| style="background-color: #8b4513" | brown | | style="background-color: #8b4513" | brown | ||
− | | | + | | EN- |
− | | | + | | VCC |
|} | |} | ||
− | NOTE: | + | NOTE: the STMBL drives do not actually use the VCC/GND connections, they just end up driving differential transceivers (with non-differential signals). The STMBL expects to have a common logic ground with the Mesa card. |
Mesa Smart Serial RJ45 Pinout: | Mesa Smart Serial RJ45 Pinout: | ||
Line 68: | Line 68: | ||
{| class="wikitable" | {| class="wikitable" | ||
! RJ45 Pin | ! RJ45 Pin | ||
+ | ! RJ45 Color | ||
! Function | ! Function | ||
! Direction | ! Direction | ||
+ | ! Notes | ||
|- | |- | ||
| 1 | | 1 | ||
+ | | style="background: repeating-linear-gradient(45deg, #ff8000, #ff8000 10px, #ffffff 10px, #ffffff 20px);" | orange-stripe | ||
| TX- | | TX- | ||
| Mesa → STMBL | | Mesa → STMBL | ||
+ | | idle = high | ||
|- | |- | ||
| 2 | | 2 | ||
+ | | style="background-color: #ff8000" | orange | ||
| TX+ | | TX+ | ||
| Mesa → STMBL | | Mesa → STMBL | ||
+ | | idle = low | ||
|- | |- | ||
| 3 | | 3 | ||
+ | | style="background: repeating-linear-gradient(45deg, #00ff80, #00ff80 10px, #ffffff 10px, #ffffff 20px);" | green-stripe | ||
| RX- | | RX- | ||
| Mesa ← STMBL | | Mesa ← STMBL | ||
+ | | idle = high | ||
|- | |- | ||
| 4 | | 4 | ||
+ | | style="background-color: #0080ff" | blue | ||
| GND | | GND | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 5 | | 5 | ||
+ | | style="background: repeating-linear-gradient(45deg, #0080ff, #0080ff 10px, #ffffff 10px, #ffffff 20px);" | blue-stripe | ||
| GND | | GND | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 6 | | 6 | ||
+ | | style="background-color: #00ff80" | green | ||
| RX+ | | RX+ | ||
| Mesa ← STMBL | | Mesa ← STMBL | ||
+ | | idle = low | ||
|- | |- | ||
| 7 | | 7 | ||
+ | | style="background: repeating-linear-gradient(45deg, #8b4513, #8b4513 10px, #ffffff 10px, #ffffff 20px);" | brown-stripe | ||
| +5V | | +5V | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 8 | | 8 | ||
+ | | style="background-color: #8b4513" | brown | ||
| +5V | | +5V | ||
| Mesa → STMBL | | Mesa → STMBL | ||
Line 107: | Line 121: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | ! Pin | + | ! TB Pin |
+ | ! RJ45 Color | ||
! Function | ! Function | ||
! Direction | ! Direction | ||
|- | |- | ||
| 1 | | 1 | ||
+ | | style="background-color: #0080ff" | blue | ||
| GND | | GND | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 2 | | 2 | ||
+ | | style="background: repeating-linear-gradient(45deg, #0080ff, #0080ff 10px, #ffffff 10px, #ffffff 20px);" | blue-stripe | ||
| GND | | GND | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 3 | | 3 | ||
+ | | style="background-color: #00ff80" | green | ||
| RX+ | | RX+ | ||
| Mesa ← STMBL | | Mesa ← STMBL | ||
|- | |- | ||
| 4 | | 4 | ||
+ | | style="background: repeating-linear-gradient(45deg, #00ff80, #00ff80 10px, #ffffff 10px, #ffffff 20px);" | green-stripe | ||
| RX- | | RX- | ||
| Mesa ← STMBL | | Mesa ← STMBL | ||
|- | |- | ||
| 5 | | 5 | ||
+ | | style="background-color: #ff8000" | orange | ||
| TX+ | | TX+ | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 6 | | 6 | ||
+ | | style="background: repeating-linear-gradient(45deg, #ff8000, #ff8000 10px, #ffffff 10px, #ffffff 20px);" | orange-stripe | ||
| TX- | | TX- | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 7 | | 7 | ||
+ | | style="background: repeating-linear-gradient(45deg, #8b4513, #8b4513 10px, #ffffff 10px, #ffffff 20px);" | brown-stripe | ||
| +5V | | +5V | ||
| Mesa → STMBL | | Mesa → STMBL | ||
|- | |- | ||
| 8 | | 8 | ||
+ | | style="background-color: #8b4513" | brown | ||
| +5V | | +5V | ||
| Mesa → STMBL | | Mesa → STMBL | ||
Line 282: | Line 305: | ||
| GND | | GND | ||
|} | |} | ||
+ | |||
+ | === Motor Output Power === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Pin | ||
+ | ! 3-phase | ||
+ | ! 2-phase | ||
+ | ! DC | ||
+ | |- | ||
+ | | 1 | ||
+ | | U | ||
+ | | A+ | ||
+ | | + | ||
+ | |- | ||
+ | | 2 | ||
+ | | V | ||
+ | | A-/B- | ||
+ | | | ||
+ | |- | ||
+ | | 3 | ||
+ | | W | ||
+ | | B+ | ||
+ | | - | ||
+ | |} | ||
+ | |||
+ | NOTE: the pins are numbered left-to-right when the STMBL is oriented with the USB port on the top. | ||
+ | |||
+ | NOTE: no motor ground is provided on the pluggable connector, instead a ring terminal must be run separately to a ground lug. | ||
+ | |||
+ | TODO: provide timing diagrams to show relative phase lead | ||
+ | |||
+ | == Sample Configurations == | ||
+ | |||
+ | === Measure Resistance/Inductance === | ||
+ | |||
+ | Configuration: | ||
+ | |||
+ | <pre>link rl</pre> | ||
+ | |||
+ | Manually run: | ||
+ | |||
+ | <pre>rl0.en = 1</pre> | ||
+ | |||
+ | After it finishes (the graph will settle down and the noises will stop), the measured resistance and inductance can be printed by printing the state of the following pins using the console: | ||
+ | |||
+ | <pre>rl0.r | ||
+ | rl0.ld</pre> | ||
+ | |||
+ | === Commutation Test === | ||
+ | |||
+ | Configuration: | ||
+ | |||
+ | <pre>link pid | ||
+ | link pmsm | ||
+ | # whichever type of feedback is being used | ||
+ | link enc_fb0 | ||
+ | link misc | ||
+ | |||
+ | # motor winding characteristics | ||
+ | conf0.r = 3.256717 | ||
+ | conf0.l = 0.025102 | ||
+ | # motor current/torque rating | ||
+ | conf0.max_force = 14.8 | ||
+ | conf0.max_ac_cur = 5 | ||
+ | # inertia, which is dependent on the mass (technically moment of inertia) being spun | ||
+ | conf0.j = 0.00005 | ||
+ | # how many electrical "revolutions" per mechanical revolution | ||
+ | conf0.polecount = 1 | ||
+ | |||
+ | # for basic quadrature encoders | ||
+ | conf0.mot_fb_res = 5000 | ||
+ | # if index isn't available, disable looking for it | ||
+ | #enc_fb0.en_index = 0 | ||
+ | |||
+ | # correct the feedback polarity/offset | ||
+ | conf0.mot_fb_rev = 0 | ||
+ | conf0.mot_fb_offset = 0.0 | ||
+ | |||
+ | # correct the (open loop) output direction (clockwise/counter-clockwise) | ||
+ | conf0.out_rev = 0</pre> | ||
+ | |||
+ | Run manually: | ||
+ | |||
+ | <pre>link com_test</pre> | ||
+ | |||
+ | If the motor is turning in a very choppy manner, then the test current might be too low. Change <code>hv0.d_cmd</code> from the default value of 1.0 to something higher: | ||
+ | |||
+ | <pre>hv0.d_cmd = 2.0</pre> | ||
+ | |||
+ | If absolute angle is available (index pulse enabled and seen, or if using an absolute encoder), then you can keep correcting the feedback offset (the units are radians): | ||
+ | |||
+ | <pre>conf0.mot_fb_offset = 0.2</pre> | ||
+ | |||
+ | You may need to zoom in to do fine adjustments. This is done by decreasing the period (increasing the frequency) of <code>term0.send_step</code>: | ||
+ | |||
+ | <pre>term0.send_step = 20</pre> | ||
+ | |||
+ | === Jog Test === | ||
+ | |||
+ | <pre>link pid | ||
+ | link pmsm | ||
+ | # whichever type of feedback is being used | ||
+ | link enc_fb0 | ||
+ | link misc | ||
+ | # this is the important part | ||
+ | link jog_cmd | ||
+ | |||
+ | # ... | ||
+ | # (same configuration used after tuning with com_test) | ||
+ | # ... | ||
+ | |||
+ | # configure the max speed and acceleration | ||
+ | stp0.max_vel = 20 | ||
+ | stp0.max_acc = 1000 | ||
+ | # allow turning further in the same direction | ||
+ | stp0.min_pos = -1000 | ||
+ | stp0.max_pos = 1000</pre> | ||
+ | |||
+ | You may have to play with the <code>conf0.j</code> parameter, be careful as having it too high can easily cause oscillations. Be ready to disable the motor! | ||
+ | |||
+ | <pre>conf0.j = 0.0001</pre> | ||
+ | |||
+ | You can also increase the motor's top speed: | ||
+ | |||
+ | <pre>stp0.max_vel = 200</pre> | ||
+ | |||
+ | And later see how much the acceleration can be pushed: | ||
+ | |||
+ | <pre>stp0.max_acc = 40000</pre> | ||
== Replacement Parts == | == Replacement Parts == | ||
Line 308: | Line 460: | ||
| [https://www.digikey.com/en/products/detail/phoenix-contact/1911978/2511306 277-11013-ND] | | [https://www.digikey.com/en/products/detail/phoenix-contact/1911978/2511306 277-11013-ND] | ||
|} | |} | ||
+ | |||
+ | Alternate replacement connector information: | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Name | ||
+ | ! Connector | ||
+ | ! PCB Header | ||
+ | |- | ||
+ | | Motor DC Power Input | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1757019/260379 Phoenix Contact 1757019] (12A)<br/>[https://www.digikey.com/en/products/detail/phoenix-contact/1911965/2511300 Phoenix Contact 1911965] (16A)<br/>[https://www.digikey.com/en/products/detail/amphenol-anytek/TJ0251530000G/2509138 Amphenol Anytek TJ0251530000G] (12A)<br/>[https://www.digikey.com/en/products/detail/w%C3%BCrth-elektronik/691351500002/2060536 Würth Elektronik 691351500002] (12A) | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1757242/260474 Phoenix Contact 1757242] (12A)<br/>[https://www.digikey.com/en/products/detail/phoenix-contact/1923869/2511394 Phoenix Contact 1923869] (16A) | ||
+ | |- | ||
+ | | Motor DC Power Output | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1757022/260380 Phoenix Contact 1757022] (12A)<br/>[https://www.digikey.com/en/products/detail/phoenix-contact/1911978/2511306 Phoenix Contact 1911978] (16A)<br/>[https://www.digikey.com/en/products/detail/amphenol-anytek/TJ0351530000G/2509183 Amphenol Anytek TJ0351530000G] (12A) | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1757255/260475 Phoenix Contact 1757255] (12A)<br/>[https://www.digikey.com/en/products/detail/phoenix-contact/1923872/2511395 Phoenix Contact 1923872] (16A) | ||
+ | |- | ||
+ | | Logic Power<br/>Alt. Cmd.<br/>Thermistor | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1840366/349178 Phoenix Contact 1840366]<br/>[https://www.digikey.com/en/products/detail/amphenol-anytek/TJ0211530000G/4241899 Amphenol Anytek TJ0211530000G] | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1844210/349195 Phoenix Contact 1844210] | ||
+ | |- | ||
+ | | Inputs<br/>Outputs | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1840405/349181 Phoenix Contact 1840405]<br/><del>[https://www.digikey.com/en/products/detail/E20611300000G/E20611300000G-ND/4919102 Amphenol Anytek E20611300000G]</del> (orange!) | ||
+ | | [https://www.digikey.com/en/products/detail/phoenix-contact/1844252/349198 Phoenix Contact 1844252] | ||
+ | |} | ||
+ | |||
+ | === Fan === | ||
+ | |||
+ | Sunon Fans ME45101V1-000U-A99 | ||
+ | |||
+ | * [https://www.digikey.com/en/products/detail/sunon-fans/ME45101V1-000U-A99/2815750 Sunon ME45101V1-000U-A99 | DigiKey] | ||
+ | * [https://www.mouser.com/ProductDetail/369-ME45101V1000UA99 Sunon ME45101V1-000U-A99 | Mouser] | ||
+ | * [https://www.sunonusa.com/product/dc-fan-45x45x10-7/ Sunon ME45101V1-000U-A99 | Sunon USA] | ||
+ | * [https://www.sunon.com/en/ProductFileDownload.aspx?oid=C899DDB1990F1B2A# ME45101V1-0000-A99 Product File Download] | ||
+ | * [https://www.sunon.com/en/PROSEARCH_FILES/(D04072500G-02)-0.pdf Sunon ME45101V1-0000-A99 Specification ("(D04072500G-02)-0.pdf", D04072500G-02, 12.01.2017)] | ||
+ | * [https://www.sunon.com/en/PROSEARCH_FILES/Doc-0045137-4-0.stp Sunon ME45101V1-0000-A99 STEP File ("Doc-0045137-4-0.stp", A201021110G-2, 2020-07-31, 109063)] | ||
+ | * [https://web.archive.org/web/20201224172438/http://portal.sunon.com.tw/pls/portal/sunonap.sunon_html_d_pkg.open_file?input_file_name=7264646F632F3230313430312F3137363536372F28443034303737343030472D3030292D332E706466 Sunon ME45101V1-000U-A99 Specification ("(D04077400G-00)-3.pdf", D04077400G-00, 11.01.2013)] (broken link from USA site via Wayback Machine) | ||
+ | * [http://portal.sunon.com.tw:7778/images/sunon/rddoc/201401/176567/(D04077400G-00)-3.pdf Sunon ME45101V1-000U-A99 Specification ("(D04077400G-00)-3.pdf", D04077400G-00, 11.01.2013)] (direct link to above file) | ||
+ | |||
+ | Fasteners used with fan: | ||
+ | |||
+ | * sheet metal case to fan snap rivet: [https://www.digikey.com/en/products/detail/essentra-components/SR-4060B/394741 Essentra Components SR-4060B | DigiKey] | ||
+ | |||
+ | === Heatsink === | ||
+ | |||
+ | STMBL originally used the Alutronic PR138/94-M3 heatsink: | ||
+ | |||
+ | * [https://www.reichelt.com/de/en/special-heat-sink-94x46x33mm-3-2k-w-m3-v-pr138-94-m3-p35400.html V PR138 - 94-M3: Special heat sink, 94x46x33mm, 3.2K - W, M3 at reichelt elektronik] | ||
+ | * [https://github.com/rene-dev/stmbl/blob/master/hw/kicad/v4.0/doc/heatsink.pdf stmbl/heatsink.pdf at master · rene-dev/stmbl] (shows drill/tap hole pattern for mounting HV board to heatsink) | ||
+ | |||
+ | A compatible replacement is a Fischer Elektronik SK 68 94 SA (M3 channels are shifted in by 0.2mm): | ||
+ | |||
+ | * [https://www.arrow.com/en/products/sk-68-94-sa/fischer-elektronik Fischer SK 68 94 SA | Arrow] | ||
+ | * [https://www.fischerelektronik.com/web_fischer/en_GB/heatsinks/A04/Extruded%20heatsinks%20for%20PCB%20mounting/VA/SK6894SA/index.xhtml Fischer SK 68 94 SA | Fischerelektronik] (PDF, DXF, IGES, and STEP files available) | ||
+ | * [https://www.fischerelektronik.com/web_fischer/en_GB/VA/SK6894SA/datasheet.xhtml?branch=heatsinks Fischer SK 68 94 SA Datasheet Page] | ||
+ | |||
+ | Fasteners used: | ||
+ | |||
+ | * DIN clip plate to heatsink: M3-0.5x6mm stainless steel narrow cheese head slotted screws | ||
+ | * HV board to heatsink: M3-0.5x16mm stainless steel pan head phillips screws | ||
+ | * HV board to heatsink: 2mm thick M3 black nylon washers (6mm OD) | ||
+ | * sheet metal case to heatsink: #4-24x1/4" stainless steel pan head phillips drive "Type AB" sheet metal screws (TODO: determine better fitting screw?) | ||
+ | |||
+ | Standoffs/spacers: | ||
+ | |||
+ | * 1pcs 8mm tall, 7mm OD, 3.6mm ID black nylon unthreaded standoffs (unmodified) | ||
+ | * 2pcs above standoff, modified to have a 2.5mm - 2.63mm tall flange, with the rest of the cylinder cut away to have a 2.6mm deep [https://en.wikipedia.org/wiki/Sagitta_(geometry) sagitta] | ||
+ | |||
+ | === DIN Clip === | ||
+ | |||
+ | The bottom of the heatsink has a DIN rail clip. The hole size/type isn't so important, as it will be riveted. Here are compatible ones: | ||
+ | |||
+ | [https://www.digikey.com/en/products/detail/weidm%C3%BCller/0687900000/412015 Weidmüller 0687900000 | DigiKey] | ||
+ | |||
+ | [https://www.digikey.com/en/products/detail/weidm%C3%BCller/687900000/15769374 Weidmüller 687900000 | DigiKey] | ||
+ | |||
+ | [https://www.digikey.com/en/products/detail/weidm%C3%BCller/0636900000/491772 Weidmüller 0636900000 | DigiKey] | ||
+ | |||
+ | [https://www.digikey.com/en/products/detail/weidm%C3%BCller/1724580000/491770 Weidmüller 1724580000 | DigiKey] (clearance hole) | ||
+ | |||
+ | [https://www.digikey.com/en/products/detail/weidm%C3%BCller/0636800000/413482 Weidmüller 0636800000 | DigiKey] (M5 threads) | ||
+ | |||
+ | [https://www.digikey.com/en/products/detail/altech-corporation/D35CLIP-M4/9456801 Altech D35CLIP-M4 | DigiKey] (M4 threads) | ||
+ | |||
+ | [https://www.digikey.com/en/products/detail/bud-industries/DNC-4796/3455740 Bud Industries DNC-4796 | DigiKey] (M4 threads) | ||
+ | |||
+ | By riveting the clip to the following laser cut aluminum adapter, it is kept from rotating, and can be mounted to the threaded channels on the bottom of the heatsink with four screws: | ||
+ | |||
+ | * <del>[https://gitcdn.link/repo/rene-dev/stmbl/master/hw/tools/clip.dxf clip.dxf] (download friendly link)</del> (server error?) | ||
+ | * [https://raw.githubusercontent.com/rene-dev/stmbl/master/hw/tools/clip.dxf clip.dxf] (wants to view in browser) | ||
+ | |||
+ | === Case === | ||
+ | |||
+ | 1mm thick aluminum | ||
+ | |||
+ | * [https://github.com/rene-dev/stmbl/blob/master/hw/tools/sheet_metal_case_io_08.dxf stmbl/sheet_metal_case_io_08.dxf at master · rene-dev/stmbl] | ||
+ | * <del>[https://gitcdn.link/repo/rene-dev/stmbl/master/hw/tools/sheet_metal_case_io_08.dxf sheet_metal_case_io_08.dxf] (download friendly link)</del> (server error?) | ||
+ | * [https://raw.githubusercontent.com/rene-dev/stmbl/master/hw/tools/sheet_metal_case_io_08.dxf sheet_metal_case_io_08.dxf] (wants to view in browser) | ||
== Online Resources == | == Online Resources == | ||
Line 318: | Line 567: | ||
https://github.com/rene-dev/stmbl/blob/master/docs/src/Getting%20Started.adoc | https://github.com/rene-dev/stmbl/blob/master/docs/src/Getting%20Started.adoc | ||
+ | |||
+ | https://github.com/rene-dev/stmbl/wiki/motor-parameters |
Latest revision as of 11:44, 28 August 2022
Overview
Open source servo drives made by Rene Hopf. The name STMBL comes from "STM32" and "BrushLess".
Software
The servo drive can be configured and debugged using it's Micro USB connector, which provides a USB CDC (UART/serial) interface. You can using any terminal emulator such as PuTTY, minicom, etc. However, to easily configure the non-volatile settings and plot real-time oscilloscope data, there is dedicated software:
https://github.com/STMBL/QtServoterm
Wiring
There are three RJ45 jacks, one intended for control signals going to the drive, and two for feedback from the servo. In most cases only the first of the two feedback ports will be used, but in some cases there are multiple types of feedback, such as an ABZ encoder along with UVW hall sensors.
Control
RJ45 Pin | RJ45 Color | Step/Dir | Mesa SS |
---|---|---|---|
1 | orange-stripe | STEP+ | RX- |
2 | orange | STEP- | RX+ |
3 | green-stripe | DIR+ | TX- |
4 | blue | FAULT- | GND |
5 | blue-stripe | FAULT+ | GND |
6 | green | DIR- | TX+ |
7 | brown-stripe | EN+ | VCC |
8 | brown | EN- | VCC |
NOTE: the STMBL drives do not actually use the VCC/GND connections, they just end up driving differential transceivers (with non-differential signals). The STMBL expects to have a common logic ground with the Mesa card.
Mesa Smart Serial RJ45 Pinout:
RJ45 Pin | RJ45 Color | Function | Direction | Notes |
---|---|---|---|---|
1 | orange-stripe | TX- | Mesa → STMBL | idle = high |
2 | orange | TX+ | Mesa → STMBL | idle = low |
3 | green-stripe | RX- | Mesa ← STMBL | idle = high |
4 | blue | GND | Mesa → STMBL | |
5 | blue-stripe | GND | Mesa → STMBL | |
6 | green | RX+ | Mesa ← STMBL | idle = low |
7 | brown-stripe | +5V | Mesa → STMBL | |
8 | brown | +5V | Mesa → STMBL |
Mesa Smart Serial Terminal Block Pinout:
TB Pin | RJ45 Color | Function | Direction |
---|---|---|---|
1 | blue | GND | Mesa → STMBL |
2 | blue-stripe | GND | Mesa → STMBL |
3 | green | RX+ | Mesa ← STMBL |
4 | green-stripe | RX- | Mesa ← STMBL |
5 | orange | TX+ | Mesa → STMBL |
6 | orange-stripe | TX- | Mesa → STMBL |
7 | brown-stripe | +5V | Mesa → STMBL |
8 | brown | +5V | Mesa → STMBL |
Feedback
RJ45 Pin | RJ45 Color | Resolver | 1Vpp | UVW | Quad. | RS-485 | RS-422 | UART | USART | UART HD | USART HD | SPI | SPI HD |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | orange-stripe | Sin+ | Sin+ | U+ | A+ | A | RX+ | RX+ | MISO+ | CS+ | |||
2 | orange | Sin- | Sin- | U- | A- | B | RX- | RX- | MISO- | CS- | |||
3 | green-stripe | Cos+ | Cos+ | V+ | B+ | CLK+ | CLK+ | CLK+ | CLK+ | ||||
4 | blue | Ref- | W- | Z- | B | Z | TX- | TX- | TX/RX- | TX/RX- | MOSI- | MOSI- | |
5 | blue-stripe | Ref+ | W+ | Z+ | A | Y | TX+ | TX+ | TX/RX+ | TX/RX+ | MOSI+ | MOSI+ | |
6 | green | Cos- | Cos- | V- | B- | CLK- | CLK- | CLK- | CLK- | ||||
7 | brown-stripe | AIN | VCC | VCC | VCC | VCC | VCC | VCC | VCC | VCC | VCC | VCC | VCC |
8 | brown | GND | GND | GND | GND | GND | GND | GND | GND | GND | GND | GND | GND |
Motor Output Power
Pin | 3-phase | 2-phase | DC |
---|---|---|---|
1 | U | A+ | + |
2 | V | A-/B- | |
3 | W | B+ | - |
NOTE: the pins are numbered left-to-right when the STMBL is oriented with the USB port on the top.
NOTE: no motor ground is provided on the pluggable connector, instead a ring terminal must be run separately to a ground lug.
TODO: provide timing diagrams to show relative phase lead
Sample Configurations
Measure Resistance/Inductance
Configuration:
link rl
Manually run:
rl0.en = 1
After it finishes (the graph will settle down and the noises will stop), the measured resistance and inductance can be printed by printing the state of the following pins using the console:
rl0.r rl0.ld
Commutation Test
Configuration:
link pid link pmsm # whichever type of feedback is being used link enc_fb0 link misc # motor winding characteristics conf0.r = 3.256717 conf0.l = 0.025102 # motor current/torque rating conf0.max_force = 14.8 conf0.max_ac_cur = 5 # inertia, which is dependent on the mass (technically moment of inertia) being spun conf0.j = 0.00005 # how many electrical "revolutions" per mechanical revolution conf0.polecount = 1 # for basic quadrature encoders conf0.mot_fb_res = 5000 # if index isn't available, disable looking for it #enc_fb0.en_index = 0 # correct the feedback polarity/offset conf0.mot_fb_rev = 0 conf0.mot_fb_offset = 0.0 # correct the (open loop) output direction (clockwise/counter-clockwise) conf0.out_rev = 0
Run manually:
link com_test
If the motor is turning in a very choppy manner, then the test current might be too low. Change hv0.d_cmd
from the default value of 1.0 to something higher:
hv0.d_cmd = 2.0
If absolute angle is available (index pulse enabled and seen, or if using an absolute encoder), then you can keep correcting the feedback offset (the units are radians):
conf0.mot_fb_offset = 0.2
You may need to zoom in to do fine adjustments. This is done by decreasing the period (increasing the frequency) of term0.send_step
:
term0.send_step = 20
Jog Test
link pid link pmsm # whichever type of feedback is being used link enc_fb0 link misc # this is the important part link jog_cmd # ... # (same configuration used after tuning with com_test) # ... # configure the max speed and acceleration stp0.max_vel = 20 stp0.max_acc = 1000 # allow turning further in the same direction stp0.min_pos = -1000 stp0.max_pos = 1000
You may have to play with the conf0.j
parameter, be careful as having it too high can easily cause oscillations. Be ready to disable the motor!
conf0.j = 0.0001
You can also increase the motor's top speed:
stp0.max_vel = 200
And later see how much the acceleration can be pushed:
stp0.max_acc = 40000
Replacement Parts
Terminal Blocks
STMBL Name | Part Name | DigiKey Part # |
---|---|---|
P2 "PTC", P3 "Logic Power", P15 "Alt. CMD" | Phoenix Contact 1840366 | 277-2417-ND |
P5 "Outputs", P9 "Inputs" | Phoenix Contact 1840421 | 277-5715-ND |
P6 "Motor DC Input" | Phoenix Contact 1911965 | 277-9026-ND |
P8 "Motor 3-phase Output" | Phoenix Contact 1911978 | 277-11013-ND |
Alternate replacement connector information:
Name | Connector | PCB Header |
---|---|---|
Motor DC Power Input | Phoenix Contact 1757019 (12A) Phoenix Contact 1911965 (16A) Amphenol Anytek TJ0251530000G (12A) Würth Elektronik 691351500002 (12A) |
Phoenix Contact 1757242 (12A) Phoenix Contact 1923869 (16A) |
Motor DC Power Output | Phoenix Contact 1757022 (12A) Phoenix Contact 1911978 (16A) Amphenol Anytek TJ0351530000G (12A) |
Phoenix Contact 1757255 (12A) Phoenix Contact 1923872 (16A) |
Logic Power Alt. Cmd. Thermistor |
Phoenix Contact 1840366 Amphenol Anytek TJ0211530000G |
Phoenix Contact 1844210 |
Inputs Outputs |
Phoenix Contact 1840405 |
Phoenix Contact 1844252 |
Fan
Sunon Fans ME45101V1-000U-A99
- Sunon ME45101V1-000U-A99 | DigiKey
- Sunon ME45101V1-000U-A99 | Mouser
- Sunon ME45101V1-000U-A99 | Sunon USA
- ME45101V1-0000-A99 Product File Download
- Sunon ME45101V1-0000-A99 Specification ("(D04072500G-02)-0.pdf", D04072500G-02, 12.01.2017)
- Sunon ME45101V1-0000-A99 STEP File ("Doc-0045137-4-0.stp", A201021110G-2, 2020-07-31, 109063)
- Sunon ME45101V1-000U-A99 Specification ("(D04077400G-00)-3.pdf", D04077400G-00, 11.01.2013) (broken link from USA site via Wayback Machine)
- Sunon ME45101V1-000U-A99 Specification ("(D04077400G-00)-3.pdf", D04077400G-00, 11.01.2013) (direct link to above file)
Fasteners used with fan:
- sheet metal case to fan snap rivet: Essentra Components SR-4060B | DigiKey
Heatsink
STMBL originally used the Alutronic PR138/94-M3 heatsink:
- V PR138 - 94-M3: Special heat sink, 94x46x33mm, 3.2K - W, M3 at reichelt elektronik
- stmbl/heatsink.pdf at master · rene-dev/stmbl (shows drill/tap hole pattern for mounting HV board to heatsink)
A compatible replacement is a Fischer Elektronik SK 68 94 SA (M3 channels are shifted in by 0.2mm):
- Fischer SK 68 94 SA | Arrow
- Fischer SK 68 94 SA | Fischerelektronik (PDF, DXF, IGES, and STEP files available)
- Fischer SK 68 94 SA Datasheet Page
Fasteners used:
- DIN clip plate to heatsink: M3-0.5x6mm stainless steel narrow cheese head slotted screws
- HV board to heatsink: M3-0.5x16mm stainless steel pan head phillips screws
- HV board to heatsink: 2mm thick M3 black nylon washers (6mm OD)
- sheet metal case to heatsink: #4-24x1/4" stainless steel pan head phillips drive "Type AB" sheet metal screws (TODO: determine better fitting screw?)
Standoffs/spacers:
- 1pcs 8mm tall, 7mm OD, 3.6mm ID black nylon unthreaded standoffs (unmodified)
- 2pcs above standoff, modified to have a 2.5mm - 2.63mm tall flange, with the rest of the cylinder cut away to have a 2.6mm deep sagitta
DIN Clip
The bottom of the heatsink has a DIN rail clip. The hole size/type isn't so important, as it will be riveted. Here are compatible ones:
Weidmüller 0687900000 | DigiKey
Weidmüller 687900000 | DigiKey
Weidmüller 0636900000 | DigiKey
Weidmüller 1724580000 | DigiKey (clearance hole)
Weidmüller 0636800000 | DigiKey (M5 threads)
Altech D35CLIP-M4 | DigiKey (M4 threads)
Bud Industries DNC-4796 | DigiKey (M4 threads)
By riveting the clip to the following laser cut aluminum adapter, it is kept from rotating, and can be mounted to the threaded channels on the bottom of the heatsink with four screws:
Case
1mm thick aluminum
- stmbl/sheet_metal_case_io_08.dxf at master · rene-dev/stmbl
sheet_metal_case_io_08.dxf (download friendly link)(server error?)- sheet_metal_case_io_08.dxf (wants to view in browser)
Online Resources
https://github.com/rene-dev/stmbl
https://github.com/rene-dev/stmbl/wiki/Pinouts
https://github.com/rene-dev/stmbl/blob/master/docs/src/Getting%20Started.adoc