{"id":182,"date":"2010-03-20T16:16:50","date_gmt":"2010-03-20T20:16:50","guid":{"rendered":"http:\/\/ammonsengineering.com\/blog\/2010\/03\/step-measurements\/"},"modified":"2010-04-21T15:57:29","modified_gmt":"2010-04-21T19:57:29","slug":"step-measurements","status":"publish","type":"post","link":"https:\/\/ammonsengineering.com\/blog\/2010\/03\/step-measurements\/","title":{"rendered":"Step measurements"},"content":{"rendered":"<p>I propped up the cart so it wouldn&#8217;t move and ran it at a variety of steady state PWM rates.\u00a0 I collected the data and plotted the average current and speed versus PWM rate.\u00a0 I plotted clockwise motion in white and counterclockwise motion in red.<\/p>\n<div id=\"attachment_181\" style=\"width: 525px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Speed-Graph.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-181\" class=\"size-full wp-image-181 \" title=\"Speed versus PWM cycle\" src=\"http:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Speed-Graph.png\" alt=\"Speed versus PWM cycle\" width=\"515\" height=\"247\" srcset=\"https:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Speed-Graph.png 859w, https:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Speed-Graph-150x71.png 150w, https:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Speed-Graph-300x143.png 300w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/a><p id=\"caption-attachment-181\" class=\"wp-caption-text\">Speed versus PWM cycle<\/p><\/div>\n<p>The speed appears to be very linear versus the PWM cycle.\u00a0 At low PWM values under 50, the motor does not move.\u00a0 At 50, it jumps a little bit then is very linear from that point on.\u00a0 For a given PWM cycle, the CCW speed is about 2% larger than the CW speed.\u00a0 This explains the slight drift to the left when cycling the PWM sinusoidally.<\/p>\n<div id=\"attachment_180\" style=\"width: 525px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Current-Graph.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-180\" class=\"size-full wp-image-180 \" title=\"Current versus PWM cycle\" src=\"http:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Current-Graph.png\" alt=\"Current versus PWM cycle\" width=\"515\" height=\"247\" srcset=\"https:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Current-Graph.png 859w, https:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Current-Graph-150x71.png 150w, https:\/\/ammonsengineering.com\/blog\/wp-content\/uploads\/2010\/03\/Step-Current-Graph-300x143.png 300w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/a><p id=\"caption-attachment-180\" class=\"wp-caption-text\">Current versus PWM cycle<\/p><\/div>\n<p>The current ramps up somewhat linearly while the motor is not turning.\u00a0 Once the motor starts turning, the current drops a little bit then increases very slowly.\u00a0 This indicates the motor is overcoming friction and other forces to maintain a steady speed.\u00a0 The interesting thing is that the CCW current\u00a0is significantly larger than the CW current, by about 20%.\u00a0 This explains the rapid drift to the right when cycling the current sinusoidally.<\/p>\n<p>This causes problems when trying to control the cart using PID.\u00a0 If I try to control the current, I need to somehow balance the left and right directions of travel.\u00a0 Perhaps it could be accounted for by the controlling program, which would just boost the current in one direction.\u00a0 I would also have to figure out the relationship while the cart is moving so that speed and acceleration are accounted for.<\/p>\n<p>Another option would be controlling the PWM cycle directly.\u00a0 The speed is almost perfectly linear to the PWM value.\u00a0 Adding a factor of 2% to correct for direction would be easy.\u00a0 The cart is so light relative to the amount of torque in the motor that it can accelerate almost instantly to the steady state speed that goes with the PWM.\u00a0 I could limit the rate of change of the PWM cycle to prevent acceleration values that exceed the safe values.<\/p>\n<p>I think I need to do further tests to figure this all out.\u00a0 This was a good start, though.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I propped up the cart so it wouldn&#8217;t move and ran it at a variety of steady state PWM rates.\u00a0 I collected the data and plotted the average current and speed versus PWM rate.\u00a0 I plotted clockwise motion in white and counterclockwise motion in red. The speed appears to be very linear versus the PWM [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":6,"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":184,"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions\/184"}],"wp:attachment":[{"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ammonsengineering.com\/blog\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}