Professional Documents
Culture Documents
Build Option Rotary Encoder PDF
Build Option Rotary Encoder PDF
Build Option Rotary Encoder PDF
V100 22-10-2016
This addendum explores the use of the Keyes 040 Rotary Encoder to replace the push buttons with
the same or increased functionality.
The code provided here is for a FULL solution only, and schematics and layout have been provided
for DRV8825 and EasyDriver v44 solutions.
The Arduino code is designated with the “re” in the filename. Only use the “re” versions with the
Rotary Encoder build.
PRECAUTIONS
Never disconnect or connect the stepper motor when the Arduino or External Power is
ON. This can result in damage to the driver board
The correct method is ensure everything is connected then connect the external power
12VDC
Disconnect the external power 12VDC prior to disconnecting the USB cable
CONNECTIONS
CLK to D9 via resistor/capacitor junction
DT to D10 via resistor/capacitor junction
SW D11 and 10K pullup resistor
+5V 5V
GND GND
SCHEMATIC
INTERACTION WITH WINDOWS APPLICATION OR ASCOM DRIVER
The Windows application and ASCOM driver should work correctly with the Rotary Encoder. Before
commands are sent to the controller to adjust the focuser position, the current position is requested
from the controller.
What this means is that if you move the focuser position using the RE, it is not immediately updated
into the ASCOM client or Windows application. However, using a GET focuser position command will
retrieve the current focuser position from the controller.
In determining a move of focuser position, the software always gets the current position from the
controller first, not from the application dialog box.
DEBOUNCE CIRCUITRY
The debounce circuitry is essential for
reliable operation of the encoder. The
circuit used 100nF capacitors and 10K
resistors (1/2 or 1/4W is fine). For the
prototype I used 220nF capacitors
which worked fine.
myFocuserPro2
BOARD DRV8825 EASYDRIVER Rotary Encoder
BOARD DRV8825_HW203_RE
ARDUINO FIRMWARE
All firmware versions that support the Rotary Encoder have RE in the filename
myFocuserPro
DRV8825_F_RE
myFocuserPro2
DRV8825_F_RE
DRV8825_HW203_F_OLED_RE
DRV8825_HW203_F_RE
DRV8825_HW203_F_RE_2004
BUILD PICTURES OF EASYDRIVER FULL BUILD WITH ROTARY ENCODER
OPTION
The following photos illustrate the EasyDriver v44 Full Option with Rotary Encoder build. Please note
that the board uses XH2.54 2P and 3P sockets. Off board components such as the driver board are
connected using 2P or 3P headers, this makes assembly and disassembly easier. Cost savings could
be made by direct soldering rather than using headers and sockets.
The EasyDriver board was purchased without the header pins soldered. Instead of soldering the
header pins, XH2.54 2P or 3P or 4P sockets were soldered. The following photo illustrates this. The
Easy driver board then connects to the main board using XH2.54 female-female cables.