# INDUSTRIAL ENCODER

If you want 80 extra pulses within a total of 5000 why not just insert an extra pulse after every 62 pulses?

...R

Hi thanks for your reply. I´m an absolute newbie to Arduino (a couple of basic projects with steppers so far).
I want to connect the Arduino between the encoder output and the industrial stepper drive.
Please point me in what direction to start reading here or what Arduino library to look at..

When you said in your Original Post "Everything works great." I assumed you are already using an Arduino.

If not, can you describe whatever it is that you have that works great.

Please post links to the datasheets for the specific products you are using.

...R

Considering that say a 200 step motor is used, having 5000 or more pulses from an encoder seems an overkill.

Robin2:
If you want 80 extra pulses within a total of 5000 why not just insert an extra pulse after every 62 pulses?

...R

He would also have to handle the case where an extra pulse was added, but then the rotation direction was reversed. Sounds like a nightmare. And, why on earth 5000 pulses per rev? Just LOOKING at the encoder could output a few stray pulses!

Now, for my design I need exactly 5080 pulses per turn. How can I use an Arduino board to accomplish these additional 80 pulses?

I'm guessing this is some metric thing? 25.4 * 200 = 5080.

One inch of movement for each rev of a 200 ppr stepper?

Maybe send one pulse to the stepper for every 25 encoder pulses gives you exactly one stepper rev for each encoder rev. Since the stepper resolution is 200 ppr, dividing the 5000 ppr encoder loses you nothing.

Of course, all this assumes that the above actually is what your'e doing.....

krupski:
He would also have to handle the case where an extra pulse was added,

...R

If anyone wants an example of why noobs find this forum to be antagonistic this is a perfet example
Instead of discussing the technology which the OP says works
Without understanding tte Application we question the parts being used.

Motor steps and encoder steps need to be divisable by intintegers.
You need to either add gearing or change the encoder to make 5080 step work with 5000 pulses.

Robin2:
If you want 80 extra pulses within a total of 5000 why not just insert an extra pulse after every 62 pulses?

...R

Could this be regarded as a case of electronic gearing?

dave-in-nj:
If anyone wants an example of why noobs find this forum to be antagonistic this is a perfet example
Instead of discussing the technology which the OP says works
Without understanding tte Application we question the parts being used.

I think my Reply #1 was directly on point.

...R

HI. This is my system:
A nema 23 stepper motor linked- by a timing belt array- to a ball screw with 16 mm per turn.
The motor is connected to a stepper driver with appropiate microstepping to my 5000 ppr encoder.
This encoder (5v are provided externally) is directly connected to the driver as step/dir source.
NO ARDUINO involved at all.
I need something less than 1,6 turns to achieve my goal: 25.4 mm (1 inch) of travel at the ball screw.
So given my encoder and the microstepping I have chosen, I need to provide 5080 steps per rev
to my driver.
In short: Could Arduino help me to get rid of the belt array 1:1.6 (4 pulleys and two GT2 belts)?
Just Arduino between my encoder output and the step/dir input of my driver.

Could Arduino help me to get rid of the belt array 1:1.6 (4 pulleys and two GT2 belts)?

Still not totally clear. You claimed the encoder was being turned by hand and the output is going to a stepper drive and then a stepper motor but now your talking belts and pulleys. Is there a hungry monkey waiting next?

So is the “goal” here for one full rotation of the encoder to result in one full rotation of the stepper motor?

An Arduino can do calculations.
An Arduino can control a stepper driver.
So quite surely you can use an Arduino for reading your encoder and translating it into a movement of your stepper.

Or is “ My goal is torque.“ the actual monkey that you have no clue what to do with?

No monkeys yet :). By torque I meant the stepper will be working very slow,
-even with the high microstepping I have chosen the torque is very good.
I will try to be more clear.
When my hand moves the encoder shaft
the ball screw (16 mm /turn by specs) moves 25.4 mm.
The system does what I need. But with a mechanical array.
The encoder provides 5000ppr to my driver.
With only these 5000 ppr, I need the 1:1.6 belt array to achieve 25.4 mm at the ball screw.
I need 5080 ppr to achieve 25.4 mm at the ball screw.
So I had a crazy idea:
Could Arduino help to get rid of 4 pulleys and two belts?
I think something simpler and cheaper than this:
https://www.motrona.com/en/products/signal-converters/frequency-divider-multiplier/fm260-programmable-pulse-and-frequency-multiplier.html
Thanks.

Microsteps are not true steps. if you take a motor that makes 200 natural steps per revolution and then microstep by 10X or 8x or some such, you do not get actual steps. microsteps are to help smooth movement and are not precision steps.

the power to hold a full or a half step is (100% or 50/50) is significantly higher than trying to hold a magnet off it's primary alignment by some alteration to the electro magnetic fields.
Try it for yourself with some magnets on your desk, let them find their center, then try to move them 8% from center.

if you have 5080 half steps, to equal the 5000 encoder pulses, then all would work great.
if you just need smooth moving from start to finish, then all would be good.
if/when you lose power, the stepper will move to a natural step and our count will be off by some tiny percentage.

Could Arduino help to get rid of 4 pulleys and two belts?

Yes.

...R

I think i’d approach this a different way...
We have an encoder that always has a ‘current’ position.
This is moved by hand.

Arduino simply keeps track of that current position.

Motor/driver has a ‘current’ position, and ‘target’ position - which it hasn’t reached (yet).

When encoder current position changes, the appropriate maths are used to determine where the motor ‘should’ be...

Tat values is transferred to the motor/driver function as a new ‘target’ position...

In the ‘background’ the Arduino sees the difference between the ‘current’ and ‘target’ position of the motor - and uses whatever (linear/S) profile you desire to move the motor current to match target... then motor stops until the a new difference is identified.

This latter feature is running all the time... all you need to do is change the target, and the motor will chase that goal.

This code seems to work ok on my mods to the carriage feed on my miniature engine crankshaft grinder.
It is to drive a measurement display but the ratio application might be of some help.
Ended up replacing thew 16tpi feed shaft with 20tpi.

``````void dsPlay_16tpi() {
lcd.clear();
lcd.print("Counter = ");             // Display the value of the Counter
lcd.print(counter);
disVal = ((counter / 4.8) / 10000);  // encoder is 1200 pulses per rev, total(counter)calculated by..... feed is 16tpi (62.5 thou" per rev),
lcd.setCursor(0, 1);                 // ratio of feed screw to encoder via belt drive is 1:2.5 so for ever rev of feed screw,
lcd.print("Travel  ");               // encoder pulses 3000...example(3000/4.8 = 625) (625/10000 = 0.0625 or 62.5 thou)
lcd.print(disVal, 4);                // Distance Value to 4 decimal places shows measure to 0.5 thou"
delay(200);
temp = counter;
}

void dsPlay_20tpi() {
//FOR 20 tpi lead screw driven direct or at 1: 1 belt drive
lcd.clear();
lcd.print("Counter = ");             // Display the value of the Counter
lcd.print(counter);
disVal = (counter / 24000);          // If using the encoder direct drive or via 60:60 belt drive and 20 tpi feed screw
lcd.setCursor(0, 1);                 // 20 tpi = 50 thou per turn....1200 count represent 50 thou travel
lcd.print("Travel  ");               // calculation now becomes 1200/24 = 50 thou per turn ....
lcd.print(disVal, 4);                // Distance Value to 4 decimal places shows measure to 0.5 thou"
delay(200);
temp = counter;
}
``````