Professional Documents
Culture Documents
MicroDAQ_Encoder Block
M.Mohamed Ibrahim
Tenet Technetronics
28-APR-17
Tenet Technetronics 1
Application Notes
Contents
Introduction .. 2
DC Motor ..2
Encoder .3
Steps involved5
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com
Tenet Technetronics 2
Application Notes
Introduction
Encoders are used to translate rotary or linear motion into a digital signal. Usually this is
for the purpose of monitoring or controlling motion parameters such as speed, rate,
direction, distance or position.
Here, we can use MicroDAQ Encoder Block to count rotation of DC motor directly from
SCILAB_XCOS. We can also build graphical interfaces to verify device performance,
compare real-world data to models created in SCILAB_XCOS.
This powerful brushed DC gear motor is available in six different gear ratios and features
an integrated quadrature encoder with 64 counts per revolution (CPR) of the motor
shaft.
Encoders
A two-channel Hall Effect encoder is used to sense the rotation of a magnetic disk on a
rear protrusion of the motor shaft. The quadrature encoder provides a resolution of 64
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com
Tenet Technetronics 3
Application Notes
counts per revolution of the motor shaft, which corresponds to 1920 counts per
revolution of the gearboxs output shaft.
The motor/encoder has six color-coded, 11" (28 cm) leads terminated by a 16 female
header with a 0.1 pitch, as shown in the Figure 2.
The Hall sensor requires an input voltage, Vcc, between 3.5 and 20 V and draws a
maximum of 10 Ma. The A and B outputs are square waves from 0 V to Vcc
approximately 90 out of phase. The frequency of the transitions tells you the speed of
the motor, and the order of the transitions tells you the direction.
Figure 2: Encoder
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com
Tenet Technetronics 4
Application Notes
MicroDAQ_Encoder Block:
Encoder block reads MicroDAQ quadrature encoder. 'Init position' parameter allows to
set initial value of quadrature encoder position register.
This block can be used in host simulation mode and for code generation.
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com
Tenet Technetronics 5
Application Notes
Step 1: MicroDAQ blocks are used to access the MicroDAQ hardware. MicroDAQ
bocks are available in XCOS palette browser under MicroDAQ palette.
Figure 6a
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com
Tenet Technetronics 6
Application Notes
Figure 6b
Figure 6c
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com
Tenet Technetronics 7
Application Notes
Note:
Here, we use gear motor so,we need to give 12v supply externally.
Figure 8: Output
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com
Tenet Technetronics 8
Application Notes
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: info@tenettech.com