RF24 motor control

Hello, I am using a rotary encoder to turn a stepper motor wirelessly with an RF24. Would it be better to send the encoders integer value over the radio and have the receiver declare the steps to be taken or should I declare the steps first with the transmit and send that value? Or does it matter. Thanks

downsecondsten:
Hello, I am using a rotary encoder to turn a stepper motor wirelessly with an RF24. Would it be better to send the encoders integer value over the radio and have the receiver declare the steps to be taken or should I declare the steps first with the transmit and send that value? Or does it matter. Thanks

What matters is feedback from the Arduino moving the motor. Please describe how the Arduino with the encoder knows when the stepper motor has completed it's movement?
Paul

What kind of encoder do You have in mind?
An absolute encoder could possible be used and incremental encoders looks useless to me.

I don't have any feedback from the stepper. I don't need it to be super precise, so I have the code telling the stepper to turn 10 steps when I rotate the encoder one click. I just didn't know if it would be more efficient to have the transmitter send the steps to the receiver or have the transmitter send the pulse count from the encoder and have the receiver tell the stepper how many steps.

So define efficiency.

I would select the method that has the least data being transferred by radio.

I would prefer methods that leave as much processing as possible as close to where it is needed

But it doesn't matter in this case much at all, really.

a7

Okey. My mistake, thinking that the encoder would be moved by the stepper.

When one pulse comes from the encoder no logic knows when/if more pulses will come. I suggest You to send the signal "one + pulse", or "one - pulse" and let the receiver be the bank for accumulated pulses..

What exact encoder are you using?

I like the ones with the integral push button. Then on the sender side, dial in the number of steps that you want the motor to take and push the button. Then the sender would send that number to the receiver and the receiver would step the motor that number of steps.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.