


Electrical Components/Concepts


99:1 Metal gear motor 12V 5.6A with 48 CPR encoder

Output of encoder
There are 48 total transitions of the encoder per rotation of the motor shaft. In the project only one channel is being counted and only the rising edges are being counted so 12 transitions occur per rotation of the motor shaft.
Software
Pseudo-code
User Interface
Wait for user to choose type of cut
Wait for user to enter in width and height of timber
Wait for user to enter depth of cut for joint
Run code for type of cut entered
​
Motor Proportional Location Control
​
Error = Set Point Location - Transition count
If error is less than 0
Turn motor clockwise
If error is more than 0
Turn motor counter clockwise
Signal condition = absolute value of Error * Kp
If Signal condition is greater than 255
Signal condition = 255
If signal condition is less than 100
Signal condition = 0
Motor speed = 255 – signal condition;
if motor speed is greater than or equal to 235
Motor speed = 255
For complete code click link below
Cost/Budget
