{"id":43,"date":"2012-03-11T08:46:00","date_gmt":"2012-03-11T08:46:00","guid":{"rendered":"https:\/\/blog.hslracing.com\/3dprinters\/2012\/03\/11\/stepper-testing\/"},"modified":"2012-03-11T08:46:00","modified_gmt":"2012-03-11T08:46:00","slug":"stepper-testing","status":"publish","type":"post","link":"https:\/\/blog.hslracing.com\/3dprinters\/2012\/03\/stepper-testing.html","title":{"rendered":"Stepper testing"},"content":{"rendered":"<p>First things first, I need to make a cable that can connect from a stepper motor to the connectors on my <a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">sanguinololu<\/a>.<\/p>\n<p>The stepper motors use <a href=\"http:\/\/uk.rs-online.com\/web\/p\/products\/3531349\/\">JST 2mm pitch 6 way connectors<\/a>, with a similar 4 pin connector for the wires that are actually connected.<\/p>\n<p>The connectors I have installed on the <a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">sanguinololu<\/a> are <a href=\"http:\/\/www.rapidonline.com\/SearchResults.aspx?kw=22-1015\">JYK .1&#8243; (2.54mm) pitch 90 degree headers<\/a>.<\/p>\n<p>I have plenty of the equivalent JYK female connectors and pins to go in them.<\/p>\n<p>I intend to purchase a bunch of pins for the JST connectors, so I can simply reuse the connector, but use longer wires &nbsp;&#8211; a pack of suitable pins from <a href=\"http:\/\/uk.rs-online.com\/web\/p\/products\/3531276\/\">RS<\/a>&nbsp;is \u00a31.60 for a pack of 50, which should be more than enough at 6 per stepper.<\/p>\n<p>Many years ago when I was into rewiring my beach buggy, I bought a pair of MSD ratchet crimpers that have interchangeable jaws.<\/p>\n<div style=\"clear: both;text-align: center\"><a href=\"http:\/\/3.bp.blogspot.com\/-UcMo3lbnSXQ\/T1ofFQBLoYI\/AAAAAAAAAPA\/JRAIW_7xaJ4\/s1600\/MSD3505.jpg\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/-UcMo3lbnSXQ\/T1ofFQBLoYI\/AAAAAAAAAPA\/JRAIW_7xaJ4\/s1600\/MSD3505.jpg\" \/><\/a><\/div>\n<div style=\"clear: both;text-align: left\">I also have various additional sets of jaws, the best tool suited to crimping the pins for the JST connectors according to <a href=\"http:\/\/www.rapidonline.com\/\">Rapid<\/a>&nbsp;(who I bought them from) is this <a href=\"http:\/\/www.rapidonline.com\/SearchResults.aspx?kw=85-0262\">tool<\/a>&nbsp;which as far as I can tell has the same jaws as these, which I just happen to have.<\/div>\n<div style=\"clear: both;text-align: center\"><a href=\"http:\/\/4.bp.blogspot.com\/-E67hKBG1ZNQ\/T1ofE_yW37I\/AAAAAAAAAO8\/Lf0daGfA7s0\/s1600\/MSD2666.jpg\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/4.bp.blogspot.com\/-E67hKBG1ZNQ\/T1ofE_yW37I\/AAAAAAAAAO8\/Lf0daGfA7s0\/s1600\/MSD2666.jpg\" \/><\/a><\/div>\n<div style=\"clear: both;text-align: left\">Some cutting, wire stripping and crimping later and we have a test cable:<\/div>\n<div style=\"clear: both;text-align: center\"><a href=\"http:\/\/1.bp.blogspot.com\/-Z54YQXN1S90\/T1ol_FlUHVI\/AAAAAAAAAPM\/w13Rq7QKwuo\/s1600\/cable.jpg\" style=\"margin-left: 1em;margin-right: 1em\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"165\" src=\"http:\/\/1.bp.blogspot.com\/-Z54YQXN1S90\/T1ol_FlUHVI\/AAAAAAAAAPM\/w13Rq7QKwuo\/s320\/cable.jpg\" width=\"320\" \/><\/a><\/div>\n<div style=\"clear: both;text-align: left\">The actual wire I intend to use is the same thickness as that on the test cable, it is 6 core alarm flex from <a href=\"http:\/\/www.wickes.co.uk\/invt\/714504\">Wickes<\/a>&nbsp;at \u00a39.99 for 50m.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">I quickly mocked up the test rig as described on the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">sanguinololu<\/a>&nbsp;page of the reprap wiki, power is from a 19v laptop brick for the motor and a LM7805 voltage regulator providing the 5v feed (that&#8217;s the relocated PIC18F4550 chip in the background).<\/div>\n<div style=\"clear: both;text-align: center\"><a href=\"http:\/\/2.bp.blogspot.com\/-QZUvKxEFMlo\/T1uUTS1PULI\/AAAAAAAAAPU\/cU05vY8PHGE\/s1600\/pololu.jpg\" style=\"margin-left: 1em;margin-right: 1em\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"211\" src=\"http:\/\/2.bp.blogspot.com\/-QZUvKxEFMlo\/T1uUTS1PULI\/AAAAAAAAAPU\/cU05vY8PHGE\/s320\/pololu.jpg\" width=\"320\" \/><\/a><\/div>\n<div style=\"clear: both;text-align: left\">The sharp eyed among you will notice that the order of the wires on the test cable have changed, this is because I was reading 1A 2A on the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">sanguinololu<\/a>&nbsp;board as one coil&nbsp;based on A+ and A for the coil on the motor details, rather than 1A 1B as a coil &#8211; wiring is much neater, all straight through from connector to connector.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">I make my own breadboard jumper wires by cutting up sections of solid core CAT5 network cable, costs next to nothing and I can have as many as I like of whatever length I want, a 1m cable makes hundreds.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Double checked the coil windings on the motor with a multimeter set for resistance.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Powered up the circuit and the motor just sits there and vibrates, shaft is not exactly locked in place either.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Try turning the trim pot and the noise level decreases and the shaft feels locked in place (not very scientific I know) although the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Stepstick\">stepstick<\/a>&nbsp;did become quite warm on the heatsink.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">The&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">sanguinololu<\/a>&nbsp;wiki page implies that I should see 0.500A across the coil windings, I see nothing notable, and my multimeter autoranges and still picked up nothing.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Plugged the <a href=\"http:\/\/reprap.org\/wiki\/Stepstick\">stepstick<\/a>&nbsp;back into the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">sanguinololu<\/a>&nbsp;board and connect via <a href=\"http:\/\/reprap.org\/wiki\/Pronterface\">Printrun<\/a>, with a motor attached, I try pressing the X+1, X+10 and X+100 buttons &#8211; nothing.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">I also tried connecting up my microSD card and reading from that &#8211; nothing.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Maybe it&#8217;s the <a href=\"http:\/\/reprap.org\/wiki\/Marlin\">marlin<\/a> firmware? reload <a href=\"http:\/\/reprap.org\/wiki\/Sprinter\">sprinter<\/a> and try again &#8211; well I can see the microSD card again, so that&#8217;s a good start, the X movement buttons also cause the motor to turn, albeit with loads of vibration and the shaft is no longer locked when still again.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Looks like marlin still thinks it is on the wrong board type, loads more digging around the configuration required here then.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">I have a search around the web and eventually find this post by <a href=\"http:\/\/forums.reprap.org\/read.php?158,117616,117831#msg-117831\">nophead<\/a>, which details how to set the voltage via the vref connection (that just happens to be present on the trim pot wiper as well).<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Try again with the X buttons, still not happy with the movement, still seems to be skipping and is not locked when still.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Neither the motor nor the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Stepstick\">stepstick<\/a>&nbsp;are even warm to the touch, but suddenly the motor stops responding.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">I have since checked everything I can on the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Stepstick\">stepstick<\/a>, continuity, resistance of every component and pin voltages when live, the only thing different on this board to any of the others is that the others all show the 19V from the power brick on all motor pins, whilst this one shows 10V and 0.25V.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Now from what I have read about these drivers, they should current limit to a maximum of 1A regardless of where the trim pot is set (adjusting merely lowers this figure), and I can&#8217;t believe I have damaged the motor &#8211; all resistances show the same as another stepper.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Currently I am at a loss as to what happened, I have rechecked all the boards for potential shorts and can find none.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">On the plus side, I have been reading up on <a href=\"http:\/\/en.wikipedia.org\/wiki\/I%C2%B2C\">I2C<\/a> bus at <a href=\"http:\/\/tronixstuff.wordpress.com\/2010\/10\/20\/tutorial-arduino-and-the-i2c-bus\/\">tronixstuff<\/a>&nbsp;and found that the user&nbsp;<a href=\"http:\/\/forums.reprap.org\/read.php?158,111155,117530#msg-117530\">Malx<\/a> has a fork of the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Marlin\">marlin<\/a>&nbsp;firmware on <a href=\"https:\/\/github.com\/malx122\/Marlin\">github<\/a> that uses the <a href=\"http:\/\/hmario.home.xs4all.nl\/arduino\/LiquidCrystal_I2C\/\">LiquidCrystal_I2C<\/a> Library.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">Now this is a much more interesting way of attaching an LCD &#8211; 2 pins requires that are already exposed &nbsp;on the&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">sanguinololu<\/a>&nbsp;board.<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>First things first, I need to make a cable that can connect from a stepper motor to the connectors on my sanguinololu. The stepper motors use JST 2mm pitch 6 way connectors, with a similar 4 pin connector for the wires that are actually connected. The connectors I have installed on the sanguinololu are JYK&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":0,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}