Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Sven_r

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Sven_r

  1. You might check the power supply, if it cannot deliver enough current it will also cause the stepper motor to stall. The Arduino might survive because the onboard voltage converter and/or capacitor(s).
  2. First some theory: The speed of the motor needs to change over time; this can be done with a regular dc motor or with a stepper motor. The regular dc motor requires very precise tuning or a feedback loop with an encoder. To simplify things I opted for the stepper motor (with reduction) these motors will turn against any required speed. To change the speed over time the time between each step the motor should be different, but since the resolution of microcontroller timers is limited the time between two steps will not always differ if required. And calculating the next step tick (or timer interrupt) requires cpu power which is rather limited if you opt for an Arduino based system. To overcome this one can calculate the number of steps for each time; For each period of time (lets say each second) one needs to take the required angle of the tracker platform and calculate the number of rotations to reach that angle. The number of rotations translate into number of steps using both the number of steps of the stepper and any reduction that would be in place. An example with fictive numbers to keep things simple: 0sec:0steps, after 3 seconds 10 steps (taken), after 6 sec a total of 22 steps (taken), 9 sec 36 steps, ... This means that the speed will differ for each period of time: 0->3sec: 10steps/sec, 3->6sec: 12steps/sec, 6->9sec 14steps/sec. To minimize the errors it's better to calculate the total number of steps for each period of time (this number always increases) this way rounding errors are taken into account because the error will not increase for each entry in the table. These pre-calculated values can be loaded into a table that can be stored in flash memory. It's a long list of the number of steps for each period in time. The microcontroller reads the first entry in the table calculates the required step frequency and starts the movement for the number of steps listed in the table. When the movement is ended the next entry in the table is taken, the number of taken steps is subtracted and with this results the next step frequency can be calculated. A good thing to do is to calculated the passed time since for the given movement, this again should lower the error. Diving deeper: Typically one should use an interrupt based timer to get the best accuracy: Everyone working with an Arduino and timer interrupts knows that calculating the best value for the OCR register involves a loop and a table of the prescaler values to get the best match for that OCR register. Since you microcontroller will not change this can also be done "offline" so the table can include a list of OCR values and the number of steps for each period. I hope this explains the theory used. I did some additional calculations on the maximum error; using full step mode (highest accuracy) and a reduction on the stepper should limit the error -0° 0' 0,02" in the configuration use by Chriske with a straight treaded rod with an new speed every 30 seconds. Without the correction the error will be -0° 0' 45,86". How long you're able to track depends on how many table entries can be stored in the flash of the microcontroller.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.