12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ultimate speed, the MD25 has a register to provide this. It works by using a value into theacceleration register and incrementing the power by that value. Changing between thecurrent speed of the motors and the new speed (from speed 1 and 2 registers). So if themotors were travelling at full speed in the forward direction (255) and were instructed tomove at full speed in rever<strong>se</strong> (0), there would be 255 steps with an acceleration registervalue of 1, but 128 for a value of 2. The default acceleration value is 5, meaning the speed ischanged from full forward to full rever<strong>se</strong> in 1.25 <strong>se</strong>conds. The register will accept values of 1up to 10 which equates to a period of only 0.65 <strong>se</strong>conds to travel from full speed in onedirection to full speed in the opposite direction.So to calculate the time (in <strong>se</strong>conds) for the acceleration to complete :if new speed > current speedsteps = (new speed - current speed) / acceleration registerif new speed < current speedsteps = (current speed - new speed) / acceleration registertime = steps * 25msFor example :AccelerationregisterTime/step Current speed New speed Steps Acceleration time1 25ms 0 255 255 6.375s2 25ms 127 255 64 1.6s3 25ms 80 0 27 0.675s5 (default) 25ms 0 255 51 1.275s10 25ms 255 0 26 0.65sBart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 77

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!