English
Language : 

AN2350 Datasheet, PDF (36/41 Pages) STMicroelectronics – Guidelines for the control of a multiaxial planar robot with ST10F276
Control algorithm
Figure 28. Values of the absolute encoder for the shoulder
X
Homing position
75
6
4
Y
2
3
0
1
AN2350
Figure 29. Values of the absolute encoder for the elbow
X
Homing position
76
5
2
Y
4
0
3
1
Values in the different sectors represent the decimal value of the bits b2b1b0 of the absolute
encoder.
As we can see, the homing position for the shoulder is characterized by a transition between
the sectors with values 7 and 5, while the elbow by a transition between the sectors with
values 7 and 6.
At the startup of the homing procedure the absolute encoder of the shoulder is read and the
ISR associated to the Capture unit CC16 is enabled. Accordingly to the sector in which the
shoulder is positioned, the shoulder is moved with a fixed PWM. Every time there is a
transition, in the ISR the absolute encoder is read. If the transition is right, then the motor of
the shoulder is stopped (PWM=50%) and the timer T2 of the incremental encoder is reset.
This value is then passed to the control algorithm.
36/41