I am kind of new to arduino so if some one can help me with that
I am trying to do a linear actuator with a brushless motor with a gear box 1 :16 and an encoder on arduino uno
I have an esc that has a pwm enable pin (plug on pin 10)
A dir pin ( plug on pin 11) and a braking pin wicht i currently dont use
My encoder has 264 pusle per turn and 2 channel ( a : pin 2 , b : pin 3
I want to be able to enter the number of turn i want on my out put shaf in the serial monitor and on a push of a button it start from 0 to X (x is the number of turn i entered ) and on another push of the same button it goes from X to 0
Can anybody help me with the programation of that ?
I will be for ever recognizing
So the controller takes PWM (active low) for speed control, and a direction input.
Get that working in a test sketch.
The Encoder seems to be push-pull output ABZ, find an encoder library to read the A and B signals from that.
Then you should look at PID control - the output of the PID loop will set the drive level and direction of the
motor controller, the inputs are a position set-point and the encoder library value.