tag:blogger.com,1999:blog-9106850240713678392024-03-19T04:48:27.502-04:00BuildIts in Progressmotors and things...Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.comBlogger162125tag:blogger.com,1999:blog-910685024071367839.post-21434203289287294512023-10-06T09:51:00.001-04:002023-10-06T09:51:48.930-04:00Trike Revival for the BD Car Sow<p><a href="https://bostondynamics.com/">Robot land</a> has an annual car-and-other-vehicles show. Last year I brought the <a href="https://build-its-inprogress.blogspot.com/search/label/Big%20Kart">hybrid car powertrain go kart</a>, but this year the kart's geting some upgrades (stay tuned), so I brought the <a href="https://build-its.blogspot.com/2013/03/electric-tricycle.html">electric tricycle</a> instead.</p><p>The trike has been hanging from a <a href="http://miters.mit.edu/">miters</a> wall unused since 2019. The last time it was ridden, <i><a href="https://brushless.zone/">someone</a></i> crashed it into a curb and bent the head tube inwards, so it needed some work to get back into a rideable state.</p><p>Somehow it's been ~11 years since I built the tricycle -<a href="https://build-its-inprogress.blogspot.com/2012/11/soon-to-be-named-three-wheeled-electric.html"> looking back at the blog</a> to jog my memory, this was one of my first big projects at miters, one of my first projects using a mill and lathe, and the first thing I ever designed in Solidworks. It's a miracle it worked.</p><p>Here's the trike pulled down from the wall. The battery cover broke ages ago so the battery is strapped in with tape. Most of the wires are held together by duct tape. The brake and shifter cable housings are frayed, and 5th gear sounds super crunchy. And that head tube angle...</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTa56WJbLAy3haTAMG3MsWEriac7dMU6A5J5ALNe_nNyeIfsURV44Bk70m8hQ44pdA_QkycSqw0BIooRDiIy6a_cQAPQYPklDv8kYp4TssPhGJXYQRBNPNLY9mpWk2gXO0JUlI2sa_G1zGMM_w4Y-rh9UVnTZTaGrnoqBgmpDCnTDy1no-QPON-wNyAcU/s4608/IMG_20230922_190214656.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTa56WJbLAy3haTAMG3MsWEriac7dMU6A5J5ALNe_nNyeIfsURV44Bk70m8hQ44pdA_QkycSqw0BIooRDiIy6a_cQAPQYPklDv8kYp4TssPhGJXYQRBNPNLY9mpWk2gXO0JUlI2sa_G1zGMM_w4Y-rh9UVnTZTaGrnoqBgmpDCnTDy1no-QPON-wNyAcU/w640-h480/IMG_20230922_190214656.jpg" width="640" /></a></div><div><br /></div><div>First order of business was to take it apart and do a little inspection and de-grunging. I'd forgotten how much mileage the trike got - there was period of time in undergrad where it got ridden once or twice a week, and it shows in the amount of chail lube and dirt caked onto everything:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDodcL1zF_FIAj-97RNCpNy2YuSF3g2Vk6xVAvXsBIR-cNI0V9rFgkAh6QMiI1gKRcE3VU7d5gHR0BrqagCThoKaiBL52ZFGalZlzL9D1Vmsm74cU0WDV8IgSnrbjCDdMo4iAZcAKx4g_DA7AC4Ij8hKQ1QfTrSz6ZzfeFzv8MaJAyLTKta1AXBBKm4DM/s4608/IMG_20230922_194131674.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDodcL1zF_FIAj-97RNCpNy2YuSF3g2Vk6xVAvXsBIR-cNI0V9rFgkAh6QMiI1gKRcE3VU7d5gHR0BrqagCThoKaiBL52ZFGalZlzL9D1Vmsm74cU0WDV8IgSnrbjCDdMo4iAZcAKx4g_DA7AC4Ij8hKQ1QfTrSz6ZzfeFzv8MaJAyLTKta1AXBBKm4DM/w640-h480/IMG_20230922_194131674.jpg" width="640" /></a></div><div><br /></div><div>The shifting wasn't working well, so I pulled the chains and Shimano gearbox:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjemvFDsp_CSaFPAGeBNUYrlkGjrTdZNbCjUp3OEjmrnX8wL05K8ptQYUEbe28VP3U-6HU3WL219giO7gr2US_5Mrit9EZwF6_Asl5gmB8khkbZsRYPwMXwVAutxh6ju9SbBTx4TtpkZZLfOKP1weHPVEPRlUeqUJIzic_uasexEJcPLJ7rcfTi0qieheY/s6000/DSC04054.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjemvFDsp_CSaFPAGeBNUYrlkGjrTdZNbCjUp3OEjmrnX8wL05K8ptQYUEbe28VP3U-6HU3WL219giO7gr2US_5Mrit9EZwF6_Asl5gmB8khkbZsRYPwMXwVAutxh6ju9SbBTx4TtpkZZLfOKP1weHPVEPRlUeqUJIzic_uasexEJcPLJ7rcfTi0qieheY/w640-h426/DSC04054.JPG" width="640" /></a></div><div><br /></div><div>The spur gear differential was one of the more complicated things I'd machined at the time, and it was... a learning experience. At the time I didn't know that I should never trust communal mills to be trammed (or how to tram a mill, for that matter), so the bores for the six shafts that span across the differential aren't very perpendicular to the end plates. As a results, the differential was super finicky to assemble and would bind up if the fasteners were tightened in the wrong order. Also apparently I hand't learned about chamfers either - those corners sure are sharp.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdHBZBUmCFRHvOAw0BriVOYxY-CczONebqqLo5Ox2YmjoINAOjp-HBZUglipUGVepEYZIuC_PQ-A5thyNRbEjU85jPWpQOBtakUqIwH6HZTNkqxOP9_JDWypSB7TX3obnv8ZLhBsrNGl9RDQM4V4ishrAfqfcaiCcHlw4-RgPq0qKc26WoD4E2Mf8pCCc/s6000/DSC04057.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdHBZBUmCFRHvOAw0BriVOYxY-CczONebqqLo5Ox2YmjoINAOjp-HBZUglipUGVepEYZIuC_PQ-A5thyNRbEjU85jPWpQOBtakUqIwH6HZTNkqxOP9_JDWypSB7TX3obnv8ZLhBsrNGl9RDQM4V4ishrAfqfcaiCcHlw4-RgPq0qKc26WoD4E2Mf8pCCc/w640-h426/DSC04057.JPG" width="640" /></a></div><div><br /></div><div>The turnigy 80-100 motor <a href="https://scolton.blogspot.com/">Shane </a>donate to the cause was still working fine, but the position sensing and motor control setup was never great - I used a <a href="https://kellycontroller.com/shop/kbs/">Kelly KBS </a>brushless controller plus one of <a href="https://www.etotheipiplusone.net/">Charles's </a>external hall effect sensor boards that measures flux leaking through the OD of the rotor. The Kelly controllers aren't great at driving low inductance hobby motors, and would periodically fault when pushing the trike hard. The external hall sensors weren't great either, between the wires falling off, the hall sensors mysteriously dying, the sensors rubbing the outside of the motor, and the timing vibrating out of alignment:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaBTMflEIT58-EYm62tEXLFywF4Yt1scrUnkImDaSaaRrFIP5Zg68NfPVwIDJHaMmpQTnwatJxwshwv6o9PPXOaQxTFMAj3DmBTRvvlN0xQxeZIr2NyJ6tWOHAUUHpEAmM_iSqPdk9GqN7KiBLL5b6cbt_DQ5QNm6Lyl62gagaRWgSR2OrX85E5Kd30Zg/s6000/DSC04060.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaBTMflEIT58-EYm62tEXLFywF4Yt1scrUnkImDaSaaRrFIP5Zg68NfPVwIDJHaMmpQTnwatJxwshwv6o9PPXOaQxTFMAj3DmBTRvvlN0xQxeZIr2NyJ6tWOHAUUHpEAmM_iSqPdk9GqN7KiBLL5b6cbt_DQ5QNm6Lyl62gagaRWgSR2OrX85E5Kd30Zg/w640-h426/DSC04060.JPG" width="640" /></a></div><div><br /></div><div><a href="https://build-its-inprogress.blogspot.com/2013/01/battery-building-motor-woes-and.html">The original seat</a> was a fiberglass monstrosity made of an old bicycle saddle, and years of newbie riders doing wheelies by accident had scraped the back edge off.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFrsRGTnjnME9ZzAbl1J8HlujldMABZm332h8omWy7b2-kqtLvFnt2pxEB7F3lRYruOYcAQdRT7q4z4HHiG2fFM5uFzXIq4FjdFvxK0vscTSdAKhE-GxF_ko_jnFN3tpyEPP2mN4DK4mA3kVik15tZe3EbUmWTDDdYYcTFUm52Z0-FkPBRH_Cy7xWnJFo/s4608/IMG_20230922_194345044.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFrsRGTnjnME9ZzAbl1J8HlujldMABZm332h8omWy7b2-kqtLvFnt2pxEB7F3lRYruOYcAQdRT7q4z4HHiG2fFM5uFzXIq4FjdFvxK0vscTSdAKhE-GxF_ko_jnFN3tpyEPP2mN4DK4mA3kVik15tZe3EbUmWTDDdYYcTFUm52Z0-FkPBRH_Cy7xWnJFo/w640-h480/IMG_20230922_194345044.jpg" width="640" /></a></div><div><br /></div><div>I found a perfect replacement for the seat in a bin at miters: an old <a href="https://www.brooksengland.com/en_us/">Brooks </a>B-67(?) double-rail saddle:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Tx9lFa9Ek1Qg2mUbkr2BFjepYeajXJl6djCpgpZf-x3SlhRbD6DSaqfa6VNdkNsmV71oPyTkkBfhrdseI6SC0p2_mhI06HF0WM81gJnr1-UR1hlMi5zSv5N8AMuj4XaxSUev5KWyYzUbg-5j26k6TO5kJfQ24xoTjjbuzB42F3CzMAqy_NVAhRjpjug/s4608/IMG_20230922_194349627.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Tx9lFa9Ek1Qg2mUbkr2BFjepYeajXJl6djCpgpZf-x3SlhRbD6DSaqfa6VNdkNsmV71oPyTkkBfhrdseI6SC0p2_mhI06HF0WM81gJnr1-UR1hlMi5zSv5N8AMuj4XaxSUev5KWyYzUbg-5j26k6TO5kJfQ24xoTjjbuzB42F3CzMAqy_NVAhRjpjug/w640-h480/IMG_20230922_194349627.jpg" width="640" /></a></div><div><br /></div>The trike wasnt bult with swapping seats in mind - I welded the rails of the original bicycle seat straight to the frame. This Brooks saddle uses a funny double-rail mounting system where the <a href="https://d30wvywztto413.cloudfront.net/media/catalog/product/cache/10595bfdb76aae098055c259c6d2be99/0/3/03.b281hs-a07205-b66-leather-brown-bottom.jpg">clamp is built into the saddle</a>, rather than into the seatpost like normal. Instead of welding more stuff to the frame, I turned a little seat post stub and bolted it on:<div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3iFzM0b-aJ_Qq5kG_PkOx0XV6vQO9RUDc3g-kQdbnuAGVrk3aRwW3HcOPEa5BoFUcFgSR_r9RHHYxAanan6C-7dgh_KX7qu5M9w1WnGOYMRT3RLviPTiyqZMN3wvYsCbbo4PSGXwsy2cOCMYTgVEF-TPutUKpiuApl6TeqxqTmmcm68YC6M-o25ateSA/s6000/DSC04050.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3iFzM0b-aJ_Qq5kG_PkOx0XV6vQO9RUDc3g-kQdbnuAGVrk3aRwW3HcOPEa5BoFUcFgSR_r9RHHYxAanan6C-7dgh_KX7qu5M9w1WnGOYMRT3RLviPTiyqZMN3wvYsCbbo4PSGXwsy2cOCMYTgVEF-TPutUKpiuApl6TeqxqTmmcm68YC6M-o25ateSA/w640-h426/DSC04050.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfMEVMciGhs4UkL2N-nYEwlFpknaqKwqclfNg7Ja8BYmsGoV9W0kb9E57AGyWgHWdVv3hUlQSiTgvn4OcXPLEmRZaI6-F8mbC5R1hqASutYVWFSGSGrbDsUK2iMlg_zye6BKk_KVno-m0642kztOf9OLcfJLVWSxpETYE2S9EZgtY48YObopb9MfwiqqI/s5032/DSC04052_crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3355" data-original-width="5032" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfMEVMciGhs4UkL2N-nYEwlFpknaqKwqclfNg7Ja8BYmsGoV9W0kb9E57AGyWgHWdVv3hUlQSiTgvn4OcXPLEmRZaI6-F8mbC5R1hqASutYVWFSGSGrbDsUK2iMlg_zye6BKk_KVno-m0642kztOf9OLcfJLVWSxpETYE2S9EZgtY48YObopb9MfwiqqI/w640-h426/DSC04052_crop.JPG" width="640" /></a></div><div><br /></div><div>The curb incident bent the curved frame tube rather than breaking the weld with the head tube - I found this tube pre-curved on the miters floor, so it's made of some mystery-alloy low strength steel. I put a steel bar in the vice and did some <i>gentle persuasion</i> to get the steering back in alignment. I think the trike would handle better with a slacker head tube angle , but to change the angle that much I should really chop and re-weld the head tube.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyw9Opdm64dx22LzCGBDTJInA3tm_4Sdwlsa8S10Z4GKlkbfaFaupXWkdqugrl1kyMAwghIWP_lOTnCUhwM1Ce_g7bekOFDbXT0KQtTKdtIt8kyeQVyWRg7IWjSN7lFd-pmuWCq_CqJOAHEUzJjvj74cTAJ4wWIFXRm7gbBJzzziBNgEt1O_ipxv2GsKI/s4608/IMG_20230922_223654339.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyw9Opdm64dx22LzCGBDTJInA3tm_4Sdwlsa8S10Z4GKlkbfaFaupXWkdqugrl1kyMAwghIWP_lOTnCUhwM1Ce_g7bekOFDbXT0KQtTKdtIt8kyeQVyWRg7IWjSN7lFd-pmuWCq_CqJOAHEUzJjvj74cTAJ4wWIFXRm7gbBJzzziBNgEt1O_ipxv2GsKI/w640-h480/IMG_20230922_223654339.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I brought the pile of parts home from miters and did the rest of the repairs in the home shop. I got <a href="https://flipsky.net/collections/v75-series/products/flipsky-75100-foc-75v-100a-single-esc-base-on-vesc-for-electric-skateboard-scooter-ebike-speed-controller">this cheap e-bike controller shaped VESC</a> as a replacement for the Kelly - it's not higher power, but <i>supposedly</i> supported external SPI encoders, and a real encoder + FOC should be big improvement over the old hall sensor and trapezoidal drive setuop. It claims to be a 120A max controller, but I've only gone up to 75A so far - internally it's just got 6 TO-220 package FETs, so I'm probably not going to push it much further:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYqw68WFg_rbRV7qdbJHbWBo6AUKxQ8xp7gL2QrauOp4h-o7XyUm0TrMEsSUJvVMFYHWlggY7bzf6Jb9ORUlZ9yC0V6tf1d2CqKpNbE_fh7KBqpCPN1wcyRwq-GHYt5oSYaPwwrfYIj1FR30zi6-2AVic_8YAFyVo8SDuSIiiAam69J5ecExtSqwKLwjo/s6000/DSC04064.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYqw68WFg_rbRV7qdbJHbWBo6AUKxQ8xp7gL2QrauOp4h-o7XyUm0TrMEsSUJvVMFYHWlggY7bzf6Jb9ORUlZ9yC0V6tf1d2CqKpNbE_fh7KBqpCPN1wcyRwq-GHYt5oSYaPwwrfYIj1FR30zi6-2AVic_8YAFyVo8SDuSIiiAam69J5ecExtSqwKLwjo/w640-h426/DSC04064.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Turns out the controller didn't really support external SPI encoders. I wired up the encoder to the hall sensor cable according to a guide I found online, but it didn't work. Probing around with a scope, the signals looked nothing at all like SPI. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I cracked the controller open and immediately found the problem - there were RC filters and pull-ups/downs on the pins, for hall effect sensors. More probing around and I was able to figure out what modifications to make - the picture below shows the full set of changes I made to the drive. Initially I had solder bridges instead of the 100 ohm resistors, but I found that the SPI only worked when I was scoping the clock pin - I gues the tiny bit of capacitance from the scope probe was damping out some ringing edges. The 100 ohm resistors in series fixed everything.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguLTkrF2S025ZPWBtY_8Jh-cmHTwPtQw-pTmey3CbWCmIuDjvH_dP9Oi8MvThG0At-9wJs1og2QlXDw8wh7eTK0B-uDm25Lq9d2OFnUGDlIuWKdnFdOpehpQOy_J23QkLcKI3LiteUtk2yCdECQD8YmHLLsqB0lu6dW_HwgfZWOA9AEN1vYgJlllReueY/s2916/vesc_mods.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1456" data-original-width="2916" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguLTkrF2S025ZPWBtY_8Jh-cmHTwPtQw-pTmey3CbWCmIuDjvH_dP9Oi8MvThG0At-9wJs1og2QlXDw8wh7eTK0B-uDm25Lq9d2OFnUGDlIuWKdnFdOpehpQOy_J23QkLcKI3LiteUtk2yCdECQD8YmHLLsqB0lu6dW_HwgfZWOA9AEN1vYgJlllReueY/w640-h320/vesc_mods.png" width="640" /></a></div><div><br /></div><div>I machined a holder for a diametric encoder magnet:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepCv4ywEGmyfYpXT8fF7bpyupoSv8QtHpcjVeV2oBsg3LXRc__twMuxQY0nWG6TutxKbwm8r9vbcfWESXCfBNpFjaDG38H839xfIuesiKwbrAG09P6IeHKXDCTNpXBWhzug00NFjuBXjXNkALml_-aMdJuo2UShFy-NCUnHS2I31Gf4YeM8E-UfLIDHo/s4608/IMG_20230924_130824789.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepCv4ywEGmyfYpXT8fF7bpyupoSv8QtHpcjVeV2oBsg3LXRc__twMuxQY0nWG6TutxKbwm8r9vbcfWESXCfBNpFjaDG38H839xfIuesiKwbrAG09P6IeHKXDCTNpXBWhzug00NFjuBXjXNkALml_-aMdJuo2UShFy-NCUnHS2I31Gf4YeM8E-UfLIDHo/w640-h480/IMG_20230924_130824789.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">And 3d-printed a holder for an encoder breakout board:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPCzL5UpEFhKV9HkjAoOfSydMFayKUkVvJlpeL52ZImRP26HkaO0HjPX0qBGSWUyUBmybILLu7-ww0WEeOJD21cUPSI9_OjAeQ9UBudenBrG2HBt74qhIt62FPMkM4n8pEOTO0Cb41UYOkpiSZ9ag-unCzninep0eVqU_Ok5rIilXqnnkt-bHMjjVV2U0/s6000/DSC04091.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPCzL5UpEFhKV9HkjAoOfSydMFayKUkVvJlpeL52ZImRP26HkaO0HjPX0qBGSWUyUBmybILLu7-ww0WEeOJD21cUPSI9_OjAeQ9UBudenBrG2HBt74qhIt62FPMkM4n8pEOTO0Cb41UYOkpiSZ9ag-unCzninep0eVqU_Ok5rIilXqnnkt-bHMjjVV2U0/w640-h426/DSC04091.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The original plastic battery cover got destroyed ages ago, so I did some CAD - <a href="https://hackaday.com/2015/08/09/cardboard-aided-design-is-the-new-cad/">the other CAD</a> - and whipped up a new one out of some thin aluminum sheet.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3dsSepUSFDgbkimk09iu1y995CG0MOTR_ytaIN_G6uL2ageHu4eERyT3q93JXlZYQ_uu8ejsgVT7PdOV-MdXsCu1y-rmAMgOvDmFcNpzOWXS_IQTBIPLVQlyvtop_jVVDYfaq1n7QnNpHeBh4JO4-5Emm3YvtfkB00YWTXLzOECwRkwoBkEAe_Ey8BMc/s4608/IMG_20230926_223548601.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3dsSepUSFDgbkimk09iu1y995CG0MOTR_ytaIN_G6uL2ageHu4eERyT3q93JXlZYQ_uu8ejsgVT7PdOV-MdXsCu1y-rmAMgOvDmFcNpzOWXS_IQTBIPLVQlyvtop_jVVDYfaq1n7QnNpHeBh4JO4-5Emm3YvtfkB00YWTXLzOECwRkwoBkEAe_Ey8BMc/w640-h480/IMG_20230926_223548601.jpg" width="640" /></a></div><div><br /></div><div>Yes, that's a frozen pizza box, thanks <a href="http://cactus-zone.blogspot.com/">Jared</a>.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaxNjqsS_GNw7DXnkZ6qAaFcXg74mvQrJomXXFhyphenhyphenheRf_9NeYWglxnKG1uVMZXtdbjs43d0BeAjhNiiQubl6-qaTAbxDEPuTRT13tFXvXdugTE-qVdpqamHq-neyGvPpKmrC_88r3GdhqaZ00ahk4ZLEFOIGzwOxum8_88LlVWJ5_ycCi9ZobZD8TRa-A/s4608/IMG_20230926_223515647.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaxNjqsS_GNw7DXnkZ6qAaFcXg74mvQrJomXXFhyphenhyphenheRf_9NeYWglxnKG1uVMZXtdbjs43d0BeAjhNiiQubl6-qaTAbxDEPuTRT13tFXvXdugTE-qVdpqamHq-neyGvPpKmrC_88r3GdhqaZ00ahk4ZLEFOIGzwOxum8_88LlVWJ5_ycCi9ZobZD8TRa-A/w640-h480/IMG_20230926_223515647.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I don't have any sort of bending brake, so the sheet was bent with a combinations of quick-grip clamps and aluminum billets.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq7ujrWFpKKENHAdop7dVImfqYW53IVavyOQcZkfZ5npHiCvmbFUftrCoPIhyphenhyphenuVk87FcgtEIsI-rUqj91HYwxdhTHKULC_dQG7La__-xaIk66g3LKkZiDzq48znXr2YI-nelcZcbKVCWXGWjazej9qClRvYxpboCnqyJLoX3Nz4oBVzNiAlZmx_4L2Cig/s4608/IMG_20230926_230349375.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq7ujrWFpKKENHAdop7dVImfqYW53IVavyOQcZkfZ5npHiCvmbFUftrCoPIhyphenhyphenuVk87FcgtEIsI-rUqj91HYwxdhTHKULC_dQG7La__-xaIk66g3LKkZiDzq48znXr2YI-nelcZcbKVCWXGWjazej9qClRvYxpboCnqyJLoX3Nz4oBVzNiAlZmx_4L2Cig/w640-h480/IMG_20230926_230349375.jpg" width="640" /></a></div><div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaWYQgJzPTyEWC7DdAlwYocKc4tVp8FMCQ2KKwQnStSr3ekgUlr8GSmrojvSlt9S9IkYWRT3osWmLIwKRtGtxRlt-wOnb3Rz1jsK9Z34ulZ7GXJxU0stuoWp0loDJOcYBnhEo8rAm9FcdlS_F9_yDTZeBchjkGZfkxw9G_aWpZyp3DEwg0cCjuIoKkYCo/s6000/DSC04078.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaWYQgJzPTyEWC7DdAlwYocKc4tVp8FMCQ2KKwQnStSr3ekgUlr8GSmrojvSlt9S9IkYWRT3osWmLIwKRtGtxRlt-wOnb3Rz1jsK9Z34ulZ7GXJxU0stuoWp0loDJOcYBnhEo8rAm9FcdlS_F9_yDTZeBchjkGZfkxw9G_aWpZyp3DEwg0cCjuIoKkYCo/w640-h426/DSC04078.JPG" width="640" /></a></div><div><br /></div><div>I made a cover for the other side of the battery (which it never had before):</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgivSwkSgy7LdQpIbJ-uufDAZDXi3_FneBTwCn67DIgKyBfbzC45v2kZSIMtMzTKlaynhowmotWoRAx8XQdp4MnZu-bZnIiBvzRN9BG-rrvClKcGyWZK_BYKM8PSkKrpyHqEUvAgJa_Hwo5YMCDuC7_qukv30Dk1qNic_JdjuWOqiQ35UtHH52mkoGDUg0/s6000/DSC04084.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgivSwkSgy7LdQpIbJ-uufDAZDXi3_FneBTwCn67DIgKyBfbzC45v2kZSIMtMzTKlaynhowmotWoRAx8XQdp4MnZu-bZnIiBvzRN9BG-rrvClKcGyWZK_BYKM8PSkKrpyHqEUvAgJa_Hwo5YMCDuC7_qukv30Dk1qNic_JdjuWOqiQ35UtHH52mkoGDUg0/w640-h426/DSC04084.JPG" width="640" /></a></div><div><br /></div><div><div>I replaced the brake and shifter cables as well - the originals never had ferrules on either the cable housing ends or cable ends, so they were fraying and in terrible shape. I did a test ride the evening before the show with a 50A current limit and didn't run into any issues. I turnued it up to 75A the morning before the show and didn't test, fortunately it didn't blow up despite some coworkers' thrashing it.</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK8RRNHBT5QyTNTeWupCHExX4Nx320NmLqE5qYoI_WiZcQ11GC4ZjVO_v3e9OHAhdVaJi8rvxZ0R8K_8WNqOkwqxYEsEN94wYM2IaurDPm44xxZfG1T6fSrxA7utrpR50oJ99p4yqltkuyhzmkLb2l5hSQb9LNa3qSUGoPDsv6nP7YR5lSwJLDuEQpfV4/s800/ezgif.com-video-to-gif%20(1).gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK8RRNHBT5QyTNTeWupCHExX4Nx320NmLqE5qYoI_WiZcQ11GC4ZjVO_v3e9OHAhdVaJi8rvxZ0R8K_8WNqOkwqxYEsEN94wYM2IaurDPm44xxZfG1T6fSrxA7utrpR50oJ99p4yqltkuyhzmkLb2l5hSQb9LNa3qSUGoPDsv6nP7YR5lSwJLDuEQpfV4/w640-h360/ezgif.com-video-to-gif%20(1).gif" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">I didn't take many pictures or videos at the show itself, but parking it next to a Ferrari wagon (I can't beleive that's even a thing) was entertaining. Lots of test rides with no issues other than a set screw coming loose once. It could definitely use a bit more motor controller - it's noticeably less peppy than before (with a 120A limit on the Kelly controller). </div></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT71IpA7o2q7YICwONYKtWcAVyYOom530z5DIlenOvrltzkjz7PWcguk5fcUYf-YsWYTikuhGLPh9CF_FrOGqvTBxwMe3_d-bPtqNNfi32qNlvQLFFtL0FwGVaSa33aMs0rOtf6f5gAj80rURkcGfU2z7k2nI5hxaRiuBPNgDxw5RCVQlm_bn5_41dsCs/s4608/IMG_20230927_153555745.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT71IpA7o2q7YICwONYKtWcAVyYOom530z5DIlenOvrltzkjz7PWcguk5fcUYf-YsWYTikuhGLPh9CF_FrOGqvTBxwMe3_d-bPtqNNfi32qNlvQLFFtL0FwGVaSa33aMs0rOtf6f5gAj80rURkcGfU2z7k2nI5hxaRiuBPNgDxw5RCVQlm_bn5_41dsCs/w640-h480/IMG_20230927_153555745.jpg" width="640" /></a></div></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com2tag:blogger.com,1999:blog-910685024071367839.post-41882141216626929652022-11-25T20:42:00.004-05:002022-11-25T21:41:35.685-05:00Lathe DRO Installation<p>I installed a DRO on the <a href="https://build-its-inprogress.blogspot.com/2022/04/clausing-4901-moving-and-restoration.html">Clausing</a>. I got <a href="https://www.aikrondro.com/">Aikron </a>scales and console - the LCD console, a 1 micron slim magnetic scale for the cross slide, and 5 micron standard width scale for the carriage. So far I'm very happy with it - the user interface is better than some US-made, much more expensive DRO's I've used, and being able to store a library of tool offsets is a real game changer - all the lathes I've used until now have been communal (and thoroughly abused...), so even though some of them had DRO's none of them had proper tool libraries. Tool libraries make turning so much more efficient, and for tolerances over 50um or so I don't even need to measure anything. </p><p><br /></p><div class="separator" style="clear: both; text-align: left;">Mocking up the cross slide scale and read head placement - In order to not loose any travel, I had to get a scale that was slightly longer than the cross slide. To get the the scale mounting fasteners to overlap, I had to make a longer cover on the back side of the cross slide.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The chuck-side scale mounting is a little unusual - <a href="https://www.youtube.com/watch?v=qjh63pll0VM">this video from Robin Renzetti</a> was the inspiration for that - as he points out, if the scale is directly under the tip of the tool, machine inaccuracies like curvature in the travel of the cross slide don't cause diameter error between the scale measurement and where the tool actually is. And these magnetic scales are small enough that chuck interference isn't an issue.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMqBsnLZcfMJT8uIsXfThoLXWaztwGkpYtW-QuAgE4ANs07S1nXsEK8wXOhr36MoUjMHaYNajTTVsx0hAQghDL7DaitZq5BbNWhQ1TZw6A9dC9-NdPqhSe0Q89tAHmXyF12PexxFVp-0kcJg7Ttb6bRWvazNWYmqsYErdKbw_zNCZe3m2e1DsRl6Uy/s4608/IMG_20220503_230007370.jpg" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMqBsnLZcfMJT8uIsXfThoLXWaztwGkpYtW-QuAgE4ANs07S1nXsEK8wXOhr36MoUjMHaYNajTTVsx0hAQghDL7DaitZq5BbNWhQ1TZw6A9dC9-NdPqhSe0Q89tAHmXyF12PexxFVp-0kcJg7Ttb6bRWvazNWYmqsYErdKbw_zNCZe3m2e1DsRl6Uy/w640-h480/IMG_20220503_230007370.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The original cover was a casting, but was almost the same profile as some off the shelf steel u-channel, so that's what I used for the new cover:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBZEFCnRI7MxVKlcgaZ3VK_NZIZ8eCBYkvflHYwjfebsdfSGXm12LGEbFD9RflFRx3VwB3M7kAFdzAXQQY4tk-hXgLt0o10BtkFA9k52sjXsnt5822ngPbpCFOnFMwdlUhhWGxyqBvHh_sgxZND1q-qshQOp9Pp68l89xa2z05Qnw0dBgHzRhahgCa/s6000/DSC02421.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="427" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBZEFCnRI7MxVKlcgaZ3VK_NZIZ8eCBYkvflHYwjfebsdfSGXm12LGEbFD9RflFRx3VwB3M7kAFdzAXQQY4tk-hXgLt0o10BtkFA9k52sjXsnt5822ngPbpCFOnFMwdlUhhWGxyqBvHh_sgxZND1q-qshQOp9Pp68l89xa2z05Qnw0dBgHzRhahgCa/w640-h427/DSC02421.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTVLLljwktkEWb-J3t1L4LirLRn1jc8OA7hV4pKkv3sH_nYsqM2HnHQY_5oBwVogYiLIGZjZc8L7tKEFlF8XkTo5egmqOHjkYQvd9XYhdx6-iMXgltJkT66QCIwX4CuAeI47FJTV-t5tBBaYA8r4FBYRsdY30U0PVbG5qU2BsUkTLtbY1JB1RzFPU5/s6000/DSC02422.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTVLLljwktkEWb-J3t1L4LirLRn1jc8OA7hV4pKkv3sH_nYsqM2HnHQY_5oBwVogYiLIGZjZc8L7tKEFlF8XkTo5egmqOHjkYQvd9XYhdx6-iMXgltJkT66QCIwX4CuAeI47FJTV-t5tBBaYA8r4FBYRsdY30U0PVbG5qU2BsUkTLtbY1JB1RzFPU5/w640-h426/DSC02422.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The extrusion was too big for my tiny mill so I used a Bridgeport at work:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrNNAmrOi6s190iI-8yoa81iHNwMjTAG_BljhEC6T2j6YewInVTHFbDPrc8Pu3IM_AOLMgkU70c-Off_UrgLwafiHeaQMMuV29LI4IIaZoguLWLZb-_O6gi_JZRRwY40X8F_JpNc4VK8GzAvz5jNSi_Am7H8cLD7ep5c8p_JzQFeIa0Igto0iXzTiY/s4608/IMG_20220512_173815000.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrNNAmrOi6s190iI-8yoa81iHNwMjTAG_BljhEC6T2j6YewInVTHFbDPrc8Pu3IM_AOLMgkU70c-Off_UrgLwafiHeaQMMuV29LI4IIaZoguLWLZb-_O6gi_JZRRwY40X8F_JpNc4VK8GzAvz5jNSi_Am7H8cLD7ep5c8p_JzQFeIa0Igto0iXzTiY/w640-h480/IMG_20220512_173815000.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I fastened the u-channel to the cross slide and indicated the faces of the cross slide in for final machining to ensure the faces (especially the scale mounting face) were flush and parallel to the cross slide:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaRCwZlD9zupwMWUSKCOSVpNg1ATEhQ4VugXNAUCiZZyaR04GK8rwOueSf1Vd9rNzyOoYnDMhX-tfrEtO62Afz5yJW4sBZKt_p5OEwvqn_TkkrY9p6bQIMsLxn34upiedB3YkKbtadtllYrGy7NNAahSdadVYknz_kK8uAlM2PUQbIAu0z6hpJD1dx/s4608/IMG_20220513_170631508.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaRCwZlD9zupwMWUSKCOSVpNg1ATEhQ4VugXNAUCiZZyaR04GK8rwOueSf1Vd9rNzyOoYnDMhX-tfrEtO62Afz5yJW4sBZKt_p5OEwvqn_TkkrY9p6bQIMsLxn34upiedB3YkKbtadtllYrGy7NNAahSdadVYknz_kK8uAlM2PUQbIAu0z6hpJD1dx/w640-h480/IMG_20220513_170631508.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Before un-bolting the cover from the cross slide, I match-drilled a couple dowel pin holes and fixed them into the cross slide casting with retaining compound. If I have to disassemble the cross slide at some point, it'll go back together repeatably.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq4BQdthiEf0R5rch-z3OH2esdcAFfJvtGQK00TtRvepy1DYNx6G3l8KxgXSZJvShL8aPBIgthlInInW3hy7sGcB-RPDwQl0t6PKWk-d1cPeZCPrX-Z3PY-tCBeGd6TszR2DMBU84YzenfIucDwpqjwZ3vSihwrjj73dy4KkdLjsynq8pwGibUeiCR/s6000/DSC02425.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq4BQdthiEf0R5rch-z3OH2esdcAFfJvtGQK00TtRvepy1DYNx6G3l8KxgXSZJvShL8aPBIgthlInInW3hy7sGcB-RPDwQl0t6PKWk-d1cPeZCPrX-Z3PY-tCBeGd6TszR2DMBU84YzenfIucDwpqjwZ3vSihwrjj73dy4KkdLjsynq8pwGibUeiCR/w640-h426/DSC02425.JPG" width="640" /></a></div><p style="text-align: left;">Checking that the scale aligns with the cross slide travel - I did the vertical alignment by loosely tightening the mounting fasteners at each end and just tapping the the scale into alignment:</p><p style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8oX-jaopW94TLnyzT3WF1j_sbb2eDHahKsHm9IW1GGZjO5j5Ed7cIo3fkxDzuUhw7OgsnLOhzDCSa0fkdOlNjihnaA9lxzH9bAf_oSf-5TZn9EEd-X8huBM3FmCeYsYWFvpzPGtV97K5IOYDjhe1FZUuArbZuixwYDM8SEHjZapTT_c5f_Ad4qbyI/s6000/DSC02438.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8oX-jaopW94TLnyzT3WF1j_sbb2eDHahKsHm9IW1GGZjO5j5Ed7cIo3fkxDzuUhw7OgsnLOhzDCSa0fkdOlNjihnaA9lxzH9bAf_oSf-5TZn9EEd-X8huBM3FmCeYsYWFvpzPGtV97K5IOYDjhe1FZUuArbZuixwYDM8SEHjZapTT_c5f_Ad4qbyI/w640-h426/DSC02438.JPG" width="640" /></a></p><p style="text-align: left;">Thanks to the match-machining I did on the cross slide cover, I didn't have to do any shimming to get the z-alignment of the scale right:</p><p style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnOQUr17dfSRKBecQJSgC6hm4o1aftFSMhkMk8ZLpu4y3atSgzKyjA-QwOuxZyohy-TyjneHg6WbcOUvkAMJ5chI-DoGUv8hnz2kBTvRUKFbSgWV18qJYx3dYzaLI3y2lVeJ0owudFjeYZ03g_qd1Gn1BWztA5W8FgQCzs1gThsS82laIVZTDx4e_H/s6000/DSC02437.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnOQUr17dfSRKBecQJSgC6hm4o1aftFSMhkMk8ZLpu4y3atSgzKyjA-QwOuxZyohy-TyjneHg6WbcOUvkAMJ5chI-DoGUv8hnz2kBTvRUKFbSgWV18qJYx3dYzaLI3y2lVeJ0owudFjeYZ03g_qd1Gn1BWztA5W8FgQCzs1gThsS82laIVZTDx4e_H/w640-h426/DSC02437.JPG" width="640" /></a></p><p style="text-align: left;">Scale and read head both mounted:</p><p style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMz6hLftzygn02ohdfUlWWt8aDdKfwLBDnRc9NnWH8Rcs8BY3Jr1UsfSNc0QkfeHWeMFcfj6XgxSmmuojidGGTVR8zUT7APYAVg9Lsh69WHWHhxRMaRFoVHRpzXTO14zUJX8lEemeup6Hqa6w9h0ayTKQNkUW_TFTb1f3HlCQBQcjLgvo3ZqnlSScM/s6000/DSC02439.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMz6hLftzygn02ohdfUlWWt8aDdKfwLBDnRc9NnWH8Rcs8BY3Jr1UsfSNc0QkfeHWeMFcfj6XgxSmmuojidGGTVR8zUT7APYAVg9Lsh69WHWHhxRMaRFoVHRpzXTO14zUJX8lEemeup6Hqa6w9h0ayTKQNkUW_TFTb1f3HlCQBQcjLgvo3ZqnlSScM/w640-h426/DSC02439.JPG" width="640" /></a></p><p style="text-align: left;">I made a scale cover by gluing a neoprene rubber sheet to the cross slide with some Loctite 380. Eventually I want to make a proper guard for the scale and proper way covers, but this does the job for now:</p><p style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIrjYFsA0DzG1gSUaFCGRbcG6mFC3jIZ8ztxNcnRI1c3MzB6w-fhoi05FZ1AQnlh1Jea1aFp-IDW0qlKLFNZm4hPlNPLkWjaCrO4Lp_cGNSev_dIWpSX-nEAR30L0_xufrTug_z-sjBqsk4okv-KLImVLIzA7-OSL2kyiqSjT0FjxJ8eD7YoHxR605/s6000/DSC02484.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIrjYFsA0DzG1gSUaFCGRbcG6mFC3jIZ8ztxNcnRI1c3MzB6w-fhoi05FZ1AQnlh1Jea1aFp-IDW0qlKLFNZm4hPlNPLkWjaCrO4Lp_cGNSev_dIWpSX-nEAR30L0_xufrTug_z-sjBqsk4okv-KLImVLIzA7-OSL2kyiqSjT0FjxJ8eD7YoHxR605/w640-h426/DSC02484.JPG" width="640" /></a></p><p style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFCTOLqMOH0IEuL7m0QSABOA9cR1WYiysYeu1v3VWXVCA7AEGyo3AjhU7SclEx7Rp1YvEB1hB7jW8OcU0DMlPdcWJk2gOE6YIAbKooAt-XzCmgxRaPXGZdDUGXLbH8eJ_lOGX5rn7eFspAYk13E4XjwpZMPKIns93GDnJ3_eTFG8G0oVviDsTVuRxC/s6000/DSC02481.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFCTOLqMOH0IEuL7m0QSABOA9cR1WYiysYeu1v3VWXVCA7AEGyo3AjhU7SclEx7Rp1YvEB1hB7jW8OcU0DMlPdcWJk2gOE6YIAbKooAt-XzCmgxRaPXGZdDUGXLbH8eJ_lOGX5rn7eFspAYk13E4XjwpZMPKIns93GDnJ3_eTFG8G0oVviDsTVuRxC/w640-h426/DSC02481.JPG" width="640" /></a></p><p style="text-align: left;">Mocking up the position of the carriage scale and read head on the back side of the machine:</p><p style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIzVh8hT9YOEWu3sk12SeFcmChc4yIQxulFJS6kHc1HFflJ7vJC0UCHOvuRmrh16QQ83KiNQs7tNW9RKoFAxN6Bz_TrRCpmS6OgDBvfVZYQUO2VnYhmuC4UwQimVu30xKubqbTaAO3Ks9vTxhtJ6QVpaFQxld7BiCt6MOvCtrwk9sDlbDXywOXbjlT/s4608/IMG_20220503_212925505.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIzVh8hT9YOEWu3sk12SeFcmChc4yIQxulFJS6kHc1HFflJ7vJC0UCHOvuRmrh16QQ83KiNQs7tNW9RKoFAxN6Bz_TrRCpmS6OgDBvfVZYQUO2VnYhmuC4UwQimVu30xKubqbTaAO3Ks9vTxhtJ6QVpaFQxld7BiCt6MOvCtrwk9sDlbDXywOXbjlT/w640-h480/IMG_20220503_212925505.jpg" width="640" /></a></p><p style="text-align: left;">To get the scale parallel to the lathe bed vertically, I sandwiched some bearings between a ground surface on the underside of the bed and the top of the scale:</p><p style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb_aNeMSBw9DDjVhvMvMJn6WInSHkDzeL5ZsfCEGnHeMG37yxxvbjoO3DanqZU4y0879kkszQ2D1TvUfB94yhaFZEMmH1bvSOzu1yaGlYWGbsZ5GOSnQw3KQ_AtxiR-XmL0syoMmiErL5sIVFRvMP6ZC2rYJsqoHHTOhCiiBZOdVQMZJvTEtnOt2Xx/s4608/IMG_20220503_213645639.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb_aNeMSBw9DDjVhvMvMJn6WInSHkDzeL5ZsfCEGnHeMG37yxxvbjoO3DanqZU4y0879kkszQ2D1TvUfB94yhaFZEMmH1bvSOzu1yaGlYWGbsZ5GOSnQw3KQ_AtxiR-XmL0syoMmiErL5sIVFRvMP6ZC2rYJsqoHHTOhCiiBZOdVQMZJvTEtnOt2Xx/w640-h480/IMG_20220503_213645639.jpg" width="640" /></a></p><p style="text-align: left;">Double checking the alignment with an indicator after mounting, but no adjustment required on this axis. It took a few shims between the bed casting and scale in the other direction:</p><p style="text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj1KtHySNi1x6u8Z-njTFVhoTjIkl0A1JgyUmdBQW5Q6FCC2BK0wmWLlaGldTziEeSZfNph8p8gnA5ArrYE-3mmPBXosqMDqDEjPfLbvkuQO75OAIm_u4cz03eGfXsXRHcoKiJwJsQgrVbat0BoOeETAhHIWhE49AMqN8j5Eva2hxBfMTfviI1Xj3F/s4608/IMG_20220503_220535247.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj1KtHySNi1x6u8Z-njTFVhoTjIkl0A1JgyUmdBQW5Q6FCC2BK0wmWLlaGldTziEeSZfNph8p8gnA5ArrYE-3mmPBXosqMDqDEjPfLbvkuQO75OAIm_u4cz03eGfXsXRHcoKiJwJsQgrVbat0BoOeETAhHIWhE49AMqN8j5Eva2hxBfMTfviI1Xj3F/w640-h480/IMG_20220503_220535247.jpg" width="640" /></a></p><div class="separator" style="clear: both; text-align: left;">The read head was mounted with the stock hardware that came with the DRO, with a few modifications:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXrpHzo83I9x-klJSopHbNJryP-HZ8BS-23m-aOVPGJH8TjwvT0B70Idd4TqNppaCnFmSTsmqeP7NOpZDUyCSU90QcaBvBui_Oz9vm6K588aNlyeMeDXydm__lx0Q5KdV6wZ21jOCkGejjnEgPMCN4ywDvi0jYscoBuE8gTPboe8FH2Kr1TgDJQO2C/s6000/DSC02452.JPG" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXrpHzo83I9x-klJSopHbNJryP-HZ8BS-23m-aOVPGJH8TjwvT0B70Idd4TqNppaCnFmSTsmqeP7NOpZDUyCSU90QcaBvBui_Oz9vm6K588aNlyeMeDXydm__lx0Q5KdV6wZ21jOCkGejjnEgPMCN4ywDvi0jYscoBuE8gTPboe8FH2Kr1TgDJQO2C/w640-h426/DSC02452.JPG" width="640" /></a></div><div><br /></div><div>A couple p-clips hold down the cables and route them in a manageable direction:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtYAexTQDPRsw33xlatJg3Goz7OLLFTe-wfZyooC6uHO0MKcQQisqpr8cstHEfTHB4MkfGxKx4gHHa9KTheDCOVSPHktjX1AfcmWPj7HVCXvInBffAvmfiSqxYAjeMX3Lphrfd7fwYE-p39PCFFiaOfdW7EfZByJV3BdCDR3K7kOXjTTX2aiNy2iV7/s6000/DSC02450.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtYAexTQDPRsw33xlatJg3Goz7OLLFTe-wfZyooC6uHO0MKcQQisqpr8cstHEfTHB4MkfGxKx4gHHa9KTheDCOVSPHktjX1AfcmWPj7HVCXvInBffAvmfiSqxYAjeMX3Lphrfd7fwYE-p39PCFFiaOfdW7EfZByJV3BdCDR3K7kOXjTTX2aiNy2iV7/w640-h426/DSC02450.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The console was mounted to the power switch enclosure with a scrap piece of aluminum u-channel:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBGVfVAZ0JSpMP1aF_x5Tqwz3Y-ZP8r75GoS_oEd92U5TtsGFbodxvrVDW1xLEs3RWBR5tpJ5nWqb1A-YelRso36DsU_Q5Fby8RpWHDfF6ynUoC6KVFXf6ckHGYTzn6Jn2EhglVRYUI5cV-Yq0vswYjw42M71wkzisIm8v3MuoiIaKIZU10351Muvz/s6000/DSC02476.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBGVfVAZ0JSpMP1aF_x5Tqwz3Y-ZP8r75GoS_oEd92U5TtsGFbodxvrVDW1xLEs3RWBR5tpJ5nWqb1A-YelRso36DsU_Q5Fby8RpWHDfF6ynUoC6KVFXf6ckHGYTzn6Jn2EhglVRYUI5cV-Yq0vswYjw42M71wkzisIm8v3MuoiIaKIZU10351Muvz/w640-h426/DSC02476.JPG" width="640" /></a></div><div><br /></div><div>And here it is all set up:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJVZ2-Rrhs3HIFxbYxNTLEgGFsqs572nOhA89UnevVUofcFcYDZZYBNy9aZtQlZbYtxOXaDKDuzo4-fmy480XJ2ms84YZmbzOLN4qbvTi8B_ubEdQPmFF0cuVxpEdnx0WQqWJ2CQJBv5sPhGt55yPWmRyPyhbo7wW71Ins0KhfIDZZ9W92b0yZkC21/s6000/DSC02473.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJVZ2-Rrhs3HIFxbYxNTLEgGFsqs572nOhA89UnevVUofcFcYDZZYBNy9aZtQlZbYtxOXaDKDuzo4-fmy480XJ2ms84YZmbzOLN4qbvTi8B_ubEdQPmFF0cuVxpEdnx0WQqWJ2CQJBv5sPhGt55yPWmRyPyhbo7wW71Ins0KhfIDZZ9W92b0yZkC21/w640-h426/DSC02473.JPG" width="640" /></a></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com4tag:blogger.com,1999:blog-910685024071367839.post-52801185734760360702022-11-02T08:11:00.001-04:002022-11-02T08:11:52.062-04:00Mini Cheetah Clone TeardownNot long after my masters thesis went online, clones of the mini cheetah actuators started showing up on AliExpress/Alibaba. Within another six months, there were clones of the whole robot. A dream outcome for the project - early on in the project I joked that it would be great if I could buy the stuff I designed from China cheaper than I could make it for (hence the original name, <a href="https://build-its-inprogress.blogspot.com/search/label/HobbyKing%20Cheetah">HobbyKing Cheetah</a>), but it really happened. Now, a few years later, I have one of the clones. <div><br /></div><div><a href="https://isopack.blogspot.com/">Bayley</a> (who also has one of these robots) put me in touch with someone from Dogotix (or as the manual calls it, <i>Shenzhen Dogo Robot Technology Co., Ltd.</i>). He said something to the effect of "I'm not making them any more but my friend still is, we'll put one together for you". And a month or so later a robot appeared. Robots identical to the one I got seem to be available from a variety of places (AliExpress from multiple sellers, <a href="https://www.robotdigg.com/product/1667/">RobotDigg</a>), so I'm still not sure if there's just one manufacture behind the scenes, or several building the exact same thing.<br /><div><br /></div><div>And here it is:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDELqD2NfXa_p0le2CTem8tDu5dHYF5LMNG-OHGQzoN-ljJvRvQg75npvYzmzuyMNoxcELcxKg0pZaFoiTz7bGIKS4DeZ4S9wMV_UI-_6VUZUWiRfG3vqMhkBgbX2HMTYbNAZgQLbIFTzVYyrpy4WvfEU28MYh_75wd-DCdFg-lQsAMutXqNNbOuFZ/s6000/DSC03624.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDELqD2NfXa_p0le2CTem8tDu5dHYF5LMNG-OHGQzoN-ljJvRvQg75npvYzmzuyMNoxcELcxKg0pZaFoiTz7bGIKS4DeZ4S9wMV_UI-_6VUZUWiRfG3vqMhkBgbX2HMTYbNAZgQLbIFTzVYyrpy4WvfEU28MYh_75wd-DCdFg-lQsAMutXqNNbOuFZ/w640-h426/DSC03624.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKpp6hvANnjx0BnjuehaCUD633Oby9n8W3RqBj57IvKzikiR3uGq6lvpWWfDvEtIQZhPYKckU04CLjG5QZoqPe_yN3JBLOX5gGU_eXrGiBcZoHmxynYEYPJWa0_bQ3Pq7c5gxzUnXl60Oo1dxX45SeCB6vLbSM2bataOxmjhxCsijppH33IsLiVHn7/s6000/DSC03625.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKpp6hvANnjx0BnjuehaCUD633Oby9n8W3RqBj57IvKzikiR3uGq6lvpWWfDvEtIQZhPYKckU04CLjG5QZoqPe_yN3JBLOX5gGU_eXrGiBcZoHmxynYEYPJWa0_bQ3Pq7c5gxzUnXl60Oo1dxX45SeCB6vLbSM2bataOxmjhxCsijppH33IsLiVHn7/w640-h426/DSC03625.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">First power-up after reading the <a href="https://drive.google.com/file/d/1V88BLv0Nf0EUJCzWKiGlQtFjvUyTo79s/view?usp=sharing">manual</a>:</div><div><div><br /></div><div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/t5SHUWb6kH4" title="YouTube video player" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">We have some miniature sheep (<a href="https://en.wikipedia.org/wiki/Ouessant_sheep">Ouessant</a>) out behind my house (not <i>my </i>sheep, the owners of the property rent out the field out back). I was curious how they'd react to the robot:</div><div style="text-align: center;"><br /></div><div style="text-align: center;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/ga6HvMP-JtI" title="YouTube video player" width="560"></iframe></div></div></div><div style="text-align: center;"><br /></div><div style="text-align: left;">The backflip didn't work in the video above, where the battery was nearly dead, but worked once it was charged:</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmsLfVlkWQ3sAXtSVaKWu8dRcO_mSDcXO66VOOqbiMVCkvpqBm5DVBbmXMmnkrJX5wmAG9g8UPiRG9zVU3ztiMgRnJX96kRXFWBlS1dVgyK-Soyx8O0_cdsWNggCWZYTiGF4WAvG4fuUBN4pzi6tpo4_f2swYNbCP_QjX1yQkkzeNjH2Iz9flwEL-c/s660/backflip.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="409" data-original-width="660" height="397" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmsLfVlkWQ3sAXtSVaKWu8dRcO_mSDcXO66VOOqbiMVCkvpqBm5DVBbmXMmnkrJX5wmAG9g8UPiRG9zVU3ztiMgRnJX96kRXFWBlS1dVgyK-Soyx8O0_cdsWNggCWZYTiGF4WAvG4fuUBN4pzi6tpo4_f2swYNbCP_QjX1yQkkzeNjH2Iz9flwEL-c/w640-h397/backflip.gif" width="640" /></a></div><div style="text-align: center;"><br /></div><div style="text-align: left;">Since the robot works, time to take it apart. On the operating table:<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1k6XIPUpgoVqYObuerY3JhmmUCNc4MSlL6iQZoDrMqOZFc69PVhEQFzWrdGVyFSJXx7QJe13XO-geKhkCtz-_hen0EUeYqnReGYmL1cQ1-_Te7VTrWb0Ln70fMx0R_gzL9YcNrkKok2uA9okTEziGgbbC2Y5s_NN1EvWsg5lsmOb0igsY8LQwIovA/s6000/DSC03666.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1k6XIPUpgoVqYObuerY3JhmmUCNc4MSlL6iQZoDrMqOZFc69PVhEQFzWrdGVyFSJXx7QJe13XO-geKhkCtz-_hen0EUeYqnReGYmL1cQ1-_Te7VTrWb0Ln70fMx0R_gzL9YcNrkKok2uA9okTEziGgbbC2Y5s_NN1EvWsg5lsmOb0igsY8LQwIovA/w640-h426/DSC03666.JPG" width="640" /></a></div><br /><div style="text-align: left;">First hilarious mechanical detail, the feet are still squash balls:<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7WwgUYkX6zK8Qmgl9Ntl4rItWIox-3zQ5GxHhc2LulYWYNWzT8ynHqV4MCft8hrtdglJY8tuYh44c_lg4ymvT7ruzZdlanuSbBxCeu4LJD_SLom3f9ArYtoscz3K9xMj6kbBhAO6T9J-iKuIc6KIdGnft4JNDPLaL7XWD2qDd6sTvkJvO2ZgmzI_s/s6000/DSC03679.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7WwgUYkX6zK8Qmgl9Ntl4rItWIox-3zQ5GxHhc2LulYWYNWzT8ynHqV4MCft8hrtdglJY8tuYh44c_lg4ymvT7ruzZdlanuSbBxCeu4LJD_SLom3f9ArYtoscz3K9xMj6kbBhAO6T9J-iKuIc6KIdGnft4JNDPLaL7XWD2qDd6sTvkJvO2ZgmzI_s/w640-h426/DSC03679.JPG" width="640" /></a></div><div><br /></div><div>The squash balls are stuck onto some SLA printed "socks", glued onto the lower leg - just the way I did it on the original robot. The<a href="https://build-its-inprogress.blogspot.com/2019/11/building-all-robots.html"> later robots I made</a> had easier to replace feet.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLRGtbHYRPMcc0q5VMdMiOtyvxDGl9nJqZFOcs2MVkaZGgxrP_yZJ5pJRZJp4y3yBUXfL-8kO-IuRNvus5q6MP9rBLjdpYt7QwCDS45krlrUr04X1EmWqWekHk1jBjG5cxr2Y2bA0gq_8j20i9mOQrEoX6L-NwWtnatIxwf3UK6wg54__NqTAolsRs/s6000/DSC03681.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLRGtbHYRPMcc0q5VMdMiOtyvxDGl9nJqZFOcs2MVkaZGgxrP_yZJ5pJRZJp4y3yBUXfL-8kO-IuRNvus5q6MP9rBLjdpYt7QwCDS45krlrUr04X1EmWqWekHk1jBjG5cxr2Y2bA0gq_8j20i9mOQrEoX6L-NwWtnatIxwf3UK6wg54__NqTAolsRs/w640-h426/DSC03681.JPG" width="640" /></a></div><br /><div style="text-align: left;">The major leg and actuator structures are all die cast! Visible ejector pin marks:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ9Ca7y1QD-sO4A8HZMR1Fa4RG47ipAO_C3YBf6QUyPrlCPvwQ3pHr4shjHaJ0S46X2zB74CALq3f1lfyemj03Y9jzlgauPC8aMFmXNmrphjgW4Jjq1B8TBWiArrrkOhHoC0FLmnYFiLUGq-Fw7-aZ00j4aaWP6uxetvoQxZDEZRtMVaO3ugMoUFhn/s6000/DSC03669.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ9Ca7y1QD-sO4A8HZMR1Fa4RG47ipAO_C3YBf6QUyPrlCPvwQ3pHr4shjHaJ0S46X2zB74CALq3f1lfyemj03Y9jzlgauPC8aMFmXNmrphjgW4Jjq1B8TBWiArrrkOhHoC0FLmnYFiLUGq-Fw7-aZ00j4aaWP6uxetvoQxZDEZRtMVaO3ugMoUFhn/w640-h426/DSC03669.JPG" width="640" /></a></div><div><br /></div><div>Cracking the leg open - the robot has a 3-piece leg upper design, which on the original Mini Cheetah was a relic of the design of the <a href="https://www.youtube.com/watch?v=FnQGPGG-vuQ">teleoperation setup I built</a>, which had one actuator on each side of the leg. I originally thought the Mini Cheetah legs were going to have the same layout, but I ended moving things around. But I'd already machined all the leg parts myself on the lab Haas, so I wasn't going to re-do all that work. Amusing that they just copied this instead of doing a simpler 2-part clamshell like I did on the later robots.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUK3aOXz1J-T3PMYeceiQ95Hb0J_7Wt7F97Kjmt6BSEir9a-pAka8VULuItWxRs0s-PQ5Tw5nrLudHRr-akPJN3rGbQuWOIqdge0nYOAFJl0rB-ajln3fp0_7unCd57r98Jsa0SK4O4vnKa9VF8W3bfBlDvP9b4Fvj2o4praLJEdp5Jdvm-QKNnMg/s6000/DSC03686.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUK3aOXz1J-T3PMYeceiQ95Hb0J_7Wt7F97Kjmt6BSEir9a-pAka8VULuItWxRs0s-PQ5Tw5nrLudHRr-akPJN3rGbQuWOIqdge0nYOAFJl0rB-ajln3fp0_7unCd57r98Jsa0SK4O4vnKa9VF8W3bfBlDvP9b4Fvj2o4praLJEdp5Jdvm-QKNnMg/w640-h426/DSC03686.JPG" width="640" /></a></div><div><br /></div><div>More molding marks inside the upper leg structure:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIG9stpLCNZHplAtzseOFbdiynfe_-2Hl2_xJEfM7pqQ5pdgdfbj9F9XKi57rk3sZNpCfchIVXWLU6YndzBVHEdwFDeBevYG-1sBA9VjCi_QGt8jY9pi3J_P5imo7pkb-IO88zdUityUS5VEz28QuiWpQf0fTxxMr38x9gb2kINbEfswg_TzJy3_tx/s6000/DSC03687.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIG9stpLCNZHplAtzseOFbdiynfe_-2Hl2_xJEfM7pqQ5pdgdfbj9F9XKi57rk3sZNpCfchIVXWLU6YndzBVHEdwFDeBevYG-1sBA9VjCi_QGt8jY9pi3J_P5imo7pkb-IO88zdUityUS5VEz28QuiWpQf0fTxxMr38x9gb2kINbEfswg_TzJy3_tx/w640-h426/DSC03687.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The knee belt isn't a Gates belt like I used, and has fiberglass tensile members rather than Kevlar. A few spare belts were shipped with the robot, that's probably why. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLixkEnuQXBEwy2n6iaBL-Q0iaPaQYKWoKDh3e6Amuv9O4oZOBNJW4qXK8Hdd2BJYvMAUXpik4m86WZCSNC6tU-SNCdmZhjHDUH-pgMFbyeMihttOvAKRsnYFZU4fDsq0KOC8exzplFJ2f3QaJwoVgy03A9W4iqwMtAdxAgczdEK6GbI7_ALyXuzpt/s6000/DSC03700.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLixkEnuQXBEwy2n6iaBL-Q0iaPaQYKWoKDh3e6Amuv9O4oZOBNJW4qXK8Hdd2BJYvMAUXpik4m86WZCSNC6tU-SNCdmZhjHDUH-pgMFbyeMihttOvAKRsnYFZU4fDsq0KOC8exzplFJ2f3QaJwoVgy03A9W4iqwMtAdxAgczdEK6GbI7_ALyXuzpt/w640-h426/DSC03700.JPG" width="640" /></a></div><div><br /></div><div>Close-up of one of the belt tensioners - the roller is a drawn cup needle roller bearing, which isn't great since it doesn't evenly support the full width of the belt. Tensioner looks a little anemic too, I wouldn't be surprised if they get bent (especially if the belts are upgraded to kevlar). After breaking the first set of tensioners on the original Mini Cheetah doing backflips, I made them way beefier and 7075.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNC5CVqVDu19omA0u59rAavkb__cKhuBmmYPEKXfAQ_o6PsY8N5eEw7apppjbyQoDcI4-VoRisKwo7kHEaNPKhsszfKy_t-5Yzzu_vYmdV0yXcoC1jMWe9XZ97Lvcl9od2xRwr-HyK73bxyKfJipx4cX2i0KUeX7c2gKP4iIYnUBX8Gf7C34EefUzB/s6000/DSC03696.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNC5CVqVDu19omA0u59rAavkb__cKhuBmmYPEKXfAQ_o6PsY8N5eEw7apppjbyQoDcI4-VoRisKwo7kHEaNPKhsszfKy_t-5Yzzu_vYmdV0yXcoC1jMWe9XZ97Lvcl9od2xRwr-HyK73bxyKfJipx4cX2i0KUeX7c2gKP4iIYnUBX8Gf7C34EefUzB/w640-h426/DSC03696.JPG" width="640" /></a></div><div><br /></div><div>One kind of neat change, the actuators have mounting features built-in so they can be axially stacked at the hip. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs80-k2P0hn4Iigg8YbPop8gdMvicxCVBBkFITcGtbgZ7cE6hivgIkjFENU5lV9-Rnw21dXwXEMYJF1aS-dG1UaQ1g6GZSVN_rv0IganMfroVARhKpGZ--UQ4GNx8XkD7-6EQ1lt_Z5PD1Z8DcXrsXOX0JK6BZJSFMiwjgr0xt_2AGfKzYUlrXZKEL/s6000/DSC03701.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs80-k2P0hn4Iigg8YbPop8gdMvicxCVBBkFITcGtbgZ7cE6hivgIkjFENU5lV9-Rnw21dXwXEMYJF1aS-dG1UaQ1g6GZSVN_rv0IganMfroVARhKpGZ--UQ4GNx8XkD7-6EQ1lt_Z5PD1Z8DcXrsXOX0JK6BZJSFMiwjgr0xt_2AGfKzYUlrXZKEL/w640-h426/DSC03701.JPG" width="640" /></a></div><div><br /></div><div>Cracking the cap off the motor drive - more die casting:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1pJjuqgCu3E25My2kukurGBPW9J2R3TytQkqWKTJ_ioiUX9V1uPe2hsk4s9dZsEjw5EI0J8QgSHlN9_q4ndx-b-KVEcpXHeX-VtNDsmVhzk_RvnGrsG6RH-eT7Zu6mObHimVeysIEnleQ_tI-1obBgb5fLMsG3f4A_4bQdebajz5gsvoXQiiUWj2g/s6000/DSC03706.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1pJjuqgCu3E25My2kukurGBPW9J2R3TytQkqWKTJ_ioiUX9V1uPe2hsk4s9dZsEjw5EI0J8QgSHlN9_q4ndx-b-KVEcpXHeX-VtNDsmVhzk_RvnGrsG6RH-eT7Zu6mObHimVeysIEnleQ_tI-1obBgb5fLMsG3f4A_4bQdebajz5gsvoXQiiUWj2g/w640-h426/DSC03706.JPG" width="640" /></a></div><div><br /></div><div>Close-up of the motor drive. It uses the same STM32F446RET6 micro and DRV8323RS gate driver I do, but different FETs and passives. The power and CAN wiring are hard soldered into the motor drive PCB - I'm not a fan of that. </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisG0KRGDHVBv0xgY_RyG7KfYld8iNe-Cd6rvk3wMxfoyFaexdlZX1e2EOY5SmNm_CSj4afOz9tsHgEdeOhtBPplwQZ23rry-8Odzhj3e_sadCQibu69cKNML-wJz7CRTJDQyrjJqXHfKMcbib3U97_XQczOEW7Vpr9ZhJM_-zhJvko_SJ2L5pmX3Fd/s4782/DSC03717%20(2).JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3188" data-original-width="4782" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisG0KRGDHVBv0xgY_RyG7KfYld8iNe-Cd6rvk3wMxfoyFaexdlZX1e2EOY5SmNm_CSj4afOz9tsHgEdeOhtBPplwQZ23rry-8Odzhj3e_sadCQibu69cKNML-wJz7CRTJDQyrjJqXHfKMcbib3U97_XQczOEW7Vpr9ZhJM_-zhJvko_SJ2L5pmX3Fd/w640-h426/DSC03717%20(2).JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">There was a surprise on the underside of the motor drive - in the middle is an AMS AS5047 encoder IC (one I've used in the past but switch away from due to availability), but circling the encoder is another board with an array of analog hall sensors:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyhln8j3eJmmhPXcWPLz5zUq2D0Fx9kkrBD1hWN81eufUR71iTEg5oaHCfAjUh7Hnh34N5fkOGHV9JDe1vV61zgyoAKruZRr-9339lfhsi3UPtIdtNJlf9TjLc8w3VIv4vg6o2eEtNiTw4oIEw7XjYVY1hsh_h_YPr-tAaZRwWWwtLT6Q_4HDe3ZwF/s6000/DSC03722.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyhln8j3eJmmhPXcWPLz5zUq2D0Fx9kkrBD1hWN81eufUR71iTEg5oaHCfAjUh7Hnh34N5fkOGHV9JDe1vV61zgyoAKruZRr-9339lfhsi3UPtIdtNJlf9TjLc8w3VIv4vg6o2eEtNiTw4oIEw7XjYVY1hsh_h_YPr-tAaZRwWWwtLT6Q_4HDe3ZwF/w640-h426/DSC03722.JPG" width="640" /></a></div><div><br /></div><div>Through these holes in the rotor, you can see the corner of a bar magnet - the magnet is glued to the back of the planet carrier, on the output of the actuator. This is actually a pretty neat trick - the analog hall sensors and bar magnet give rough output position - accurate enough to determine which rotation the input encoder is on relative to the the output. For the Mini Cheetah, I didn't have any sort of output encoder, so the robot had to be turned on in a zero-configuration, within one rotor rotation (60 degrees at the output). That would be totally unacceptable for a product, so it's neat to see this cheap solution that doesn't use a full-fledged output encoder. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0AJqwupOc5QGcjB1CXvLDgvySobbvPvwf5bj-VtdUxAULIh_x7Y4cD0nojOrSBVYuhMQYiuvOFfQIYWs8O2hRcq49Dzf27c6OXUidWVjY3flIiPW_d0PN5kBgR4llf8HgHE9P_H1Ybc-HGWxjdwj4e3BLXTF92qB5zpPjQN17MDgtD60g1e_Fx6qj/s4304/DSC03725%20(2).JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2869" data-original-width="4304" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0AJqwupOc5QGcjB1CXvLDgvySobbvPvwf5bj-VtdUxAULIh_x7Y4cD0nojOrSBVYuhMQYiuvOFfQIYWs8O2hRcq49Dzf27c6OXUidWVjY3flIiPW_d0PN5kBgR4llf8HgHE9P_H1Ybc-HGWxjdwj4e3BLXTF92qB5zpPjQN17MDgtD60g1e_Fx6qj/w640-h426/DSC03725%20(2).JPG" width="640" /></a></div><div><br /></div><div class="separator" style="clear: both; text-align: left;">Cracking the covers open - looks like a bit of a wiring mess in there:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdMMHLtLwCk4Q1-69_3uIYay2ALDO-X0nFb5V_fF1t3kfDIdwYoqYr-9C2uRnDVtLXkfowv3VURETRGUivHbCKhk2EvxQleWhTDmsLMLLktZHdQD7_r6M_aUfG1jniUM-ZbLn5f2h21ajYRomWi5JJhjA_Crxwq6l8XM1hcwqF5XQv0L0VAvDc3HbN/s6000/DSC03735.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdMMHLtLwCk4Q1-69_3uIYay2ALDO-X0nFb5V_fF1t3kfDIdwYoqYr-9C2uRnDVtLXkfowv3VURETRGUivHbCKhk2EvxQleWhTDmsLMLLktZHdQD7_r6M_aUfG1jniUM-ZbLn5f2h21ajYRomWi5JJhjA_Crxwq6l8XM1hcwqF5XQv0L0VAvDc3HbN/w640-h426/DSC03735.JPG" width="640" /></a></div><div><br /></div><div>Closer view of the power management board. In addition to the precharge circuit, there are a few interesting features here that I didn't have. First, there's bus current sensing and over-current protection. The big bug-like component on the right of the board is an Allegro hall effect current sensor. The two DIP switches let you set the current limit (or turn it off, as you need to do for backflips...). Also neat, there's an STM32F103 on the board, and an isolated CAN circuit copied from the SPIne board. The CAN connector isn't populated, and I don't know if the micro even has any firmware on it, but presumably you could hook this into one of the CAN busses and log battery voltage and current.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6GuO-BK77rnRf1zZCopUdMJIJlmrxswEl-GyFiTeTFAiDNFSa98LnWyRCEwPQlKty6QTZnQnrO9cmD_HA4bgLm2brCCvu2noUvrissEKM_DCjs-ThXChEZKVVOeP_elPyqs2o4WlJ7c8DdU71TTbhR4bFlpO5LgqbT5wnuouY9MEgzSqcmdIYJIbR/s6000/DSC03760.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6GuO-BK77rnRf1zZCopUdMJIJlmrxswEl-GyFiTeTFAiDNFSa98LnWyRCEwPQlKty6QTZnQnrO9cmD_HA4bgLm2brCCvu2noUvrissEKM_DCjs-ThXChEZKVVOeP_elPyqs2o4WlJ7c8DdU71TTbhR4bFlpO5LgqbT5wnuouY9MEgzSqcmdIYJIbR/w640-h426/DSC03760.JPG" width="640" /></a></div><div><br /></div><div>Here's the robot propped up in a pin-up pose for accessing the side panel screws. A pose the robots were frequently in for (dis)assembly back at the <a href="https://biomimetics.mit.edu/">lab</a>.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfRHpeMz5Iu4oRCHQ9JlUZhfq-VnallyXeMGePtqqox786SJ6qLoOmZix6Ex3WZ7oiQ7GVLR1FpG4WGtNBSPpMaN9Hvswgs_5WSAcOaFY-IOYSPjIICJ7q9-ZCZQu_OXYkB834OLwG9WlQy2GHSwtAaMKACyUsOtw3MJf5kKC2S9_S-r86bRg4E-jX/s6000/DSC03744.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfRHpeMz5Iu4oRCHQ9JlUZhfq-VnallyXeMGePtqqox786SJ6qLoOmZix6Ex3WZ7oiQ7GVLR1FpG4WGtNBSPpMaN9Hvswgs_5WSAcOaFY-IOYSPjIICJ7q9-ZCZQu_OXYkB834OLwG9WlQy2GHSwtAaMKACyUsOtw3MJf5kKC2S9_S-r86bRg4E-jX/w640-h426/DSC03744.JPG" width="640" /></a></div><div><br /></div><div>Nothing too exciting on the panels - a pair of switches for motor and computer power that plug into the power boards, and a chassis mount ethernet extension plugging into the computer</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMuOEarysg2bEoQVhFOzLh5V6Lyt3Wfl8e6hpmnVWa-eanQJ_oG3zli9KHL6E3MGOEQPRbU-mgZz5HDfqQ_xPHSsuJcUVQJBHygKi-LpLJCJQmbQUL4Qe4rzHiMuvxRrCxRch7XzWWdOm__NpdGNAKF3YGS3a_uQKGzv2QOra09VWl7jTaAV37Q8Z1/s6000/DSC03746.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMuOEarysg2bEoQVhFOzLh5V6Lyt3Wfl8e6hpmnVWa-eanQJ_oG3zli9KHL6E3MGOEQPRbU-mgZz5HDfqQ_xPHSsuJcUVQJBHygKi-LpLJCJQmbQUL4Qe4rzHiMuvxRrCxRch7XzWWdOm__NpdGNAKF3YGS3a_uQKGzv2QOra09VWl7jTaAV37Q8Z1/w640-h426/DSC03746.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM2GLG7-QWo9syLPLq4uGAn7riYXERphDEI-ulccNP6R_soC3hZIxtEFc21p_EnFBlo9gpr5K_iSPKgzn132OlgKx8GDIZzgE45Hp2G8-gq3v8RCuT-YCaQfJ4pCfInPgQvozDf0garO2TLnZK8j6dSXP0fLq9VmbyuDoyq-HqG0Y89vtN8DXSPPm0/s6000/DSC03747.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM2GLG7-QWo9syLPLq4uGAn7riYXERphDEI-ulccNP6R_soC3hZIxtEFc21p_EnFBlo9gpr5K_iSPKgzn132OlgKx8GDIZzgE45Hp2G8-gq3v8RCuT-YCaQfJ4pCfInPgQvozDf0garO2TLnZK8j6dSXP0fLq9VmbyuDoyq-HqG0Y89vtN8DXSPPm0/w640-h426/DSC03747.JPG" width="640" /></a></div><div><br /></div><div>The battery on this robot is integrated rather than swappable (I guess you can't ship off-the-shelf drill batteries in a product), so there's a charging port on the outside:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgye71kRe3jhdo9dYMgjbrqMaGOrwIWr7GaMz2NBlDrPBL8KrYuRpocbMeSxohV_x3zRhpfmAdifxQWKb3Tz5zGNRKIoRe6xuB-MDX0yj253D5exf6su1JsD9VjsGW542hB7cKiYxeuvq889oMAySGQXDawHOKSFlqv0bTmWUMaPg75xEefB9Xb4_UT/s6000/DSC03749.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgye71kRe3jhdo9dYMgjbrqMaGOrwIWr7GaMz2NBlDrPBL8KrYuRpocbMeSxohV_x3zRhpfmAdifxQWKb3Tz5zGNRKIoRe6xuB-MDX0yj253D5exf6su1JsD9VjsGW542hB7cKiYxeuvq889oMAySGQXDawHOKSFlqv0bTmWUMaPg75xEefB9Xb4_UT/w640-h426/DSC03749.JPG" width="640" /></a></div><div><br /></div><div>All the panels removed. Blue battery visible under the power board:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbil4OpW1pzaT52qTeqADJhxBUhaiaCHTsY3i8tEzQ4sqUPSvJ1kk91PEhD6xrHVZG5MZujh9m8v-l0Y9MBGfRsGTlHPhfNG_qGiTWogWW_KZ2CM3CNeAyKSH40TCzQV9TQ8-ofKmI1QLFHc1LZ3JMIsG6w8-1zXSw3336CZp-O82-dX0qe7BbX5vS/s6000/DSC03752.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbil4OpW1pzaT52qTeqADJhxBUhaiaCHTsY3i8tEzQ4sqUPSvJ1kk91PEhD6xrHVZG5MZujh9m8v-l0Y9MBGfRsGTlHPhfNG_qGiTWogWW_KZ2CM3CNeAyKSH40TCzQV9TQ8-ofKmI1QLFHc1LZ3JMIsG6w8-1zXSw3336CZp-O82-dX0qe7BbX5vS/w640-h426/DSC03752.JPG" width="640" /></a></div><div><br /></div><div>Rather than wiring harnesses from the legs straight to the power board, there are power/CAN distribution boards on both ends of the robot, with one XT30 connector and CAN connector per motor:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdLN9A_QrmHzyIa9sGX1zBVN_jlnZN1nykaJV6DJZmC4VeyEf9JbgJi7F_UZixCV_euScN680hkZSpVQheOfGSmQPeJj67tsOd9nEcw4dFJySiJS9gtETf65Gxi8iq5PX05L7eZHKQBG1y6fH8swfTlNk-h_RlAEopaDXAQn3dPob6CXDoaZAH0m0X/s6000/DSC03755.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdLN9A_QrmHzyIa9sGX1zBVN_jlnZN1nykaJV6DJZmC4VeyEf9JbgJi7F_UZixCV_euScN680hkZSpVQheOfGSmQPeJj67tsOd9nEcw4dFJySiJS9gtETf65Gxi8iq5PX05L7eZHKQBG1y6fH8swfTlNk-h_RlAEopaDXAQn3dPob6CXDoaZAH0m0X/w640-h426/DSC03755.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-K4TSRMK0rI_5S_QIznKVqkIa3iRvG1bHcZGKrAQEQdxwQt5VrdIv1S7nx8SN8PeHEbPi60LHwJ5cMed902THo1sJaNlqAVUdrSsqYY-fO-FRNthVYVaRTRUAYkQgdkuYGJQIXc5n4PEIuDeATxJSUfzqfSwXFy-TCQ41EJnoom5fyHov8jM96mw0/s6000/DSC03756.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-K4TSRMK0rI_5S_QIznKVqkIa3iRvG1bHcZGKrAQEQdxwQt5VrdIv1S7nx8SN8PeHEbPi60LHwJ5cMed902THo1sJaNlqAVUdrSsqYY-fO-FRNthVYVaRTRUAYkQgdkuYGJQIXc5n4PEIuDeATxJSUfzqfSwXFy-TCQ41EJnoom5fyHov8jM96mw0/w640-h426/DSC03756.JPG" width="640" /></a></div><div><br /></div><div>The computer (<a href="https://up-board.org/up/specifications/">UP Board</a>) and SPIne board (SPI to quad-CAN interface) is nearly unchanged from my design. Curiously, they aren't running the CAN grounds to the actuators, even though the CAN interfaces are isolated. I haven't probed around too closely, but it sure looks like the CAN transceivers on the computer side are just floating. Seems kind of sketchy. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4jm0Pc9GG9hTIN4eB3iLD6DMzi8a-D30Lk2fJFs1FoCLBzb5Jk5OSycEkOISaWyA6zAygdrG6NepIQzDVQcV7sblygpDL7C7x_hs9q8xMoI1RVj4OZITuB4rN-glLHbMBJ5inmLdfRKDtpVUYXWwfQH4Sm1aArztgD3vgXoHOMf1uoA7VhZf90Dyh/s6000/DSC03758.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4jm0Pc9GG9hTIN4eB3iLD6DMzi8a-D30Lk2fJFs1FoCLBzb5Jk5OSycEkOISaWyA6zAygdrG6NepIQzDVQcV7sblygpDL7C7x_hs9q8xMoI1RVj4OZITuB4rN-glLHbMBJ5inmLdfRKDtpVUYXWwfQH4Sm1aArztgD3vgXoHOMf1uoA7VhZf90Dyh/w640-h426/DSC03758.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Pulling off the power board I found this funny assembly issue - the coax cable running from the RC receiver to the antenna on the back of the robot somehow got snaked through the leads of the isolated power supply powering the computer:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSC5EWPRyw1BVRuEMfI4faS0KA5hRepd2GEmeJytgH2qcetL3KXGF4w4f9TZdlCJoUUaeco8I5swQ2Qvu66p3lZLeBS9VxZPzNwfXQd_u1LsaWGqIevFLa1K2pTwWGG1lK5aF3oE8Q3Fs_LSApur8hQUE9GPrzNFUqha0myxkOTsdeSgj2f3WXzq0S/s6000/DSC03770.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSC5EWPRyw1BVRuEMfI4faS0KA5hRepd2GEmeJytgH2qcetL3KXGF4w4f9TZdlCJoUUaeco8I5swQ2Qvu66p3lZLeBS9VxZPzNwfXQd_u1LsaWGqIevFLa1K2pTwWGG1lK5aF3oE8Q3Fs_LSApur8hQUE9GPrzNFUqha0myxkOTsdeSgj2f3WXzq0S/w640-h426/DSC03770.JPG" width="640" /></a></div><div><br /></div><div>6s LiPo battery built in - I didn't take it apart any further than this:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM8tIYIz72gfOSzyYPS-t9M2brqizHTofhbzFUGyvPcJ94CQHhG2OV7vj24rXPnck-SGc0O8VWhEPQfQB__0jHKB3sTAg66rHlFVmpB2Q0uI2pmesCtWZ9S58WJmCr6F2Fjv6LGWQ9p0h-uq-RgLbVkNdhCrTWrgPrPsC8hCa4B-YIsM2nA5rnycyr/s6000/DSC03771.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="6000" data-original-width="4000" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM8tIYIz72gfOSzyYPS-t9M2brqizHTofhbzFUGyvPcJ94CQHhG2OV7vj24rXPnck-SGc0O8VWhEPQfQB__0jHKB3sTAg66rHlFVmpB2Q0uI2pmesCtWZ9S58WJmCr6F2Fjv6LGWQ9p0h-uq-RgLbVkNdhCrTWrgPrPsC8hCa4B-YIsM2nA5rnycyr/w426-h640/DSC03771.JPG" width="426" /></a></div><div><br /></div><div>I was expecting a cell-phone grade IMU in this thing, but it actually has something kind of expensive, a <a href="https://www.yesense.com/yis300">YIS300</a>. Never heard of these before, but it seems similar to the Vectornav or Microstrain IMUs I used, with an on-board orientation estimate. These seem to be a few hundred dollars at least on AliExpress, so not cheap. The hot-glue based micro USB connector retention is... questionable.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVtb_Ipkv2ASJ6B7ExDIGy-IS9oR0l_T0yu8O2Ug5wEEWMpeAgBJcc9D5HM2T-to6lFSt5N3ny0vwFOIefH76QAjX77L6ZUNwWoN0nX6KGxiSrSud0roTOf-qCjQzLDo5onAumuoXR7iA7tgQn0SzYNx7aeHBMT6tlVotBu5I-k113YGO3ll5X3_6k/s6000/DSC03773.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVtb_Ipkv2ASJ6B7ExDIGy-IS9oR0l_T0yu8O2Ug5wEEWMpeAgBJcc9D5HM2T-to6lFSt5N3ny0vwFOIefH76QAjX77L6ZUNwWoN0nX6KGxiSrSud0roTOf-qCjQzLDo5onAumuoXR7iA7tgQn0SzYNx7aeHBMT6tlVotBu5I-k113YGO3ll5X3_6k/w640-h426/DSC03773.JPG" width="640" /></a></div><br /><div>That's about it - I didn't want to recalibrate anything, so I didn't take the actuators fully apart. I don't have any concrete plans for the robot, but I'm sure it'll show up again here.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxLA2pghFby0l0vJKRKnSI5A43iugm4NoDS5gHI7WYOPwB0CpMgdKlGR0HB05lG8ticOFqnmGpDYD8FtNkZwKJfWjDnwvIrJhSGV8cCLgUMyqRNp7I8qyjdp3yqPCH8n7HU_g-Un7dRvcFKwSX7B4bmDhfFNVDkn1mwWiRjP1z9uYff7HFC2viP0gB/s6000/DSC03643.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxLA2pghFby0l0vJKRKnSI5A43iugm4NoDS5gHI7WYOPwB0CpMgdKlGR0HB05lG8ticOFqnmGpDYD8FtNkZwKJfWjDnwvIrJhSGV8cCLgUMyqRNp7I8qyjdp3yqPCH8n7HU_g-Un7dRvcFKwSX7B4bmDhfFNVDkn1mwWiRjP1z9uYff7HFC2viP0gB/w640-h426/DSC03643.JPG" width="640" /></a></div><br /></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com7tag:blogger.com,1999:blog-910685024071367839.post-45017602508322541762022-07-10T15:47:00.001-04:002022-07-10T15:47:37.055-04:00Varying Pitch Screw Robot: Finishing the Mechanism and First Tests<div class="separator" style="clear: both; text-align: left;">Here's the detailed post to go with the <a href="https://build-its-feed.blogspot.com/">pictures and videos I've been dribbling out</a> over the last few months.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><a href="https://build-its-inprogress.blogspot.com/2022/02/varying-pitch-screw-robot-build-progress.html">Last episode</a> the mechanism was mostly finished, and was just missing the guide rollers that constrain the screw to linear motion and react the motor torque on the screw.</div><div class="separator" style="clear: both; text-align: center;"><br /></div>Looking at the CAD cross section, there are 3 sets of 3 rollers ride in shallow axial grooves on the screw. The roller are spaced so that the screw is always supported, even as the rollers pass over the spiral grooves in the screw. In the cross-section below, the red things are pairs of flanged bearings supporting the rollers.<div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjASjVirIhGx4LCOB20EcRYc_bzcVcWPYQ0qQyL7DLjrf-CtteG1-LeWA0DwAWigJJu0TOlx7rzOleyUjdRPbug7lkhYQzoE1CdrwCkpJEA-Wicd4jwMY7m1XWZv9dyVR-a-PLygCRZGGsM9pjitOWv86qiu3E9m-wW7_VFhxwhy0rv3aErc70cQdAK/s2704/guide_roller_xsec.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1885" data-original-width="2704" height="446" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjASjVirIhGx4LCOB20EcRYc_bzcVcWPYQ0qQyL7DLjrf-CtteG1-LeWA0DwAWigJJu0TOlx7rzOleyUjdRPbug7lkhYQzoE1CdrwCkpJEA-Wicd4jwMY7m1XWZv9dyVR-a-PLygCRZGGsM9pjitOWv86qiu3E9m-wW7_VFhxwhy0rv3aErc70cQdAK/w640-h446/guide_roller_xsec.png" width="640" /></a></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The bump on the outside of the rollers was turned with a custom-made form tool. I machined the form tool on the CNC mill out of a piece of (allegedly) high speed steel. First I tried on a high speed steel lathe tool blank, but the small un-coated carbide endmill I tried with didn't last very long. I dug through my bin of lathe blanks and broken end mill shanks, and tested the hardness of a bunch of pieces against the lathe blank that foiled my first attempt. I found the shank of an old Harbor Freight HSS end mill, which was (perhaps unsurprisingly) appreciably softer than all the other pieces of HSS I had lying around. But the rollers are plastic, and I was making ~10 of them, not 1000's, so it was still hard enough. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I prepared the endmill shank on one of the <a href="http://miters.mit.edu/">MITERS</a> Bridgeports - milling the rounded sides flat, and cutting in a top rake and front clearance angle:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvF-7ZmaEXGLMqET27jkbZIv2E_MJKlW77jIwMDcckFKbghMaVtWm5cewWw8NXtpS7r6p0xDkPpDuLmw0S5kOi02YlFqD1IcNAFJqr-XJ2Txr-vO8XRywDvrjxdR2hy3MFT6z8ZAs0FHKfRzfICNKTx9s4Ubovz-pv-Ar1a0G7lqw2ZZLtxGuHAphK/s4608/IMG_20220320_205932134.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvF-7ZmaEXGLMqET27jkbZIv2E_MJKlW77jIwMDcckFKbghMaVtWm5cewWw8NXtpS7r6p0xDkPpDuLmw0S5kOi02YlFqD1IcNAFJqr-XJ2Txr-vO8XRywDvrjxdR2hy3MFT6z8ZAs0FHKfRzfICNKTx9s4Ubovz-pv-Ar1a0G7lqw2ZZLtxGuHAphK/w640-h480/IMG_20220320_205932134.jpg" width="640" /></a></div><div><br /></div><div>I stuck the tool in the <a href="https://build-its-inprogress.blogspot.com/2020/10/benchtop-5-axis-mill.html">CNC mill</a> to cut the profile:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZQ0rj0-P_MEClldka2Z63zKnIy7w2xrPi2EekZdewQGkgBeBG0Vfmp6WzNssJZ4gckHR6xPoP_mokJaoA0ndMNEhwpTeBiAvFqYnjd8I2_Pe5RM3npaaI7jQ9fBR7W5KUFsbCoeAcy40TuwwesesuWyrHWoakQoh2_9Uj72K8YnLxnL4VZJTob5By/s4608/IMG_20220418_201941236.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZQ0rj0-P_MEClldka2Z63zKnIy7w2xrPi2EekZdewQGkgBeBG0Vfmp6WzNssJZ4gckHR6xPoP_mokJaoA0ndMNEhwpTeBiAvFqYnjd8I2_Pe5RM3npaaI7jQ9fBR7W5KUFsbCoeAcy40TuwwesesuWyrHWoakQoh2_9Uj72K8YnLxnL4VZJTob5By/w640-h480/IMG_20220418_201941236.jpg" width="640" /></a></div><div><br /></div><div>And here's a close-up of the final tool and one of the machined rollers:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaG6MpNFmIJpmMiA0x3At6d5QORwmBk152-gc2XSLoLFgYKZ3XzPw8spITKXrXuzj8CBS-_WktCdUSNvVNR5cwNKniDNlmtTxdJ-IdhWQPCL-_Kc9mZw0vyb4DXBo6vVc4Ne3rMMN5ioMm7s1UTbDRno0iNTrco7fQysXIQLKGEA97kfCu1UXF7EXb/s3011/IMG_20220418_210004097%20(2).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2259" data-original-width="3011" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaG6MpNFmIJpmMiA0x3At6d5QORwmBk152-gc2XSLoLFgYKZ3XzPw8spITKXrXuzj8CBS-_WktCdUSNvVNR5cwNKniDNlmtTxdJ-IdhWQPCL-_Kc9mZw0vyb4DXBo6vVc4Ne3rMMN5ioMm7s1UTbDRno0iNTrco7fQysXIQLKGEA97kfCu1UXF7EXb/w640-h480/IMG_20220418_210004097%20(2).jpg" width="640" /></a></div><div><br /></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXITBzjznIC-SmcSD39Y8yRqnjg0zmkRcDeRUzGh_xHlk8o32okR6NptDsS_bFdJirnzJIaRok_4p_CoK_ttOk1uVI4aVJT6hX01xbYzef2weXM26fuIMgqlOCOL-QOG-S5xnlyAi_Eiy-wlQX6rwXP1josFRF2PhsA05SiH0ENedTXCdhePpv6mAG/s3522/IMG_20220419_210246952%20(2).jpg" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="2641" data-original-width="3522" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXITBzjznIC-SmcSD39Y8yRqnjg0zmkRcDeRUzGh_xHlk8o32okR6NptDsS_bFdJirnzJIaRok_4p_CoK_ttOk1uVI4aVJT6hX01xbYzef2weXM26fuIMgqlOCOL-QOG-S5xnlyAi_Eiy-wlQX6rwXP1josFRF2PhsA05SiH0ENedTXCdhePpv6mAG/w640-h480/IMG_20220419_210246952%20(2).jpg" width="640" /></a></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsSMhUdqFUwMHDzlxWNAJ6MIghpXFtInoChmU7JLg5bFgzEwtSAVL5Hfu0WFr6Z1F7by4Hgk2Jzf9cMjagIyrZm1Q4F2r1adlyWbxXQ3XhYkuDhhLUWHRWv4JRp0bMtrWPBqbclZBTbXe9HrGUXD9gTTriY1ZeoU5veshA7EE6HhkjS8y8ODCCZPN0/s800/ezgif.com-gif-maker%20(20).gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsSMhUdqFUwMHDzlxWNAJ6MIghpXFtInoChmU7JLg5bFgzEwtSAVL5Hfu0WFr6Z1F7by4Hgk2Jzf9cMjagIyrZm1Q4F2r1adlyWbxXQ3XhYkuDhhLUWHRWv4JRp0bMtrWPBqbclZBTbXe9HrGUXD9gTTriY1ZeoU5veshA7EE6HhkjS8y8ODCCZPN0/w640-h360/ezgif.com-gif-maker%20(20).gif" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>The axles for the rollers are undersized (h8 tolerance) dowel pins, which are a nice slip-fit into the bearing IDs. The fit between the dowels and the machined aluminum support piece is close enough that the pins can be pushed in and out by hand, but the friction is enough to keep them put for testing. They'll be permanently held in place by a drop of retaining compound on one side, which should still let me press the pins out if I need to.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbUUlEZoYm78gquI7SzyEsZPOrly3qvWEyUENFb76hMN4Q97Eu7PBMaNQCaAw0qTmhz6f02lqi5rVGZeHobh7cNHkfAJ_HaPpEfAU3ePw_5wMYmlnzPk0NdBh31AORjGA-ygmNPTteoU9fR4W8liNFVZXzsCEB72yiLKVWxwfmeCLYnqIc8MCFrLoJ/s5109/DSC02417%20(2).JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3406" data-original-width="5109" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbUUlEZoYm78gquI7SzyEsZPOrly3qvWEyUENFb76hMN4Q97Eu7PBMaNQCaAw0qTmhz6f02lqi5rVGZeHobh7cNHkfAJ_HaPpEfAU3ePw_5wMYmlnzPk0NdBh31AORjGA-ygmNPTteoU9fR4W8liNFVZXzsCEB72yiLKVWxwfmeCLYnqIc8MCFrLoJ/w640-h426/DSC02417%20(2).JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_RsvUnEynv1rN3w7CJSyXYofme3F5rcl5_B8tR_vTRPpRQQoChJ6QfByFvlCoquUzK4CM_vEZQXJ_mv9RKn-20BpELMXvZwVre5YYa89kiL2Uco599Vo13aWoanwldT7cLOjuM_2CwI99cIPdK1qaBn9iJnarOqP0iZTa5XDh-AS8-xhpRdMOXoio/s6000/DSC02415.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_RsvUnEynv1rN3w7CJSyXYofme3F5rcl5_B8tR_vTRPpRQQoChJ6QfByFvlCoquUzK4CM_vEZQXJ_mv9RKn-20BpELMXvZwVre5YYa89kiL2Uco599Vo13aWoanwldT7cLOjuM_2CwI99cIPdK1qaBn9iJnarOqP0iZTa5XDh-AS8-xhpRdMOXoio/w640-h426/DSC02415.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">With the rollers made, the mechanism was ready for testing under power. I was a little worried about commutation with the motor encoder offset through a 1:1 spur gear pair, but it worked fine. The first test was to apply a constant torque and make sure the mechanism felt smooth throughout its travel. </div><div class="separator" style="clear: both; text-align: center;"><br /></div>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/VZuGqg_7pwc" title="YouTube video player" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">Things felt good, so next I put it into closed-loop position control and thrashed the leg back and forth. I didn't notice until I filmed this video that the regen during acceleration was boosting the output voltage of the power supply up to >40V. I was lucky the motor controller didn't get toasted.</div><div style="text-align: center;"><br /></div><div style="text-align: center;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/kdp4xFlkIoQ" title="YouTube video player" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">During this testing I accidentally crashed the screw into the hardstop without a bumper - the cam followers ran into the end of the cam slots, so all the kinetic energy in the rotor went into shearing off the guide rollers. I remade all the rollers out of PEEK to give them a bit more strength. New PEEK one in black on the left, white delrin one with a chunk missing on the right:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc-89m3h_Q4PFfvaLJIY0BCf6-Vr9eqLLnh9DYAt_b8SSbspwIQ5oUfL4c0GfNcU2BkRIotDGVmUcWukvC1VgvIf5zsL9iqlwaoSoLiDoX6Z8C97nD4O_YBXKpUlcUBnfwcItA0R9pzcPEyGEB_XsI50WEzsJUaJHfTApJYKRfFHcuzZSfzyrOrPDp/s2583/IMG_20220525_225849344.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1937" data-original-width="2583" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc-89m3h_Q4PFfvaLJIY0BCf6-Vr9eqLLnh9DYAt_b8SSbspwIQ5oUfL4c0GfNcU2BkRIotDGVmUcWukvC1VgvIf5zsL9iqlwaoSoLiDoX6Z8C97nD4O_YBXKpUlcUBnfwcItA0R9pzcPEyGEB_XsI50WEzsJUaJHfTApJYKRfFHcuzZSfzyrOrPDp/w640-h480/IMG_20220525_225849344.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRmEX1OEdida73wBIXOaVS8Kn3GZUIOeU88lmcJZY_gzptmtPncF4NFQfTfmeI3mc01kVZKRq8Z--sYYfhfqLZX-900EjTeTW4Cp-l36zZXQkQ_qHi6brb5vUtjWjosQPF4ccyQTA1-jp2kv2GT3yIIylXvLAQItF2nWmMFzP3GKG3ikTffrLSxRBV/s3355/IMG_20220525_230212556.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2516" data-original-width="3355" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRmEX1OEdida73wBIXOaVS8Kn3GZUIOeU88lmcJZY_gzptmtPncF4NFQfTfmeI3mc01kVZKRq8Z--sYYfhfqLZX-900EjTeTW4Cp-l36zZXQkQ_qHi6brb5vUtjWjosQPF4ccyQTA1-jp2kv2GT3yIIylXvLAQItF2nWmMFzP3GKG3ikTffrLSxRBV/w640-h480/IMG_20220525_230212556.jpg" width="640" /></a></div><div style="text-align: left;"><br /></div><div style="text-align: left;">For high power testing, I put together a simple test fixture for launching a steel puck the same weight as the final robot will be (hopefully). The classic way robot-folk do their first leg tests is on a vertical linear rail, but a multi-meter tall rail wouldn't be very practical. So instead of having the robot jump, it throws something of equivalent weight.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">The screw mechanism mounts to a pair of machined plates and aluminum extrusions left over from the <a href="https://build-its-feed.blogspot.com/2021/07/mill-enclosure-is-almost-done.html">CNC mill enclosure</a>. A cart rides the rails with the same type of v-groove wheels some 3d-printers use. The cart cradles a puck of stainless steel until it reaches the end of its travel, at which point the cart crashes to a stop and the steel puck is ejected.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Here's the test fixture, with electronics and batteries zip-tied to a piece of acrylic. The electronics are just a Nucleo and a CAN transceiver - the Nucleo talks to the motor drive over CAN, and to my laptop over USB:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh17t0bC4a-iMAj1ePMBuRZlcG9fVcxf9Ih751D5oQiE2Sqv3JD6OO2kM7jBlncSkQC816n_JK2W9UH5_3PdK_eiq78tHA5XQrAukjaf2BVPqcef3TfA-RYgmKAu7v-MQNPJtovq28Ay_55TmkN-izYAKIJSvT3rQYdtc-nQKzZZsXdPT_1VMBtufP1/s4608/IMG_20220612_205404738.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh17t0bC4a-iMAj1ePMBuRZlcG9fVcxf9Ih751D5oQiE2Sqv3JD6OO2kM7jBlncSkQC816n_JK2W9UH5_3PdK_eiq78tHA5XQrAukjaf2BVPqcef3TfA-RYgmKAu7v-MQNPJtovq28Ay_55TmkN-izYAKIJSvT3rQYdtc-nQKzZZsXdPT_1VMBtufP1/w640-h480/IMG_20220612_205404738.jpg" width="640" /></a></div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLOxR-urrUHN5jd7o41BHIO0smQesL8NNUwiQaoA16Y4-yqu1xOSgY05PLjmAGeHa4tJs14Ii-sWOFUZdBeEjvHvuJ6K8pJnxkTica-BzLoW3vTGnjf_04E6T6M4hOFumpZNEfvDyIskyBixNbLSjc-Sy6ipjvRqTGn9-sZjXstV-EIm7uxFw2wgxs/s4608/IMG_20220607_222554186.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLOxR-urrUHN5jd7o41BHIO0smQesL8NNUwiQaoA16Y4-yqu1xOSgY05PLjmAGeHa4tJs14Ii-sWOFUZdBeEjvHvuJ6K8pJnxkTica-BzLoW3vTGnjf_04E6T6M4hOFumpZNEfvDyIskyBixNbLSjc-Sy6ipjvRqTGn9-sZjXstV-EIm7uxFw2wgxs/w640-h480/IMG_20220607_222554186.jpg" width="640" /></a></div><div><br /></div><div>The picture below shows the v-rollers and matching groove in the aluminum extrusions:<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGRhwgP5m3cerV3UYeh7VOQ_4jc2ysbWFz0JXLANRiFaWXHvmuYFoBvhwNyVZtw2lzSRYKvz-t3flF2Wzz06y5vSF6mb0gReZKnPuXueUnpGT46N36kF5Jdy1w3LDuIh1Pceux68PeyV6cdAvPX2KUV3mpZGZoNC6bPpey9czzF0CPUXGszxZq7neE/s4608/IMG_20220607_222758289.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGRhwgP5m3cerV3UYeh7VOQ_4jc2ysbWFz0JXLANRiFaWXHvmuYFoBvhwNyVZtw2lzSRYKvz-t3flF2Wzz06y5vSF6mb0gReZKnPuXueUnpGT46N36kF5Jdy1w3LDuIh1Pceux68PeyV6cdAvPX2KUV3mpZGZoNC6bPpey9czzF0CPUXGszxZq7neE/w640-h480/IMG_20220607_222758289.jpg" width="640" /></a></div><br /><div style="text-align: left;">Rather than building some elaborate stand for the apparatus, I bolted on a couple wooden stakes and rammed the test setup into the ground:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbjyhD72jHm-nAqvvHtdaKbpapPEP_GuW7QH0s-cC3cMDg2CuYVcJk6GcGWDNwtVCVSOmWSSqMCf4R18aIL2TRx1SCPCSTMeaP_QxROuUL6nbIqVQybpENPHeX5wVOV5vAq-t4zxIvQajAICC0_T5Nn0Ak_Ki_9_z6lVlF1opdIY9DfoBierVJE9_a/s600/ezgif.com-gif-maker%20(18).gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="337" data-original-width="600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbjyhD72jHm-nAqvvHtdaKbpapPEP_GuW7QH0s-cC3cMDg2CuYVcJk6GcGWDNwtVCVSOmWSSqMCf4R18aIL2TRx1SCPCSTMeaP_QxROuUL6nbIqVQybpENPHeX5wVOV5vAq-t4zxIvQajAICC0_T5Nn0Ak_Ki_9_z6lVlF1opdIY9DfoBierVJE9_a/s16000/ezgif.com-gif-maker%20(18).gif" /></a></div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl6-lrVIoe1y5gLjeMpOnTMRKe-knUB-AgPmtZ1j2QN0YG_co8SPVk2HeVgDmVcPgvPdG2WGwmtomMEQnEZY0iAybMtYfsBQsB0jLBB-0Ay4OyumnixMK0PaMM2dK0vKH-VoY6K-f31kCetlWV_QJPwJ5xsFjk3lTbRFzpqnYFV3JWbXyUob2ohwFH/s4608/IMG_20220626_145609061.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4608" data-original-width="3456" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl6-lrVIoe1y5gLjeMpOnTMRKe-knUB-AgPmtZ1j2QN0YG_co8SPVk2HeVgDmVcPgvPdG2WGwmtomMEQnEZY0iAybMtYfsBQsB0jLBB-0Ay4OyumnixMK0PaMM2dK0vKH-VoY6K-f31kCetlWV_QJPwJ5xsFjk3lTbRFzpqnYFV3JWbXyUob2ohwFH/w480-h640/IMG_20220626_145609061.jpg" width="480" /></a></div><br /><div style="text-align: left;">On the software side, I threw together a quick python GUI based off the <a href="https://build-its-inprogress.blogspot.com/search/label/Espresso%20Machine">espresso machine</a> software. It lets me save logs, manually set gains and commands, and send short torque pulse commands with the "BANG" button:<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP9HR8dVlkcrAJlBF-jFvVzn1rIc2WLYn2muqJ8ZkrCYW98grIrjThni8Q8QruF6M1zKzDJJ2By98m5gHP4ghE9atFnHP4qU9Pn-2X2nV8LAbepUaI98zOhuiNGqvxXFBCNSXh7TQedjLQH9KtTtVILN3N8Ig7U8nQu1hazbA_1cjIvctToblQq7ul/s4608/IMG_20220612_210343881.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP9HR8dVlkcrAJlBF-jFvVzn1rIc2WLYn2muqJ8ZkrCYW98grIrjThni8Q8QruF6M1zKzDJJ2By98m5gHP4ghE9atFnHP4qU9Pn-2X2nV8LAbepUaI98zOhuiNGqvxXFBCNSXh7TQedjLQH9KtTtVILN3N8Ig7U8nQu1hazbA_1cjIvctToblQq7ul/w640-h480/IMG_20220612_210343881.jpg" width="640" /></a></div><br /><div style="text-align: left;">The first couple times I set up outside I had mysterious electrical issues - sometimes, when the motor was enabled and switching, the USB communication to the laptop would drop out and not come back until the Nucleo was power cycled. Eventually I traced it back to the USB hub I had the Nucleo plugged in, but the issue was very intermittent and only showed up when the motor was powered with over 25V. Once I ditched the USB hub, everything worked reliably. Here's the first outdoor testing video:</div><div><br /></div><div style="text-align: center;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/10V4WR_E9ew" title="YouTube video player" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">This testing only got to about 3.3 meters, not the ~9 meters my original transmission ratio optimization predicted, but there were a few things going wrong.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">One problem was pretty clear from the logs - once the motor gets up to about 7000 RPM, current tracking goes terribly wrong. I think this is from the overcurrent protection on the DRV8302 gate driver on the motor controller triggering and turning off the FETs briefly before re-enabling, but I don't (currently) log the faults, so I'm not sure yet.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">The motor speed only reaches ~700 rad/s vs the 1200 it's supposed to reach, which checks out in terms of the final height the puck reached. </div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnxV173N9i8NUIGAk7GSvwFl2sIJQqQS6SUThY3iHjpF7E89uNWbUEcaE7n_F_FvmO3XelF_sqi-HDn1lN3DS0-uoD197BkCN3JEzsgFUrnWsu0mhkBi4fTrTDPur5mw_kkKWZabyKRN5BwroG9tVW2wHomlrODUBpzcK-6ifuWz7VBNT50sHvSBJJ/s958/hop_log2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="753" data-original-width="958" height="503" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnxV173N9i8NUIGAk7GSvwFl2sIJQqQS6SUThY3iHjpF7E89uNWbUEcaE7n_F_FvmO3XelF_sqi-HDn1lN3DS0-uoD197BkCN3JEzsgFUrnWsu0mhkBi4fTrTDPur5mw_kkKWZabyKRN5BwroG9tVW2wHomlrODUBpzcK-6ifuWz7VBNT50sHvSBJJ/w640-h503/hop_log2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">Another issue is that the motor isn't actually producing the torque I expect. I got these custom-wound from T-Motor and it seems like they were off a bit - the torque constant measures out to be about 30% lower than I expected. Sadly the motor in the mechanism right now is potted in, so I can't rewind it, or even remove it without some serious effort. I've already cranked up the motor drive peak current to 60A from the 40A I usually run, and I'd have to turn in up to ~80A to get the torque I was expecting, and I'm a bit hesitant to do that. But even with the torque constant being off, it should be able to launch a lot higher given the current control issues during most of the stroke.</div><div style="text-align: left;"><br /></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com4tag:blogger.com,1999:blog-910685024071367839.post-59561103627540100812022-04-19T00:56:00.001-04:002022-06-24T22:39:22.417-04:00Clausing 4901 Moving and Restoration<p> I've been keeping my eye out on craiglist and machinery auctions for a small (but not <a href="https://build-its.blogspot.com/2015/12/benchtop-lathe.html"><i>that</i> </a>small) lathe for a while now, but small lathes (other than import mini-lathes) are pretty uncommon. Someone <a href="https://brushless.zone/">Austin</a> knows just bought a house just a few miles away from me with this Clausing 4900-series lathe in the basement, so we visited to take a look:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAHPMKPxV_PQukDoqIcsUmBPNILIpyEonhjQ8OZH4421iwONJga4POBZ7xNBrf6umtuzV4LDeWTj1BAI-dc3TrRlRzWgiWsaJSMnCI9IMteNBW7-gzILBwYpO5KkJgqakIuLjZMUyQP8TUxItehXfqSSNv3I2_tBS0PFJ98KplNgm_11ZhgPjJE2Xh/s1197/IMG_20220404_134749%20(2).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1093" data-original-width="1197" height="584" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAHPMKPxV_PQukDoqIcsUmBPNILIpyEonhjQ8OZH4421iwONJga4POBZ7xNBrf6umtuzV4LDeWTj1BAI-dc3TrRlRzWgiWsaJSMnCI9IMteNBW7-gzILBwYpO5KkJgqakIuLjZMUyQP8TUxItehXfqSSNv3I2_tBS0PFJ98KplNgm_11ZhgPjJE2Xh/w640-h584/IMG_20220404_134749%20(2).jpg" width="640" /></a></div><div><br /></div><div>The scale of this lathe really didn't come across in photographs - it's way smaller than I originally thought from the pictures. <a href="http://miters.mit.edu/">MITERS </a>has a Clausing lathe of the same era, a 6918, which looks almost exactly the same but scaled up around 50% in every direction - from the original pictures I saw, I was expecting something more like the MITERS-lathe. </div><div><br /></div><div>I took some measurements, determined it would be possible to fit in my apartment, checked out the joist situation supporting the floor where the lathe would sit, and decided to go for it. </div><div><br /></div><div>For for the move, I recruited <a href="http://www.rsreeve.com/">Rob </a>and <a href="https://andrewbirkel.com/">Andrew</a>, who have moved many tons of machine tools over the last several years (probably all of which are much heavier than the 800-ish pounds this lathe is), plus Austin, Aaron, and myself.</div><div><br /></div><div>We started by splitting the lathe off its base, to make it less top-heavy. The lathe and chip tray were un-screwed from the two legs and lifted up with an engine hoist. We removed the legs and slid Rob's heavy-duty dolly underneath. </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvvI34lbuS0CyI1furnIlsZjiTXa2H5uNaMeB2MvI9wWedH2lbxtyprab8RSa1anz6A1-I9-qGEIEWpPbJt1ZB2UqBi3Y1lT5WBnM_Vhy5jH6HB7gpl8qowYhpCpv7elHK2EC77muKpta1pbEVfnERCpNkZ5RkPmnWQXU5C78cqD1N1uSU5PiDg3eK/s4032/2022-04-10%20(4).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvvI34lbuS0CyI1furnIlsZjiTXa2H5uNaMeB2MvI9wWedH2lbxtyprab8RSa1anz6A1-I9-qGEIEWpPbJt1ZB2UqBi3Y1lT5WBnM_Vhy5jH6HB7gpl8qowYhpCpv7elHK2EC77muKpta1pbEVfnERCpNkZ5RkPmnWQXU5C78cqD1N1uSU5PiDg3eK/w640-h480/2022-04-10%20(4).jpg" width="640" /></a></div><div><br /></div><div>The basement the lathe was in had a door directly outside (so we didn't have to go up any stairs), but the door was pretty far from where we could get a pickup truck. A dumpster blocked most of the driveway, so we had to haul the lathe up a small hill and around the dumpster. The dolly rolled surprisingly well over the dirt and grass, even with ~600 lbs on it:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOZdHOPv8yBUEjhB24k8DzlAfIMZNYKlbPvl39LNXbU-MtSQ_1VzIukODFNSFcyH8GdRDAaLtWNLrLytnwqDw0V6JwyZ-ANpJ3Sh8V2_pXnudiBl_peZAWysHGOr1UIV94yNIfVwlbeRjDg-8c9PCbIcmLbl1S62KwZxu1wREijOExGTC7b_Fdyymi/s4032/2022-04-10%20(5).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOZdHOPv8yBUEjhB24k8DzlAfIMZNYKlbPvl39LNXbU-MtSQ_1VzIukODFNSFcyH8GdRDAaLtWNLrLytnwqDw0V6JwyZ-ANpJ3Sh8V2_pXnudiBl_peZAWysHGOr1UIV94yNIfVwlbeRjDg-8c9PCbIcmLbl1S62KwZxu1wREijOExGTC7b_Fdyymi/w480-h640/2022-04-10%20(5).jpg" width="480" /></a></div><div><br /></div><div>Lifted up again, dolly and all, ready for the truck to be backed under it:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikGJfhCLc9oPOeS2_TZ2TkzvNf8xJs4-EMLArhTghBU8Q4k6RDoNthCTFak0HXXhx7i-JLnI6lbAy0Opptdgw-xL91RRArTKXsNMqXNxH0Ndf1YoE2itdwp_JhAEB_n49fH2qftmZkge6JaXaA1Yv3jxMWgPvx_FEwZjpAwheYAYZS-AmMH90JJugK/s4032/2022-04-10%20(7).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikGJfhCLc9oPOeS2_TZ2TkzvNf8xJs4-EMLArhTghBU8Q4k6RDoNthCTFak0HXXhx7i-JLnI6lbAy0Opptdgw-xL91RRArTKXsNMqXNxH0Ndf1YoE2itdwp_JhAEB_n49fH2qftmZkge6JaXaA1Yv3jxMWgPvx_FEwZjpAwheYAYZS-AmMH90JJugK/w640-h480/2022-04-10%20(7).jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Loaded up and strapped down in the Sliski-mobile. The 8' truck bed makes the lathe look even smaller:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVxTJqn7-wtzaNIpw981V77TpVpu0ZmXDPbOZUyvxdxL_zp0hg_K8UonMb9IpAweOJqQndk4gpjpFIb_PGsdwzsK-hLU1Vno_fg9Ox6f8RVHrC6M_FPKTr2GKqhJqiksSwJwcQ2aPnGEtQglfPcaJo4eLquzepj1lQc_JbjeVWQZmL6brzGOjBAV89/s4608/IMG_20220410_132139233.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVxTJqn7-wtzaNIpw981V77TpVpu0ZmXDPbOZUyvxdxL_zp0hg_K8UonMb9IpAweOJqQndk4gpjpFIb_PGsdwzsK-hLU1Vno_fg9Ox6f8RVHrC6M_FPKTr2GKqhJqiksSwJwcQ2aPnGEtQglfPcaJo4eLquzepj1lQc_JbjeVWQZmL6brzGOjBAV89/w640-h480/IMG_20220410_132139233.jpg" width="640" /></a></div><div><br /></div><div>Getting the lathe into my place was a little tricky since there wasn't a lot of space to maneuver, but it went smoothly.</div><div><br /></div><div>Here we are going through the front door. We hand-lifted the lathe up the two steps. A couple feet inside the front door there was an area of floor we had to avoid, where there's a trapdoor to our water heater. There aren't joists spanning that section of floor, so we skirted around it.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMgmBaiPKFHf6E9NFiVpp3IDlfwWTVm_bll-aI6wCONkccVXV9sUVjhJVpB3oGld9IVqR5yOMdZrGWneErEtfp17vfHY9QPdz-xXpqtgaM7rNKBFiY2mKjy9yYuSFYDUqmyLoA8q_F33N7haGzw4fRyDNgY2rkRQh3FO2vfzG8CtEtrvuld95fWNq0/s4032/2022-04-10%20(6).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMgmBaiPKFHf6E9NFiVpp3IDlfwWTVm_bll-aI6wCONkccVXV9sUVjhJVpB3oGld9IVqR5yOMdZrGWneErEtfp17vfHY9QPdz-xXpqtgaM7rNKBFiY2mKjy9yYuSFYDUqmyLoA8q_F33N7haGzw4fRyDNgY2rkRQh3FO2vfzG8CtEtrvuld95fWNq0/w640-h480/2022-04-10%20(6).jpg" width="640" /></a></div><div><br /></div><div>The dolly <i>just </i>barely fit through the internal doorways, once the doors were removed from the hinges:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR6exgnGkbmBS9yGuDViJf16QBXsUVBpumLsgb2DlynTByZyTaxPLHbo1ABJQBo5CVZt1I-fIaEphDZWS8CeS4SOw1Pfska_l8K_IXxPwrqUxrOyh_j9fem9T3fd1FHtbh5eKVBLDFnAX3g161N3PprWD98dGFY43pC_0fo47f3W0-Xa9pRxH6CehX/s4032/2022-04-10%20(3).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR6exgnGkbmBS9yGuDViJf16QBXsUVBpumLsgb2DlynTByZyTaxPLHbo1ABJQBo5CVZt1I-fIaEphDZWS8CeS4SOw1Pfska_l8K_IXxPwrqUxrOyh_j9fem9T3fd1FHtbh5eKVBLDFnAX3g161N3PprWD98dGFY43pC_0fo47f3W0-Xa9pRxH6CehX/w480-h640/2022-04-10%20(3).jpg" width="480" /></a></div><br /><div>To re-assemble the lathe, we again lifted it with the engine hoist and re-attached the legs while the hoist was supporting the weight. I put a couple 2x6's under the lathe's leveling feet, with big felt pads underneath, to spread the load and protect the floor.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrnTRfYOanxFwUERxu-yBJ-7RuAbwu_dVza3uzweePWnbKvz-87LaZX3Rm4JJXtvdh-KPiG5Fq3_N5XONhtVrgPW64Aucd4PzfZBLj-J4nFbDdaTk3_mRZq20gFC7Dchv7V6R1NDcO_JvDlc-x3OfRn4btte_53klhttFeI43N_uTzkZVA8EGn19IZ/s4032/2022-04-10%20(1).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrnTRfYOanxFwUERxu-yBJ-7RuAbwu_dVza3uzweePWnbKvz-87LaZX3Rm4JJXtvdh-KPiG5Fq3_N5XONhtVrgPW64Aucd4PzfZBLj-J4nFbDdaTk3_mRZq20gFC7Dchv7V6R1NDcO_JvDlc-x3OfRn4btte_53klhttFeI43N_uTzkZVA8EGn19IZ/w640-h480/2022-04-10%20(1).jpg" width="640" /></a></div><div><br /></div><div>The lathe back on it's stand, in all it's grungy glory:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgliyhwg6jFyB7oH1_NA9spqLCYsKKynYFX4OhKZgSSxoM3jEHUrLPtLg3JphErwuZa7INThL79jezSm9UUJol_u_qMvX-TUoeKMn8btcBAHX1da0bP5Wx6K5T0IhHjFSC-lEYPWBa2N4ZcJh6WC3rG3t8VNJ_XSwl6zEyAcxIKLJ8Jo5Xms0KdTK-s/s2964/IMG_20220410_153323701%20(2).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2222" data-original-width="2964" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgliyhwg6jFyB7oH1_NA9spqLCYsKKynYFX4OhKZgSSxoM3jEHUrLPtLg3JphErwuZa7INThL79jezSm9UUJol_u_qMvX-TUoeKMn8btcBAHX1da0bP5Wx6K5T0IhHjFSC-lEYPWBa2N4ZcJh6WC3rG3t8VNJ_XSwl6zEyAcxIKLJ8Jo5Xms0KdTK-s/w640-h480/IMG_20220410_153323701%20(2).jpg" width="640" /></a></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF0NrYCbMxhPC-i3bHkO0-wOtPwir6Vrslovr-bH4FTC6PmNQkxKe34AbEyevoGQU6FPnu79QWcWQQ4eE0Adew1zhVNAcQqSiJmHiitIGEpYqyxtESBxaWDNyBB2jFmWI-273LlgoxMTCC0SyyH80yoLscgKmJzVM5StydMKFtKKQuldB4SiQRdUgj/s6000/DSC02295.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF0NrYCbMxhPC-i3bHkO0-wOtPwir6Vrslovr-bH4FTC6PmNQkxKe34AbEyevoGQU6FPnu79QWcWQQ4eE0Adew1zhVNAcQqSiJmHiitIGEpYqyxtESBxaWDNyBB2jFmWI-273LlgoxMTCC0SyyH80yoLscgKmJzVM5StydMKFtKKQuldB4SiQRdUgj/w640-h426/DSC02295.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbJ1BmG4mZdgwbpMLzQojBWyrq7XgGLABkvy286AD2e4aTeGwu0qCynEvymxYKDcPTIn1PqsXzSf1W-bmR_IzPh8AHP61JizYzqpJReavj8kOehTBR8BbNKx6MUKRRsaPeYBwNs4xYgTT471k1LrKxUlSdwSfhvhGxVVMtiCtP_WKi4veEj62VqfH/s6000/DSC02291.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbJ1BmG4mZdgwbpMLzQojBWyrq7XgGLABkvy286AD2e4aTeGwu0qCynEvymxYKDcPTIn1PqsXzSf1W-bmR_IzPh8AHP61JizYzqpJReavj8kOehTBR8BbNKx6MUKRRsaPeYBwNs4xYgTT471k1LrKxUlSdwSfhvhGxVVMtiCtP_WKi4veEj62VqfH/w640-h426/DSC02291.JPG" width="640" /></a></div><div><br /></div><div>Initially the headstock was full of paper and cloth scraps - some mice had made a home there. Fortunately the mice were long gone, and thankfully hadn't left behind any mummified remains. After vacuuming out all the detritus, here's what the inside of the headstock looked like:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ0B0uflHZwmExNafc_qle5-UyX-XDIjwhiPhs8Bd2D0W9EYOnffiR7dReD5Ja2BXKFrqzEyMWZWPK3Sh3jQbKcLDERCDB2as-dBACC-qMFrSSHW47xrdqdVgkQblMD8ev1XIxeFcsXAmTZj9POi3fa90vmevPYloqOJe-EJTY6LfNb_oyECtMULfu/s6000/DSC02303.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ0B0uflHZwmExNafc_qle5-UyX-XDIjwhiPhs8Bd2D0W9EYOnffiR7dReD5Ja2BXKFrqzEyMWZWPK3Sh3jQbKcLDERCDB2as-dBACC-qMFrSSHW47xrdqdVgkQblMD8ev1XIxeFcsXAmTZj9POi3fa90vmevPYloqOJe-EJTY6LfNb_oyECtMULfu/w640-h426/DSC02303.JPG" width="640" /></a></div><div><br /></div><div>The gears looked pretty rusty, the lever for engaging the back gear was stuck, and the spindle wouldn't turn once the power feed was engaged. I worked things free by liberally spraying all the gears and shafts down with WD40 and gradually working the spindle back and forth by hand with the power feed gears engaged. Eventually all the sticky spots in the gearing smoothed out, and the power feed and back gear shifted smoothly:</div><div style="text-align: center;"><br /></div>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/eC_uBe89TRk" title="YouTube video player" width="560"></iframe></div><div><br /></div><div>At first I thought I'd have to take the headstock apart to clean the rust off the gearing, but I was able to do it in-place with a small wire brush. The state of the gears in the headstock also made me worried about the spindle bearings. I oiled the spindle bearings and ran the spindle, and the oil that leaked out from the spindle was clean - so I'm assuming the spindle bearings aren't full of rust.</div><div><br /></div><div>Scrubbed feed gears:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOmhOytjf5mhOhLNXTTiAIFaofYOhSm2K2uPYkCCs6AMK2AufXgUDBiroSrAEZIN0OCqwWtKIOnOxxwipC307FzTsBBomewApk9JCc30S2OGytpNnHrorxz1cOLjyKUaRSUxDgVtMX3P9Oq3LK0u8tqkPaTeEOX-8Qc5sxkt0LRPUbaBaO4U2sTPK7/s6000/DSC02352.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOmhOytjf5mhOhLNXTTiAIFaofYOhSm2K2uPYkCCs6AMK2AufXgUDBiroSrAEZIN0OCqwWtKIOnOxxwipC307FzTsBBomewApk9JCc30S2OGytpNnHrorxz1cOLjyKUaRSUxDgVtMX3P9Oq3LK0u8tqkPaTeEOX-8Qc5sxkt0LRPUbaBaO4U2sTPK7/w640-h426/DSC02352.JPG" width="640" /></a></div><div><br /></div>Scrubbed headstock gears:<div><br /><div><div style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-YqKj7bDmoXEPxpHdcijqdWsUWtsHsbc3xA84EOIWeRouwOmgljZUr4kx_uXJy3hhXttPh0zzS_5UZfnRhMSb_-9FYp7-8baOUnJpeh8X9fCUKoOL5N8ghjnCGBoN9itWtPWH2_gI-CjA5V5H2Sbsb1EKxn81cMY5qB47A4TgL9DaMj-spfWgLL3Q/s4608/IMG_20220413_233517643.jpg" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-YqKj7bDmoXEPxpHdcijqdWsUWtsHsbc3xA84EOIWeRouwOmgljZUr4kx_uXJy3hhXttPh0zzS_5UZfnRhMSb_-9FYp7-8baOUnJpeh8X9fCUKoOL5N8ghjnCGBoN9itWtPWH2_gI-CjA5V5H2Sbsb1EKxn81cMY5qB47A4TgL9DaMj-spfWgLL3Q/w640-h480/IMG_20220413_233517643.jpg" width="640" /></a></div><div><br /></div><div><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both;">Gears cleaned, power feed gears greased with some molybdenum disulphide grease, and a fresh timing belt installed - the original was damaged trying to remove it during the move.</div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifa9YFz5Dg-xvgbGfzzB69e32i_Apl2W018i4dBOu8fWOfh3ti7cWkulERlUyE6e553smBWBp0v2JhxMQhee_mayky9hnf7MI8tpl3zjAR2MFT8sM6HjBtqv-L3P_FM6wHCS3HaOgnt5EZ4uQC7fqhDdW8MpSZhQkwdvdykJtXQJG7e-l0mvloQpEc/s6000/DSC02359.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifa9YFz5Dg-xvgbGfzzB69e32i_Apl2W018i4dBOu8fWOfh3ti7cWkulERlUyE6e553smBWBp0v2JhxMQhee_mayky9hnf7MI8tpl3zjAR2MFT8sM6HjBtqv-L3P_FM6wHCS3HaOgnt5EZ4uQC7fqhDdW8MpSZhQkwdvdykJtXQJG7e-l0mvloQpEc/w640-h426/DSC02359.JPG" width="640" /></a></div><div><br /></div><div>I cleaned the decades of gunk off the painted surfaces by spraying them down with WD40, scrubbing with a plastic-bristled brush, and wiping away the sludge.</div><div><br /></div><div>Here's the chip pan mid-scrubbing:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFp7N10ncHIcD4RVnqkg5RXyDD4cDf2gcA7PqzX-3uY40I6_NtYsPWa8uqxX9b_htS7Vt_TpWfnIjhJBRjx9xjMMLLLexIauGFeKXoC1kqgD1wOG2MHVS5_YYywH93SXrNR6GptlQEitCFI7ekDoRNReYSL08YZxY1c1IZ0XT16KXeltN5S90rBwsr/s6000/DSC02315.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFp7N10ncHIcD4RVnqkg5RXyDD4cDf2gcA7PqzX-3uY40I6_NtYsPWa8uqxX9b_htS7Vt_TpWfnIjhJBRjx9xjMMLLLexIauGFeKXoC1kqgD1wOG2MHVS5_YYywH93SXrNR6GptlQEitCFI7ekDoRNReYSL08YZxY1c1IZ0XT16KXeltN5S90rBwsr/w640-h426/DSC02315.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Hard to believe this was hiding underneath all the dirt and oil:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimmQXc6ykoC30Fop_wU__lQDlEd_vNwiCIcVNZElxEO_hfegdda2wzhCPmYdV2rOkQz4RBfnuBqQxgn0tAivGcRU8QBwy6sNn1hJOhNI_voVqnsesxnTWosZuUJ72obVRO01F8vicLQefAvQNfd_4l1fuEilBOAIQrDR1Kpgk6Qjf9pBvSnxkdLF34/s6000/DSC02328.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimmQXc6ykoC30Fop_wU__lQDlEd_vNwiCIcVNZElxEO_hfegdda2wzhCPmYdV2rOkQz4RBfnuBqQxgn0tAivGcRU8QBwy6sNn1hJOhNI_voVqnsesxnTWosZuUJ72obVRO01F8vicLQefAvQNfd_4l1fuEilBOAIQrDR1Kpgk6Qjf9pBvSnxkdLF34/w640-h426/DSC02328.JPG" width="640" /></a></div><div><br /></div><div>I took the cross slide off, and the sliding surfaces look like they're in great condition. The original grinding marks are still visible across the whole underside of the cross slide, and the lead screw nut has very little backlash. Also encouraging, the cross slide doesn't tighten up at the extremes of its travel, which would have been a symptom of worn ways.</div><div style="text-align: center;"><br /></div><div style="text-align: center;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGXbUQ-WBLbe0iLsjpYw7eeYeBlxiGkZ_uHLrO2x300x-eppnr7NuyxzMZlYbVAkIDNts4TIzVvqt7ojHhjGYGXCVmolGmax2XNSOtqQ6SG4vKVEFQsiwrZ5Q4Vi71ALadNjj5cmlReuJ_BSqTnYQ2NMKcrK1wwBzwb6RDUAEWz-fUu_dH3LUdnGuo/w640-h426/DSC02272.JPG" style="color: #0000ee;" width="640" /></div><div><br /></div><div>Here it is all scrubbed with the covers back on. Looking pretty good, I think:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1S7cuzVQiuKsc-pkDZ_ClYQULnB7OQZaHlsce_X_DY2AWUDez3D1n5TZGbl6o2zzvj81g0d8gFFU2K8eJmLo9K5gGAqTwvLDMEjVflr5p-drySWyDh9F45Wef-n51C5VgOUHpan0y1yxN8FrPmt6qT-ii7-Y1yeZ5shFdZ6LCvR-_tCPgJDQx-zUW/s6000/DSC02396.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1S7cuzVQiuKsc-pkDZ_ClYQULnB7OQZaHlsce_X_DY2AWUDez3D1n5TZGbl6o2zzvj81g0d8gFFU2K8eJmLo9K5gGAqTwvLDMEjVflr5p-drySWyDh9F45Wef-n51C5VgOUHpan0y1yxN8FrPmt6qT-ii7-Y1yeZ5shFdZ6LCvR-_tCPgJDQx-zUW/w640-h426/DSC02396.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwXWFaKMqp3Z7afh9wXX02itSfhA6B3sgRJ7tO7w4O7TPA4Sh1HVQZlAJOGmWkW4Tr_qxIkhyYmFWjlmEHow0gOi92ZOu73gSKzJeRk5T0OBJVHAS9X3MLlTQRlSrCdgWjHQfwbMgg1j22ebrbzowJMMJ00ApfCBkueBGCiIsUSgCU7GJfDJGUFggC/s6000/DSC02399.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwXWFaKMqp3Z7afh9wXX02itSfhA6B3sgRJ7tO7w4O7TPA4Sh1HVQZlAJOGmWkW4Tr_qxIkhyYmFWjlmEHow0gOi92ZOu73gSKzJeRk5T0OBJVHAS9X3MLlTQRlSrCdgWjHQfwbMgg1j22ebrbzowJMMJ00ApfCBkueBGCiIsUSgCU7GJfDJGUFggC/w640-h426/DSC02399.JPG" width="640" /></a></div><div><br /></div><div>The lathe came with some great accessories, including the change gears for metric threading. Most of the accessories had surface rust, but cleaned up really well with some Evaporust.</div><div><br /></div><div>Before:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3S--PQyEGtLTtR85R8t5ukEidBlsUFLi043JeL0Q5skP0wqNk0woo5JPy3dn9XEopvCwuu7t5ZZgYb4_B869t7uHQ7tsMGOSF020WR2Lbdc5-DM0uBh-JKGVwDVeRvjXf26HPkDMRGEcEvE9bqiHTvU2c2IVGlvJugxwjgBTZ5TwmT28P29n36lc/s4608/IMG_20220410_183610318.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3S--PQyEGtLTtR85R8t5ukEidBlsUFLi043JeL0Q5skP0wqNk0woo5JPy3dn9XEopvCwuu7t5ZZgYb4_B869t7uHQ7tsMGOSF020WR2Lbdc5-DM0uBh-JKGVwDVeRvjXf26HPkDMRGEcEvE9bqiHTvU2c2IVGlvJugxwjgBTZ5TwmT28P29n36lc/w640-h480/IMG_20220410_183610318.jpg" width="640" /></a></div><div><br /></div><div>After:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQj8AyaYBCD1obretCFFz_X9Go95mPy9XesBUzpMlPejecvgmR_A91kLCTjCu9hm9_tWpBsnixRHfvP1kaLzqSos1l_TrJFFScGp8ysSBclTYrlU5GyUlHD-0WvK9rY5IZGEWhWTjsr6wtKpMHu-yFCWei-LuHbDIcMqQDV1cT7gggz-L6O_65N61i/s4608/IMG_20220416_204331724.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQj8AyaYBCD1obretCFFz_X9Go95mPy9XesBUzpMlPejecvgmR_A91kLCTjCu9hm9_tWpBsnixRHfvP1kaLzqSos1l_TrJFFScGp8ysSBclTYrlU5GyUlHD-0WvK9rY5IZGEWhWTjsr6wtKpMHu-yFCWei-LuHbDIcMqQDV1cT7gggz-L6O_65N61i/w640-h480/IMG_20220416_204331724.jpg" width="640" /></a></div><div><br /></div><div>8" 4-jaw chuck post-cleaning:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSqB0XnPOq8lzXwEy4HIVlbbVP39-YomUMb2y9bAkoA_pyhReRWO6PyTwGh3CpdjWdX724ViN-mAncJIG0WazQjwtv6qN1kut2AUpFkKgMKuOXZlZgLrYJJowxd2lAZ9adwvEoV5pVEXSqTMvrsEXEr_0o2Ixna2MUPDLm-N7hqZQsqxP0YZD-Rs7I/s4608/IMG_20220416_212421413.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSqB0XnPOq8lzXwEy4HIVlbbVP39-YomUMb2y9bAkoA_pyhReRWO6PyTwGh3CpdjWdX724ViN-mAncJIG0WazQjwtv6qN1kut2AUpFkKgMKuOXZlZgLrYJJowxd2lAZ9adwvEoV5pVEXSqTMvrsEXEr_0o2Ixna2MUPDLm-N7hqZQsqxP0YZD-Rs7I/w640-h480/IMG_20220416_212421413.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">The lathe also came with the original paper manual, factory inspection report, and accessory manuals:</div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="4608" data-original-width="3456" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9GkDNAIy-rCMcC6nRpHeiLUR2iSPSNKK8cbh3asDZ3WQBwnHl8twvhpwBnvoMnbfb9mHo3nPeym6eBdcNgetN_iPnq4-_Djbhbbt4zBQ5aOGjCm6wlX9v_ja7TcZD_wcukE4zNXiw-7bwXU28By4JhPBfISkZT2c91pIKysV2BLXNS2kg6AXfTuQc/w480-h640/IMG_20220411_214827931.jpg" style="color: #0000ee;" width="480" /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The manual is full of beautiful hand-drawn exploded view like these:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgafJ6jyClvsZr_v6569R6KCjBVOXfNHebKNYRLESr_ZZrlOyeXCJE8fCpBQV-qMj6O_6w-k9P9JtkJIgYiuzVKP_McnHhOFB50eCT8BzlIyjw4xgQ5LKU1HBtN4t1q6qaHRukAvMhlWvAdxpoxOzTKYvri77LB4Pvhe3iQNF-gjzgd7sOeAcyzIPOO/s4608/IMG_20220411_201342498.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgafJ6jyClvsZr_v6569R6KCjBVOXfNHebKNYRLESr_ZZrlOyeXCJE8fCpBQV-qMj6O_6w-k9P9JtkJIgYiuzVKP_McnHhOFB50eCT8BzlIyjw4xgQ5LKU1HBtN4t1q6qaHRukAvMhlWvAdxpoxOzTKYvri77LB4Pvhe3iQNF-gjzgd7sOeAcyzIPOO/w640-h480/IMG_20220411_201342498.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUhofWbfs5745R7gAqvuwVGCVNxZ8fjI_rNfhTFsXszhtZdyzr422P05Xem_iiI3V6cuE8XxEyvXvwf9XmoJ4pWCccIhDE63s_ja8odSTC12FxRKtOyFg9dgm-Dmip0nH5nOwYJAYI_9giuofRVbosl4dhn83GCywppmfivD7iodS-72qoMwAzqQLC/s4608/IMG_20220411_201455422.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4608" data-original-width="3456" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUhofWbfs5745R7gAqvuwVGCVNxZ8fjI_rNfhTFsXszhtZdyzr422P05Xem_iiI3V6cuE8XxEyvXvwf9XmoJ4pWCccIhDE63s_ja8odSTC12FxRKtOyFg9dgm-Dmip0nH5nOwYJAYI_9giuofRVbosl4dhn83GCywppmfivD7iodS-72qoMwAzqQLC/w480-h640/IMG_20220411_201455422.jpg" width="480" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">There were some other good bits of history in the manual. The metric threading gears apparently cost $150 in ~1970 (~$1000 in today's dollars). Unfortunately the micro carriage stop listed isn't around any more.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZarf-1-6KWhO3p9M2h9R0PdTOaIw80d-kfJgRJ8lSD1wXeZ7MjOhrZTv1z5kNSTRcO6l6txmjdfni-q7KyrDIwjKZRyVAtRhSO0Aif05tGXJctzkjZ4PWFkhUcn4EJLivDUnzAkTL-zdp8kKZU-hR0d11Ktj7DVK99_GblSfKhk0fuln14-gyoS4x/s6000/DSC02378.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZarf-1-6KWhO3p9M2h9R0PdTOaIw80d-kfJgRJ8lSD1wXeZ7MjOhrZTv1z5kNSTRcO6l6txmjdfni-q7KyrDIwjKZRyVAtRhSO0Aif05tGXJctzkjZ4PWFkhUcn4EJLivDUnzAkTL-zdp8kKZU-hR0d11Ktj7DVK99_GblSfKhk0fuln14-gyoS4x/w640-h426/DSC02378.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">Eventually I'll get the manual properly scanned and post it online. I was able to find the operator manual online already, but not the exploded views, parts lists, and accessory manuals, so someone else might find those useful.</div></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here it is running and taking it's first cuts out of some scrap aluminum:</div><div class="separator" style="clear: both; text-align: left;"><br /></div>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/nZn6ijArrXw" title="YouTube video player" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: left;">The lathe is fully operational now, but I am planning on a few immediate upgrades like adding a digital readout. All the lathes I've used have been communal (and most of them haven't even had a DRO). I'm excited for the opportunity to set up a proper tool library with tool offsets stored on the DRO, and no one but me to mess them up. That should make work way more efficient. Along with the DRO I'll likely make a solid tool post mount to replace the compound slide, <a href="https://youtu.be/pG3YSfgyJPI">a-la-Renzetti</a>.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The 3/4 HP single-phase AC motor and v-belt system might get swapped for something a little more powerful eventually (should be able to get around 3X the power out of a typical outlet), and electronic speed control would be a big improvement over shifting v-belts around.</div></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com5tag:blogger.com,1999:blog-910685024071367839.post-18986861382418820132022-02-27T19:39:00.000-05:002022-02-27T19:39:24.087-05:00Varying pitch screw robot build progress<div>Lots of progress on the jumping robot based on <a href="https://build-its-inprogress.blogspot.com/2020/08/varying-pitch-screw-mechanism.html">this mechanism</a>.</div><div><br /></div><div>To start off, here's a cross section of the core mechanism. </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh8WNqOMVOIojYd0gQwPyD7fqKElB1BTw-DogTeUPVgVlO7xMmfpzmxst5H8DxtSgajtPQ8LsfoA0eN5Tu-VKIjCVxUrFVUeMkCtIGeF8Q9Ix5HWFVve0-6ZMzimAgyan8KOT46tD-73Vt6-wsIqgGIq3W1GXGQZ44MTlYd6dvcp4GUMwvp50gk5li8=s2663" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1860" data-original-width="2663" height="448" src="https://blogger.googleusercontent.com/img/a/AVvXsEh8WNqOMVOIojYd0gQwPyD7fqKElB1BTw-DogTeUPVgVlO7xMmfpzmxst5H8DxtSgajtPQ8LsfoA0eN5Tu-VKIjCVxUrFVUeMkCtIGeF8Q9Ix5HWFVve0-6ZMzimAgyan8KOT46tD-73Vt6-wsIqgGIq3W1GXGQZ44MTlYd6dvcp4GUMwvp50gk5li8=w640-h448" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">At the center of the mechanism is the varying pitch screw (or <a href="https://en.wikipedia.org/wiki/Cam#Cylindrical_cam">barrel cam</a>). The screw passes through a "nut" with two cam followers, which drives the screw axially as it turns. The nut directly supports the rotor of an electric motor (specifically a <a href="http://store-en.tmotor.com/goods.php?id=856">T-motor RI50</a>). The screw passes through the center of the motor's stator, and is constrained by a guide bushing at the top, and 3 sets of guide rollers at the bottom, which roll in axial grooves on the screw and react the motor torque.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">One kind of sketchy bit is that I'm measuring the rotor position through a 1:1 spur gear pair. Ideally I would have used an off-axis encoder with a through bore to pass the screw. I didn't do that though - I already have a few dozen of my <a href="https://build-its.blogspot.com/2019/12/the-mini-cheetah-robot.html">mini cheetah</a> motor drives on hand, and I actually couldn't find any appropriately sized thru-bore absolute encoders that were good for ~12k RPM. I <i>maybe </i>could have used the <a href="https://www.ichaus.de/MU">iC Haus IC-MU</a> (actually, one of the last things I did at <a href="http://biomimetics.mit.edu/">the lab</a> was make a version of my drive with that encoder IC, so most of the work is done already), but with the magnet target I need to clear the screw it's rated at exactly 12k RPM, which seemed like cutting it close. Maybe eventually I'll do a purpose-built version of the motor drive for this, if the geared encoder turns out to be problematic. Still, offsetting the encoder seemed like a better idea than offsetting the whole motor and having a belt or gears to transmit torque to the cam followers - this way the gears don't take any torque and can be plastic and very thin.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><b>On to actually building the thing:</b></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Machining the screw was quite a saga, and I actually ended up outsourcing the part. I could have eventually finished it with the approach I was taking, but it ended up not being worth it for now. It's the wrong shape for the 5-axis mill, so machining the full part required it to be broken into 3 separate pieces with two setups per piece, with extremely good alignment between operations required for smooth cam surfaces. I did think about building some sort of dedicated rotary-CNC contraption, or rigging some mechanism to one of the local bridgeports with an encoder and motor driven rotary axis - maybe if I want to be able to rapidly revise this part I'll revisit one of those ideas.</div><div><br /></div>Here's an example of one operation done on one of the parts. For locating adjacent pieces and transferring torque, I put a <a href="https://en.wikipedia.org/wiki/Hirth_joint">hirth</a>-esque coupling at the ends. The plan was to drill all the way through the center of each part and clamp the whole thing together with a long tie rod down the center.<div><br /><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjEWgjbHNpMs4d39o4BB8YZHqdJm0TSU3TBoyY7ijmtUzlynt6Ycey9c0yFFI6SdMGEJ4quLc3UX1HV61pBbWaxuSwfvDLtQmEXe6ejkfueqnP95FxPt0SmyTnEqIGzJjG1249Z8D3HXyRghbah5Jlt3eCSZCRO1i7O7hKnPAn6IpCw-jusWXTmDJf0=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjEWgjbHNpMs4d39o4BB8YZHqdJm0TSU3TBoyY7ijmtUzlynt6Ycey9c0yFFI6SdMGEJ4quLc3UX1HV61pBbWaxuSwfvDLtQmEXe6ejkfueqnP95FxPt0SmyTnEqIGzJjG1249Z8D3HXyRghbah5Jlt3eCSZCRO1i7O7hKnPAn6IpCw-jusWXTmDJf0=w640-h480" width="640" /></a></div><div><br /></div><div>The little cylindrical bores on the sides were added for aligning the 2nd operation. Indicating in the bore gave me the height and orientation offset of the part.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgHg2lHb1A3iC2Tkat60lVNXtO4bzzNWTGdyUwX5gthikuoI2ymv1dd1MDUsk-5BCao9xDQLsMvT69Q5fvZp2Wz_9gNOGuxIo5aJOhg0Bln9l9Kk3Bkp1Y_tduPZJPNR36f4MlpTbG5N_Pl5FhGvCky9wGs2N7xjlEEl1l9JskAzHw1rUaNgdU6TfdL=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgHg2lHb1A3iC2Tkat60lVNXtO4bzzNWTGdyUwX5gthikuoI2ymv1dd1MDUsk-5BCao9xDQLsMvT69Q5fvZp2Wz_9gNOGuxIo5aJOhg0Bln9l9Kk3Bkp1Y_tduPZJPNR36f4MlpTbG5N_Pl5FhGvCky9wGs2N7xjlEEl1l9JskAzHw1rUaNgdU6TfdL=w640-h480" width="640" /></a></div><div><br /></div><div>Here's the CAM tree for one operation:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhq15IaZR4dWX4qMdJL8UEteigIIj3QBl_GX4qMFlWN0BoxmQ9ZGhwOs90Eal765NQN9O5fNo7FsakNOBDoQ1mwN5107qz0GIV23JMJecGJ7uhPPPqEMcuNkUMhUh7AXWKpMLGqBtuuh6ISAtp6vJO6jNNkoYePHi-JXsOdWPSYlXDk_UAOYobRhvMY=s966" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="966" data-original-width="958" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEhq15IaZR4dWX4qMdJL8UEteigIIj3QBl_GX4qMFlWN0BoxmQ9ZGhwOs90Eal765NQN9O5fNo7FsakNOBDoQ1mwN5107qz0GIV23JMJecGJ7uhPPPqEMcuNkUMhUh7AXWKpMLGqBtuuh6ISAtp6vJO6jNNkoYePHi-JXsOdWPSYlXDk_UAOYobRhvMY=w634-h640" width="634" /></a></div><br /><div>Here's a pile of attempts:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhqPdGe47SdBSCsfO4ytqszSjKjKzjMaQMnSssRrRadrxBxrBVQaD9b_4kCIXVvIrYUmuOLxI-QZ16jPK7-X5sCwhurDipOa7dg3ge64pVuyyWClOdM-xQtE8K46oikdu3D5WJW2q6hQOAL7Hjsi6Ss7Jf_cMOtF-hv2dGynZZyVPeenbMY1CYY-kGc=s4608" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhqPdGe47SdBSCsfO4ytqszSjKjKzjMaQMnSssRrRadrxBxrBVQaD9b_4kCIXVvIrYUmuOLxI-QZ16jPK7-X5sCwhurDipOa7dg3ge64pVuyyWClOdM-xQtE8K46oikdu3D5WJW2q6hQOAL7Hjsi6Ss7Jf_cMOtF-hv2dGynZZyVPeenbMY1CYY-kGc=w640-h480" width="640" /></a></div><div><br /></div><div>I ended up outsourcing the part to none other than PCBWay. Yes, <a href="https://pcbway.com/">that PCBWay</a>. They now do machining too. I figured I'd upload the part and see what happened - last time I tried to get an earlier version of this part quoted by one of my usual Chinese prototyping shops, they quoted nearly $2k apiece in 7075.</div><div><br /></div><div>To my great surprise, I got back a quote for $170 with no complaints. For that price I was half expecting to just get a cylinder in the mail, but a few weeks later the part appeared and looked pretty good - not immaculate, but good enough to get started. The slot for the cams doesn't have the best finish, and you can faintly see a parting line in the center where they must have flipped the part around, but overall pretty good.</div><div><br /></div><div>They even drilled the 5mm hole I had in CAD all the way down the center of the part - when I was trying to machine the part in 3 pieces, the hole was clearance for the tie rod down the center that would have clamped the pieces together. I honestly meant to suppress the feature before uploading it, but I forgot and they drilled it anyway. That's a 5mm diameter, 400mm long hole. Even drilling from both sides, that's a 40:1 L:D drill, which is not something I'd ever want to deal with.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgwzo9lPbTsAzfqRolQvoEBIBu9qijBIGVTsPh-xNzUxNEPzpHbZxEGxJW14037V2HFaXIept8TlHcAow3RBpQlrnQ9jtUxeZYNX23i2TRoCzQW0gFOalwJok40wPlSiI23ic1sLk52BQowQ9EOL_fuCoja70y4YP2Yu6VafLGPn03iEAjBFw_zIkYE=s1600" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgwzo9lPbTsAzfqRolQvoEBIBu9qijBIGVTsPh-xNzUxNEPzpHbZxEGxJW14037V2HFaXIept8TlHcAow3RBpQlrnQ9jtUxeZYNX23i2TRoCzQW0gFOalwJok40wPlSiI23ic1sLk52BQowQ9EOL_fuCoja70y4YP2Yu6VafLGPn03iEAjBFw_zIkYE=w640-h480" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiKrMhUvQy1iRHDlyx0jwzm8QsMySVmkDRhW24E4JTVKrNeNLdUGsHWkHi7WPcNeQq7dunZvSJu_DeuA9LMKOd9TGvedIuhQzxzXjzd7KvlS-mQZfEWciUg_mkr_PqhC8aFT8X56cTHuPWqdctz1TCOvRAWYW1CLxGTjFafg6dk5xwv7tEAKsqXAq5n=s1600" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiKrMhUvQy1iRHDlyx0jwzm8QsMySVmkDRhW24E4JTVKrNeNLdUGsHWkHi7WPcNeQq7dunZvSJu_DeuA9LMKOd9TGvedIuhQzxzXjzd7KvlS-mQZfEWciUg_mkr_PqhC8aFT8X56cTHuPWqdctz1TCOvRAWYW1CLxGTjFafg6dk5xwv7tEAKsqXAq5n=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>Next part up was the nut. The nut has two cam followers that roll in the grooves in the screw, and holds rotor of the electric motor. This is probably obvious, but the reason for having two (or more) cam followers rather than just one is to balance the forces on the nut. The downside of more than one cam follower is that it sets an n-times higher constraint on the minimum pitch of the screw, which constrains the <a href="https://build-its-inprogress.blogspot.com/2020/11/transmission-ratio-trajectory.html">profile optimization</a>.</div></div></div><div><br /></div><div>I started out by turning all the cylindrical features on a manual lathe. I was able to do everything in one operation, so everything is as concentric as possible. I left a stub on the bottom so I could hold the part in a collet chuck on the mill.</div><div><br /></div><div>Here it is before milling:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjX6_UqKKuWnM6mLTrBift9SEUL5R9mrhHBJ7mKfXtIVAWm2OuB3131KfQ60ziWbw633gKOrUgFzuIBPJzJ2bX6F7sjm15JsSfNhN-YLE5P-bnJ9wRpf3GzQF2umdhpboedJjyvYTVvV-yncCBnfNNDl-2AOgn32Qx2yma6kFNg_hTkcdJzp2eXOJJO=s6000" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEjX6_UqKKuWnM6mLTrBift9SEUL5R9mrhHBJ7mKfXtIVAWm2OuB3131KfQ60ziWbw633gKOrUgFzuIBPJzJ2bX6F7sjm15JsSfNhN-YLE5P-bnJ9wRpf3GzQF2umdhpboedJjyvYTVvV-yncCBnfNNDl-2AOgn32Qx2yma6kFNg_hTkcdJzp2eXOJJO=w640-h426" width="640" /></a></div><div><br /></div><div>And after:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhQGZQMneCtTOrF97GmmMdaP7fuFUUwIpenK1_bTMFqn0RtT_gAbIegTjLiWJuOuzp_-KxButQMggJbf9GLXqp-WnWM-ygfmAfy7szTLNIyd3D7tcfewZaFTYPV1qiRJZaNHim2tEpCU3uHis3ZupB-D1esz2ZAIilVo9CoacPlKStTD6SS11qGOKJM=s2799" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2100" data-original-width="2799" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhQGZQMneCtTOrF97GmmMdaP7fuFUUwIpenK1_bTMFqn0RtT_gAbIegTjLiWJuOuzp_-KxButQMggJbf9GLXqp-WnWM-ygfmAfy7szTLNIyd3D7tcfewZaFTYPV1qiRJZaNHim2tEpCU3uHis3ZupB-D1esz2ZAIilVo9CoacPlKStTD6SS11qGOKJM=w640-h480" width="640" /></a></div><div><br /></div><div>There's two undercuts inside cam follower bearing bores (<a href="https://build-its-feed.blogspot.com/2022/01/undercutting-tool.html">cut with a home-made tool</a>), which support the flanged bearings the cam followers spin in:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiPEAzJUUjaxXqp7Gnyyv3RxKBE0_U2WEaMQcuxuqedNfb60GlXVxN2GAMnY3CRqFi7Db4MgXr-VWk7Ufvyonkv6-QXlDTmbfNtk3EYX35LNkQ0aEjQAmvshbhlg6Z3lLdNUVLSUABb_vi0q7v4NnWjjoVoRIo_W4XnOji3CIpNNU92i7oXesOlJDQm=s4608" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiPEAzJUUjaxXqp7Gnyyv3RxKBE0_U2WEaMQcuxuqedNfb60GlXVxN2GAMnY3CRqFi7Db4MgXr-VWk7Ufvyonkv6-QXlDTmbfNtk3EYX35LNkQ0aEjQAmvshbhlg6Z3lLdNUVLSUABb_vi0q7v4NnWjjoVoRIo_W4XnOji3CIpNNU92i7oXesOlJDQm=w640-h480" width="640" /></a></div><br /><div>Typically, cam followers (a.k.a <i>track rollers</i>) are a needle bearing with an extra thick outer race, and the outer race rides against a cam surface. I needed 3mm diameter cam followers, which aren't a thing, and even if they were, by the time the bearing OD was 3mm, the shaft diameter would probably be ~1mm and not strong enough for my loads anyways. I flipped the usual cam follower arrangement to look like a spindle. A pair of bearings (one flanged, one not) are housed by the rotor, and a solid 3mm shaft pokes in and engages the cam surface.</div><div><br /></div><div>These are the two cam followers with bearings:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhibPVy1_kkCmL8Ko-lJyLouHScedC7C9m9BOJ8qo6Z0iMfKTusWeWoIm0eMQ9RcgTScAFQpXrTOqXMEOruBHp0AsT6OquUz1YeLS_2ujpDnJIhsBOmvia6acyG1QNjMKf5LWReWn4m5eP87q-sGTilCE5wy5LGAiMm9mVJh2JnBG8GWQIDHn-7FMPN=s1600" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhibPVy1_kkCmL8Ko-lJyLouHScedC7C9m9BOJ8qo6Z0iMfKTusWeWoIm0eMQ9RcgTScAFQpXrTOqXMEOruBHp0AsT6OquUz1YeLS_2ujpDnJIhsBOmvia6acyG1QNjMKf5LWReWn4m5eP87q-sGTilCE5wy5LGAiMm9mVJh2JnBG8GWQIDHn-7FMPN=w640-h480" width="640" /></a></div><div><br /></div>These can <i>just barely </i>be inserted from the inside through the central bore in the rotor. I'd probably change up this arrangement a little if I had to remake the rotor as it was pretty tricky to assemble, but this design did minimize the cantilever of the cam followers, and very solidly supports the thrust loads on the cam followers (due to both cam scrubbing and centripetal acceleration from the rotor spinning)<div><br /></div><div>Here's the nut assembled (minus the motor rotor), with bearings:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjNsoOCuFpxVeoj_fyxySNhFG99dL-s9Yyk4pQhrR8BxKZPjtrt_r90Vb4JtoQhHGqfjG5SN43sOOjR6KS8U2lpv8MM7t3jZaZYfpkwBPHLK-1xMhRi29WaEbsDLJJ5gPBp1d8Ki2g1vcQYMgrVEaysa099LMd8ZEjbcaOqtwAM0PIxokLGSZVZ_4m3=s3083" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2055" data-original-width="3083" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEjNsoOCuFpxVeoj_fyxySNhFG99dL-s9Yyk4pQhrR8BxKZPjtrt_r90Vb4JtoQhHGqfjG5SN43sOOjR6KS8U2lpv8MM7t3jZaZYfpkwBPHLK-1xMhRi29WaEbsDLJJ5gPBp1d8Ki2g1vcQYMgrVEaysa099LMd8ZEjbcaOqtwAM0PIxokLGSZVZ_4m3=w640-h426" width="640" /></a></div><div><br /></div><div>A view down the center to one of the cam followers:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjYS2PPNTi8qiM5YbNsvRqxPQeMux6689Vtr9tcM_bKe99aF-6JNUl8JyM3adHriVuR7Tvfq7Wfd7pFAFGVKlK9PSDVjKnjLURqqg_PfPaNc8RO8XqV1kA12JwVA3R-0wUwMhI4LBMLqYv5fi_T07owb0cFBp38YnmX74D-0WtRBQfyuTH_kj2zeP9a=s2841" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1894" data-original-width="2841" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEjYS2PPNTi8qiM5YbNsvRqxPQeMux6689Vtr9tcM_bKe99aF-6JNUl8JyM3adHriVuR7Tvfq7Wfd7pFAFGVKlK9PSDVjKnjLURqqg_PfPaNc8RO8XqV1kA12JwVA3R-0wUwMhI4LBMLqYv5fi_T07owb0cFBp38YnmX74D-0WtRBQfyuTH_kj2zeP9a=w640-h426" width="640" /></a></div><br /><div>For testing, I turned two Delrin bushings to keep the screw centered in the nut. These will be removed once the real supports for the screw are made:<br /><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgyQPqrLoi1av01Rd8OvTGFVEEaKYHZ6wXF77Q0SHWErdzHGJuf29IbhvAMaJL9a2fFcxOlPk6lsWzvAez3MfuJ1BCWIV38Hqlc6R0tHf_FvvcWVRBe1YIaellmUiXIX-ICohxdEH7wOFwNZlZhnYlJ3AZPdxZEgfeRkLTD994jiZNpG22TG9k6F6pV=s3529" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2353" data-original-width="3529" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEgyQPqrLoi1av01Rd8OvTGFVEEaKYHZ6wXF77Q0SHWErdzHGJuf29IbhvAMaJL9a2fFcxOlPk6lsWzvAez3MfuJ1BCWIV38Hqlc6R0tHf_FvvcWVRBe1YIaellmUiXIX-ICohxdEH7wOFwNZlZhnYlJ3AZPdxZEgfeRkLTD994jiZNpG22TG9k6F6pV=w640-h426" width="640" /></a></div><div><br /></div><div>With everything properly constrained, the mechanism works pretty smoothly:</div><div><br /></div>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/100is1XpXcE" title="YouTube video player" width="560"></iframe></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>I post-machined a stock nylon spur gear, which mounts to the nut to drive the commutation encoder:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgskE-fcy6eH1Qq49QM_1y7dsDwaov1-2i1CDorJW7LmZ0-tRse3MciTrwijr0kuvtd55AGK_kp-ye3OsVZiOHk5rfB22ZHQcCagYEq4t7CA23H7VMT163O2zDHA3Y20AfU5569NvIzXEVQCN12WZbcWGXVU0Cnr96nq7E9BPE0Ew5Ae32ubZPaR3tJ=s3640" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2426" data-original-width="3640" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEgskE-fcy6eH1Qq49QM_1y7dsDwaov1-2i1CDorJW7LmZ0-tRse3MciTrwijr0kuvtd55AGK_kp-ye3OsVZiOHk5rfB22ZHQcCagYEq4t7CA23H7VMT163O2zDHA3Y20AfU5569NvIzXEVQCN12WZbcWGXVU0Cnr96nq7E9BPE0Ew5Ae32ubZPaR3tJ=w640-h426" width="640" /></a></div><div><br /></div><div><div>Next parts up were the two halves of the motor housing. Here's a probably very boring video of machining one half, condensed down to 5 minutes:</div><div><br /></div><div style="text-align: center;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/H6zlijfK8ls" title="YouTube video player" width="560"></iframe>
<br /></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjBpQH52maI5RtqiyIhe5vykIEnmkqifsMlTqVEsnYjCwCI6DbYShFUlh4aoQxllpaA87eQitPKYwcV87o0v0NvNx0PaN0qt5wHSdtTX9ON0MulI0YwKpaFXLF77lU0KGmWGE2d4EXd9jCTZ07WPLjpn0gD9Di5h4xl8S25UrR-CYlbU3Fzn572Eryd=s3389" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2259" data-original-width="3389" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEjBpQH52maI5RtqiyIhe5vykIEnmkqifsMlTqVEsnYjCwCI6DbYShFUlh4aoQxllpaA87eQitPKYwcV87o0v0NvNx0PaN0qt5wHSdtTX9ON0MulI0YwKpaFXLF77lU0KGmWGE2d4EXd9jCTZ07WPLjpn0gD9Di5h4xl8S25UrR-CYlbU3Fzn572Eryd=w640-h426" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgq7eltcutdKo9JZj-hCu8NUQCztTbAYn6d2iDiGYvNExKbmBUJBuFHEXzIr73FKDSzWms6Q4AYDEeH03naP5-BZw3T3flfVqG3JVq8A3b800Rf6THIXZZsgH81mrVydxDF4O2iDCVgfeTvHMHOoul-HJI8gulMrB0pu0BZPL499LRZAKSGnzmzcbNK=s3802" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2535" data-original-width="3802" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEgq7eltcutdKo9JZj-hCu8NUQCztTbAYn6d2iDiGYvNExKbmBUJBuFHEXzIr73FKDSzWms6Q4AYDEeH03naP5-BZw3T3flfVqG3JVq8A3b800Rf6THIXZZsgH81mrVydxDF4O2iDCVgfeTvHMHOoul-HJI8gulMrB0pu0BZPL499LRZAKSGnzmzcbNK=w640-h426" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>The RI50 stator was slip-fit into the motor housing with retaining compound on the OD (Loctite 648). </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgD7bbufqzalfqysysh5HGEHt4cqD6X4c_ZMzDD7MWHX-D3VK6qV0Px1DkAqQKRnJ3sv6hWAyn8XourjneyER0OfuV_TxDCzauqkMicZ_CDHWRR1r_wyGPUN8NizgEHrwRCmJJUGcKBu8IZeusXOh5CJyzkg-bgKdYZAnu-Tj-cemVSx_AYli5rblRD=s4608" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgD7bbufqzalfqysysh5HGEHt4cqD6X4c_ZMzDD7MWHX-D3VK6qV0Px1DkAqQKRnJ3sv6hWAyn8XourjneyER0OfuV_TxDCzauqkMicZ_CDHWRR1r_wyGPUN8NizgEHrwRCmJJUGcKBu8IZeusXOh5CJyzkg-bgKdYZAnu-Tj-cemVSx_AYli5rblRD=w640-h480" width="640" /></a></div><div><br /></div><div>I potted the windings in a low-viscosity <a href="https://www.mcmaster.com/7548A11/">thermally conductive epoxy</a> to improve the thermal conductivity.</div><div><br /><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj5QPLFKhdGM7pX9aGlTGOQepPszMcWpPDf8kQ8IpGuN4nWKS1gvYOOHbvlYMiAJvPU-5LT33c4yq4RiVVIsLh7uCKGB2ZJAT7n-86EUxcwbynUGURe5QvLSdPUSngB6-SJ1ZUC5phcDw4mpegzB19nXZw-X4T1WM9jVhrUsdSMUlCS06mLu8zdLLlp=s4608" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEj5QPLFKhdGM7pX9aGlTGOQepPszMcWpPDf8kQ8IpGuN4nWKS1gvYOOHbvlYMiAJvPU-5LT33c4yq4RiVVIsLh7uCKGB2ZJAT7n-86EUxcwbynUGURe5QvLSdPUSngB6-SJ1ZUC5phcDw4mpegzB19nXZw-X4T1WM9jVhrUsdSMUlCS06mLu8zdLLlp=w640-h480" width="640" /></a></div><br /></div><div>I 3d-printed an expanding mold for the ID of the stator. The part on the left was a close fit to the stator ID and has a tapered bore. It tapers down to a knife-edge at the bottom - this sharp plastic edge seals against the motor housing when compressed, without the need for explicit sealing elements like o-rings. The conical plug on the right presses the mold down, and expands it into the ID of the stator to take up any gaps. The mold parts were sanded smooth, and wiped down in an easy-to-clean grease, to keep the epoxy from sticking.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjt7WGV9J6UkXPvzxU_o3hCFBvVOprv41E7S2LKGsKywvUELYKTfQZEomVUBnqn0Cb4-G_OdM1QvStZ_5T31kQ70cO3ziThLF-7y8L5YCvgRDhLIjoh29YSivCWet0uZD93dos1z1vyZhzrSjVLltJGZy0H1iS9EUsmF3iPTOO4DYrMJVRdVlurOdzi=s4608" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjt7WGV9J6UkXPvzxU_o3hCFBvVOprv41E7S2LKGsKywvUELYKTfQZEomVUBnqn0Cb4-G_OdM1QvStZ_5T31kQ70cO3ziThLF-7y8L5YCvgRDhLIjoh29YSivCWet0uZD93dos1z1vyZhzrSjVLltJGZy0H1iS9EUsmF3iPTOO4DYrMJVRdVlurOdzi=w640-h480" width="640" /></a></div><br /></div><div>I filled the motor from the bottom-up by sticking a luer lock syringe needle on the end of a mixing nozzle, and inserting the needle down the stator slots in-between the coils to the bottom of the motor housing:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg4Rx1ZvAzQPNq2DATZ_rIlGBKs1acvgF3dGqA-C19WQd99EAGVCJuq-30BNfG5MR23Y0yEqHWs7Kcxm4KtOCp_tZyS0RYSrMc95nuAvxtJ7qajftfjD3oGUTcjuK8Fl6Bv2WydxZ-bQ4svy7ingJ8Wh5JeDCvREGK4y_aDzHGICJ1AwbQpl8s0okee=s4608" style="margin-left: 1em; margin-right: 1em;"></a><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg4Rx1ZvAzQPNq2DATZ_rIlGBKs1acvgF3dGqA-C19WQd99EAGVCJuq-30BNfG5MR23Y0yEqHWs7Kcxm4KtOCp_tZyS0RYSrMc95nuAvxtJ7qajftfjD3oGUTcjuK8Fl6Bv2WydxZ-bQ4svy7ingJ8Wh5JeDCvREGK4y_aDzHGICJ1AwbQpl8s0okee=s4608" style="margin-left: 1em; margin-right: 1em;"></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiIguX5Ws10bGHI5BeLn7_MitYbAg4_Acg4YPmWOz4gdl8TyJa01w9MCgQ9DYXuwMG_DfvjtmVxAz4bUZqBJzbjqYh57peyr7qy7A5LATeIn6jrOerO6q73fpBYOfX6B3VZ-gU2vZug2NtIjhXrSTLzFWlBwBZCFdWw_K_SL967pR5qMSHfWd8uvbeu=s4608" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiIguX5Ws10bGHI5BeLn7_MitYbAg4_Acg4YPmWOz4gdl8TyJa01w9MCgQ9DYXuwMG_DfvjtmVxAz4bUZqBJzbjqYh57peyr7qy7A5LATeIn6jrOerO6q73fpBYOfX6B3VZ-gU2vZug2NtIjhXrSTLzFWlBwBZCFdWw_K_SL967pR5qMSHfWd8uvbeu=w640-h480" width="640" /></a><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here it is after filling with epoxy, while the mold is still in place:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEg4Rx1ZvAzQPNq2DATZ_rIlGBKs1acvgF3dGqA-C19WQd99EAGVCJuq-30BNfG5MR23Y0yEqHWs7Kcxm4KtOCp_tZyS0RYSrMc95nuAvxtJ7qajftfjD3oGUTcjuK8Fl6Bv2WydxZ-bQ4svy7ingJ8Wh5JeDCvREGK4y_aDzHGICJ1AwbQpl8s0okee=w640-h480" width="640" /></div><div><br /></div><div>At the top of the mechanism, the screw is centered by a close-fitting <a href="https://www.mcam.com/na-en/products/engineering-plastics/standard/tivarr-uhmw-pe-family-of-products/tivarr-hpv/">Tivar HPV</a> (extra slippery UHMW) bushing. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhdfX5BnhIa-3NRNwZ0aUPRxBmIqo-VWoAd88Sdjs7olzxgaDHVGUx6_ockvTiJoghf-bVnNdp23hZapkA2O8nnolVrrL8FruzrP9GL2igTVLRuOTI8YlBbi2OwoFv-FlUDVk7ZCrgCZM-7JX1Y59DdHWSlGbOpBpSY_-7v3jyk1L58P_11GueiVGr1=s3770" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2513" data-original-width="3770" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEhdfX5BnhIa-3NRNwZ0aUPRxBmIqo-VWoAd88Sdjs7olzxgaDHVGUx6_ockvTiJoghf-bVnNdp23hZapkA2O8nnolVrrL8FruzrP9GL2igTVLRuOTI8YlBbi2OwoFv-FlUDVk7ZCrgCZM-7JX1Y59DdHWSlGbOpBpSY_-7v3jyk1L58P_11GueiVGr1=w640-h426" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi1Jtukx9TH2jYikig_b1OGNxPb07c3KpcWA5z09PWQ06HaQgM1oy52fqIQNlJZwHqLWRw-bjif-IjuRkGF0kY65tyi9e4CZyMqsWiLtamEP7ZKWkNA6lfcf3TKj_4IbnrThzpzx7xioYeVjF0gmBlknArFp8toSkZ6eQHbTE5bdygWM2pUfgbxP2Nt=s4408" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2938" data-original-width="4408" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEi1Jtukx9TH2jYikig_b1OGNxPb07c3KpcWA5z09PWQ06HaQgM1oy52fqIQNlJZwHqLWRw-bjif-IjuRkGF0kY65tyi9e4CZyMqsWiLtamEP7ZKWkNA6lfcf3TKj_4IbnrThzpzx7xioYeVjF0gmBlknArFp8toSkZ6eQHbTE5bdygWM2pUfgbxP2Nt=w640-h426" width="640" /></a></div><div><br /></div><div>At the top of the bushing, there's an end-of-travel bumper made from a square cross section o-ring. This will take the edge off any impacts were the screw still has velocity at the end of travel. The o-ring is glued to the bushing with some <a href="https://www.henkel-adhesives.com/us/en/product/instant-adhesives/loctite_380.html">Loctite 380 Black Max</a>. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgs0jyMXSivuNBTSEkzePnPj8kuWPuUtRvz1emvh23RSoS3kcg5PKSgZqegv1XixH_OQkqX3QhUe3GZgZ9bqtIhyp58Dmcyjh4YGbDRXHDMwZPgNVFwS1EMA7_rY8kZiQpH8HqxeN5d2KCcR9vobfxws0ZVVgpWs8csMMaNHeGRnhJE8t_gYHZm0kEX=s4238" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2825" data-original-width="4238" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEgs0jyMXSivuNBTSEkzePnPj8kuWPuUtRvz1emvh23RSoS3kcg5PKSgZqegv1XixH_OQkqX3QhUe3GZgZ9bqtIhyp58Dmcyjh4YGbDRXHDMwZPgNVFwS1EMA7_rY8kZiQpH8HqxeN5d2KCcR9vobfxws0ZVVgpWs8csMMaNHeGRnhJE8t_gYHZm0kEX=w640-h426" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEic0_Az7DBlVUM-N6aXoYzibCcZoEQEOVoNfBHaKCd0ZKthWYbe06u1Um0C2vPO8KKkDRMk30jCIqbQM9sAhv_gKLxNjQIlteQsVD2VlrcGnI78qnHpG8Uh5u9OZ6Nl12vahVK3rNnLyT6W4_BakUyNJz_mHwU1O3MFNql9-AalCvpyoQt50auYKYsP=s4244" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2829" data-original-width="4244" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEic0_Az7DBlVUM-N6aXoYzibCcZoEQEOVoNfBHaKCd0ZKthWYbe06u1Um0C2vPO8KKkDRMk30jCIqbQM9sAhv_gKLxNjQIlteQsVD2VlrcGnI78qnHpG8Uh5u9OZ6Nl12vahVK3rNnLyT6W4_BakUyNJz_mHwU1O3MFNql9-AalCvpyoQt50auYKYsP=w640-h426" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div></div><div class="separator" style="clear: both; text-align: left;">Here's the motor drive mount attached. The motor drive mount is an HP MJF 3d-printed part. At the center is a pair of bearings fan aluminum shaft with a tiny diametric magnet pressed into the end, for sensing the rotor position. The spur gear in the motor drive mount meshes with the spur gear on the rotor, as seen two pictures down.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjfku0ViW_61yjv_xTFL-WLTWcGdXinaz2XuO-tTBou4p5S1vMT-sMpz4CwLb7NgOlu0kVYWcQcpaMToz-4qn6aYahcJJSPe4qcm9liSD5VtWke7Lux3pKAHNB6d9HYzlgxXW7aVxS58_LAOj8UeCahmFped15KIHo30a6Mgwi1L6lMOkkny97lrppY=s4845" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3231" data-original-width="4845" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEjfku0ViW_61yjv_xTFL-WLTWcGdXinaz2XuO-tTBou4p5S1vMT-sMpz4CwLb7NgOlu0kVYWcQcpaMToz-4qn6aYahcJJSPe4qcm9liSD5VtWke7Lux3pKAHNB6d9HYzlgxXW7aVxS58_LAOj8UeCahmFped15KIHo30a6Mgwi1L6lMOkkny97lrppY=w640-h426" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhdL7fyZEH8ByHFUNArr2pPKVEStdpRxBeUlckbWvhxG4qeGOit5FzoNZ2IR2zMRn5tM5-Ue92svpWI4yp8xLxv2GwfohNSJ8OD4sjnfEZmKCfdqeKDXg4IDlwM7Vv2SLWSyQUG2Xl9Uvdpl7b2OoxMEb8OLzsyScVmbyY0RczMAdmSpwXm7m5hFR_u=s6000" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEhdL7fyZEH8ByHFUNArr2pPKVEStdpRxBeUlckbWvhxG4qeGOit5FzoNZ2IR2zMRn5tM5-Ue92svpWI4yp8xLxv2GwfohNSJ8OD4sjnfEZmKCfdqeKDXg4IDlwM7Vv2SLWSyQUG2Xl9Uvdpl7b2OoxMEb8OLzsyScVmbyY0RczMAdmSpwXm7m5hFR_u=w640-h426" width="640" /></a></div></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">On the opposite side of the assembly from the guide bushing, there will be a set of guide rollers. There are three rollers each that run in three axial grooves along the screw. The axial grooves are shallow enough that they don't interfere with the spiral cam slots in the screw, and the 3 rollers per groove allow at least one of the rollers to always be engaged, even as the rollers pass over the cam slots. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">It's partially the fault of my job, and partially the fault of having a 5-axis mill at home, but all my parts are getting <i>bad</i>. Below is the piece that holds the nine guide rollers. It doesn't have any walls thicker than ~1.5mm, has holes bored from every which way, and has a bunch of weird undercuts.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhECUh63JYj8eEMl43P7faw6nSTm-oJ9SGqGN6dcHF6np2eTyg_YyZMA4WHxLVdsBkV5ymAXcQbGP-D23y5d91CPOfx1ZQcxqSDW62K4_ubvGjuB2da59QO7-Pi6vvDdK9Fi_aljKbnV2YoFo20KYGt9GrODdis8IRhIiEqLCMC4A9cST9Gx75ikmAE=s2925" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2193" data-original-width="2925" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhECUh63JYj8eEMl43P7faw6nSTm-oJ9SGqGN6dcHF6np2eTyg_YyZMA4WHxLVdsBkV5ymAXcQbGP-D23y5d91CPOfx1ZQcxqSDW62K4_ubvGjuB2da59QO7-Pi6vvDdK9Fi_aljKbnV2YoFo20KYGt9GrODdis8IRhIiEqLCMC4A9cST9Gx75ikmAE=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiWrQDUKM1EO1W-F9OHf0lGDW4bPbtQt-yyRsH7orVLXXQqvSjJ8Jwf7CCY1qOKClBJs0xTUbmhdyaNIq18tVJYtW0Ia15lCoHMoPrSpAK_Ssny2RFjS7dXZVQ1Sica3lgL1qYlW9Sf_MKPttfz4ofuIILnhsaHebNDy8Y04D04vDupwnaykPddzXPH=s2981" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1987" data-original-width="2981" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEiWrQDUKM1EO1W-F9OHf0lGDW4bPbtQt-yyRsH7orVLXXQqvSjJ8Jwf7CCY1qOKClBJs0xTUbmhdyaNIq18tVJYtW0Ia15lCoHMoPrSpAK_Ssny2RFjS7dXZVQ1Sica3lgL1qYlW9Sf_MKPttfz4ofuIILnhsaHebNDy8Y04D04vDupwnaykPddzXPH=w640-h426" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Cross section of the guide rollers assembly. The internal bosses visible in the picture above space the guide roller bearing inner races away from the walls of the part. </div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj-Q60rdpPCoC1utgKONddBf_3We44MIdA4IEvIPsWgd_eQxwbgjmEEtdnXwJP6laW9jSsXfesU1WkPP-OmjF6Akr8LcjS10VBXAXfEjwKKzoLoH5dow5bZdG1NgZJDs1i8ajdn98UQrTkQ8ApzUDR4HYWFo9t1RYKaBQG1fwW8L3UAOeajYWWcRU2o=s2704" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1885" data-original-width="2704" height="446" src="https://blogger.googleusercontent.com/img/a/AVvXsEj-Q60rdpPCoC1utgKONddBf_3We44MIdA4IEvIPsWgd_eQxwbgjmEEtdnXwJP6laW9jSsXfesU1WkPP-OmjF6Akr8LcjS10VBXAXfEjwKKzoLoH5dow5bZdG1NgZJDs1i8ajdn98UQrTkQ8ApzUDR4HYWFo9t1RYKaBQG1fwW8L3UAOeajYWWcRU2o=w640-h446" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here's how the part fits up to the motor assembly. The black ring at the end is another square o-ring bumper. I still need to make the guide rollers.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhTvJJH6hml1D5-HHPnPy9NuXFZTqBeSOm-pqVec9JH3Lc2M5CK45zTujmEyI4T7BdZQYqud31oCseT3NJZOAzr84_KZypT8-J-e1xjGvDir1aFCQcAYRFuN_-1QCTGgxD9iP0KMjHVVSmgoCi4ZSuQ8mt4sF5jQ-tcUdz6vKD3xDpMjQeKsd6QwAny=s4601" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3068" data-original-width="4601" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEhTvJJH6hml1D5-HHPnPy9NuXFZTqBeSOm-pqVec9JH3Lc2M5CK45zTujmEyI4T7BdZQYqud31oCseT3NJZOAzr84_KZypT8-J-e1xjGvDir1aFCQcAYRFuN_-1QCTGgxD9iP0KMjHVVSmgoCi4ZSuQ8mt4sF5jQ-tcUdz6vKD3xDpMjQeKsd6QwAny=w640-h426" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">And finally, here's a view of the assembly in its current state. Just a few little parts left before it's ready for some testing - not jumping to start out, probably launching something of equivalent mass. Either something's going to get launched very high, the mechanism is going to explode, or both, so it will be exciting regardless.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjnygpssx8QV8r0P_EVhAJIrRPzEamltUZixhdTySr4ICct2j0D2mUVPrLsNWo9mVpRIFO6qSD8waD9zYGXu14W94vP08AgrbLoNUvmWacQeZ-a5VskD7dkI7hTUd7oZynrzEQl2KvrGPHcnlQJjR32HD0p491moOYYVeIsgD25YvlczJnp7liFhf_T=s5203" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3469" data-original-width="5203" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEjnygpssx8QV8r0P_EVhAJIrRPzEamltUZixhdTySr4ICct2j0D2mUVPrLsNWo9mVpRIFO6qSD8waD9zYGXu14W94vP08AgrbLoNUvmWacQeZ-a5VskD7dkI7hTUd7oZynrzEQl2KvrGPHcnlQJjR32HD0p491moOYYVeIsgD25YvlczJnp7liFhf_T=w640-h426" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiMuwVsrc715LDXANBmxqarrpz27ck6K23Ml5l2rXoXki3SUV5witbMRCmPUVRJoNWSU-CSjzDxVwSwpSi8qFet8Jptm6CnMK2ypUFGr0YYv_1UWP-eso-y-7CxDlzkwWSQOsFHAKCWbG-G4dfZ2oiA5z9niapEj3NKwT_I2W3rIb2XiMV_Y030SH-j=s5541" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3694" data-original-width="5541" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEiMuwVsrc715LDXANBmxqarrpz27ck6K23Ml5l2rXoXki3SUV5witbMRCmPUVRJoNWSU-CSjzDxVwSwpSi8qFet8Jptm6CnMK2ypUFGr0YYv_1UWP-eso-y-7CxDlzkwWSQOsFHAKCWbG-G4dfZ2oiA5z9niapEj3NKwT_I2W3rIb2XiMV_Y030SH-j=w640-h426" width="640" /></a></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com7tag:blogger.com,1999:blog-910685024071367839.post-40315428668041722642021-09-08T23:57:00.000-04:002021-09-08T23:57:25.564-04:00Closed Loop Espresso Part 2: Firmware Estimation and ControlI've made a lot of progress on the software and control side of the <a href="https://build-its-inprogress.blogspot.com/search/label/Espresso%20Machine">espresso machine</a>, and learned some good lessons about designing the real version of the machine.<div><br /></div><div>This is the first post in a series about the firmware/software, more to come soon.<br /><div><br /></div><div>To "spill the beans", as people at work say, here's a demo of the current state of the machine:<div><div><br /></div></div>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/OfQHwUaiH74" title="YouTube video player" width="560"></iframe></div></div><div style="text-align: center;"><br /></div><div style="text-align: left;">Here's what's going on while making the espresso in the video:</div><div style="text-align: left;"><ul style="text-align: left;"><li>After the "Start" button is pressed, water is pumped through the heater and back into the tank at a constant flow rate, and the water/group heaters start heating.</li><li>Once both temperatures have converged to their setpoint, flow is switched from from the tank to the group. At first, the water is flushed through the group to the drip tray, to purge air from the group.</li><li>Once the air is purged, the valve to the drip tray closes and "preinfusion" starts. The group is filled up at a constant flow rate.</li><li>Once the desired shot pressure is reached (indicating the group is full and puck is saturated with water), the machine switches over to pressure control, and holds a constant pressure for the remainder of the shot.</li><li>Once the desired output weight is reached (for now estimated by integrating a pump displacement/leak model), flow to the group is controlled to zero and excess pressure is vented to the drip tray, so the drips through the puck stop quickly.</li></ul><div>On to the subject of this post, firmware-level estimation and control</div><div><br /></div><div><u>Flow Estimation</u></div><div>Originally I was planning on finding a flow sensor, but so far haven't found a sensor that's both affordable and any good - the impeller type sensors for all-in-one coffee machines have pretty terrible accuracy. Fortunately I have enough instrumentation to estimate the flow pretty well. Here's the basic model I'm using for flow estimation:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ZZyXB1725oM/YTf4VPxNkLI/AAAAAAAAcKY/XejfqUtxMnwqBQz1tZReZ0r6kurmnojIwCLcBGAsYHQ/s2048/leak_diagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1731" data-original-width="2048" height="541" src="https://1.bp.blogspot.com/-ZZyXB1725oM/YTf4VPxNkLI/AAAAAAAAcKY/XejfqUtxMnwqBQz1tZReZ0r6kurmnojIwCLcBGAsYHQ/w640-h541/leak_diagram.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div>There's an "ideal" pump with constant displacement \(D\), spinning at angular velocity \(\dot{\theta}\), with the flow characteristic:</div><div><br /></div><div>\[F_{ideal} = \dot{\theta} D\]</div><div><br /></div><div>There's leak path between the outlet and inlet of the pump, with a nonlinear resistance which behaves quadratically. The pressure, \(\Delta P\) across the resistor is:</div><div><br />\[\Delta P = C_{1}F_{leak} + C_{2}F_{leak}^{2}\]</div><div><br /></div><div>Solving the quadratic equation:</div><div><br /></div><div>\[F_{leak} = \frac{-C_{1} + \sqrt{C_{1}^{2} + 4C_{2}\Delta P}}{2 C_{2}}\]</div><div><br /></div><div>\(\Delta P\) and \(\dot{\theta}\) are both measured, and the output flow is estimated by just adding up \(F_{ideal}\) and \(F_{leak}\).</div><div><br /></div><div>This is (of course) in SI units, so \(\dot{\theta}\) is in cubic meters, \(D\) is in cubic meters per radian, \(\Delta P\) is in Pascals, and all the flows are in cubic meters per second.</div><div><br /></div><div><u>Pump Characterization</u></div><div><u><br /></u></div><div>The pump displacement is listed on the <a href="https://www.fluidotech.it/site/assets/files/1315/mg300-gear-pump-datasheet.pdf">datasheet</a>, and one could probably get a decent guess at the leak coefficients by squinting at the pressure/flow curves in the datasheet, but I measured these parameters in-place.</div><div><br /></div><div>I measured the pump displacement by just pumping water into a cup on a scale, and measuring the weight in the cup vs pump angle. Averaging over a minute of pumping, I got a result that was nearly identical to the datasheet value (hooray!).</div><div><br /></div><div>I measured the leak coefficients \(C_{1}\) and \(C_{2}\) by blocking off the output of the pump with the needle valve, and varying the speed of the pump. Blocking the output sets \(F_{leak} = F_{ideal}\), so the coefficients are found by fitting a curve to \(\Delta P\) vs \(\dot{\theta}\).</div><div><br /></div><div>Looks pretty quadratic to me:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-LOfY0udVXzM/YTgLWIIPxwI/AAAAAAAAcKg/sXfSrzX4xncjVEX_jSAGT8_ZGQox_w53ACLcBGAsYHQ/s725/leak_fit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="725" height="424" src="https://1.bp.blogspot.com/-LOfY0udVXzM/YTgLWIIPxwI/AAAAAAAAcKg/sXfSrzX4xncjVEX_jSAGT8_ZGQox_w53ACLcBGAsYHQ/w640-h424/leak_fit.png" width="640" /></a></div><br /><div><u>Flow Control</u></div><div><u><br /></u></div><div>Flow control falls right out of the flow equations above. Knowing \(\Delta P\) across the pump and have a desired flow rate \(F_{des}\), the desired pump velocity \(\dot{\theta}_{des}\) is set to:</div><div>\[\dot{\theta}_{des} = \frac{F_{des} + F_{leak}}{D}\]</div><div>Then the closed-loop velocity control is handled on the motor drive. </div><div><br /></div><div><u>Pressure Control</u></div><div><u><br /></u></div><div>Pressure control was a bit more involved. I started out by measuring the pressure frequency response of the system with the <a href="https://build-its-feed.blogspot.com/2021/08/adjustable-puck-simulator.html">puck simulator</a> installed and blocked off for zero flow, by applying a chirp torque signal and measuring the resulting pressure</div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-PWYZQwPfcIs/YTirGs-X3KI/AAAAAAAAcKs/nMcLshAqDzkdVyg-HxiUTCjTgWFXYVd7gCLcBGAsYHQ/s922/chirp_plot_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="922" data-original-width="810" height="640" src="https://1.bp.blogspot.com/-PWYZQwPfcIs/YTirGs-X3KI/AAAAAAAAcKs/nMcLshAqDzkdVyg-HxiUTCjTgWFXYVd7gCLcBGAsYHQ/w562-h640/chirp_plot_2.png" width="562" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>The time series data can be turned into a bode plot by taking the ratios of the FFT's of the input and output. I've fit a 2nd order model to it, which is what I'd expect with the output blocked - the dynamics should be dominated by the inertia of the pump motor and magnetic coupling, and the spring constant of the magnetic coupling + fluid. When the output isn't blocked off, a third pole shows up, but that didn't matter too much for designing the controller.</div><div style="text-align: left;"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-180-qJ8j--g/YTirGoLXAmI/AAAAAAAAcKo/thPv4TcL_OYtJHWF-7lGxtjpyxUrE3NtACLcBGAsYHQ/s640/bode_fit_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://1.bp.blogspot.com/-180-qJ8j--g/YTirGoLXAmI/AAAAAAAAcKo/thPv4TcL_OYtJHWF-7lGxtjpyxUrE3NtACLcBGAsYHQ/w640-h480/bode_fit_3.png" width="640" /></a></div><div style="text-align: left;"><br /></div>I designed a pressure controller by loop shaping a PI + lead controller. I was able to push it to ~90 rad/s (14.3 hz crossover) on the hardware before things got crunchy.<br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-xHiY6mUZiR0/YTirHItpI0I/AAAAAAAAcK0/Hk0_cfU4XYkIlgeeJpGvZdOBQU7839HJACLcBGAsYHQ/s640/pressure_loop_shaping_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://1.bp.blogspot.com/-xHiY6mUZiR0/YTirHItpI0I/AAAAAAAAcK0/Hk0_cfU4XYkIlgeeJpGvZdOBQU7839HJACLcBGAsYHQ/w640-h480/pressure_loop_shaping_1.png" width="640" /></a></div><div style="text-align: left;"><br /></div><div style="text-align: left;">Here's the closed-loop step response (compared to the simulated step response given the 2nd order fit of the dynamics and the controller above). There's a little periodic wiggle in the pressure (I think from the teeth of the gear pump), but overall it looks pretty good.</div><div style="text-align: left;"><br /></div><a href="https://1.bp.blogspot.com/-s2sUxY09spY/YTirHpz88QI/AAAAAAAAcK4/bsRZh2gkt4k0oW7jG8nqPYidm_yDGPxsQCLcBGAsYHQ/s678/step_response_fit_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="480" data-original-width="678" height="454" src="https://1.bp.blogspot.com/-s2sUxY09spY/YTirHpz88QI/AAAAAAAAcK4/bsRZh2gkt4k0oW7jG8nqPYidm_yDGPxsQCLcBGAsYHQ/w640-h454/step_response_fit_1.png" width="640" /></a><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">And here's the measured vs expected closed-loop frequency response, measured the same was as the open-loop frequency response with a chirp input:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-DKpZ3CJnNgk/YTirGse7-pI/AAAAAAAAcKw/MjL6YXKMiHQ79F2tOx-bkLs1-DT6gXsPgCLcBGAsYHQ/s640/pi_lead_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://1.bp.blogspot.com/-DKpZ3CJnNgk/YTirGse7-pI/AAAAAAAAcKw/MjL6YXKMiHQ79F2tOx-bkLs1-DT6gXsPgCLcBGAsYHQ/w640-h480/pi_lead_2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><u>Temperature Control</u></div><div class="separator" style="clear: both; text-align: left;"><u><br /></u></div><div class="separator" style="clear: both; text-align: left;">As boring as temperature control is, it turned out to be a real pain. This prototype hardware (due to being thrown together out of mostly off-the-shelf sensors/fittings/etc) has the classic problem of non-collocated actuators and sensors. Basically, the temperature sensors are relatively far away from the heaters, so there's significant dynamics between the heaters and sensors. That, coupled with relatively slow time constants meant testing was very time consuming. I frequently found myself filling up the water tank with ice cubes to cool things down faster.</div><div><br /></div><div>There were a couple mildly interesting issues I ran into though. One had to do with the SSR's I'm using to turn on and off the heating elements. Typical SSR's only turn on and off at mains zero-crossings. I just stuffed some PWM on the input to the SSR, in the hopes that the probability of the input to the SSR being high at the zero crossing would be equal to the PWM duty cycle. Depending on the PWM frequency, this could work out. But due to some timer constraints with the clock configuration for USB and CAN, my PWM frequency ended up evenly dividing into 60 Hz. As a result, the PWM rising had a consistent alignment with the mains zero crossing, causing the SSR to turn on much more often than I expected given the PWM duty cycle. Rather than trying to reconfigure the timers, I implemented software PWM so I could make the PWM period much larger than 1/60th of a second, to avoid this issue.</div><div><br /></div><div>The other interesting issue I ran into had to do with my crappy hacked-together water heater design. Here's a cartoon of (roughly) what happens in the water heater. Water flows in at some inlet temperature, and out (hopefully) at the desired temperature. Assuming the heater itself is a constant temperature, which is probably not an unreasonable assumption if it's highly thermally conductive, then the <i>average</i> water outlet temperature <a href="https://web.mit.edu/16.unified/www/FALL/thermodynamics/notes/node131.html">exponentially approaches the heater temperature</a> throughout the heater.</div><div> </div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Epo_r6fPDIA/YTl_JGOoKJI/AAAAAAAAcLY/URELfE9G1wk1ECId4duehqzSuZc4dSTLQCLcBGAsYHQ/s2048/rect5482.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1543" data-original-width="2048" height="482" src="https://1.bp.blogspot.com/-Epo_r6fPDIA/YTl_JGOoKJI/AAAAAAAAcLY/URELfE9G1wk1ECId4duehqzSuZc4dSTLQCLcBGAsYHQ/w640-h482/rect5482.png" width="640" /></a></div><div><br /></div><i>Average</i> is the key word. As you can see from the cartoon plot, depending on the length of the heater and the convection coefficient between the heater wall and the water, the heater temperature could potentially be much higher than the outlet temperature. And in reality, at a given cross section of the water flowing through the heater, the entire cross section will not be at the average temperature. The water towards the walls of the heater will be hotter than the average, and the water in the middle of the cross section will be cooler than average.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">For making espresso, the desired output temperature is typically somewhere in the low-90's C, which is awfully close to water's boiling temperature under ambient pressure. The larger the difference between the heater temperature and the average outlet temperature, the larger the temperature gradient across the cross section of the water flow - so with a bad heater design (ahem) where the heater needs to be significantly hotter than the outlet, the water at the perimeter of the flow cross section can actually start boiling, even though the <i>average</i> water temperature is below boiling. This results in the machine spluttering as it cycles water back to the tank while preheating, and introduces (highly compressible) steam into the group when the shot is happening, which affects the pressure control.<br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">This issues seems solvable, and I think with a fresh heater and group design I can also significantly decrease the thermal mass and improve the temperature control bandwidth. </div><div><br /></div></div><div style="text-align: left;">This is getting long, so I'll pick up next time with a software post.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"></div></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com9tag:blogger.com,1999:blog-910685024071367839.post-28589600693592830862021-04-15T21:35:00.005-04:002021-04-15T21:35:58.431-04:00New motor drive firmware<p> Over a year ago I started porting my motor control firmware away from mbed. I've been working on it in spurts every few months and and ended up re-doing a lot of things from scratch, so it took much longer than I originally planned. Find it here:</p><p><a href="https://github.com/bgkatz/motorcontrol">https://github.com/bgkatz/motorcontrol</a></p><p>The core motor control math hasn't changed (<a href="https://github.com/bgkatz/motorcontrol/blob/master/Core/Src/foc.c">foc.c</a> is nearly identical to the old version). Lots of features have been improved though:</p><p></p><ul style="text-align: left;"><li>Encoder calibration/linearization is now current-mode, not voltage mode, and the calibration current can be configured from the serial terminal interface</li><li>Lots more parameters are configurable from the serial interface</li><li>Hardware setup is done with the Cube auto-generated setup code. Linking between the hardware and motor control code is all done in <a href="https://github.com/bgkatz/motorcontrol/blob/master/Core/Inc/hw_config.h">hw_config.h</a> so it should be pretty easy to port to different micros (someday I'll switch to using G4's instead of F446's....)</li></ul><div>It's certainly not completely polished, but I think everything's working - I've been using this firmware for the <a href="https://build-its-inprogress.blogspot.com/search/label/Espresso%20Machine">espresso machine</a> pump. I don't have any <a href="https://build-its.blogspot.com/2019/12/the-mini-cheetah-robot.html">Mini Cheetah</a> hardware other than the motor drives any more, so I haven't been able to confirm backwards-compatibility. Let me know if you try it and have problems.</div><p></p>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com12tag:blogger.com,1999:blog-910685024071367839.post-17665985030822984552021-02-25T23:34:00.005-05:002021-03-10T23:46:15.420-05:00Closed Loop Espresso Intro<p>Even before getting a lever espresso machine, I've been thinking about how I might design one if I were to do it from scratch.</p><p>This is the layout I've converged to:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAnQtKJYZF-O7VCAac3OsyZ_kJkFY7CLnyFxBQCbOVzKaOOo69ZzwPhyWdM3VJk9N57jyPNkOcY8VzaATn9YP4LmPdLwtd5pqwrmz5EnB_Df9gjhRfjUjCa6HBPYL5m9Q93Kn34TbDFyE/s2048/schematic.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1061" data-original-width="2048" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAnQtKJYZF-O7VCAac3OsyZ_kJkFY7CLnyFxBQCbOVzKaOOo69ZzwPhyWdM3VJk9N57jyPNkOcY8VzaATn9YP4LmPdLwtd5pqwrmz5EnB_Df9gjhRfjUjCa6HBPYL5m9Q93Kn34TbDFyE/w640-h332/schematic.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: left;">The basic summary is:</div><div class="separator" style="clear: both; text-align: left;">- Electric motor driven pump pumps water through a heater.</div><div class="separator" style="clear: both; text-align: left;">- If the water at the output of the heater isn't up to temperature, the 3-way valve after the heater will cycle the water back through the tank.</div><div class="separator" style="clear: both; text-align: left;">- Once the water at the output of the heater is up to temperature, the valve switches and water is piped over to the group head and coffee.</div><div class="separator" style="clear: both; text-align: left;">- An extra "drain" valve between the group head and the drip tray relieves pressure after the shot is done. Strictly this isn't necessary, but it serves a few purposes I'll get into later.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Critically with this setup, the whole tank of water doesn't have to get hot as it would in a boiler-based espresso machine. I'm hoping to get the delay between powering the machine on and pulling the first shot down to a minute or less. With a standard 15A mains outlet, it should be possible to real-time heat over 5 mL/s of water from room-temperature to espresso temperature, so main delay is in getting the thermal mass of the heater up to temperature.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The pump:</div><p></p><div class="separator" style="clear: both; text-align: left;">As far as I can tell, most "real" espresso machines use either <a href="https://clivecoffee.com/blogs/learn/the-pump-the-heart-of-your-espresso-machine">vibratory pumps or rotary vane pumps</a>. From a pure performance perspective these don't seem like great solutions to me. Vibratory pumps are noisy and hard to control (not saying you can't, <a href="https://decentespresso.com/">Decent </a>does pressure control with vibratory pump), and their main appeal is they're cheap and you can plug them straight into mains. Rotary vane pumps are positive displacement (which is good for pressure control, roughly speaking), but tend to have large displacements - meaning for a given pressure, a lot of torque is needed at the input, since (ignoring losses) \(energy = torque*angle = pressure*displacement\). Lots of torque = large motor or gear reduction. However, the pumping power requirements for making espresso are tiny - on the order of a few watts of \(pressure*flow rate\) (9 Bar * 4 mL/s is 3.6 watts, and I think that's towards the upper end of espresso flow rates). So a pump with a small displacement and a tiny motor (effectively getting "gear reduction" through the pump) makes more sense to me. </div><div class="separator" style="clear: both; text-align: left;"><br />Gear pumps were my first though. What I wanted was "stainless steel body gear pump with PEEK gears", and it turns out that exactly this object exists and can be purchased on ebay for a few tens of dollars. Even better, they all are magnetically coupled, so there are no shaft seals to leak. A couple weeks later I had a Fluid-o-Tech MG304 pump.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-aredtkOQibU/YDRxw7LhbQI/AAAAAAAAa14/QIAFDvJyAnsRVU_ZKqGXP94RjrC5tiOnACLcBGAsYHQ/s6000/DSC01513.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-aredtkOQibU/YDRxw7LhbQI/AAAAAAAAa14/QIAFDvJyAnsRVU_ZKqGXP94RjrC5tiOnACLcBGAsYHQ/w640-h426/DSC01513.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here's a shot of the inside. The gears and bushings are CF-PEEK and the rest is stainless:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDTIWRIpq9HBSupdrC0DtdgbxnNNk4HUbjosomdgEUQR5Twzj-Bz_xI4tAI_k13_2F10WkGwLw0uS54n8WB5Dh9_BoKyCQgjdDbr_SjTttRAXg6XRfASAL0LbOPQsroexwFciCYdBkC5s/s2048/IMG_20201207_190945953.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDTIWRIpq9HBSupdrC0DtdgbxnNNk4HUbjosomdgEUQR5Twzj-Bz_xI4tAI_k13_2F10WkGwLw0uS54n8WB5Dh9_BoKyCQgjdDbr_SjTttRAXg6XRfASAL0LbOPQsroexwFciCYdBkC5s/w640-h480/IMG_20201207_190945953.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here's a relevant plot from the datasheet. The blue curve labeled "A" is for a 1 cP viscosity fluid, e.g. water. Should be able to get over 200 psi at greater-than-espresso flow rates. Since the pump displacement is so small, torques needed are in the ~.1 N-m or less range, which means I can use a tiny motor.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJRUGuBHWEfI2rAO7snpZ7JEa3t31FvNHZgASRUhEtmn_E2F0kpo_r6bBmAcjsg4ldG_bItBTHWyTt1t1q8n0BzZPVRJJ9t7n1cTw92D0_mUqJ3d4TwuoZOZE9GmV-HasPaM2G0yctMhE/s541/pump_curve.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="414" data-original-width="541" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJRUGuBHWEfI2rAO7snpZ7JEa3t31FvNHZgASRUhEtmn_E2F0kpo_r6bBmAcjsg4ldG_bItBTHWyTt1t1q8n0BzZPVRJJ9t7n1cTw92D0_mUqJ3d4TwuoZOZE9GmV-HasPaM2G0yctMhE/s16000/pump_curve.PNG" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The main downside of gear pumps is leakage - which you can see in the pressure vs flow plot. Gear pumps "seal" by having very close tolerances between the tooth tips and faces of the gears and the pump cavity, so some fluid leaks through these gaps. For this pump it's very linear with pressure - at a constant input speed (which would be a constant flow if there were no leakage), output flow drops off linearly with pressure drop across the pump. </div><div><br /></div>The pump came with a low-end brushed maxon driving it. I swapped that for a Moog BN23 Silencer motor I snagged from a <a href="https://www.media.mit.edu/">Media Lab</a> trash pile ~7 years ago. One of its larger brethren was used to power the <a href="https://build-its.blogspot.com/2015/12/benchtop-lathe.html">tiny lathe</a>, and another by <a href="https://transistor-man.com/bluebot_revival.html">Dane for Robot Art</a>. A 3d-printed spacer adapts it to the pump. Eventually this'll need to be replaced with a more temperature resistant part, since the water flowing through the pump will get fairly warm.<br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKGL0xVNC4_OslUeYuqT6ZLvSecR2lWbHmo4frUbcs158it8txZDjD1tCjxaDcn4zFb4r69O2IsJugx1g6mGN-7TohE82M43H4muZIoT3y8TuwW-0_hAdfrd7eSLjc9hgyKlQ4HtNGLmk/s6000/DSC01516.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKGL0xVNC4_OslUeYuqT6ZLvSecR2lWbHmo4frUbcs158it8txZDjD1tCjxaDcn4zFb4r69O2IsJugx1g6mGN-7TohE82M43H4muZIoT3y8TuwW-0_hAdfrd7eSLjc9hgyKlQ4HtNGLmk/w640-h426/DSC01516.JPG" width="640" /></a></div><p>I modified a spare <a href="https://build-its-inprogress.blogspot.com/search/label/Pendulum">pendulum motor controller</a> so I could plug in the pressure sensor. Eventually I'll have a separate micro for doing all the high-level control and use one of my usual motor drives with the built in encoder, but for now this was the easiest thing to hack together. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWWbLJP67AhzxG6y3WLPgtvEdUiM50X3T1yyrAyMT9X77HrxX2OMaj6nU6CGeJSo0l6ToLnwWEqy8DPTjB_NEj0yOZl3zc1hmQy3-WWuAhZXLyy3cj8kUfDFmJV22Art0aBpi95MEEZ5E/s6000/DSC01515.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWWbLJP67AhzxG6y3WLPgtvEdUiM50X3T1yyrAyMT9X77HrxX2OMaj6nU6CGeJSo0l6ToLnwWEqy8DPTjB_NEj0yOZl3zc1hmQy3-WWuAhZXLyy3cj8kUfDFmJV22Art0aBpi95MEEZ5E/w640-h426/DSC01515.JPG" width="640" /></a></div><p></p><div class="separator" style="clear: both; text-align: left;">This was my pressure control test bed - the pump and motor, an automotive-style thread-in pressure sensor, a dial pressure gauge, and a needle valve as a variable load;</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxUUSd1HkyfmgVkRJ6jAVohvonZrABhze9CDhTMbZq_ArJ7yvF-WL14MgsuPz0KhhydK1pC0Q0ycbjWMniZNc1up-cJhw13uHgQnrFVKjj4CkqSxEWn6IDpvlK10Dhb010_eUk5R__zXI/s6000/DSC01509.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxUUSd1HkyfmgVkRJ6jAVohvonZrABhze9CDhTMbZq_ArJ7yvF-WL14MgsuPz0KhhydK1pC0Q0ycbjWMniZNc1up-cJhw13uHgQnrFVKjj4CkqSxEWn6IDpvlK10Dhb010_eUk5R__zXI/w640-h426/DSC01509.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p><p>Testing closed-loop pressure control. The pressure is plotted/setpoint set from the computer, and you can see the response to the needle valve opening and closing. With this setup I can get around 10 Hz of closed-loop pressure bandwidth.</p>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/AFd8I2u-qNY" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">Some kind of interesting notes about the pressure control, looping back to the pressure relief valve. One of the factors limiting the pressure control bandwidth is the compliance in the pump system. A lot of this is from the magnetic coupling, which has a sinusoidal force-vs-displacement profile, with zero stiffness around zero displacement, and relatively low peak stiffness. The other source of compliance is the fluid circuit - the bulk modulus of the fluid, the stiffness of the tubing and other stuff between the pump and the output, and much more importantly, the volume of air trapped in the system. Without the relief valve, a big air bubble could get trapped in the top of the group head, above the puck of coffee, which would add a huge compliance. To avoid this, the relief valve can be kept open until the group head is full of water, and then closed.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">On to water heating:</div><div style="text-align: center;"><br /></div><div>The water heater is made from three 1/4" x 7" die heaters sandwiched between two thin aluminum plates, with a stainless tube snaking between the heaters. My main goal was minimizing the thermal mass of the heater. This design is kind of terrible, but it's functional enough to get me going. The bend radius is super tight, and I did a few test bends that went well, but most of the bends in the final heater are awful. Still, they didn't crack and still pass water, so <i>good enough.</i><br /><div><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-cwIm0RsebZM/YDh-IIbtEPI/AAAAAAAAa6k/CSFxBb0r-QsBHlu_jZ-3JCRhUzvZFT_rQCLcBGAsYHQ/s2048/IMG_20201227_225217946.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-cwIm0RsebZM/YDh-IIbtEPI/AAAAAAAAa6k/CSFxBb0r-QsBHlu_jZ-3JCRhUzvZFT_rQCLcBGAsYHQ/w640-h480/IMG_20201227_225217946.jpg" width="640" /></a></div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-kM5q1XnkCfc/YDh-QyoJM5I/AAAAAAAAa6s/ykmeWLMJEGULew7STweAnA-fQ8mjAd74QCLcBGAsYHQ/s2048/IMG_20201227_225141806.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-kM5q1XnkCfc/YDh-QyoJM5I/AAAAAAAAa6s/ykmeWLMJEGULew7STweAnA-fQ8mjAd74QCLcBGAsYHQ/w640-h480/IMG_20201227_225141806.jpg" width="640" /></a></div><br /><div style="text-align: left;">Two thick sheets of FR4 sandwich the whole assembly for insulation. The machinist clamps are for extra pressure in the center. Yeah, this design was bad.</div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-T23I9Zk2WSc/YDRw6pmPeiI/AAAAAAAAa1k/caBNjzQ9WkEFl3NbEDQl6maJFmqvvxWoACLcBGAsYHQ/s6000/DSC01588.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-T23I9Zk2WSc/YDRw6pmPeiI/AAAAAAAAa1k/caBNjzQ9WkEFl3NbEDQl6maJFmqvvxWoACLcBGAsYHQ/w640-h426/DSC01588.JPG" width="640" /></a></div><div><br /></div><div>For water temperature control, I have a platinum RTD in the flow of water, and a thermistor measuring the temperature of the heater. I circulate water through the heating loop and back into the tank (in the picture above the metal pot...) until the the water temperature sensor has converged to the desired temperature, and then a 3-way valve is switch to pipe the hot water to the group head instead of back to the tank. It takes around a minute to converge from room temperature to ~90C, and that's with a pretty terribly designed heater and a water temperature sensor with way too much thermal mass (I used a generic NPT threaded sensor so I could throw this together quickly). So I think with some actual design I'll be able to get it even faster.</div><div><br /></div><div>Similar to the heater, the group head was designed to be low thermal mass. This is the opposite of how most espresso machines work, where the groups often have as much thermal mass as possible for "thermal stability" But they're usually heated by water or steam from the boiler. With the power of <i>feedback control</i>, low thermal mass, a group heater, and a group temperature sensor seems like the way to go.</div><div><br /></div><div>I designed the group to work with a <a href="https://build-its-inprogress.blogspot.com/search/label/La%20Pavoni">La Pavoni </a> portafilter, shower screen, and group seal, since I already had those lying around. For the final version of all this (assuming there is a final version), I'll probably switch over to the standard 58mm portafilter size.</div><div><br /></div><div>Here's the CAD and a cross section. The typical wall thickness is 1.5-2mm. I could definitely have gone harder with the light-weighting, but I wasn't in the mood for any analysis (this is pressurized to ~150 psi), so I just eyeballed it for now. Next round of parts I'll probably be able to make it ~50% lighter. </div><div><br /></div><div><a href="https://lh3.googleusercontent.com/-jObzq0ZZtzI/YDXCD6G3HhI/AAAAAAAAa3Q/0TEUawttTBscriSOu7xrgfKvn5pq-D-YACLcBGAsYHQ/group_1.PNG" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img alt="" data-original-height="1306" data-original-width="1737" height="221" src="https://lh3.googleusercontent.com/-jObzq0ZZtzI/YDXCD6G3HhI/AAAAAAAAa3Q/0TEUawttTBscriSOu7xrgfKvn5pq-D-YACLcBGAsYHQ/w294-h221/group_1.PNG" width="294" /></a><a href="https://lh3.googleusercontent.com/-i8_oH-51Kuw/YDXCGRyD2jI/AAAAAAAAa3U/BAatc0pZAGwWHz43adRRiYPWzytiK8r3wCLcBGAsYHQ/group_2.PNG" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img alt="" data-original-height="940" data-original-width="1571" height="181" src="https://lh3.googleusercontent.com/-i8_oH-51Kuw/YDXCGRyD2jI/AAAAAAAAa3U/BAatc0pZAGwWHz43adRRiYPWzytiK8r3wCLcBGAsYHQ/w303-h181/group_2.PNG" width="303" /></a></div><div><br /></div><div>A screenshot of the CAM for making the top half of the group. Thanks to the power of the 5-axis mill, it was only 2 setups, despite the holes pointed in every direction.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDTC4q6b0N0FGcZSs7Cnvkg9DeDc0kVjmU1j7BZbbhuUc8SN2ryoINiaXUiaknt_wwS473eD4FSusf6fFcOGc8SxTmwnp82Q_e3CauEEindHYVtdt3pEP9lF0ht68H9J6j8lgdMU8Jv7s/s1707/5-axis_cam.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1380" data-original-width="1707" height="518" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDTC4q6b0N0FGcZSs7Cnvkg9DeDc0kVjmU1j7BZbbhuUc8SN2ryoINiaXUiaknt_wwS473eD4FSusf6fFcOGc8SxTmwnp82Q_e3CauEEindHYVtdt3pEP9lF0ht68H9J6j8lgdMU8Jv7s/w640-h518/5-axis_cam.PNG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /></div><div>Video of the machining:<a href="https://build-its-inprogress.blogspot.com/2020/10/benchtop-5-axis-mill.html"><br /></a><div style="text-align: center;"><br /></div><div style="text-align: center;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/RX4uG-8z8Jk" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">The finished parts assembled with seal and shower screen;</div><div style="text-align: center;"><br /></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Uv2BlyN6RQ4/YDh-plsYuOI/AAAAAAAAa68/xmKX_PXvwroI5ZwgHLrr0zSbOjQ0is_CACLcBGAsYHQ/s6000/DSC01652.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-Uv2BlyN6RQ4/YDh-plsYuOI/AAAAAAAAa68/xmKX_PXvwroI5ZwgHLrr0zSbOjQ0is_CACLcBGAsYHQ/w640-h426/DSC01652.JPG" width="640" /></a></div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-oawSeVSn_24/YDh-xJI4YsI/AAAAAAAAa7A/ASR1W43r-XUzVo4BfdbZ3jCLWZKdWqEMQCLcBGAsYHQ/s6000/DSC01650.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-oawSeVSn_24/YDh-xJI4YsI/AAAAAAAAa7A/ASR1W43r-XUzVo4BfdbZ3jCLWZKdWqEMQCLcBGAsYHQ/w640-h426/DSC01650.JPG" width="640" /></a></div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Fw9XOhedqLc/YDh-7T7AseI/AAAAAAAAa7I/hidGiPvkJwYxEMMaXtsE4lnqA63vBgGZgCLcBGAsYHQ/s6000/DSC01672.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-Fw9XOhedqLc/YDh-7T7AseI/AAAAAAAAa7I/hidGiPvkJwYxEMMaXtsE4lnqA63vBgGZgCLcBGAsYHQ/w640-h426/DSC01672.JPG" width="640" /></a></div><div style="text-align: center;"><br /><div style="text-align: left;">With the group head done, all it took was an afternoon of plumbing, sketchy wiring, and a tiny bit of firmware to read a few new temperature sensors and toggle valves.</div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><br /></div>Everything's just bolted to a strip of aluminum right now, and I stole the drip tray from the La Pavoni.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-PnN9G8i_bvU/YDh_FJl1bbI/AAAAAAAAa7Q/5bd4RlsNF20syP7Grdm0qDzXoZKsAVPnwCLcBGAsYHQ/s6000/DSC01678.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-PnN9G8i_bvU/YDh_FJl1bbI/AAAAAAAAa7Q/5bd4RlsNF20syP7Grdm0qDzXoZKsAVPnwCLcBGAsYHQ/w640-h426/DSC01678.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div></div></div><div>Here's the first test of the machine. In my excitement I let it run for a little too long and the shot ended up over-extracted, but it turned out way better than I expected for a first try. Pardon the wrench used as a handle for the group head - McMaster order with with a threaded handle was delayed.</div><div style="text-align: center;"><br /></div><div style="text-align: center;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/3tTyvmxyGaQ" width="560"></iframe></div></div></div><div style="text-align: center;"><br /></div><div style="text-align: left;">For this test the group head wasn't heated, but I do have a 100W cartridge heater and thermistor for it, so the water flowing through it won't be cooled down.</div><div><br /></div><div>While right now the machine is a huge heap on a benchtop, I think with some actual design it could be packaged to be very compact. </div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com28tag:blogger.com,1999:blog-910685024071367839.post-53072919457696131862020-12-28T16:45:00.000-05:002020-12-28T16:45:45.254-05:00New Photo and Video Feed<p> You'll now notice that I added a <a href="https://build-its-feed.blogspot.com/">Feed </a>tab to the top of the page.</p><p>When I started the blog, I would wait until I completely finished a project, then do one gigantic writeup at the end. This habit was left over from when I used <a href="https://www.instructables.com/">Instructables</a> to document things. As my projects got more complicated, that blogging style stopped working. So I <a href="http://build-its.blogspot.com/2012/07/site-change.html">started</a> the <a href="http://build-its-inprogress.blogspot.com/">In-Progress</a> section for shorter technical updates. When I (on occasion) finish something, I now throw a summary on the <a href="http://build-its.blogspot.com/">main page</a>, and links to the relevant posts from the in-progress section. I think this has been working fine, but I still tend to hold onto stuff until I've made enough progress for a proper technical blog post. </p><p>Despite the relative infrequency at which I write detailed posts, I think most weeks I do <i>something</i> side-project related that <i>someone </i>on the internet would find interesting. To avoid cluttering the proper blog, I made a new Feed section where I plan on just throwing up images or videos with one or two sentence descriptions. "Hey, that sounds like Instagram", you might say, and you'd be right. But I've avoided Facebook and Instagram this long, so I don't intend to stop now. Maybe I'll get bored of this and it will fall by the wayside, but for now, enjoy.</p>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com5tag:blogger.com,1999:blog-910685024071367839.post-66704013230506703582020-12-09T08:24:00.012-05:002021-02-25T23:58:06.190-05:00La Pavoni Europiccola Lever Espresso Machine Restoration<p>I've had a <a href="https://www.lapavoni.com/en/domestic-line/lever-machines/">La Pavoni </a>Professional lever espresso machine for a couple years now, which I got on ebay and fixed up. Getting it working turned out to be completely uneventful, so I never wrote up anything about it. I recently restored a Europiccola for my sister, and this time around the restoration was <i>much</i> more involved. It was in pretty rough shape when I got it - all the seals were shot, the sightglass was smashed, and the copper/brass plating was peeling horribly. But the heating element and electronics were in good shape, and core mechanical pieces worked.</p><p>I forgot to fully document the state I received it in, but here's what it looked like minus the grouphead:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwUovrx7NNfQMjQcdlHxfMQcNOyTjsgmDvi4DB0ot3_lNRFES_M8oROmhyP-KG4SkeF6zESFNBgwREPIsBsOUfVdX2IOGlzVq6uFk6M0Z1wChnlOzOT28rqRFrWGiGCv2qoZWvv3kDWg/" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwUovrx7NNfQMjQcdlHxfMQcNOyTjsgmDvi4DB0ot3_lNRFES_M8oROmhyP-KG4SkeF6zESFNBgwREPIsBsOUfVdX2IOGlzVq6uFk6M0Z1wChnlOzOT28rqRFrWGiGCv2qoZWvv3kDWg/w640-h426/DSC01422.JPG" width="640" /></a></div><br /><p></p><p>All the seals needed replacing. The trickiest of these was the seal in the top of the grouphead. This seal is held in by a brass washer and a retaining retaining ring, which was made out of non-stainless steel. It sits in a chamber full of steam, so I don't know what they were thinking there. So the retaining ring was extremely rusted, so much so that the holes used for removing it with snap ring pliers were gone:</p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTFCSsleGLBH7p583xiN-jCwObfEAZQ1w2wLAmlTdFUaoY1FhfJCt3z3wysNLsVOYMITDub_yFKPyx0uzVBk6qDwDiYpH-tSXEipvh6lOg26rf1RjFoDI2db3krodLD-pOsk2L_tgEs_Y/" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTFCSsleGLBH7p583xiN-jCwObfEAZQ1w2wLAmlTdFUaoY1FhfJCt3z3wysNLsVOYMITDub_yFKPyx0uzVBk6qDwDiYpH-tSXEipvh6lOg26rf1RjFoDI2db3krodLD-pOsk2L_tgEs_Y/w640-h480/IMG_20201115_155314924.jpg" width="640" /></a></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I was able to slowly chisel it loose and pry it out with a dental pick. This is what was left of the original retaining ring (left), seal, and washer:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-EqCrsyLT-xA/X9BO5yIWt6I/AAAAAAAAZ50/9vrajDI4AMsZetMM9x32pFaRVMgOr7j4ACLcBGAsYHQ/IMG_20201115_161349726.jpg" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1536" data-original-width="2048" height="480" src="https://lh3.googleusercontent.com/-EqCrsyLT-xA/X9BO5yIWt6I/AAAAAAAAZ50/9vrajDI4AMsZetMM9x32pFaRVMgOr7j4ACLcBGAsYHQ/w640-h480/IMG_20201115_161349726.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div>Here it is after installing a new seal, cleaning up the brass washer, and using a new stainless retaining ring. Sorry for the blurry pictures:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbWIImrOdNz3F9OlHtUrVPThatRNB-YT1FOSHJhnuSH3qbfXFgY4yv7PGeH02KYVsy4JZkTaoDOp4pgv-wuF0T6giLLKrguPRz3-2FOTTENhXOt03HtDq0U4able4ymawAsS08tTUF984/" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbWIImrOdNz3F9OlHtUrVPThatRNB-YT1FOSHJhnuSH3qbfXFgY4yv7PGeH02KYVsy4JZkTaoDOp4pgv-wuF0T6giLLKrguPRz3-2FOTTENhXOt03HtDq0U4able4ymawAsS08tTUF984/w640-h480/IMG_20201115_162833578.jpg" width="640" /></a></div><br /></div><p></p><p>This machine originally had a copper finish on the boiler and gold/brass finish on the grouphead and base, but both were discolored and peeling. The finish on this unit was strange - on the outside, there was a clear varnish layer (the source of the peeling). Under that, the boiler has an electroplated layer of actual copper, and the base has an electroplated brass layer. Neither of those layers were in very good shape. Where the copper/brass were wearing through, there were signs of a chrome coat beneath that. </p><p>I took the boiler as far apart as I could before stripping the coating. The sightglass attachment points are bolted through the boiler, with their nuts on the inside of the boiler, at a funny angle. I'm sure there's a specialized wrench for removing these, but I didn't have that. I used a 16mm wrench with a 12-point ratchet. Because the opening at the base of the boiler is pretty small, the wrench couldn't be turned enough to click past one pawl of the ratchet. To make progress, I had to turn the wrench a few degrees, remove the wrench, manually click the ratchet over two clicks, take up the backlash in the ratchet, put it back in, and turn the nut a few degrees. And repeat several dozen times. I couldn't get the wrench around the nuts holding on the pressure relief valve or steam wand, so I just gave up and left them on.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-a94d8wOxWwI/X9BPtiXk4kI/AAAAAAAAZ6M/ZC4JWdSLY9IRuqzKybsGfQYtEBpTBVcdwCLcBGAsYHQ/IMG_20201124_200045637.jpg" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1536" data-original-width="2048" height="480" src="https://lh3.googleusercontent.com/-a94d8wOxWwI/X9BPtiXk4kI/AAAAAAAAZ6M/ZC4JWdSLY9IRuqzKybsGfQYtEBpTBVcdwCLcBGAsYHQ/w640-h480/IMG_20201124_200045637.jpg" width="640" /></a></div><div><br /></div><div class="separator" style="clear: both;">The original plated bolts holding that hold the grouphead on were a little rusty, so I got some new stainless steel bolts, turned the text off the caps, and gave them a polish:</div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;"><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-LVCujIiUscY/X9BNubu5-jI/AAAAAAAAZ5c/Z6I4-aGXl0oEeK-WklsGIDqU4J9irsTjACLcBGAsYHQ/IMG_20201124_191101769.jpg" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="1536" data-original-width="2048" height="480" src="https://lh3.googleusercontent.com/-LVCujIiUscY/X9BNubu5-jI/AAAAAAAAZ5c/Z6I4-aGXl0oEeK-WklsGIDqU4J9irsTjACLcBGAsYHQ/w640-h480/IMG_20201124_191101769.jpg" width="640" /></a></div></div><p></p><p>A combination many rounds of paint stripper and scrubbing with a gentle polishing compound stripped off the varnish and electroplated layers, and revealed an almost pristine chrome coat on the boiler. The base wasn't in quite as good shape, but a few cycles of scrubbing with scotch-brite and sanding with progressively finer sandpapers improved it.</p><p>Part way through stripping, the boiler had this really interesting crackle-texture:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-bMVxczMfKVo/X9BIN4YT8oI/AAAAAAAAZ30/wPyJhdDHMKEFLkRUwIgEmMZXEPkaecFjQCLcBGAsYHQ/DSC01447.JPG" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="4000" data-original-width="6000" height="426" src="https://lh3.googleusercontent.com/-bMVxczMfKVo/X9BIN4YT8oI/AAAAAAAAZ30/wPyJhdDHMKEFLkRUwIgEmMZXEPkaecFjQCLcBGAsYHQ/w640-h426/DSC01447.JPG" width="640" /></a></div><br /><p></p><p>The chrome on the base slowly being revealed:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-QbLf3QWWgYo/X9BIciDSmCI/AAAAAAAAZ34/7pGq3goFvCAl_udK2-U2tKOzinqA1gTlACLcBGAsYHQ/DSC01450.JPG" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="4000" data-original-width="6000" height="426" src="https://lh3.googleusercontent.com/-QbLf3QWWgYo/X9BIciDSmCI/AAAAAAAAZ34/7pGq3goFvCAl_udK2-U2tKOzinqA1gTlACLcBGAsYHQ/w640-h426/DSC01450.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The drip tray had a few deep rust pits in it. I stripped the rust out of the pits, and sprayed a layer of clear high-temperature spray paint to over them hopefully keep them from eating all the way through the base. Fun fact I learned in this process, some "high strength" toilet bowl cleaners are 5-10% hydrochloric acid, so it works really well for stripping rust or black oxide from steel. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here's what the pits looked like after a couple rounds cleaner:</div><div class="separator" style="clear: both; text-align: left;"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-vhB31tST6go/X9BR_SHHXHI/AAAAAAAAZ6Y/OgIP4CpaTQ87M0MyDfMU6NUYYNNL67HvACLcBGAsYHQ/IMG_20201124_230900989.jpg" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="1536" data-original-width="2048" height="480" src="https://lh3.googleusercontent.com/-vhB31tST6go/X9BR_SHHXHI/AAAAAAAAZ6Y/OgIP4CpaTQ87M0MyDfMU6NUYYNNL67HvACLcBGAsYHQ/w640-h480/IMG_20201124_230900989.jpg" width="640" /></a></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I was amazed at the state of the chrome coat underneath all the gunk. Going in, I was sure I would need to strip the parts all the way down and repaint them to make it look decent. Lots of scrubbing later, here's what the boiler looked like:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-p0GQsEckq-8/X9BI0ZnMQoI/AAAAAAAAZ4E/3U5LMjVQiXAJaewz3IfUNFTEDwev4GQxACLcBGAsYHQ/DSC01458.JPG" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="4000" data-original-width="6000" height="426" src="https://lh3.googleusercontent.com/-p0GQsEckq-8/X9BI0ZnMQoI/AAAAAAAAZ4E/3U5LMjVQiXAJaewz3IfUNFTEDwev4GQxACLcBGAsYHQ/w640-h426/DSC01458.JPG" width="640" /></a></div><br />Kind of interesting side note - I could have taken off all the copper with just paint stripper. I noticed that when I wiped off the paint stripper residue, it was blue from oxidizing the copper. Scrubbing was much faster though. I used some glass stovetop cleaner, which is very gently abrasive and won't scratch the chrome. Steel wool probably would have been much faster, but I didn't have any on hand. Steel is softer than chrome, so I don't think it would have scratched the chrome. <p></p><p>The base wasn't in quite as good shape as the boiler, but was able to get most of the blemishes out with scotch-brite and sandpaper. In the end it doesn't look as nice as the glossy boiler, but the smooth brushed look is still much better than it started out. Here it is going back together:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-MDP-i1x_agU/X9BM1GibP9I/AAAAAAAAZ5U/nAeKf8eCnXAVzOcKSly59Evh9MVId7-IACLcBGAsYHQ/IMG_20201126_153105746.jpg" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="1536" data-original-width="2048" height="480" src="https://lh3.googleusercontent.com/-MDP-i1x_agU/X9BM1GibP9I/AAAAAAAAZ5U/nAeKf8eCnXAVzOcKSly59Evh9MVId7-IACLcBGAsYHQ/w640-h480/IMG_20201126_153105746.jpg" width="640" /></a></div><p></p><p></p><div class="separator" style="clear: both; text-align: left;">I stuck the logo back on with some 3M VHB foam tape:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-gK_at6cGrDs/X9BK44UygYI/AAAAAAAAZ4Q/oT_m3cTrtGU7VUBonJhMhjm1JO0-VhaCwCLcBGAsYHQ/DSC01474.JPG" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="4000" data-original-width="6000" height="426" src="https://lh3.googleusercontent.com/-gK_at6cGrDs/X9BK44UygYI/AAAAAAAAZ4Q/oT_m3cTrtGU7VUBonJhMhjm1JO0-VhaCwCLcBGAsYHQ/w640-h426/DSC01474.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The fully assembled machine:</div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioXRPiC9DUmOJpgWYkrPWLEgMnTAzlEp6tdLsYLn6g8BmQrFiDXGQBja14p5EYNerQs6e5Gg4lZNpfrDy7E1vC6nkz7HhQODx82-UXY1eXSGCj5gTHSZN150DBrwC9MKCJ6BZZ0HomwhU/s6000/DSC01470.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioXRPiC9DUmOJpgWYkrPWLEgMnTAzlEp6tdLsYLn6g8BmQrFiDXGQBja14p5EYNerQs6e5Gg4lZNpfrDy7E1vC6nkz7HhQODx82-UXY1eXSGCj5gTHSZN150DBrwC9MKCJ6BZZ0HomwhU/w640-h426/DSC01470.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div>Once it was back together I ran two rounds of Dezcal descaling solution through it, did two rounds of letting it sit full water with a couple spoonfuls of baking soda dissolved in, and filled/boiled/flushed the water probably a dozen times to make sure dirt and all the chemicals I used were out of the system. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Then it was ready to go. Here's pulling a shot of <a href="https://redbirdcoffee.com/collections/featured-coffees/products/red-bird-espresso">Red Bird Espresso</a> to test it out:<br /><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-erpdzhoJRFs/X9BX9n2bFOI/AAAAAAAAZ60/Jc7ejLBasAIu6N2mCwDReCePhgPgA6OlwCLcBGAsYHQ/ezgif.com-gif-maker%2B%25281%2529.gif" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="338" data-original-width="600" src="https://lh3.googleusercontent.com/-erpdzhoJRFs/X9BX9n2bFOI/AAAAAAAAZ60/Jc7ejLBasAIu6N2mCwDReCePhgPgA6OlwCLcBGAsYHQ/s16000/ezgif.com-gif-maker%2B%25281%2529.gif" /></a></div></div></div><p></p>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com1tag:blogger.com,1999:blog-910685024071367839.post-84693948777701136592020-11-17T23:16:00.005-05:002022-04-21T21:01:30.975-04:00Transmission Ratio Trajectory Optimization<p> Getting back to <a href="http://build-its-inprogress.blogspot.com/2020/08/varying-pitch-screw-mechanism.html">this mechanism</a>. In the <a href="http://build-its-inprogress.blogspot.com/2020/06/simple-dynamics-with-variable.html">post about the dynamics with varying transmission ratio</a>, I came up with the design for the transmission profile by a combination of hand-calculations, intuition, and guesswork. But we can do better. </p><p>This problem fits nicely into a trajectory optimization. For an intro to trajectory optimization, I'd highly recommend this <a href="http://underactuated.mit.edu/trajopt.html">MIT Underactuated Robotics chapter</a>. </p><p>I not-so-subtly hinted that the point of this mechanism was for jumping or launching things with an electric motor. The simple English explanation of what I'm trying to do with a trajectory optimization here is answer this question: What transmission ratio vs time maximizes jump height without breaking the mechanism? </p><p>The optimization-lingo version of that would be something like:</p><p>Minimize \(-\dot{x}(t_{final})\), subject to:</p><p></p><ul style="text-align: left;"><li>Dynamics are not violated (i.e. \(x(t) = \int_{t_{0}}^{t_{final}} \dot{x}\,dt + x(t_{0})\))</li><li>Initial conditions (everything starts at rest, i.e. \(x(t_{0})=0\), \(\dot{x}(t_{0})=0\), etc)</li><li>\(\ddot{x} < a_{max}\), \(\omega < \omega_{max}\) (acceleration limit to limit forces, maximum motor speed)</li><li>And a few other things I'll get to later</li></ul><p></p><p>I set up the problem using <a href="https://web.casadi.org/">CasAdi</a>, which is the same tool Jared and I used for the Mini Cheetah <a href="https://www.youtube.com/watch?v=q5S4fb0Rje4">backflip optimization</a>. CasAdi makes it super easy to set up nonlinear optimizations like without having to understand what's going on in the back-end too deeply. </p><p><br /></p><p>Walking through my code (<a href="https://github.com/bgkatz/transmission_opt/blob/master/transmission_opt.py">on GitHub here</a>):</p><p><u>Pick some constants</u></p><p>The only "choice" here is the number of trajectory intervals. Roughly speaking, too few will result in integration error, and too many will take longer to converge. Everything else is just physical parameters:</p>
<div style="background: rgb(32, 32, 32); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4
5
6
7
8</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #d0d0d0;"><br /></span></pre><pre style="line-height: 125%; margin: 0px;"><span style="color: #d0d0d0;">N</span> <span style="color: #d0d0d0;">=</span> <span style="color: #3677a9;">200</span> <span> </span><span> </span><span> </span><span style="color: #999999; font-style: italic;"># number of trajectory intervals</span>
<span style="color: #d0d0d0;">m</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">.</span><span style="color: #3677a9;">75</span> <span> </span><span> </span><span> </span> <span style="color: #999999; font-style: italic;"># mass (kg)</span>
<span style="color: #d0d0d0;">j_rotor</span> <span style="color: #d0d0d0;">=</span> <span style="color: #3677a9;">6e-6</span> <span> </span> <span style="color: #999999; font-style: italic;"># rotor inertia (kg*m^2)</span>
<span style="color: #d0d0d0;">l_leg</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">.</span><span style="color: #3677a9;">35</span> <span> </span> <span style="color: #999999; font-style: italic;"># leg length (m)</span>
<span style="color: #d0d0d0;">tau</span> <span style="color: #d0d0d0;">=</span> <span style="color: #3677a9;">1.6</span> <span> </span> <span style="color: #999999; font-style: italic;"># motor torque (N-m)</span>
<span style="color: #d0d0d0;">w_max</span> <span style="color: #d0d0d0;">=</span> <span style="color: #3677a9;">1200</span> <span style="color: #999999; font-style: italic;"># max motor speed (rad/s)</span>
<span style="color: #d0d0d0;">g</span> <span style="color: #d0d0d0;">=</span> <span style="color: #3677a9;">9.8</span> <span style="color: #999999; font-style: italic;"># gravity (m/s^2)</span>
</pre></td></tr></tbody></table></div>
<p><u><br /></u></p><p><u>Decision variables</u></p><p>I took a "Direct Transcription" approach to the optimization - at each point along the trajectory, both the state (positions, velocities) and control inputs (transmission ratio and its derivative) are decision variables being optimized for. As someone with not very much experience with this stuff, I found this easier to understand and implement than other methods (<a href="http://underactuated.mit.edu/trajopt.html#section3">see here for several formulations</a>). I end up with a ton of redundant decision variables here (really there's only one independent one, which is the transmission ratio), but having position <i>and </i>velocity <i>and </i>acceleration <i>and </i>motor angular velocity <i>and </i>transmission ratio derivative as decision variables makes it very easy to put constraints on those terms.</p><p>Another note here, I have the final takeoff time as a decision variable. This seems to usually not be a good idea (I won't pretend I can do an explanation justice), but this problem is simple enough that it works out. Doing the Mini Cheetah backflips, for example, we <i>did not</i> do this, and fixed the takeoff times ahead of time (and did a little manual tuning to get the optimization to produce a nice result). But that optimization had way more states and control inputs than this one.</p><p>Also, CasAdi is great. foo = opti.variable(rows, cols), and you have a matrix of decision variables.</p><p></p><div style="background: rgb(32, 32, 32); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #d0d0d0;">opti</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">Opti()</span> <span style="color: #999999; font-style: italic;"># Optimization problem</span>
<span style="color: #999999; font-style: italic;">### decision variables ###</span>
<span style="color: #d0d0d0;">X</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">opti.variable(</span><span style="color: #3677a9;">2</span><span style="color: #d0d0d0;">,N+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># position and velocity trajectory</span>
<span style="color: #d0d0d0;">pos</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">X[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">,:]</span>
<span style="color: #d0d0d0;">speed</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">X[</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">,:]</span>
<span style="color: #d0d0d0;">accel</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">opti.variable(</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">,</span> <span style="color: #d0d0d0;">N+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># separating this out behaved better than including in X</span>
<span style="color: #d0d0d0;">U</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">opti.variable(</span><span style="color: #3677a9;">2</span><span style="color: #d0d0d0;">,N+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># transmission ratio and its derivative</span>
<span style="color: #d0d0d0;">k</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">U[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">,:]</span>
<span style="color: #d0d0d0;">kd</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">U[</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">,:]</span>
<span style="color: #d0d0d0;">W</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">opti.variable(</span><span style="color: #3677a9;">2</span><span style="color: #d0d0d0;">,</span> <span style="color: #d0d0d0;">N+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># rotor angle and angular velocity</span>
<span style="color: #d0d0d0;">theta</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">W[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">,:]</span>
<span style="color: #d0d0d0;">thetad</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">W[</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">,:]</span>
<span style="color: #d0d0d0;">T</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">opti.variable()</span> <span style="color: #999999; font-style: italic;"># final time</span>
</pre></td></tr></tbody></table></div>
<p></p><p>
</p><p><u><br /></u></p><p><u>Pick a cost function</u></p><p>Often it's hard to describe what you "want" the optimization to do in an equation, have multiple competing objectives, and so on, but this problem is charmingly simple. Maximizing jump height is the same as maximizing takeoff velocity, so we just minimize the negative of that.</p><p></p><div style="background: rgb(32, 32, 32); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #999999; font-style: italic;">#### objective ###</span>
<span style="color: #d0d0d0;">opti.minimize(-(speed[-</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]))</span> <span style="color: #999999; font-style: italic;"># maximize speed at takeoff</span>
</pre></td></tr></tbody></table></div>
<p></p><p><u><br /></u></p><p><u>Set up the dynamics constraints</u></p><p>This is the real meat of the optimization. It implements the varying transmission ratio dynamics (with gravity this time) at every timestep along the trajectory.</p><p>The equations of motion,</p><p>$$<br />\ddot{x} = \frac{k\tau + j\dot{k}\dot{\theta}-k^{2}mg}{j + k^{2}m}<br />$$</p><p>are implemented by the function \(f(x, u)\). \(x\) is really the vector \([x, \dot{x}]\) at the timestep being evaluated, and u, the control input, is the transmission ratio and its derivative, \([k, \dot{k}]\). It returns \([\dot{x}, \ddot{x}]\).</p><p>To ensure the dynamics are respected, there's trapezoidal integration constraints at each timestep, for all the states. Basically, \(x(t+\Delta t) = x(t) + \Delta t\frac{(\dot{x}(t) + \dot{x}(t+\Delta t)}{2}\), and same deal for \(\dot{x}\), \(k\), \(\dot{k}\), and \(\omega\).</p><p>Finally there's the transmission ratio constraint, \(\dot{x} = k\dot{\theta}\)</p>
<div style="background: rgb(32, 32, 32); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #999999; font-style: italic;">#### dynamic constraints ###</span>
<span style="color: #d0d0d0;">f</span> <span style="color: #d0d0d0;">=</span> <span style="color: #6ab825; font-weight: bold;">lambda</span> <span style="color: #d0d0d0;">x,u:</span> <span style="color: #d0d0d0;">vertcat(x[</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">],</span> <span style="color: #d0d0d0;">(u[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">]*tau</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">j_rotor*x[</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]*u[</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]/u[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">]</span> <span style="color: #d0d0d0;">-</span> <span style="color: #d0d0d0;">m*g*(u[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">]**</span><span style="color: #3677a9;">2</span><span style="color: #d0d0d0;">))/(j_rotor</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">m_body*(u[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">]**</span><span style="color: #3677a9;">2</span><span style="color: #d0d0d0;">)))</span> <span style="color: #999999; font-style: italic;"># dx/dt = f(x,u)</span>
<span style="color: #d0d0d0;">dt</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">T/N</span> <span style="color: #999999; font-style: italic;"># length of a control intervals</span>
<span style="color: #6ab825; font-weight: bold;">for</span> <span style="color: #d0d0d0;">i</span> <span style="color: #6ab825; font-weight: bold;">in</span> <span style="color: #24909d;">range</span><span style="color: #d0d0d0;">(N):</span> <span style="color: #999999; font-style: italic;"># loop over control intervals</span>
<span style="color: #d0d0d0;">k1</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">f(X[:,i],</span> <span style="color: #d0d0d0;">U[:,i])</span>
<span style="color: #d0d0d0;">k2</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">f(X[:,i+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">],</span> <span style="color: #d0d0d0;">U[:,i+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">])</span>
<span style="color: #d0d0d0;">x_next</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">X[:,i]</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">dt*(k1+k2)/</span><span style="color: #3677a9;">2</span> <span style="color: #999999; font-style: italic;"># trapezoidal integration</span>
<span style="color: #d0d0d0;">opti.subject_to(X[:,i+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]==x_next)</span> <span style="color: #999999; font-style: italic;"># dynamics integration constraint</span>
<span style="color: #d0d0d0;">opti.subject_to(accel[i]</span> <span style="color: #d0d0d0;">==</span> <span style="color: #d0d0d0;">k1[</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">])</span> <span style="color: #999999; font-style: italic;"># acceleration</span>
<span style="color: #d0d0d0;">k_next</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">k[i]</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">dt*(kd[i]</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">kd[i+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">])/</span><span style="color: #3677a9;">2</span> <span style="color: #999999; font-style: italic;"># transmission ratio integration constraint</span>
<span style="color: #d0d0d0;">opti.subject_to(k[i+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]==k_next)</span>
<span style="color: #d0d0d0;">theta_next</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">theta[i]</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">dt*(thetad[i]</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">thetad[i+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">])/</span><span style="color: #3677a9;">2</span>
<span style="color: #d0d0d0;">opti.subject_to(theta[i+</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]</span> <span style="color: #d0d0d0;">==</span> <span style="color: #d0d0d0;">theta_next)</span> <span style="color: #999999; font-style: italic;"># angle/angular velocity integration constraint</span>
<span style="color: #d0d0d0;">opti.subject_to(thetad[i]</span> <span style="color: #d0d0d0;">==</span> <span style="color: #d0d0d0;">speed[i]/k[i])</span> <span style="color: #999999; font-style: italic;"># linear and angular velocity transmission ratio constraint</span>
</pre></td></tr></tbody></table></div>
<p><br /></p><p><u>Bounds and boundary conditions:</u></p><p>The bounds are hard limits on the range of values the decision variables are allowed to take. These are mostly based on physical constraints of building a variable transmission. There are bounds on the derivative of the transmission ratio, so it doesn't instantaneously jump. There are bounds on the transmission ratio itself, because it can't be infinite or too small. The motor has a maximum angular velocity. There's an acceleration limit to limit the forces on the transmission.</p><p>In addition to the bounds, there are some constraints on the initial and final state. Everything has to start at rest at 0 position and velocity. At the end, the extension of the "leg" should be the length of the leg. The final motor speed should be small, so it doesn't crash into a hard-stop with too much energy.</p>
<div style="background: rgb(32, 32, 32); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #999999; font-style: italic;">### bounds ###</span>
<span style="color: #d0d0d0;">opti.subject_to(opti.bounded(</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">,kd,</span><span style="color: #3677a9;">50</span><span style="color: #d0d0d0;">))</span> <span style="color: #999999; font-style: italic;"># transmission ratio derivative bounds (no infinite slopes)</span>
<span style="color: #d0d0d0;">opti.subject_to(opti.bounded(</span><span style="color: #3677a9;">0.0008</span><span style="color: #d0d0d0;">,k,</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">))</span> <span style="color: #999999; font-style: italic;"># transmission ratio bounds (meters per radian)</span>
<span style="color: #d0d0d0;">opti.subject_to(opti.bounded(</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">,</span> <span style="color: #d0d0d0;">thetad,</span> <span style="color: #d0d0d0;">w_max))</span> <span style="color: #999999; font-style: italic;"># maximum motor angular velocity</span>
<span style="color: #d0d0d0;">opti.subject_to(opti.bounded(.</span><span style="color: #3677a9;">01</span><span style="color: #d0d0d0;">,</span> <span style="color: #d0d0d0;">T,</span> <span style="color: #d0d0d0;">.</span><span style="color: #3677a9;">5</span><span style="color: #d0d0d0;">))</span> <span style="color: #999999; font-style: italic;"># reasonable takeoff time limits</span>
<span style="color: #d0d0d0;">opti.subject_to(opti.bounded(</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">,</span> <span style="color: #d0d0d0;">accel,</span> <span style="color: #3677a9;">1000</span><span style="color: #d0d0d0;">))</span> <span style="color: #999999; font-style: italic;"># acceleration limits</span>
<span style="color: #999999; font-style: italic;">#### boundary conditions ###</span>
<span style="color: #d0d0d0;">opti.subject_to(pos[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">]==</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># 0 initial position</span>
<span style="color: #d0d0d0;">opti.subject_to(speed[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">]==</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># 0 initial velocity</span>
<span style="color: #d0d0d0;">opti.subject_to(pos[-</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]==l_leg)</span> <span style="color: #999999; font-style: italic;"># final position = leg length at takeoff</span>
<span style="color: #d0d0d0;">opti.subject_to(theta[</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">]</span> <span style="color: #d0d0d0;">==</span> <span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># initial rotor angle of zero</span>
<span style="color: #d0d0d0;">opti.subject_to(thetad[-</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]<</span><span style="color: #3677a9;">200</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># final rotor speed < 200 rad/s</span>
<span style="color: #d0d0d0;">opti.subject_to(thetad[-</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]</span> <span style="color: #d0d0d0;">==</span> <span style="color: #d0d0d0;">speed[-</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">]/k[-</span><span style="color: #3677a9;">1</span><span style="color: #d0d0d0;">])</span> <span style="color: #999999; font-style: italic;"># linear and angular velocity transmission ratio constraint at the end</span>
<span style="color: #999999; font-style: italic;">#### misc. constraints ###</span>
<span style="color: #d0d0d0;">opti.subject_to(T>=</span><span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># Time must be positive</span>
</pre></td></tr></tbody></table></div><p><br /></p><p><u>Initial guess</u></p><p>The initial guess is the values for the decision variables that the optimization algorithm starts from. For weird nonlinear trajectory optimizations, good initial guesses can make an enormous difference in the convergence speed and quality of the solutions. A good example from my old lab is <a href="https://dspace.mit.edu/handle/1721.1/125485">Gerardo's regularized predictive controller</a>, which, as a flavor non-linear model predictive controller (MPC), runs a trajectory optimization at ~100 hz, so it can be used for (<a href="https://youtu.be/b-CKniAkYx4">incredibly impressive</a>) feedback control. One of the many things that lets that optimization run at 100 hz is a good initial guess (a.k.a. "warm starting").</p><p>But this problem's simple, so I did a few runs starting from guesses of zero for everything, and picked what looked like the "average" values of the solutions I got as the new initial guesses.</p><p></p><div style="background: rgb(32, 32, 32); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #999999; font-style: italic;">#### initial values ###</span>
<span style="color: #d0d0d0;">opti.set_initial(k,</span> <span style="color: #d0d0d0;">.</span><span style="color: #3677a9;">02</span><span style="color: #d0d0d0;">)</span>
<span style="color: #d0d0d0;">opti.set_initial(kd,</span> <span style="color: #3677a9;">0</span><span style="color: #d0d0d0;">)</span>
<span style="color: #d0d0d0;">opti.set_initial(T,</span> <span style="color: #d0d0d0;">.</span><span style="color: #3677a9;">2</span><span style="color: #d0d0d0;">)</span>
</pre></td></tr></tbody></table></div>
<p></p><p><br /></p><p><u>Solve:</u></p><p>Set up and solve the problem with the solver of your choice. I used <a href="https://github.com/coin-or/Ipopt">IPOPT </a>because that's what we used for Cheetah stuff. I played around with a few others and didn't get any better results.</p><p></p><div style="background: rgb(32, 32, 32); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #999999; font-style: italic;">### solve ###</span>
<span style="color: #d0d0d0;">opti.solver(</span><span style="color: #ed9d13;">"ipopt"</span><span style="color: #d0d0d0;">)</span> <span style="color: #999999; font-style: italic;"># set numerical backend</span>
<span style="color: #d0d0d0;">sol</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">opti.solve()</span> <span style="color: #999999; font-style: italic;"># actual solve</span>
</pre></td></tr></tbody></table></div>
<p></p><p><br /></p><p>And that's it.</p><p>Here an example solution:</p><p>Here you can see how the kinetic energy of the mass, of the rotor inertia, and the potential energy of the mass trade off over the trajectory:</p><p><br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixlZb6PUpKRV6a75sOhiyefWz0_8MeRp3uepEhYvZ6N0ESp4Mgy9uPrc2T1Tz8qVsYWlEmwL6BIkJrCteS-CWUscrvfpqvXrTkHMl-khtNYwKqEApGXXAYo_2rfIChyphenhyphenXmhg_D43z-cnQc/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="480" data-original-width="640" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixlZb6PUpKRV6a75sOhiyefWz0_8MeRp3uepEhYvZ6N0ESp4Mgy9uPrc2T1Tz8qVsYWlEmwL6BIkJrCteS-CWUscrvfpqvXrTkHMl-khtNYwKqEApGXXAYo_2rfIChyphenhyphenXmhg_D43z-cnQc/w400-h300/energy_1.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Compared to the hand-designed version of the transmission profile, the optimized one can exactly max out my acceleration constraint, exactly max out the motor speed constraint, and rapidly decelerate the motor to my threshold at the end (ignore the acceleration at the last timestep, it's not meaningful):</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-wMY7TDhihqs/X7SbEZr8HNI/AAAAAAAAZos/FuzQTwlZeDUCzjn-syltEXDOfru9qbRRgCLcBGAsYHQ/speed_accel_1.png" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="480" data-original-width="640" height="300" src="https://lh3.googleusercontent.com/-wMY7TDhihqs/X7SbEZr8HNI/AAAAAAAAZos/FuzQTwlZeDUCzjn-syltEXDOfru9qbRRgCLcBGAsYHQ/w400-h300/speed_accel_1.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div style="text-align: left;">Below is an example of an optimized transmission ratio vs rotor angle on the left, vs my hand-designed one on the right. The mass/torque/inertia/stroke used for these are different, so the absolute numbers shouldn't be compared, but qualitatively, I was definitely on the right track with my hand-design. Which is always satisfying to see:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div style="text-align: center;"><a href="https://lh3.googleusercontent.com/-IU55PR2PPqg/X7SbmST48lI/AAAAAAAAZo4/L748EPoq8IcTSxbomfnsS7_ZM1IMkW8_QCLcBGAsYHQ/k_vs_theta_1.png" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="480" data-original-width="640" height="233" src="https://lh3.googleusercontent.com/-IU55PR2PPqg/X7SbmST48lI/AAAAAAAAZo4/L748EPoq8IcTSxbomfnsS7_ZM1IMkW8_QCLcBGAsYHQ/w283-h233/k_vs_theta_1.png" width="283" /></a><a href="https://lh3.googleusercontent.com/-t27IjbATZO0/X7Sb8deQGwI/AAAAAAAAZpE/A8EjpmyUmdsuEvMy1XBFHpn3jh5UW1T5ACLcBGAsYHQ/tr_1.jpg" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img alt="" data-original-height="558" data-original-width="560" height="228" src="https://lh3.googleusercontent.com/-t27IjbATZO0/X7Sb8deQGwI/AAAAAAAAZpE/A8EjpmyUmdsuEvMy1XBFHpn3jh5UW1T5ACLcBGAsYHQ/w271-h228/tr_1.jpg" width="271" /></a></div></div><br /></div></div><p></p><p>The numbers I'm seeing out of the optimization are nearly 10 meters (if I can hit the weight target in there), so things are going to get exciting.</p>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com4tag:blogger.com,1999:blog-910685024071367839.post-76990221135104952392020-11-15T20:26:00.001-05:002020-11-15T20:27:38.929-05:00Music Server<p>Until Google axe-murdered it recently, I used Google Play Music to store my music collection and stream it to my various devices. I didn't pay for a subscription, just uploaded all my music files to Play, and treated it as free storage, organization, and streaming. Rather than switch over to YouTube Music (I tried, it was utter garbage) or some other streaming service, I took this opportunity to set up a personal music server.</p><p>My music buying and listening habits are a little unusual:</p><p></p><ul style="text-align: left;"><li>I want a digital copy of my music backed up on storage I own</li><li>I purchase and download full albums (not single songs)</li><li>I almost always listen to full albums (no shuffling, auto-generated playlists, etc). </li></ul><div>So I'm not really into the idea of subscription-based streaming services. Compounding my dislike of streaming subscriptions, I want my money to actually go to the musicians who make the music I listen to, and streaming just doesn't do that very well. </div><div><br /></div><div>For the last few years, I've been tracking my album purchases as well as how many total song plays I have. Here's what my cumulative music spending looks like since April 2018:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUeE5wSR5HtYLv3FeB_uvoF08vmRKWZdiDdZB-hbUk4jiY1XaJklBMs87K6Jb-Qgf8UbZoVbIZRbyeoqZLsysuwHgtsat7dQOON0FHk-my3SR8R2b5XcfmGkJbA3wRXMgRSB969CCqOs/s1200/download.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="742" data-original-width="1200" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUeE5wSR5HtYLv3FeB_uvoF08vmRKWZdiDdZB-hbUk4jiY1XaJklBMs87K6Jb-Qgf8UbZoVbIZRbyeoqZLsysuwHgtsat7dQOON0FHk-my3SR8R2b5XcfmGkJbA3wRXMgRSB969CCqOs/w400-h248/download.png" width="400" /></a></div><div style="text-align: center;"><br /></div><div style="text-align: left;">Since then, I've spent an average of $13.64 per month on buying albums, which is slightly more than a Spotify membership. Looking at the sources I've purchased the albums from (directly from artist websites, Bandcamp, Amazon, etc), on average 76% of my spending goes towards the rights holders - $332.98 since I started keeping track. If I had used Spotify, on the other hand, the total payout to rights holders would have been on the order of $65.60, given how many plays I've logged in that time (~20,500 plays, assuming <a href="https://soundcharts.com/blog/music-streaming-rates-payouts">.32 cents/stream</a>).</div><div style="text-align: left;"><br /></div><div style="text-align: left;">So I spend 36% more a month on music than a Spotify subscription would cost, but <i>5 times</i> as much of my money makes it to the music's rights holders. Some other service than Spotify might be better (according to the source I linked to, Amazon pays out ~3.7x what Spotify does per-stream), but either way, given my listening habits, buying albums seems like the way to go from an artist-profit perspective. </div><div style="text-align: left;"><br /></div><div style="text-align: left;"><u><b>The Setup:</b></u></div><div style="text-align: left;"><u><b><br /></b></u></div><div style="text-align: left;">I'm now hosting my music on a Raspberry Pi running <a href="https://airsonic.github.io/">Airsonic</a>. For storage I'm using a pair of USB flash drives in mirrored RAID. </div><div style="text-align: left;"><br /></div><div>I'm not going to write up a full how-to, but here's a list of resources I used and notes from setting it up. It was surprisingly straight-forward, even though I'm no Linux wizard and have never self-hosted a website before.</div><div><ul style="text-align: left;"><li><a href="https://www.ricmedia.com/build-raspberry-pi3-raid-nas-server/#USB_Flash_Drives">Setting up the flash drive RAID array</a></li><li><a href="https://airsonic.github.io/docs/install/example/raspberrypi/">Installing Airsonic on a Raspberry Pi</a>. The only thing I did differently from this guide was use open-jdk rather than oracle-jdk. Skip past the "Set up a reverse proxy" portion for now.</li><li>I got a domain name on <a href="https://domains.google/">Google Domains</a>, installed ddclient on the Pi, and followed <a href="https://support.google.com/domains/answer/6147083?hl=en">these instructions</a> to set up dynamic DNS so the domain points towards my router's dynamic IP address.</li><li>I struggled for a while with getting a TLS certificate using <a href="https://certbot.eff.org/">certbot</a>. It turns out my ISP blocks port 80, so I followed <a href="https://jmorahan.net/articles/lets-encrypt-without-port-80/">these instructions</a> to get a certificate using port 443.</li><li><a href="https://airsonic.github.io/docs/proxy/apache/">Airsonic Apache reverse proxy setup</a>. Once I could reach my domain name from outside of my local network, I followed these instructions. This just worked, so my Airsonic login showed up at <my_domain_name>.com/airsonic.</li><li>Airsonic works best with an Artist/Album/SongName folder structure, so I used <a href="https://www.mp3tag.de/en/">MP3TAG </a>to re-organize my files, following the instruction <a href="https://superuser.com/questions/171052/automatically-sort-music-files-into-folders-by-album-artist-names">here</a>. It was fast and worked great.</li></ul><div>And that's pretty much it. I've had no problems with the browser-based playback, and the Android app Subsonic seems like it works, but I haven't tested it much. </div></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com0tag:blogger.com,1999:blog-910685024071367839.post-84936459815917077892020-10-28T00:10:00.000-04:002020-10-28T00:10:11.631-04:00Another batch of furuta pendulums<p> I did another batch of Furuta pendulums and took a timelapse of the assembly:</p>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/gnMUaHNvWII" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">These were done in a bit of a hurry, and nothing was changed from <a href="http://build-its-inprogress.blogspot.com/2019/12/furuta-pendulums-building-some-more.html">last time</a>. At some point I'll probably do a refresh of the design, though. After building 16 of these, I have a bunch of ideas about things I'd like to do differently, and I've gotten a few feature requests from the recipient as well. </div><div style="text-align: left;"><br /></div><div style="text-align: left;">And now, back to the <a href="http://build-its-inprogress.blogspot.com/2020/08/varying-pitch-screw-mechanism.html">other</a> <a href="http://build-its-inprogress.blogspot.com/2020/01/new-high-power-motor-drive.html">things</a> in the pipeline.</div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com9tag:blogger.com,1999:blog-910685024071367839.post-39068213437415246672020-10-06T00:23:00.003-04:002021-03-16T20:47:57.713-04:00Benchtop 5-Axis Mill<div class="separator" style="clear: both; text-align: left;">This was inevitable, but the pandemic has accelerated my home-shop setup. What with leaving the <a href="http://biomimetics.mit.edu/">lab</a> almost a year ago (I miss you <a href="https://www.haascnc.com/machines/vertical-mills/mini-mills/models/sminimill2.html">Lab Haas</a>) and no <a href="http://miters.mit.edu/">MITERS</a> for the foreseeable future, I haven't had access to any machine tools other than the <a href="https://build-its-inprogress.blogspot.com/search/label/Mini%20Lathe">tiny lathe</a> for a while. Time to fix that.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I've been following <a href="https://pocketnc.com/">Pocket NC</a> since 2012, after seeing them at the NY Maker Faire - they make a tiny but surprisingly capable 5-axis CNC mill. It has basically the same layout as the big <a href="https://www.grobgroup.com/en/products/product-range/universal-machining-centers/milling-centers/">GROB</a> machines, with a horizontal milling spindle moving in Z and X, and a cantilevered trunnion on the Y axis. I was tempted to get one of their machines, but I think they're just <i>too</i> small and underpowered (and pretty expensive) for the sort of parts I make. In my search for a small-enough-to-carry-upstairs-into-my-living-room-but-not-too-small CNC mill, I ran across a scaled-up Pocket NC clone made by a Chinese company, <a href="https://www.xslightings.com/pocket-nc/5-axis-desktop-cnc-mill.html">Xinshan Tech</a>. I couldn't find any examples of real people outside of China owning the machine, but after some emails back and forth with the company, including a bunch of videos, I was convinced that the machine was real and not a scam. This machine was appealing, since it's a fair bit bigger than the Pocket NC, with ~50% more travel in each axis, all steel, servo (rather than stepper) driven, and much heavier (~70 kg). I've gotten along just fine with 3-axis machines up until now, but I couldn't actually find any 3-axis mills that fit what I was looking for any better, and 5-axis opens up some interesting opportunities.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I decided to go for it, and a month later DHL showed up with a heavy crate:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-VlqrQxHzAL4/X3qGTgsAo4I/AAAAAAAAZV8/OF9SybUKuXg4p_wv45hvaG2BNzZaBdXRwCLcBGAsYHQ/IMG_20200817_123739430.jpg" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1536" data-original-width="2048" height="480" src="https://lh3.googleusercontent.com/-VlqrQxHzAL4/X3qGTgsAo4I/AAAAAAAAZV8/OF9SybUKuXg4p_wv45hvaG2BNzZaBdXRwCLcBGAsYHQ/w640-h480/IMG_20200817_123739430.jpg" width="640" /></a></div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-WBAXOH2CR3Q/X3p4MO8aH7I/AAAAAAAAZUg/HHWtiqukYaIjpyi8yUfagConERdwGOQ_wCLcBGAsYHQ/s2048/IMG_20200817_124117193_MP.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-WBAXOH2CR3Q/X3p4MO8aH7I/AAAAAAAAZUg/HHWtiqukYaIjpyi8yUfagConERdwGOQ_wCLcBGAsYHQ/w640-h480/IMG_20200817_124117193_MP.jpg" width="640" /></a></div><div><br /></div><div class="separator" style="clear: both; text-align: left;">Out of the crate and on the bench. The machine is deceptively heavy given how small it looks, and is very awkward to hold onto. Rigol scope in the background for scale. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-SrRlLoUe88w/X3p4NY-Ed7I/AAAAAAAAZUs/xJU43gJPPdUzogXxsYITWc9uu2HHAMSUwCLcBGAsYHQ/s2048/IMG_20200817_175159543.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-SrRlLoUe88w/X3p4NY-Ed7I/AAAAAAAAZUs/xJU43gJPPdUzogXxsYITWc9uu2HHAMSUwCLcBGAsYHQ/w640-h480/IMG_20200817_175159543.jpg" width="640" /></a></div><div><br /></div><div>Back side of the spindle visible: It's a generic 800W ER-11 water cooled spindles. Maybe something to upgrade in the future:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK8gtyRugr08iUXFD33TF8Uduq4dHDQ9vVlqCOk0i2mEyE-29N0NIos5NcfhsvfOCdZpm4-1f1Bzo7SUyb459REY9LAS_sPda2zSvrBRSEPco05rchT6CszkxT9qRCQ7UTnP6hyU_CehQ/s2048/IMG_20200817_175206508.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK8gtyRugr08iUXFD33TF8Uduq4dHDQ9vVlqCOk0i2mEyE-29N0NIos5NcfhsvfOCdZpm4-1f1Bzo7SUyb459REY9LAS_sPda2zSvrBRSEPco05rchT6CszkxT9qRCQ7UTnP6hyU_CehQ/w640-h480/IMG_20200817_175206508.jpg" width="640" /></a></div><div><br /></div><div>The three linear axes are driven by brushless servos with integrated controllers:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-tQYE1_9DrHM/X3p4N4YsiEI/AAAAAAAAZU0/UKgmn_PR6_Y0yj3dO9IoBApyM_224sjzgCLcBGAsYHQ/s2048/IMG_20200817_175214564.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-tQYE1_9DrHM/X3p4N4YsiEI/AAAAAAAAZU0/UKgmn_PR6_Y0yj3dO9IoBApyM_224sjzgCLcBGAsYHQ/w640-h480/IMG_20200817_175214564.jpg" width="640" /></a></div><div><br /></div><div>A peek under the bellows way covers at the (allegedly Hiwin) X-axis ballscrew and one of the linear guides:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Kxrqn3mSHDM/X3p4PHhtMmI/AAAAAAAAZU4/7Epsosx_l8Mq6Ld2bt0UTOG5HOgHbD3uwCLcBGAsYHQ/s2048/IMG_20200817_175232871.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Kxrqn3mSHDM/X3p4PHhtMmI/AAAAAAAAZU4/7Epsosx_l8Mq6Ld2bt0UTOG5HOgHbD3uwCLcBGAsYHQ/w640-h480/IMG_20200817_175232871.jpg" width="640" /></a></div><div><br /></div><div>The linear axis ballscrews are coupled to the servos with disc couplings, which is nice to see</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-JeY5W5p6zug/X3p4QLXSZvI/AAAAAAAAZVA/AJdbmots3lINJO0W27RtsvW_5xpX2enCgCLcBGAsYHQ/s2048/IMG_20200817_185137468_MP.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1536" height="640" src="https://1.bp.blogspot.com/-JeY5W5p6zug/X3p4QLXSZvI/AAAAAAAAZVA/AJdbmots3lINJO0W27RtsvW_5xpX2enCgCLcBGAsYHQ/w480-h640/IMG_20200817_185137468_MP.jpg" width="480" /></a></div><div><br /></div>The backside of the machine, where you can see the X,Y, and A axis servos. The rotary axes are driven with harmonic drive reductions and supported by crossed roller bearings, which I'm surprised was possible given the cost.<div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-82SWelWFj4c/X3p4Pn3jzKI/AAAAAAAAZU8/iCydhKPlvGIxUUwmw-kBaKkDSTGJWinqgCLcBGAsYHQ/s2048/IMG_20200817_192111570.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1536" height="640" src="https://1.bp.blogspot.com/-82SWelWFj4c/X3p4Pn3jzKI/AAAAAAAAZU8/iCydhKPlvGIxUUwmw-kBaKkDSTGJWinqgCLcBGAsYHQ/w480-h640/IMG_20200817_192111570.jpg" width="480" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">When I unpacked the electronics box, a few screws had worked loose in shipping and were rattling around. The inside of the electronics box was not confidence-inspiring. There's a generic 36V DC supply to run the servos, a 1.5 kW VFD, and some pretty sketchy wiring. The machine seems good mechanically, so I'm letting this slide for now....</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-4o3P-_95288/X3p4Lspe8KI/AAAAAAAAZUc/kEQVghed0AYHmYiQo1NgsTcUoSon5G-lgCLcBGAsYHQ/s2048/IMG_20200817_173829522.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-4o3P-_95288/X3p4Lspe8KI/AAAAAAAAZUc/kEQVghed0AYHmYiQo1NgsTcUoSon5G-lgCLcBGAsYHQ/w640-h480/IMG_20200817_173829522.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-pAnl-KL8HSY/X3p4M6xBHEI/AAAAAAAAZUo/9N3RdcG5_JI3k2nQHxrLe9oWJLm3CbKVgCLcBGAsYHQ/s2048/IMG_20200817_173854796.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-pAnl-KL8HSY/X3p4M6xBHEI/AAAAAAAAZUo/9N3RdcG5_JI3k2nQHxrLe9oWJLm3CbKVgCLcBGAsYHQ/w640-h480/IMG_20200817_173854796.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I've been using the shipping crate it came in as an enclosure. If I fold the door up it keeps the chips in and the noise down a little, at the cost of seeing what's going on. Eventually I'll build a proper enclosure. I set the crate on top of a Harbor Freight rolling tool cart, which stores the power supply box, water cooling, and related tools:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-02MI8q6rBpY/X3p6B7ZroHI/AAAAAAAAZVg/hBUC6blkrWkVHh_rk4mQT-xkMYldHuNggCLcBGAsYHQ/s6000/DSC01399.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="6000" data-original-width="4000" height="640" src="https://1.bp.blogspot.com/-02MI8q6rBpY/X3p6B7ZroHI/AAAAAAAAZVg/hBUC6blkrWkVHh_rk4mQT-xkMYldHuNggCLcBGAsYHQ/w426-h640/DSC01399.JPG" width="426" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Screenshot of the the control software below. The software isn't anything fancy, but does the job. There are amusingly mis-translated buttons like "Knife", which actually runs the tool probing macro, "overrate", which is the feed override, and "Cold Fog", which presumably would turn on mist coolant if the machine had it.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-KTuXrq0_djw/X3vUwFiRl8I/AAAAAAAAZWU/BmJmWuiLGNcydWz0NXERnoyCCrEHLbUiQCLcBGAsYHQ/s901/cnc_window.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="901" height="446" src="https://1.bp.blogspot.com/-KTuXrq0_djw/X3vUwFiRl8I/AAAAAAAAZWU/BmJmWuiLGNcydWz0NXERnoyCCrEHLbUiQCLcBGAsYHQ/w640-h446/cnc_window.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Not particularly exciting, but here was my first working attempt at a multi-axis toolpath (video at 16x):</div><div class="separator" style="clear: both; text-align: left;"><br /></div>
<div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/k3-qp1KVwRc" width="560"></iframe></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here's one of the first "real" parts I've made - the front side of a motor housing. Most of the material removal was done with a Datron 3mm single-flute end mill. Thanks to the rotary table I could do this part in one setup, rather than machining one side, machining a fixture, and machining the other side like I would on a 3-axis machine. Video at 8x speed.</div><br /><div style="text-align: center;"><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/k9_kyYpLbaU" width="560"></iframe></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here's pretending the mill is a lathe and machining a shaft for said motor, including a lock ring thread cut with a 60 degree chamfer mill. HSMWorks, which I've been using for CAM <a href="https://build-its-inprogress.blogspot.com/2013/11/cnc-everything.html">since the beginning</a>, is pretty terrible for this style of toolpath, so the surface finish is a little weird. It buffed out easily though. In this picture the part is done and being parted off:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-nLsswGnmS3Y/X3vakc2lhPI/AAAAAAAAZWk/qy8Owvmoo4gb3t76q2rz5sgJUZuVDdwegCLcBGAsYHQ/s6000/DSC01377.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-nLsswGnmS3Y/X3vakc2lhPI/AAAAAAAAZWk/qy8Owvmoo4gb3t76q2rz5sgJUZuVDdwegCLcBGAsYHQ/w640-h426/DSC01377.JPG" width="640" /></a></div><div><br /></div><div>And here's that half-a-motor-housing and shaft with a rotor for a frameless motor installed (held on by a threaded lockring also made on the mill), and bearings and commutation encoder magnet pressed in. </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-DdthG415e3M/X3vakULs1eI/AAAAAAAAZWg/CVGvVZZ8jIQ3JK7U_YmYk35X29sAXhy1wCLcBGAsYHQ/s6000/DSC01398.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="6000" height="426" src="https://1.bp.blogspot.com/-DdthG415e3M/X3vakULs1eI/AAAAAAAAZWg/CVGvVZZ8jIQ3JK7U_YmYk35X29sAXhy1wCLcBGAsYHQ/w640-h426/DSC01398.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;">I haven't pushed the machine too hard yet, in the interest of keeping noise down. It's in my 2nd floor living room, and not very well enclosed, so I've been making the toolpaths conservative to avoid complaints from my neighbors.</div><br /></div><div>Amusing setup from today - a part in the tiny lathe 3-jaw chuck, held in an ER-40 collet chuck, bolted to the table. Milling a circular dovetail in the part (which is a fixture for yet another part), to match the dovetails milled into the lathe chuck soft jaws: No dovetail cutter required.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ySruBUDj7lI/X3p4QdKHKuI/AAAAAAAAZVE/n6Bh-oxkbLoL3SpToLHsdRXFtTycj2wyQCLcBGAsYHQ/s2048/IMG_20201004_152259666.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-ySruBUDj7lI/X3p4QdKHKuI/AAAAAAAAZVE/n6Bh-oxkbLoL3SpToLHsdRXFtTycj2wyQCLcBGAsYHQ/w640-h480/IMG_20201004_152259666.jpg" width="640" /></a></div><br /></div><div>Summary of thoughts/impressions so far:</div><div><ul style="text-align: left;"><li>The core mechanical pieces of the machine seem pretty good. Brushless servos, linear guides, ballscrews, and harmonic drives, on a steel structure is impressive at this price point.</li><li>The less-critical hardware is a little janky - the bellows way covers, the sheet metal spindle cover, the electronics box, the water cooling loop. But those are all relatively straightforward to re-do or repair if needed.</li><li>With good tools (I've been having great luck with Datron single flute cutters for roughing), it performs pretty well cutting aluminum. I've been roughing with a 3mm endmill at 20k RPM, 2.5mm stepover, .5mm stepdown, and 2000mm/min feed with no problem. It could definitely be pushed harder but it gets loud. I haven't tried harder materials yet.</li><li>I haven't done a ton of experimenting yet, but "conventional" style toolpaths with large stepover and small stepdown seem to perform better than "adaptive" or "trochoidal" style toolpaths with a large stepdown and small stepover. Needs more testing though.</li><li>I wish I had a way to pre-set tool lengths with the ER-11 spindle. The machine has a built-in tool probe, but swapping collets and probing takes a while. I'm thinking about making a bunch of shrink-fit holders that all have the same shank diameter and bottom out in the spindle, so the collet and collet nut never have to come all the way off. </li><li>There are a few vendors of the machine (It's even on Amazon, but also RobotDigg and a few other sites), but it's cheaper to get directly from Xinshan. </li><li>Support has been really excellent so far. I've had tons of questions about how things work, and I always get a response the next day. When I've had g-code that behaves confusingly, they'll run the code on their machine and send me a video.</li><li>CAM-wise, I've been using HSMWorks. I think the kids these days are using Fusion 360 (Autodesk bought HSMWorks and I think has ported it into Fusion), but I've never tried it. Solidworks integration is super nice since your CAM updates when your model updates, and I don't really want to switch to Fusion for CAD. HSMWorks/Fusion 4/5-axis toolpaths are kind of a joke, but 3+2 (position the rotary axes then do a 3-axis toolpath) work great. The "real" answer for good 5-axis toolpaths is probably a more legit stand-alone CAM software, but I'm going to stick to HSMWorks for everything I can. </li><li>Cool feature, the machine can do TCP, Tool Point Center control - this means that the CAM origin does not need to be at the machine origin (the intersection of the two rotary axes). You can put the CAM origin wherever, set the work coordinate system offsets by touching off to the part, and the machine will figure out the kinematics. This makes CAM much simpler, since you don't have to know where the part/stock are on the machine when you're doing the CAM. That's what you'd expect for 3-axis stuff, but with the two rotary axes, it's not just an offset in X, Y and Z anymore. I haven't been to adventurous with this, but offsetting the Z at least seem to work just fine. </li></ul><div><a href="https://drive.google.com/file/d/1lTwRy72Ov9juVDXPSiig7L9HHpZ_kP3_/view?usp=sharing">Here's a link to my HSMWorks post processor.</a> </div></div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com40tag:blogger.com,1999:blog-910685024071367839.post-52146937586183273212020-08-30T22:45:00.002-04:002022-04-21T21:01:46.372-04:00Varying pitch screw mechanismI put together a mostly-3D-printed prototype of the <a href="https://build-its-inprogress.blogspot.com/2020/06/simple-dynamics-with-variable.html">variable-pitch screw idea</a>. Although it looked like it would work in CAD, I wanted to get a feel for the mechanism in real-life before designing anything around it:<br /><br /><div style="text-align: center;"><iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube-nocookie.com/embed/xYO2BARInSg" width="560"></iframe></div><div style="text-align: center;"><br /></div><div style="text-align: left;">The mechanism combines a <a href="https://en.wikipedia.org/wiki/Cam#Cylindrical_cam">cylindrical cam</a> with linear motion constraint all on the same cylinder.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">The main pieces besides the screw are shown below. On the left is the linear constraint mechanism, which has 6 rollers in it. In the center is the "nut" which has two cam followers pointing radially inwards. The cam followers engage with the spiral slot around the screw. On the right and left of the nut are bearings which take the thrust load from the screw, and constrain the nut. On the right is a cap, which just supports one of the nut bearings. It threads on to the linear mechanism, sandwiching the nut.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><a href="https://1.bp.blogspot.com/-DMI2prnOHag/X0xbvMkbx5I/AAAAAAAAY_w/eVMrjyeN3CgvC451HI7UWq9EJuQluIAvgCLcBGAsYHQ/s2048/DSC01373.JPG" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img alt="wow, blogger has alt text now" border="0" data-original-height="1365" data-original-width="2048" height="427" src="https://1.bp.blogspot.com/-DMI2prnOHag/X0xbvMkbx5I/AAAAAAAAY_w/eVMrjyeN3CgvC451HI7UWq9EJuQluIAvgCLcBGAsYHQ/w640-h427/DSC01373.JPG" width="640" /></a></div><div style="text-align: left;"><br /></div><div style="text-align: left;">A better view of how the linear motion constraint works. 3 V-grooves go down the length of the screw. 6 plastic rollers on bearings ride in the V-grooves, preventing the screw from rotating or tilting:<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Mn-hYdOCM4E/X0xbusxkqCI/AAAAAAAAY_o/kccFt0oBkrg4UFf7-zQ6wrV77gVsGpG5gCLcBGAsYHQ/s2048/DSC01278.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1365" data-original-width="2048" src="https://1.bp.blogspot.com/-Mn-hYdOCM4E/X0xbusxkqCI/AAAAAAAAY_o/kccFt0oBkrg4UFf7-zQ6wrV77gVsGpG5gCLcBGAsYHQ/s640/DSC01278.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-I48FtHByYtI/X0xbum0ZBiI/AAAAAAAAY_s/_9j_qELSZFEMYP2HxcqP72Pwk48m8oWbgCLcBGAsYHQ/s2048/DSC01371.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1365" data-original-width="2048" src="https://1.bp.blogspot.com/-I48FtHByYtI/X0xbum0ZBiI/AAAAAAAAY_s/_9j_qELSZFEMYP2HxcqP72Pwk48m8oWbgCLcBGAsYHQ/s640/DSC01371.JPG" width="640" /></a></div><div><br /></div>The V-grooves are shallow enough that they don't interfere with the spiral cam slot:<div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-9m5J-oGK3AQ/X0xgY6FW1sI/AAAAAAAAZAg/8V59Ib0Trq8mZGy8B1K1r3GKSE-PlTlcwCLcBGAsYHQ/s2048/DSC01372.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1365" data-original-width="2048" src="https://1.bp.blogspot.com/-9m5J-oGK3AQ/X0xgY6FW1sI/AAAAAAAAZAg/8V59Ib0Trq8mZGy8B1K1r3GKSE-PlTlcwCLcBGAsYHQ/s640/DSC01372.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Here's a cross section of the linear motion constraint. There are 4 rollers per V-groove, and the rollers are carefully spaced such that 2 spaced far apart from each other are always engaged with the V-groove, even while one or two other roller is jumping over spiral slot.</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-JDIXTWBypGA/X0xdQMH277I/AAAAAAAAZAI/SwHzvDTnS3cS7hmJdOTrsYe5qQJYufYTwCLcBGAsYHQ/s1260/spline_rollers.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="621" data-original-width="1260" src="https://1.bp.blogspot.com/-JDIXTWBypGA/X0xdQMH277I/AAAAAAAAZAI/SwHzvDTnS3cS7hmJdOTrsYe5qQJYufYTwCLcBGAsYHQ/s640/spline_rollers.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">Below you can see the makeshift cam followers inside the nut. Each cam follower is a dowel pin pressed into a pair of flanged bearings. For a "real" version of this I'll need to come up with something less janky, but this was good enough to check that the mechanism actually worked.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-F5S9-AbZb_g/X0xbvf-JvdI/AAAAAAAAY_0/vozXOAgBN18yOJScIjDiMUmLi2NnEGWwwCLcBGAsYHQ/s2048/DSC01375.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1365" data-original-width="2048" src="https://1.bp.blogspot.com/-F5S9-AbZb_g/X0xbvf-JvdI/AAAAAAAAY_0/vozXOAgBN18yOJScIjDiMUmLi2NnEGWwwCLcBGAsYHQ/s640/DSC01375.JPG" width="640" /></a></div><br /><div style="text-align: left;">The linear constraint rollers were machined on the <a href="https://build-its-inprogress.blogspot.com/search/label/Mini%20Lathe">Tiny Lathe</a>. I used a diamond needle file to hand-grind a form tool out of an HSS blank. The whole roller profile was turned in one pass by plunging the form tool in a set depth. The bore for the bearings was also done in one pass, by offsetting the tailstock to one side, and boring it out with a ballnose end mill in the drill chuck. Delrin is soft enough that you can get away with stuff like this.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Here's a picture of the form tool next to one of the rollers in the assembly:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-69w49or876E/X0xe7Y3IktI/AAAAAAAAZAU/o9d8MJW5GUIAt1qpJbZITGSVz8BP-3UcgCLcBGAsYHQ/s2048/DSC01260.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1940" data-original-width="2048" src="https://1.bp.blogspot.com/-69w49or876E/X0xe7Y3IktI/AAAAAAAAZAU/o9d8MJW5GUIAt1qpJbZITGSVz8BP-3UcgCLcBGAsYHQ/s640/DSC01260.JPG" width="640" /></a></div><div><br /></div><div>The screw CAD was generated by creating a CSV of coordinates in MATLAB, importing it as a spline into SolidWorks, and sweep-cutting a small-diameter cylinder through a hollow tube, following the spline. Kind of a finicky process, but it works. If I decided to change the profile later on, I can replace the spline points with new set, and <i>most </i>of the dependent features are able to regenerate.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-X9cqHso46ik/X0xhBk_5oxI/AAAAAAAAZAo/plmeYzhYvBI3VOdwS1JExO-lsiNq38KQACLcBGAsYHQ/s1570/cut_sweep.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="626" data-original-width="1570" src="https://1.bp.blogspot.com/-X9cqHso46ik/X0xhBk_5oxI/AAAAAAAAZAo/plmeYzhYvBI3VOdwS1JExO-lsiNq38KQACLcBGAsYHQ/s640/cut_sweep.JPG" width="640" /></a></div><br /><div style="text-align: left;"><br /></div>
</div>Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com6tag:blogger.com,1999:blog-910685024071367839.post-86577044403754813852020-07-22T23:35:00.000-04:002020-07-22T23:35:46.124-04:00A decade of project bloggingI just noticed that as of this month, I've had <a href="http://build-its.blogspot.com/">build-its.blogspot.com</a> for 10 years. It's hard to believe how long it's been and how short it's felt. Hopefully Blogger is still around in another 10.<br />
<div>
<br /></div>
<div>
For nostalgia's sake, here's the oldest project-thing I've documented- <a href="https://build-its.blogspot.com/2010/08/rocket-car.html"><span id="goog_2023198611"></span>strapping model rocket engines to a pinewood derby car<span id="goog_2023198612"></span></a><a href="https://build-its.blogspot.com/2010/08/rocket-car.html">:</a> This video predates the blog - I think it was filmed in 2007.</div>
<div>
<br /></div>
<div>
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/A5mVcoj5BVs" width="560"></iframe>
</div>
<div>
<br />
2nd place goes to this shot of me planing a railing on <a href="http://build-its.blogspot.com/2011/10/shellback-dinghy.html">The Boat</a> from 2009. <br />
<br />
<a href="http://4.bp.blogspot.com/-qsDWM9GfKJM/XxkCQpPObPI/AAAAAAAAYvM/7UhenQNMoAYK5ANlrO8sVrlvbo8GZ9NfgCK4BGAYYCw/s1600/DSC00491.JPG" imageanchor="1"><img border="0" height="480" src="https://4.bp.blogspot.com/-qsDWM9GfKJM/XxkCQpPObPI/AAAAAAAAYvM/7UhenQNMoAYK5ANlrO8sVrlvbo8GZ9NfgCK4BGAYYCw/s640/DSC00491.JPG" width="640" /></a></div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com1tag:blogger.com,1999:blog-910685024071367839.post-85102423966596473482020-06-06T22:19:00.002-04:002022-04-29T07:29:00.568-04:00Simple Dynamics With Varying Transmission Ratios<div>
An idea I've had in the back of my head for a while now is using varying transmission ratios to transfer kinetic energy between bodies. That sounds really abstract, but I'll explain.</div>
<div>
<br /></div>
<div>
Here's a simple example that frames the problem.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-nk7P9bfYl-U/XtxjSdnqKPI/AAAAAAAAYaE/tNgpCkmilP03YllZ5zaI7qfxB8dEG_UwgCLcBGAsYHQ/s1600/diagram_1_labeled.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="727" data-original-width="1600" height="290" src="https://1.bp.blogspot.com/-nk7P9bfYl-U/XtxjSdnqKPI/AAAAAAAAYaE/tNgpCkmilP03YllZ5zaI7qfxB8dEG_UwgCLcBGAsYHQ/s640/diagram_1_labeled.jpg" width="640" /></a></div>
<br />
There's a mass, \(m\), which can translate in \(x\). Driving the mass is an actuator with inertia \(j\) and angle \(\theta\). There's a transmission between the rotation of the actuator and the translation of the mass. The transmission ratio, \(k\), is the ratio between angular velocity of the actuator and linear velocity of the mass, i.e. a radius. This radius varies as the angle of the actuator changes.<br />
<br />
Below is a sketch of how a varying transmission ratio might look, with a pulley that changes radius as it winds up:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-AhSOHDP4ht4/Xt2mhQdhtDI/AAAAAAAAYaQ/9lCJ64W14S0nhBBpSAo6advvSC_SDCetACLcBGAsYHQ/s1600/diagram_1_vgr.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="727" data-original-width="1600" height="290" src="https://1.bp.blogspot.com/-AhSOHDP4ht4/Xt2mhQdhtDI/AAAAAAAAYaQ/9lCJ64W14S0nhBBpSAo6advvSC_SDCetACLcBGAsYHQ/s640/diagram_1_vgr.jpg" width="640" /></a></div>
<br />
The specific idea I wanted to test out was this:<br />
<i>Start out with a low transmission ratio, so spinning the inertia doesn't move the mass very much. "Spool up" the inertia to high speed. Vary the transmission ratio so the mass accelerates at constant power, but the inertia speed is constant. Then, rapidly increase the transmission ratio. This should cause the inertia to decelerate, transferring its kinetic energy to the mass.</i><br />
<i><br /></i>
At least, that's intuitively what I would expect to happen. It's similar to the idea of revving up an engine and dumping the clutch to accelerate hard (or do a burnout), but in the clutch case, half of the kinetic energy is necessarily dissipated by slip in the clutch. In the variable transmission ratio case, there's no slip, so there shouldn't be any energy loss.<br />
<br />
Jumping into the dynamics:<br />
Instantaneously, the relationship between angular velocity and linear velocity is:</div>
<div>
$$\dot{x} = k\dot{\theta}$$</div>
<div>
Differentiating, the relationship between accelerations is:</div>
<div>
$$\ddot{x} = k\ddot{\theta} + \dot{k}\dot{\theta}$$</div>
<div>
Normally, with a fixed transmission ratio, \(\ddot{x} = k\ddot{\theta}\). But if the transmission ratio <i>isn't </i>constant, another term shows up. If the transmission ratio is increasing and there's positive angular velocity, there's an additional positive acceleration. That's in-line with the intuition so far.<br />
<br />
If a constant torque \(\tau\) is applied to the actuator, the acceleration of the mass works out to the following:<br />
<br />
$$<br />
\ddot{x} = \frac{k\tau + j\dot{k}\dot{\theta}}{j + k^{2}m}<br />
$$<br />
<br />
Rather than the transmission ratio being time-varying, say it's position-varying. Imagine a cable spooling up on a variable-radius pulley, or a cam follower rolling along a cam. Recognizing that if \(k = k(\theta)\), then \(\dot{k} = \dot{\theta}\frac{dk}{d\theta}\), the acceleration is:<br />
<br />
$$<br />
\ddot{x} = \frac{k\tau + j\dot{\theta}^{2}\frac{dk}{d\theta}}{j + k^{2}m}<br />
$$<br />
<br />
This position-derivative variant is nice because it can be pre-computed from k vs position, rather than requiring time-differentiation to get.<br />
<br />
<br />
Going back to the idea I wanted to test: <i>Spool up the motor to high speed. Operate at constant speed and power. Then spool down the motor to transfer the actuator's kinetic energy to the mass.</i><br />
<i><br /></i>
I roughly hand-designed a varying transmission ratio to do this. At the beginning, there's a constant, small transmission ratio. Then it switches to a logarithmic curve - A log curve results in constant power output at constant actuator angular velocity, although I'm not going to justify that here. At the end, it rapidly increases to slow down the actuator.<br />
<br />
Here's a plot of the example transmission ratio vs motor angle. Polar version of the plot on the right:<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-77gOZV-PDGs/Xt248OXwjuI/AAAAAAAAYbQ/x4tPcm5dIMMYgogUIJh5KGZIwVFIJgRrQCLcBGAsYHQ/s1600/tr_1.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="560" height="318" src="https://1.bp.blogspot.com/-77gOZV-PDGs/Xt248OXwjuI/AAAAAAAAYbQ/x4tPcm5dIMMYgogUIJh5KGZIwVFIJgRrQCLcBGAsYHQ/s320/tr_1.jpg" width="320" /></a></div>
<a href="https://1.bp.blogspot.com/-vPB8FGKgL9k/Xt23rb_WzGI/AAAAAAAAYbE/215V38sSDVc0d4MGCLOfrAM5URXcioVKwCLcBGAsYHQ/s1600/tr_1.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a>
<a href="https://1.bp.blogspot.com/-ojXPDFKGCfU/Xt23No6ME8I/AAAAAAAAYa4/xqYIzxNK1rM6OHS2Qm5H5PgbNrOUflCzQCLcBGAsYHQ/s1600/tr_polar.jpg" style="clear: right; display: inline; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" data-original-height="380" data-original-width="351" height="320" src="https://1.bp.blogspot.com/-ojXPDFKGCfU/Xt23No6ME8I/AAAAAAAAYa4/xqYIzxNK1rM6OHS2Qm5H5PgbNrOUflCzQCLcBGAsYHQ/s320/tr_polar.jpg" width="294" /></a><br />
<br />
And a rotating GIF for good measure:<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-AjdVI9ys7ZM/Xt21nmqFuWI/AAAAAAAAYag/yF5q-5BI5EgmY4x9GC6Afvj9Y__vQL8cwCLcBGAsYHQ/s1600/pulley.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="420" data-original-width="560" height="240" src="https://1.bp.blogspot.com/-AjdVI9ys7ZM/Xt21nmqFuWI/AAAAAAAAYag/yF5q-5BI5EgmY4x9GC6Afvj9Y__vQL8cwCLcBGAsYHQ/s320/pulley.gif" width="320" /></a></div>
<br />
Simulating the dynamics, here's what I get when applying a constant torque to the actuator. Actuator angular velocity and speed of the mass are plotted below. First, when the transmission ratio is tiny, the angular velocity ramps up but the mass barely moves. Then when the transmission reaches the logarithmic section, the angular velocity becomes roughly constant. The mass accelerates at constant power. Finally, the steep end section of the transmission is reached, the actuator angular velocity quickly decreases, and there is a corresponding jump in mass linear velocity.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-CdtKw718j3g/Xt2_x399KQI/AAAAAAAAYcU/FTEPWQZZWywivMM-kV5oqGK5OECU8hXxwCLcBGAsYHQ/s1600/velocities.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="420" data-original-width="560" src="https://1.bp.blogspot.com/-CdtKw718j3g/Xt2_x399KQI/AAAAAAAAYcU/FTEPWQZZWywivMM-kV5oqGK5OECU8hXxwCLcBGAsYHQ/s1600/velocities.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
Plotting the kinetic energies of the actuator and mass, vs the input energy, \(\int{\tau\omega}\), you can clearly see energy trading off between the actuator and mass. No energy is lost - the kinetic energies at the end are equal to the input energy:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-7kHqCcsh89g/Xt2-vlvox-I/AAAAAAAAYcA/v3zPd3SqdqY62SwRG7tVka4dLS6H6cCWACLcBGAsYHQ/s1600/energy.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="420" data-original-width="560" src="https://1.bp.blogspot.com/-7kHqCcsh89g/Xt2-vlvox-I/AAAAAAAAYcA/v3zPd3SqdqY62SwRG7tVka4dLS6H6cCWACLcBGAsYHQ/s1600/energy.jpg" /></a></div>
<br />
<br />
Changing gears (ha), here's what a solid model of a pulley with this profile looks like:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-vFntIlvXdsU/Xt28TuLjTMI/AAAAAAAAYbc/LSyRlJ5JwEMsVPIvSlZ89GZOHSxHl0YmwCLcBGAsYHQ/s1600/vr_pulley_cad.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="750" data-original-width="472" height="320" src="https://1.bp.blogspot.com/-vFntIlvXdsU/Xt28TuLjTMI/AAAAAAAAYbc/LSyRlJ5JwEMsVPIvSlZ89GZOHSxHl0YmwCLcBGAsYHQ/s320/vr_pulley_cad.JPG" width="201" /></a></div>
<br />
And rather than a variable-radius pulley, the same transmission profile can also be implemented as a variable-pitch screw (or maybe technically a barrel cam). A pair of cam followers ride in the grooves and act as the nut:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-joZKHuJVASE/Xt29bO1VEbI/AAAAAAAAYbw/Bnz2V-ahmVUkd8qQpr7dFC7khBAHLV9-ACLcBGAsYHQ/s1600/2020-05-17.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="215" data-original-width="674" src="https://1.bp.blogspot.com/-joZKHuJVASE/Xt29bO1VEbI/AAAAAAAAYbw/Bnz2V-ahmVUkd8qQpr7dFC7khBAHLV9-ACLcBGAsYHQ/s1600/2020-05-17.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Stay tuned, prototypes coming up soon.</div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com2tag:blogger.com,1999:blog-910685024071367839.post-21557016128504459102020-04-18T17:33:00.000-04:002020-04-18T17:33:43.401-04:00Titanium anodizing experiment<br />
A month or two back I tried out anodizing a titanium bicycle fork. Eventually I want to anodize, mask, and bead blast a frame along the same lines as <a href="https://www.flickr.com/photos/fireflybicycles/">Firefly </a>, so the fork was a test-run to get a feel for the anodizing and masking process.<br />
<br />
I did the anodizing by soaking a foam brush in a water and baking soda mixture, clipping one power supply lead to the brush, and one to the part, and brushing the part. <br />
<br />
If you're good at this, you can get <a href="https://www.flickr.com/photos/fireflybicycles/49426270557/">nice gradients</a> by adjusting the power supply voltage as you move along the part, but I definitely need more practice. I love the purple and dark blue parts: <br />
<br />
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-L3i2VPqM-wc/Xptqg9ipcxI/AAAAAAAAYJU/w5oIWX2R_g4yqBZET5tX0sLUuQE7tgtyQCK4BGAYYCw/s1600/DSC00987.JPG" imageanchor="1"><img border="0" height="426" src="https://2.bp.blogspot.com/-L3i2VPqM-wc/Xptqg9ipcxI/AAAAAAAAYJU/w5oIWX2R_g4yqBZET5tX0sLUuQE7tgtyQCK4BGAYYCw/s640/DSC00987.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
I used some vinyl tape to mask out a pattern, and then bead blasted to strip the anodizing where it wasn't masked. I didn't put any effort into this pattern since this was a test, but eventually I'll make a mask on a CNC vinyl cutter. I need to find a blasting cabinet with a gentler media in it as well.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-L3i2VPqM-wc/Xptqg9ipcxI/AAAAAAAAYJU/w5oIWX2R_g4yqBZET5tX0sLUuQE7tgtyQCK4BGAYYCw/s1600/DSC00987.JPG" imageanchor="1"></a><a href="http://3.bp.blogspot.com/-WVGjsK4BPxI/Xptqut-7vWI/AAAAAAAAYJc/KyqwgeuIgP8O0ZkgwhpivmrhSHaNobQ2QCK4BGAYYCw/s1600/DSC01018.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-WVGjsK4BPxI/Xptqut-7vWI/AAAAAAAAYJc/KyqwgeuIgP8O0ZkgwhpivmrhSHaNobQ2QCK4BGAYYCw/s640/DSC01018.JPG" width="640" /></a></div>
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-L3i2VPqM-wc/Xptqg9ipcxI/AAAAAAAAYJU/w5oIWX2R_g4yqBZET5tX0sLUuQE7tgtyQCK4BGAYYCw/s1600/DSC00987.JPG" imageanchor="1"><br /></a></div>
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-L3i2VPqM-wc/Xptqg9ipcxI/AAAAAAAAYJU/w5oIWX2R_g4yqBZET5tX0sLUuQE7tgtyQCK4BGAYYCw/s1600/DSC00987.JPG" imageanchor="1"></a><a href="http://3.bp.blogspot.com/-WVGjsK4BPxI/Xptqut-7vWI/AAAAAAAAYJc/KyqwgeuIgP8O0ZkgwhpivmrhSHaNobQ2QCK4BGAYYCw/s1600/DSC01018.JPG" imageanchor="1"></a><a href="http://1.bp.blogspot.com/-agBn8fWTO6M/Xptq8nmV76I/AAAAAAAAYJo/3dpQ1PoFvLI7bA5gJ6Nuthqvhth-UfivwCK4BGAYYCw/s1600/DSC01014.JPG" imageanchor="1"><img border="0" height="426" src="https://1.bp.blogspot.com/-agBn8fWTO6M/Xptq8nmV76I/AAAAAAAAYJo/3dpQ1PoFvLI7bA5gJ6Nuthqvhth-UfivwCK4BGAYYCw/s640/DSC01014.JPG" width="640" /></a></div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com2tag:blogger.com,1999:blog-910685024071367839.post-28031621027253257962020-01-20T19:58:00.000-05:002020-01-20T19:58:08.418-05:00New High Power Motor Drive<div class="separator" style="clear: both; text-align: left;">
I've been working on a <a href="https://www.youtube.com/watch?v=QZ1DaQgg3lE">large robot</a>-size motor drive, with a design target of 75V, >70A (peak phase) continuous with heatsinking, and >150A peak. In order to make the drive as compact as possible, it's split into three separate boards stacked on top of each other. The bottom layer is the power layer with MOSFETs, ceramic DC link capacitors, and current shunts. To minimize the thermal resistance between all the heat generating components to the world, the power layer is built on a 2-layer aluminum substrate board. Above the power board is the logic board with microcontroller and gate-drive, built on a normal 4-layer 1 oz board. On the very top is a breakout board with connectors for DC power input, the 3 phases, and communication/encoder</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To get a better feel for how well the aluminum power board will work, I built a simple half-bridge using the same FETs as I plan on using for the final motor drive. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Here's the first test-board, affectionately named <i>The Half Bridge of Science.</i> It's just 2 parallel TPW3R70APL FETs per side, some 250V .47 uF ceramic caps, and a couple TLP152 gate-drive optocouplers to drive the gates.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-ky6Vz-QUNGE/XiY-AUoPnoI/AAAAAAAAXzg/9w4cNRJPwUo8MtZsWbqnYEjWqrPf3pkJwCLcBGAsYHQ/s1600/IMG_20190907_240555351.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-ky6Vz-QUNGE/XiY-AUoPnoI/AAAAAAAAXzg/9w4cNRJPwUo8MtZsWbqnYEjWqrPf3pkJwCLcBGAsYHQ/s640/IMG_20190907_240555351.jpg" width="640" /></a></div>
<br />
Here's my dummy load for the half-bridge: 4 big "Pickle" resistors in a 2S2P arrangement for 1 ohm and lots of watts, with the boost converter inductor from a Ford Fusion hybrid in series.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-7U6_MveVrSc/XiY-AcY7DmI/AAAAAAAAXzk/zbO_KzNRB9o8xlD9Kr92JOkhOiiWlgfiACLcBGAsYHQ/s1600/IMG_20190907_240630223.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-7U6_MveVrSc/XiY-AcY7DmI/AAAAAAAAXzk/zbO_KzNRB9o8xlD9Kr92JOkhOiiWlgfiACLcBGAsYHQ/s640/IMG_20190907_240630223.jpg" width="640" /></a></div>
<br />
Here it is with 55 DC amps (equivalent to 77 peak sinusoidal amps) going out of it at 50V on the input at a 50% duty cycle, basically perfectly maxing out the MITERS Lambda 50V 30A supplies.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-3R0F5yXrbV4/XiY-AWpp1aI/AAAAAAAAXzo/Ge2xnRf_p8kcVfU8WBL2hdhmlyIqrQuuwCLcBGAsYHQ/s1600/IMG_20190907_240853666.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-3R0F5yXrbV4/XiY-AWpp1aI/AAAAAAAAXzo/Ge2xnRf_p8kcVfU8WBL2hdhmlyIqrQuuwCLcBGAsYHQ/s640/IMG_20190907_240853666.jpg" width="640" /></a></div>
<br />
<div style="text-align: left;">
Here are side-by-side shots of the board with a thermal camera at 55A switching at 10 kHz on the left, and 20 kHz on the right. Here's it's poorly clamped to a heatsink with no thermal paste. At 10 kHz, the FETs (Sp2) ran at 57 C, and the ceramic capacitors (Sp1) at 55. At 20 kHz, the FETs were at 65 C and the hottest of the ceramics at 75 C. Looks like I need more DC link ceramics to handle the ripple current.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://4.bp.blogspot.com/-2rIhMvRg-cc/XiZAbRyShsI/AAAAAAAAX0A/9nEEWGjULKMbDQX2aRavja4qRw9tzdcLQCK4BGAYYCw/s1600/alu55a10khz.jpg" imageanchor="1"><img border="0" height="256" src="https://4.bp.blogspot.com/-2rIhMvRg-cc/XiZAbRyShsI/AAAAAAAAX0A/9nEEWGjULKMbDQX2aRavja4qRw9tzdcLQCK4BGAYYCw/s320/alu55a10khz.jpg" width="320" /></a><a href="http://3.bp.blogspot.com/-TxE65038EB0/XiZAbh58x5I/AAAAAAAAX0I/wSgi6WNMIbEGOxZuHNnyGx3s03yYPJf1wCK4BGAYYCw/s1600/alu55a20khz.jpg" imageanchor="1"><img border="0" height="256" src="https://3.bp.blogspot.com/-TxE65038EB0/XiZAbh58x5I/AAAAAAAAX0I/wSgi6WNMIbEGOxZuHNnyGx3s03yYPJf1wCK4BGAYYCw/s320/alu55a20khz.jpg" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
There were a few mistakes with this board, so I expect thermal performance to only get better from here - I accidentally used the 1 W/m-K insulator instead of the 2 W/m-K insulator that's also available, and I misinterpreted the minimum via size, so the thermal vias were huge and sparse. This seemed pretty promising, so I designed 3-phase version</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Here's the populated 3-phase power board. For testing, I got a normal FR4 board to confirm that everything works. The copper power links between the boards were custom-machined, since I couldn't find any COTS pins that were as compact.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<a href="http://4.bp.blogspot.com/-5bFFfnAjSGw/XiZHYp6BzfI/AAAAAAAAX0Y/cNoiA-48vEUwmGxjyUHnLkYPzm_dkcG_wCK4BGAYYCw/s1600/DSC00927.JPG" imageanchor="1"><img border="0" height="424" src="https://4.bp.blogspot.com/-5bFFfnAjSGw/XiZHYp6BzfI/AAAAAAAAX0Y/cNoiA-48vEUwmGxjyUHnLkYPzm_dkcG_wCK4BGAYYCw/s640/DSC00927.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Here's the logic board, minus gate driver. To start out, I'm trying the DRV8353S gate drive IC. It's very similar to the DRV8323 I used on my smaller motor drives. I went for the version without a built-in buck converter and use an external 15V and 5V buck to power everything. Since the DRV8323 was good for driving 2 FETs very similar to these at 40 kHz, it should be able to drive twice as many FETs at 20 kHz.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://1.bp.blogspot.com/-K7P0es3gwAI/XiZH2CrMK8I/AAAAAAAAX0k/LHjV5eHCwC00uKK_IiL4JfTY0bRwHlluQCK4BGAYYCw/s1600/DSC00930.JPG" imageanchor="1"><img border="0" height="426" src="https://1.bp.blogspot.com/-K7P0es3gwAI/XiZH2CrMK8I/AAAAAAAAX0k/LHjV5eHCwC00uKK_IiL4JfTY0bRwHlluQCK4BGAYYCw/s640/DSC00930.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
The top of the stack has Wurth terminals to get power in and out, and some JST-SH's for logic. I plan on replacing the logic connectors with something more robust like the <a href="https://www.harwin.com/connectors-hardware/high-reliability-connectors/2mm-4mm-pitch-connectors/">Harwin Datamate L-Tek</a>'s I used on the Mini Cheetah, once everything is up and running.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://3.bp.blogspot.com/-jWivbWAhY0c/XiZIimPwgcI/AAAAAAAAX0w/nrUpGm0PlfY7RxVXrNnGRAxCBIZPaMPxACK4BGAYYCw/s1600/DSC00929.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-jWivbWAhY0c/XiZIimPwgcI/AAAAAAAAX0w/nrUpGm0PlfY7RxVXrNnGRAxCBIZPaMPxACK4BGAYYCw/s640/DSC00929.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
The assembled stack:</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://3.bp.blogspot.com/-byirA4trW24/XiZJW_OP-YI/AAAAAAAAX08/vzF7_-zayM4YA6Jku0RvqdQdaxxmhxR7ACK4BGAYYCw/s1600/DSC00942.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-byirA4trW24/XiZJW_OP-YI/AAAAAAAAX08/vzF7_-zayM4YA6Jku0RvqdQdaxxmhxR7ACK4BGAYYCw/s640/DSC00942.JPG" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Next time it will be a little bit thinner - I ordered the wrong male header for the board-to-board connectors, so the boards sit a little further apart than I originally intended.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<a href="http://1.bp.blogspot.com/-lfChjYGykwM/XiZJa4E1BrI/AAAAAAAAX1E/LSoIq2nGWh8cOJ_J5S5VcFvbhrai262rACK4BGAYYCw/s1600/DSC00948.JPG" imageanchor="1"><img border="0" height="426" src="https://1.bp.blogspot.com/-lfChjYGykwM/XiZJa4E1BrI/AAAAAAAAX1E/LSoIq2nGWh8cOJ_J5S5VcFvbhrai262rACK4BGAYYCw/s640/DSC00948.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Next to a coke can for a sense of scale. The footprint of the drive is 45x45mm.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://4.bp.blogspot.com/-iovebIthciw/XiZK53vYQtI/AAAAAAAAX1g/7UJhXLjdA3gdbSpj-bE6BAHBxa8JnyN6wCK4BGAYYCw/s1600/DSC00946.JPG" imageanchor="1"><img border="0" height="426" src="https://4.bp.blogspot.com/-iovebIthciw/XiZK53vYQtI/AAAAAAAAX1g/7UJhXLjdA3gdbSpj-bE6BAHBxa8JnyN6wCK4BGAYYCw/s640/DSC00946.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Hooked into a giant T-motor U15 I'm using for testing:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<a href="http://3.bp.blogspot.com/-QtLpZOkWPIw/XiZJdYOp7wI/AAAAAAAAX1M/5VcyGyrDJgAQTtEtl10K83ilbEQ9qxzMwCK4BGAYYCw/s1600/DSC00951.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-QtLpZOkWPIw/XiZJdYOp7wI/AAAAAAAAX1M/5VcyGyrDJgAQTtEtl10K83ilbEQ9qxzMwCK4BGAYYCw/s640/DSC00951.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
That's all for now. There were two swapped pins on the logic board I had to fix with air-wires, but other than that everything seems to work. Unfortunately I made some dumb testing mistakes and blew up the controller before I could push it too hard, and the stacked construction is almost impossible to disassemble. But now that I know the board layout works I'm going to send out for the aluminum power boards. Stay tuned.</div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com6tag:blogger.com,1999:blog-910685024071367839.post-3391670556583074942019-12-15T21:27:00.000-05:002019-12-15T21:29:35.386-05:00Furuta Pendulum(s): Building some moreI built 6 furuta pendulums for a university controls class:<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/VVQ-PGfJMuA" width="560"></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Since the original furuta pendulum was all built out of scrap I had lying around, I had to redesign pretty much everything from scratch.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Instead of using a hand-skewed motor like the original, I used a custom-wind of a T-motor gimbal motor. These have low enough cogging torque to work pretty well:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-SIAFPsvrrWY/XfbpD3JypjI/AAAAAAAAXrA/7Qhg1PCgr1Qp6EaVHspHHJhQZQel0rT2gCK4BGAYYCw/s1600/DSC00593.JPG" imageanchor="1"><img border="0" height="426" src="https://2.bp.blogspot.com/-SIAFPsvrrWY/XfbpD3JypjI/AAAAAAAAXrA/7Qhg1PCgr1Qp6EaVHspHHJhQZQel0rT2gCK4BGAYYCw/s640/DSC00593.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Each motor gets a Microfit connector crimped on the leads, and a hollow shaft retaining-compounded in, for the encoder wheel to attach to:</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-3lHZBUstXvM/XfbpvSqcR3I/AAAAAAAAXrs/XWoOSR5L84UkTa0yQ02Gr5Rq8yMM7WtnQCK4BGAYYCw/s1600/DSC00594.JPG" imageanchor="1"><img border="0" height="426" src="https://2.bp.blogspot.com/-3lHZBUstXvM/XfbpvSqcR3I/AAAAAAAAXrs/XWoOSR5L84UkTa0yQ02Gr5Rq8yMM7WtnQCK4BGAYYCw/s640/DSC00594.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
The spindle has a pair of bearings very lightly preloaded by a wavy washer, and a diametrically magnetized magnet in the back which is read by a hall encoder:</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://4.bp.blogspot.com/-dqfOSJITN9Y/XfbpSqlFzsI/AAAAAAAAXrU/icqrz9L-JtEwo8px7_AILQkmsJhOPXeZQCK4BGAYYCw/s1600/DSC00596.JPG" imageanchor="1"><img border="0" height="426" src="https://4.bp.blogspot.com/-dqfOSJITN9Y/XfbpSqlFzsI/AAAAAAAAXrU/icqrz9L-JtEwo8px7_AILQkmsJhOPXeZQCK4BGAYYCw/s640/DSC00596.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://3.bp.blogspot.com/-Q3I2o3KK-r8/XfbpSFJG9cI/AAAAAAAAXrM/ky4u4TGeuY8T6jBA2bRb2yng4hTyTJO1gCK4BGAYYCw/s1600/DSC00600.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-Q3I2o3KK-r8/XfbpSFJG9cI/AAAAAAAAXrM/ky4u4TGeuY8T6jBA2bRb2yng4hTyTJO1gCK4BGAYYCw/s640/DSC00600.JPG" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In the base is a US digital 20k count/rev optical encoder which the wires for the pendulum hall encoder pass through:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-yNgQpHaS6Hs/XfbpjOi9wwI/AAAAAAAAXrk/_tW6PTBy7zMsrbHh9c9m6uEEZNmgVcGSgCK4BGAYYCw/s1600/DSC00602.JPG" imageanchor="1"><img border="0" height="426" src="https://2.bp.blogspot.com/-yNgQpHaS6Hs/XfbpjOi9wwI/AAAAAAAAXrk/_tW6PTBy7zMsrbHh9c9m6uEEZNmgVcGSgCK4BGAYYCw/s640/DSC00602.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
SPI to the pendulum encoder gets passed over a 12-pin slip ring, with each pin doubled-up for (hopefully) better reliability:</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://2.bp.blogspot.com/-dqBWzeiXjc4/Xfbp9cT44SI/AAAAAAAAXr4/x3tfKzwvJp081YvhzrvSXmCFo2hU8scZQCK4BGAYYCw/s1600/DSC00616.JPG" imageanchor="1"><img border="0" height="426" src="https://2.bp.blogspot.com/-dqBWzeiXjc4/Xfbp9cT44SI/AAAAAAAAXr4/x3tfKzwvJp081YvhzrvSXmCFo2hU8scZQCK4BGAYYCw/s640/DSC00616.JPG" width="640" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In the base there's a board with power switch, mode switch, DC input jack, USB connector for serial communication, and programming header on it. The mode switch allows the pendulum control to be done by the on-board motor controller, or by taking commands and passing back sensor outputs over serial to a computer running the controller.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<a href="http://4.bp.blogspot.com/-N5DPnY3E0BY/XfbqQo_Jr9I/AAAAAAAAXsI/B6yYONG_f4Y6Yl831_B60DqQXm8ze8B3wCK4BGAYYCw/s1600/DSC00640.JPG" imageanchor="1"><img border="0" height="426" src="https://4.bp.blogspot.com/-N5DPnY3E0BY/XfbqQo_Jr9I/AAAAAAAAXsI/B6yYONG_f4Y6Yl831_B60DqQXm8ze8B3wCK4BGAYYCw/s640/DSC00640.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
I didn't want any screws to show, so the top is held on by 4 magnets:</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://3.bp.blogspot.com/-OYZ6NThK354/XfbqsFV2f6I/AAAAAAAAXsc/H1iDwmaokj8gC2kl8M2ld6mqQcPKfbDtQCK4BGAYYCw/s1600/DSC00680.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-OYZ6NThK354/XfbqsFV2f6I/AAAAAAAAXsc/H1iDwmaokj8gC2kl8M2ld6mqQcPKfbDtQCK4BGAYYCw/s640/DSC00680.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://3.bp.blogspot.com/-fRqQyus5iOE/XfbqoRzplHI/AAAAAAAAXsU/JNhk1xa6AFY_qNDDDhShVjDBIJz4tMwoQCK4BGAYYCw/s1600/DSC00671.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-fRqQyus5iOE/XfbqoRzplHI/AAAAAAAAXsU/JNhk1xa6AFY_qNDDDhShVjDBIJz4tMwoQCK4BGAYYCw/s640/DSC00671.JPG" width="640" /></a></div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="http://3.bp.blogspot.com/-0RnMyb-R-Q8/Xfbo93invxI/AAAAAAAAXq4/HX2KYHeQvTkzJyVlr3xrnglh5urRJP89wCK4BGAYYCw/s1600/DSC00618.JPG" imageanchor="1"><img border="0" height="426" src="https://3.bp.blogspot.com/-0RnMyb-R-Q8/Xfbo93invxI/AAAAAAAAXq4/HX2KYHeQvTkzJyVlr3xrnglh5urRJP89wCK4BGAYYCw/s640/DSC00618.JPG" width="640" /></a><br />
<br />
<div style="text-align: left;">
Next to the original:</div>
<div style="text-align: left;">
<br /></div>
<a href="http://2.bp.blogspot.com/-bIu1bcei5PI/Xfbr_cKYZ5I/AAAAAAAAXss/K70PyDCFH04ecmcaNT7vD-6szFH5UVv8wCK4BGAYYCw/s1600/DSC00389.JPG" imageanchor="1"><img border="0" height="425" src="https://2.bp.blogspot.com/-bIu1bcei5PI/Xfbr_cKYZ5I/AAAAAAAAXss/K70PyDCFH04ecmcaNT7vD-6szFH5UVv8wCK4BGAYYCw/s640/DSC00389.JPG" width="640" /></a></div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com11tag:blogger.com,1999:blog-910685024071367839.post-77807134420272828182019-11-29T18:47:00.000-05:002020-04-21T18:58:14.294-04:00Building All The Robots<br />
<br />
<br />
Here's a photo-dump of some pictures from assembling the<a href="https://www.youtube.com/watch?v=G6fMV1UPzkg&"> herd of Mini Cheetahs.</a><br />
<br />
<div class="separator" style="clear: both;">
150 Stators:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-3Qrzjm8hcAM/XeFvJO3_ptI/AAAAAAAAXjw/z-Da0BXzg54oy-enJ-stecLiNP_wr_4UACLcBGAsYHQ/s1600/DSC00536.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-3Qrzjm8hcAM/XeFvJO3_ptI/AAAAAAAAXjw/z-Da0BXzg54oy-enJ-stecLiNP_wr_4UACLcBGAsYHQ/s640/DSC00536.jpg" width="640" /></a></div>
<br />
150 Front actuator housings with output bearing installed:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-F4UUHuEpfDI/XeFvJE18wZI/AAAAAAAAXj0/o7WY_MhENQULX46EBUJhK30sYb-kb9BvACLcBGAsYHQ/s1600/DSC00537.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-F4UUHuEpfDI/XeFvJE18wZI/AAAAAAAAXj0/o7WY_MhENQULX46EBUJhK30sYb-kb9BvACLcBGAsYHQ/s640/DSC00537.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
50 upper legs. The upper link was consolidated from 3 parts to 2 for the new robots:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Ga4bPuFN980/XeFvL3JWwOI/AAAAAAAAXkc/tLdXh3aDqfIzDWo7851urBabmvfFPAghgCLcBGAsYHQ/s1600/DSC00706.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-Ga4bPuFN980/XeFvL3JWwOI/AAAAAAAAXkc/tLdXh3aDqfIzDWo7851urBabmvfFPAghgCLcBGAsYHQ/s640/DSC00706.jpg" width="640" /></a></div>
<br />
For assembly I got these fancy Wera adjustable torque screwdrivers, so I (and people helping assemble) could repeatably torque all the screws:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-QTo7JAhGj-o/XeFvJHV-cFI/AAAAAAAAXj4/RFmf8VAWTFMud6Q3VjwnPFcgDd-5XtHzwCLcBGAsYHQ/s1600/DSC00539.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-QTo7JAhGj-o/XeFvJHV-cFI/AAAAAAAAXj4/RFmf8VAWTFMud6Q3VjwnPFcgDd-5XtHzwCLcBGAsYHQ/s640/DSC00539.jpg" width="640" /></a></div>
<br />
A handful of the 450 planet gears with needle bearings installed:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-kb3yZkUKl9w/XeFvJ1n35RI/AAAAAAAAXj8/GdM-albLfWQccZM-onzuro04ro6UY4HYwCLcBGAsYHQ/s1600/DSC00543.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-kb3yZkUKl9w/XeFvJ1n35RI/AAAAAAAAXj8/GdM-albLfWQccZM-onzuro04ro6UY4HYwCLcBGAsYHQ/s640/DSC00543.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
150 rings gears with OD's post-machined to size. Ready to be pressed into the housings:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-_z6srngFENA/XeFvKP2K4SI/AAAAAAAAXkA/CvSsu-WiTh4QEbLYj5lDHDUvKCgyLAYnACLcBGAsYHQ/s1600/DSC00545.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-_z6srngFENA/XeFvKP2K4SI/AAAAAAAAXkA/CvSsu-WiTh4QEbLYj5lDHDUvKCgyLAYnACLcBGAsYHQ/s640/DSC00545.jpg" width="640" /></a></div>
<br />
A sea of sun gears:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-qa-ORMXV_W7FW4Io7LVQGqJHUiLgRqqTE_VxlENELZ7rvGdYegd2H0PYOtJoAvJy_H3pozzcLS7dwhC7WLVdJi0RxWTq1144fGSqANxs8Dvm3stejHV8XhDegmd2O9HxFrNefqsBq4g/s1600/DSC00570.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-qa-ORMXV_W7FW4Io7LVQGqJHUiLgRqqTE_VxlENELZ7rvGdYegd2H0PYOtJoAvJy_H3pozzcLS7dwhC7WLVdJi0RxWTq1144fGSqANxs8Dvm3stejHV8XhDegmd2O9HxFrNefqsBq4g/s640/DSC00570.jpg" width="640" /></a></div>
<br />
Actuator with stator and gearbox installed:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-6YfZuwyRDss/XeGNwuzKrsI/AAAAAAAAXlg/so6LAulHqBI1UtHYfM1-n-SvS7l2nz17QCLcBGAsYHQ/s1600/DSC00542.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-6YfZuwyRDss/XeGNwuzKrsI/AAAAAAAAXlg/so6LAulHqBI1UtHYfM1-n-SvS7l2nz17QCLcBGAsYHQ/s640/DSC00542.jpg" width="640" /></a></div>
<br />
<br />
I made several minor design mistakes I had to fix. Some holes in the sheet metal were 1mm off, so I made this fixture for re-machining the holes. Small mistakes like this sunk a huge amount of time, because each on has to be fixed between 50 and 150 times. Fortunately everything was salvageable.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-2NdO4g_Xtfs/XeFvKl4bByI/AAAAAAAAXkI/z5gpXa0Y1NAlLS8TcHD1rkeHkUP-iXMAQCLcBGAsYHQ/s1600/DSC00574.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-2NdO4g_Xtfs/XeFvKl4bByI/AAAAAAAAXkI/z5gpXa0Y1NAlLS8TcHD1rkeHkUP-iXMAQCLcBGAsYHQ/s640/DSC00574.jpg" width="640" /></a></div>
<br />
Most of the actuators with stators and planetary gearboxes installed:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-u_9zZazLJNo/XeFvK_cGd0I/AAAAAAAAXkM/SllfvyvjjzI_iQfcMn-P66V6kRaqmkG2ACLcBGAsYHQ/s1600/DSC00582.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-u_9zZazLJNo/XeFvK_cGd0I/AAAAAAAAXkM/SllfvyvjjzI_iQfcMn-P66V6kRaqmkG2ACLcBGAsYHQ/s640/DSC00582.jpg" width="640" /></a></div>
<br />
Part of one robot body with computer, CAN interface, IMU, RC receiver, and power supply:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNbaZbCUIRWAxZMxJeTIKLXBiwgoTW3gx8Hl2PWUksIekA20FGvQyPnuo7wa_Y9M50tsSUjwkPzBVngoNl1l_xq2Z8DP4iiQiOf5yIrsb7EEHU_WoMu6MPeSjUzLuNlt-XCAf9w0dtZ9c/s1600/DSC00689.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNbaZbCUIRWAxZMxJeTIKLXBiwgoTW3gx8Hl2PWUksIekA20FGvQyPnuo7wa_Y9M50tsSUjwkPzBVngoNl1l_xq2Z8DP4iiQiOf5yIrsb7EEHU_WoMu6MPeSjUzLuNlt-XCAf9w0dtZ9c/s640/DSC00689.jpg" width="640" /></a></div>
<br />
The glorious actuator cabinet:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/--WnybaxKYFk/XeFvLIrjxDI/AAAAAAAAXkU/9qsQh9reWyQBqZoFZwATA8yrvEhRTH-BQCLcBGAsYHQ/s1600/DSC00702.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/--WnybaxKYFk/XeFvLIrjxDI/AAAAAAAAXkU/9qsQh9reWyQBqZoFZwATA8yrvEhRTH-BQCLcBGAsYHQ/s640/DSC00702.jpg" width="640" /></a></div>
<br />
<br />
Computers and CAN breakouts:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-TZm5ztTA6w0/XeFvLoNnLdI/AAAAAAAAXkY/UMewQiUWFXU-ehD_4VREIbI4P0CeD9nIgCLcBGAsYHQ/s1600/DSC00703.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-TZm5ztTA6w0/XeFvLoNnLdI/AAAAAAAAXkY/UMewQiUWFXU-ehD_4VREIbI4P0CeD9nIgCLcBGAsYHQ/s640/DSC00703.jpg" width="640" /></a></div>
<br />
Power supplies, body center-plates:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-mIdHr8t1PbE/XeFvL5YWJRI/AAAAAAAAXkg/OcuBsY4VxwQFkdrk-Ouz0JhahHp9e4f5wCLcBGAsYHQ/s1600/DSC00704.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-mIdHr8t1PbE/XeFvL5YWJRI/AAAAAAAAXkg/OcuBsY4VxwQFkdrk-Ouz0JhahHp9e4f5wCLcBGAsYHQ/s640/DSC00704.jpg" width="640" /></a></div>
<br />
Belts installed, ready for tensioners and outer half of the leg clamshell.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-F8l24I04OzA/XeGVkRG1BpI/AAAAAAAAXl0/N2ihqgq_SKkVR6S1S4PFCa9BLQuTwgQ-ACLcBGAsYHQ/s1600/DSC00824.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-F8l24I04OzA/XeGVkRG1BpI/AAAAAAAAXl0/N2ihqgq_SKkVR6S1S4PFCa9BLQuTwgQ-ACLcBGAsYHQ/s640/DSC00824.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both;">
A mostly assembled leg:</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-bnC9AZMJWHA/XeFvMJtV-aI/AAAAAAAAXkk/C8mI4xZ-o40mbv-MK35zeLL7baHdvKcRgCLcBGAsYHQ/s1600/DSC00728.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-bnC9AZMJWHA/XeFvMJtV-aI/AAAAAAAAXkk/C8mI4xZ-o40mbv-MK35zeLL7baHdvKcRgCLcBGAsYHQ/s640/DSC00728.jpg" width="640" /></a></div>
<br />
A nearly complete robot, waiting for the last few wire-management steps and final body assembly:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnq_W9FJawFl6bG2obQVrqBGdvrhRl8jfKWIOJyuWMAH37hiaxxYvXmV59IaPAF0WJRW3ldpS_FTqhmZ3xQN5fY56PYT71vpNE4k9-ZDACOhj0ej_O9kfJhCdKSq1G1Lvu8FM5w6D4Y9k/s1600/DSC00740.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnq_W9FJawFl6bG2obQVrqBGdvrhRl8jfKWIOJyuWMAH37hiaxxYvXmV59IaPAF0WJRW3ldpS_FTqhmZ3xQN5fY56PYT71vpNE4k9-ZDACOhj0ej_O9kfJhCdKSq1G1Lvu8FM5w6D4Y9k/s640/DSC00740.jpg" width="640" /></a></div>
<br />
One robot during electrical and software testing, before final assembly:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-lpG_hO8ucOQ/XeFvNfy-qII/AAAAAAAAXks/xzVuGhU3EgQPJBuP_FPtBce7P2iwI5JswCLcBGAsYHQ/s1600/DSC00813.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-lpG_hO8ucOQ/XeFvNfy-qII/AAAAAAAAXks/xzVuGhU3EgQPJBuP_FPtBce7P2iwI5JswCLcBGAsYHQ/s640/DSC00813.jpg" width="640" /></a></div>
<br />
Half a robot's worth of actuators:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-MRGtRD1Loxw/XeFvNwauqHI/AAAAAAAAXkw/X1TPEl6wP-kAXoX2qdIrxpewm92emYuigCLcBGAsYHQ/s1600/DSC00821.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-MRGtRD1Loxw/XeFvNwauqHI/AAAAAAAAXkw/X1TPEl6wP-kAXoX2qdIrxpewm92emYuigCLcBGAsYHQ/s640/DSC00821.jpg" width="640" /></a></div>
<br />
Final assembly step of attaching the legs to the body:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Lcs-5MIxYRE/XeFvOS5JKZI/AAAAAAAAXk0/ATbVZGIMcIIULkFKuPaLr516xVpi8L6bACLcBGAsYHQ/s1600/DSC00830.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-Lcs-5MIxYRE/XeFvOS5JKZI/AAAAAAAAXk0/ATbVZGIMcIIULkFKuPaLr516xVpi8L6bACLcBGAsYHQ/s640/DSC00830.jpg" width="640" /></a></div>
<br />
Robot with top panel removed:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-1TvZFgEFkCA/XeGUzr1XG-I/AAAAAAAAXls/4G1hkGXlVyA1ZAiZJPHNP2BMMPCv9lp8ACLcBGAsYHQ/s1600/DSC00754.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-1TvZFgEFkCA/XeGUzr1XG-I/AAAAAAAAXls/4G1hkGXlVyA1ZAiZJPHNP2BMMPCv9lp8ACLcBGAsYHQ/s640/DSC00754.jpg" width="640" /></a></div>
<br />
<br />
A pair of robots ready for final testing:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-VNG7K5tTakc/XeFvO2UVweI/AAAAAAAAXk4/Zfx8TzJSI6gQBRaoVNRwpDpSwP0ImrnvgCLcBGAsYHQ/s1600/DSC00833.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-VNG7K5tTakc/XeFvO2UVweI/AAAAAAAAXk4/Zfx8TzJSI6gQBRaoVNRwpDpSwP0ImrnvgCLcBGAsYHQ/s640/DSC00833.jpg" width="640" /></a></div>
<br />
Most of the new robots lined up on the lab treadmill:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-kyh0-44A1yQ/XeFvPbvsXtI/AAAAAAAAXk8/6vm3GIef_tcadiUffmLBqJUnSzcwLlvhQCLcBGAsYHQ/s1600/DSC00869.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="426" src="https://1.bp.blogspot.com/-kyh0-44A1yQ/XeFvPbvsXtI/AAAAAAAAXk8/6vm3GIef_tcadiUffmLBqJUnSzcwLlvhQCLcBGAsYHQ/s640/DSC00869.jpg" width="640" /></a></div>
<br />Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com31tag:blogger.com,1999:blog-910685024071367839.post-91282688937929794762019-11-07T10:00:00.002-05:002019-11-07T10:00:27.690-05:00So Many RobotsThe last few months have been very busy. <br />
<br />
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/G6fMV1UPzkg" width="560"></iframe><br />
<br />
<br /></div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com4tag:blogger.com,1999:blog-910685024071367839.post-57232146699128323382019-10-31T23:00:00.001-04:002019-12-15T20:36:30.063-05:00Motor Temperature Estimation Without a SensorI just finished building a bunch of<a href="https://build-its-inprogress.blogspot.com/search/label/HobbyKing%20Cheetah"> Mini Cheetah</a>s which the <a href="http://biomimetics.mit.edu/">lab</a> is loaning out to other research groups. Since we're giving these to people who for the most part aren't hardware oriented, these robots need to be even more robust than the original one.<br />
<br />
One piece of that is preventing the motors from burning out. During normal operation with a good locomotion controller, the motors barely even get above ambient (even <a href="https://www.youtube.com/watch?v=6JlVol3eyNI&feature=youtu.be">going 3.7 m/s</a>, the motors weren't warm to the touch afterwards). However, it's really easy to write a controller that rapidly heats up the motors without actually <i>doing</i> anything - railing torque commands back-and-forth due to instability, joints mechanically stuck against something, machine-learning algorithm flailing around wildly, etc. We haven't burned out any motors on the original Mini Cheetah yet, but I think our lab members all have a pretty good sense of what's good/bad for the robot, and know to shut it down quickly if something bad is happening. But when the robot is in the hands of a bunch of software and machine learning engineers..... So to protect the robots, I'm adding in winding temperature sensing and over-temperature protection, to (hopefully) make it impossible to burn out the motors.<br />
<br />
Now, the smart way to do this would have probably been to just add a thermistor in the windings, and call it done. Obviously, I didn't do that, so here's my observer-based workaround.<br />
<br />
<u>Overview</u><br />
<u><br /></u>
The temperature estimate uses an observer to combine two sources of information: A thermal model of the motor, and a temperature "measurement" based on the resistance temperature coefficient of the copper in the windings. The resistance of the motor is estimated based on applied voltage, measured current, measured speed and known motor parameters, and compared against the resistance at a known temperature. Sounds pretty simple, right?<br />
<br />
Of course not. If it was, it wouldn't be worth a blog post. It's not terribly complicated either, but it took a bunch of little hacks to make it actually work.<br />
<br />
<u>Thermal Modeling:</u><br />
<br />
I'm using a 1st order thermal model with just thermal mass \(C_{th}\) and thermal resistance to ambient \(R_{th}\). With temperature rise over ambient \(\Delta T\), thermal power going in \(\dot{Q_{in}}\), and thermal power going out \(\dot{Q_{out}}R_{th} = \Delta T\), the dynamics are<br />
$$<br />
\Delta \dot{T} = \frac{\dot{Q}_{in} - \dot{Q}_{out}}{C_{th}}<br />
$$<br />
To get \(\dot{Q}_{in}\), I just use \(i^{2} R\), but accounting for the variation from nominal resistance\(R_{0}\) due to \(\Delta T\), i.e. it's temperature coefficient of resistance \(\alpha\) (.00393 for copper):<br />
$$<br />
\dot{Q}_{in} = (1 + \alpha\Delta T)R_{0}i^{2}<br />
$$<br />
In (slightly simplified) code, the model part of the observer is updated as follows, by Euler-integrating the thermal model.<br />
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #202020; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #6ab825; font-weight: bold;">delta_t</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">observer.temperature</span> <span style="color: #d0d0d0;">-</span> <span style="color: #d0d0d0;">T_AMBIENT;</span>
<span style="color: #d0d0d0;">observer.qd_in</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">R_NOMINAL**(</span><span style="color: #3677a9;">1.0f</span> <span style="color: #d0d0d0;">+</span> <span style="color: #3677a9;">.00393f</span><span style="color: #d0d0d0;">*</span><span style="color: #6ab825; font-weight: bold;">delta_t</span><span style="color: #d0d0d0;">)*controller.i*controller.i;</span>
<span style="color: #d0d0d0;">observer.qd_out</span> <span style="color: #d0d0d0;">=</span> <span style="color: #6ab825; font-weight: bold;">delta_t</span><span style="color: #d0d0d0;">*R_TH;</span>
<span style="color: #d0d0d0;">observer.temperature</span> <span style="color: #d0d0d0;">+=</span> <span style="color: #d0d0d0;">DT*(observer.qd_in-observer.qd_out)/C_TH;</span>
</pre>
</div>
<br />
An important implementation detail, in the actual firmware I'm doing the last line of math as doubles, rather than floats like everything else. My sample period DT is very small (since my loops run at 20-40 kHz depending on the motor I'm driving), and \( \frac{\dot{Q_{in}} - \dot{Q_{out}}}{C_{th}}\) is also pretty small since the thermal dynamics are very slow. As a result, the change in temperature over one loop-cycle gets rounded down to zero when you use floats. Since STM32F4's are crap-tastic at double math, this single line takes a substantial fraction of my 25 microsecond loop period when I'm running at 40 kHz. I'm sure there's a way to do this avoiding doubles, but I have just enough computational headroom that I don't care.<br />
<br />
<u>Measuring Temperature and Resistance</u><br />
<u><br /></u>
Assuming we can measure the resistance of the motor perfectly and we know nominal resistance \(R_{0}\) at some temperature \(T_{0}\), and the temperature coefficient \(\alpha\) , we can calculate temperature:<br />
<br />
$$<br />
T = T_{0} + \left(\frac{R}{R_{0}} -1 \right)\frac{1}{\alpha}<br />
$$<br />
<br />
To measure \(R\), use one of the synchronous motor voltage equations. I use the Q-axis one, because for my surface PM robot motors there's usually not much current on the D axis.<br />
<br />
$$<br />
V_{q} = Ri_{q} + L_{q}\frac{di_{q}}{dt} + \omega L_{d}i_{d} + \omega\lambda<br />
$$<br />
<br />
We'll assume \( \frac{di_{q}}{dt} \) is zero, since the temperature observer is going to be very low-bandwidth compared to the current control dynamics. Conveniently if you use the Q-axis voltage equation rather than the D-axis one, the \( \omega L_{d}i_{d} \) term is usually zero, since \(i_{d} \) is only non-zero at high-speeds during field weakening, and in that region you can't get enough q-current into the motor to burn it out anyways.<br />
<br />
Since we know \(V_{q}\), \(i_{q}\), \(i_{d}\), \(\omega\), \(l_{d}\), and \(\lambda\), we can just solve the voltage equation for \(R\). In reality I had to add a trick to get this to work, but I'll get into that later.<br />
<br />
<u>Implementing the Observer</u><br />
<br />
The basic steps in the observer are:<br />
<ul>
<li>Integrate forward the dynamics of the quantity you are estimating</li>
<li>Take a sensor reading and calculate the error between the estimate and the sensor reading</li>
<li>Use a proportional controller to drive the estimate towards the sensor reading</li>
</ul>
In code the whole observer looks like this:<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #202020; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #999999; font-style: italic;">// Integrate the thermal model //</span>
<span style="color: #6ab825; font-weight: bold;">delta_t</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">observer.temperature</span> <span style="color: #d0d0d0;">-</span> <span style="color: #d0d0d0;">T_AMBIENT;</span>
<span style="color: #d0d0d0;">observer.qd_in</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">R_NOMINAL**(</span><span style="color: #3677a9;">1.0f</span> <span style="color: #d0d0d0;">+</span> <span style="color: #3677a9;">.00393f</span><span style="color: #d0d0d0;">*</span><span style="color: #6ab825; font-weight: bold;">delta_t</span><span style="color: #d0d0d0;">)*controller.i*controller.i;</span>
<span style="color: #d0d0d0;">observer.qd_out</span> <span style="color: #d0d0d0;">=</span> <span style="color: #6ab825; font-weight: bold;">delta_t</span><span style="color: #d0d0d0;">*R_TH;</span>
<span style="color: #d0d0d0;">observer.temperature</span> <span style="color: #d0d0d0;">+=</span> <span style="color: #d0d0d0;">DT*(observer.qd_in-observer.qd_out)/C_TH;</span>
<span style="color: #999999; font-style: italic;">// Estimate Resistance //</span>
<span style="color: #d0d0d0;">observer.resistance</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">(controller.v_q</span> <span style="color: #d0d0d0;">- controller.omega*(L_D*controller.i_d</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">WB))/(controller.i_q);</span>
<span style="color: #999999; font-style: italic;">// Estimate Temperature from temp-co //</span>
<span style="color: #d0d0d0;">observer.t_measured</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">((T_AMBIENT</span> <span style="color: #d0d0d0;">+</span> <span style="color: #d0d0d0;">((observer.resistance/R_NOMINAL)</span> <span style="color: #d0d0d0;">-</span> <span style="color: #3677a9;">1.0f</span><span style="color: #d0d0d0;">)*</span><span style="color: #3677a9;">254.5f</span><span style="color: #d0d0d0;">));</span>
<span style="color: #999999; font-style: italic;">// Update Observer with measured temperature //</span>
<span style="color: #d0d0d0;">e</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">(</span><span style="color: #6ab825; font-weight: bold;">float</span><span style="color: #d0d0d0;">)observer.temperature</span> <span style="color: #d0d0d0;">-</span> <span style="color: #d0d0d0;">observer.temp_measured;</span>
<span style="color: #d0d0d0;">observer.temperature</span> <span style="color: #d0d0d0;">-=</span> <span style="color: #3677a9;">.0001f</span><span style="color: #d0d0d0;">*e;</span>
</pre>
</div>
<br />
Naively implemented, the above didn't really work - the resistance measurements are terrible , so either you have a very low observer gain and basically run open-loop with just the thermal model, or the temperature estimate varies wildly depending on the speed and torque the motor is operating at. It took a couple more additions to get it to work reliably.<br />
<br />
<u>Voltage Linearization</u><br />
<br />
The first problem I notice was that the measured resistance changed dramatically as the current varied. At low currents, the estimated resistance was much higher. This problem was caused by nonlinearity in the voltage output of the motor drive due to deadtime. I tried a few methods for compensating the dead time, but I got the best result by scaling my d and q axis voltages based on modulation depth. I measured the nonlinearity by logging measured current vs commanded modulation depth over a range of currents, putting all the current on the d-axis so the rotor didn't move.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Xn7MdaFy7b0/XbuICe6YPyI/AAAAAAAAXeA/_tUYNOPKLPshDuzeYioVILpcX8sUYrCLACLcBGAsYHQ/s1600/current_vs_voltage.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="382" data-original-width="523" src="https://1.bp.blogspot.com/-Xn7MdaFy7b0/XbuICe6YPyI/AAAAAAAAXeA/_tUYNOPKLPshDuzeYioVILpcX8sUYrCLACLcBGAsYHQ/s1600/current_vs_voltage.jpg" /></a></div>
<br />
I generated a lookup table to scale the commanded voltages so that current vs commanded voltage is linear. Around zero commanded voltage, I actually only get about .5 output volts per commanded volt, pre-linearization:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-wD63lsgieeI/XbuL1ca10cI/AAAAAAAAXeM/e8M75y5lFFo5wUtIa6YiqzaxxDyyjXtZgCLcBGAsYHQ/s1600/voltage_linearization.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="420" data-original-width="560" src="https://1.bp.blogspot.com/-wD63lsgieeI/XbuL1ca10cI/AAAAAAAAXeM/e8M75y5lFFo5wUtIa6YiqzaxxDyyjXtZgCLcBGAsYHQ/s1600/voltage_linearization.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<u>State-dependent Gain Scaling</u></div>
<div class="separator" style="clear: both; text-align: left;">
i.e. lazy person's Kalman filter substitute.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Even with the voltage linearization, there are some operating conditions which make it hard to measure the resistance accurately.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>At very low currents the measurements are bad. You have a small voltage divided by a small current, so the result is super sensitive to noise or bias in either.</li>
</ul>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>At high speeds the measurements are also bad since the flux linkage term in the voltage equation dominates. Slight error in the flux linkage constant causes errors, and also non-sinusoidal flux linkage and inductances mean there's lots of ripple in the d and q voltages and currents at high speed.</li>
</ul>
<div>
The least sketchy way to incorporate these effects might be to figure out how the covariance of the temperature "measurement" depends on the operating state, and use a Kalman filter to optimize the observer gain based on the changing covariance.</div>
<div>
<br /></div>
<div>
My sketchy alternative was to hand-tune a "trust" function which behaves similarly to inverse covariance, to make the gain really small in states where I don't trust the temperature measurement. Basically, if the current is below some threshold, make the gain really small, and/or if the speed is above some threshold, make the gain really small. Around each threshold I have a linear ramp, to smooth things out a bit. In code, my "trust" function works like this:<br />
<br /></div>
<div>
<div style="background: #202020; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #999999; font-style: italic;">// Calculate "trust" based on state //</span>
<span style="color: #d0d0d0;">observer.trust</span> <span style="color: #d0d0d0;">=</span> <span style="color: #d0d0d0;">(</span><span style="color: #3677a9;">1.0f</span> <span style="color: #d0d0d0;">-</span> <span style="color: #3677a9;">.004f</span><span style="color: #d0d0d0;">*fminf(abs(controller.dtheta_elec),</span> <span style="color: #3677a9;">250.0f</span><span style="color: #d0d0d0;">))</span> <span style="color: #d0d0d0;">*</span> <span style="color: #d0d0d0;">(</span><span style="color: #3677a9;">.01f</span><span style="color: #d0d0d0;">*(fminf(controller.current^2,</span> <span style="color: #3677a9;">100.0f</span><span style="color: #d0d0d0;">)));</span>
<span style="color: #999999; font-style: italic;">// Scale observer gain by "trust" //</span>
<span style="color: #999999; font-style: italic;">// .0001 is the default observer gain //</span>
<span style="color: #d0d0d0;">observer.temperature</span> <span style="color: #d0d0d0;">-=</span> <span style="color: #d0d0d0;">observer.trust*</span><span style="color: #3677a9;">.0001f</span><span style="color: #d0d0d0;">*e;</span>
</pre>
</div>
</div>
<br />
When the resistance estimates are the best (current greater than 10 amps, speed near zero), "trust" is equal to 1, so the observer gain doesn't change, and the observer gain goes to zero (i.e. open-loop) at really bad measurement points. I'm sure this would horrify every controls professor I've had, but it works pretty well:<br />
<br />
Here's a video of testing with one of the mini cheetah motors, with a thermocouple glued into the windings. I'm railing the current command between -40A and 40A at 5 hz, so the motor only spends a very brief period of time at low speed, and most of its time at high speed with low current. In this test I initialize the motor temperature at 25 degrees, even though the motor is still at 60 degrees from a previous experiment. The observer takes about 16 seconds to converge to the actual temperature, but from there on it tracks to within ~5 degrees. Once the temperature hits 120 degrees, the current limit is throttled back to 14 amps in order to keep the temperature below 120 C:<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/mk1XINcKHq8" width="560"></iframe></div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com3tag:blogger.com,1999:blog-910685024071367839.post-68632112160917534142019-06-01T16:42:00.001-04:002019-11-06T17:56:45.518-05:00Mini Cheetah at ICRAI was just at <a href="https://www.icra2019.org/">ICRA</a> 2019 with the <a href="https://build-its-inprogress.blogspot.com/search/label/HobbyKing%20Cheetah">robot</a>, to present a <a href="https://ras.papercept.net/conferences/conferences/ICRA19/program/ICRA19_ContentListWeb_2.html#tuct1-14_02">paper</a> and demo the robot:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><a href="https://1.bp.blogspot.com/-PEeO_kEPbdc/XPLfHrhq2ZI/AAAAAAAAXGM/sCG2gQ2kQE8KdgDeWhqplTny1WSJLmvrgCLcBGAs/s1600/quadrupeds_icra.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1108" data-original-width="1478" height="478" src="https://1.bp.blogspot.com/-PEeO_kEPbdc/XPLfHrhq2ZI/AAAAAAAAXGM/sCG2gQ2kQE8KdgDeWhqplTny1WSJLmvrgCLcBGAs/s640/quadrupeds_icra.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 12.8px;">Not my picture. Pulled from google images.</td></tr>
</tbody></table>
<br />
Here are a few other peoples' videos from the conference and the <a href="https://icra2019wslocomotion.wordpress.com/">legged robot workshop</a>. Despite being half the size of all the other robots, Mini Cheetah was running circles around them.<br />
<br />
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/zrzCYgNnHfI" width="560"></iframe></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/nyV_MIy2lu8" width="560"></iframe></div>
<div style="text-align: center;">
<br /></div>
At one point, we had Mini Cheetah,<a href="https://www.bostondynamics.com/spot-mini"> Spot Mini</a>, <a href="https://www.anybotics.com/anymal-legged-robot/">ANYmal</a>, <a href="http://www.unitree.cc/">Laikago</a>, <a href="https://www.ghostrobotics.io/">Vision 60</a>, and <a href="https://people.eecs.berkeley.edu/~ronf/Biomimetics.html">Salto </a>all up and running:<br />
<div style="text-align: center;">
<br /></div>
<br />
<div style="text-align: center;">
<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/NsvH4ZVp4tE" width="560"></iframe></div>
<div>
<br /></div>
Ben Katzhttp://www.blogger.com/profile/15816221191617788028noreply@blogger.com22