Hello guys , before i start to dig deeper HOW to make it, i want to ask if its possible to make with arduino.
i have arduino uno ,digital encoder and stepper motor and i want all from this to when i turn encoder, stepper moves exactly steps respectively against on what degree is encoder.
example:
so if it reads encoder postion
0 degree >stepper on position x
90 degree >stepper on position x+30
180 degree >stepper on position x+60
270 degree > stepper on position x+30
360/0 degree > stepper back on position x
but also when i turn its goes constantly linear to that position. example: if i turn encoder by 3 degree position is x+1, by 6 degree position is x+2 and so every degree x+0.3333
as far as i understand what i need and dont know if its possible:
i connected encoder but it reads how much turns i turn, but i need only full 1 turn(360degree) so some kind of reset in code on encoder readings on 360degree position (or thats doesnot matteR?)
when it hits 180 degree(or any other degree where i ned to change direction) i starts to move steps backwards
make it somehow smooth and linear . so if i have linear change from 30 to 60 degree so i need only change these two values not each degree.
its not so simple like in example ofc ,i have readings by every degree. i got old paper folding machine and wheel that pushes the levers have huge runout and i want to remove it and put steppers motors with acme threads to do that manual wheel and lever job. and dont suggest variant to repair wheel, because there is different material papers and there need to regulate levers accordingly to each paper every time. so i want do it on computer and save some time and exclude some human error from lever adjustment.
p.s. im ready to pay for code if this is possible :
If your encoder puts out 600 pulses per revolution, then 90° = 150 pulses, 180° = 300, 270° = 450, 360° = 0. For a 200 step per revolution motor, each step = 1.8°, so you can only get even degrees every 5th step, 9°, 18°, 27°, etc. You can't stop at, say, 30° because 16 steps = 28.8° and 17 steps = 30.6°.
Robin2:
This is the first mention of a damaged wheel.
in first post i mention runout on wheel but dont focus on that, more i like to know if arduino can handle that code.
JCA34F:
If your encoder puts out 600 pulses per revolution, then 90° = 150 pulses, 180° = 300, 270° = 450, 360° = 0. For a 200 step per revolution motor, each step = 1.8°, so you can only get even degrees every 5th step, 9°, 18°, 27°, etc. You can't stop at, say, 30° because 16 steps = 28.8° and 17 steps = 30.6°.
probably there will be much more steps because i will use acme or ballscrew with maybe 5mm lead, so if i need 5cm travel distance , stepper must go 10 turns.
and i think its not problem to code ups and down to check position of encoder and accordingly set stepper motor direction and also how much steps it must go, i just wonder if arduino can handle to check each degree of position of encoder and give the necessary information to the stepper motor , because encoder goes full revolution about in 10 sec.
Can you post the code you have and a copy of your schematic please?
Look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
craftzars:
in first post i mention runout on wheel but dont focus on that, more i like to know if arduino can handle that code.
If you are not prepared to explain enough so we can understand the problem how can we help - other than guess, which I did in the first line of Reply #1