Tracking Altitude and Azimuth (Horizon Coordinates) for telescope using low-cost Encoders



12/30/17: Added BreadBoard with Nano. The Breadboard is good but I did not cleanup or mess with the Schematic or PCB... Also, it does not include Trimpots (or fixed Resistors) for the LCD contrast and backlight - add them if using an LCD.

Code: .Hex files of Full Code are now posted (see link to Github). These codes require an LCD (they do not output serial or bluetooth display).

Review some Youtube vid's on flashing .hex files.

For Pinout clarity, see pinout photo.


12/2/17: Added Bluetooth output/display with NANO and Breadboard. Code with Bluetooth also posted at Github.

Replaced sample code with a more complete version. I left out enough code for you to redo - there are enough comments and code to make it an easy challenge...

The code is now posted at Github:  ]

This design is for ATMega 328 chip (and can be used with an UNO - just program the chip on the UNO, remove it and put the chip on this PCB or Breadboard - Simple!).

Generally, the design can be used for most any telescope (and, can be used as a baseline for a Surveying transit using a laser instead of telescope or mounted on telescope).

    ▪    The Gears, Mounts and Design Info are posted (see Links, below)
    ▪    The PCB is Single-Sided and laid out for easy assembly
    ⁃    I make my PCB’s with CopperCAM
    ⁃    Bring power in via BAT & GND pads
    ⁃    Use the other 6 pads for the Altitude and Azimuth encoders
    ⁃    Signals and Power
    ⁃    Two corner mount holes


    ▪    See the file: Code_forPosting.ino. It is a baseline code to get you started
    ▪    Note: The Alt & Azi encoders use D2 & A4 and D3 & A5.
    ⁃    The Analog pins (A4 & A5) are defined as pins D18 and D19 in Arduino syntax to make them Digital pins)
    ▪    Use INPUT_PULLUP  (or, ‘C’ bit-bang syntax) to pull-up. The physical design does not include/need physical resistors. Thus, encoders will work without adding circuitry for them.
    ▪    BE SURE to tweak code samples to reflect this info!


These links are all you need to get started - it's important to read/watch the video...
    ▪    YouTube
    ▪    3D-Parts

5 Volt supply power is required (+/- the usual 0.5V).
The regulator circuit was removed - the design works great using a USB supply, such as KAMASHI or Jackery).  Make a USB connection from scrap usb cable and consider adding a load to it (such as an LED; the USB Power devices will timeout… depends on your final design load).


Depends on the Hemisphere you live in…
For Northern, point to Polaris and press the Polaris button (don’t forget to program fixed values for it).
Or, point North and level the scope, then press 0,0 button
For Southern, use the Manually Setting approach

Your code will be different, mine is setup to:
Set coord’s to 0,0 [Btn 1]
Set my local coord’s for Polaris [Btn 2]
Manually set Azimuth [Btn 3, turn encoder to desired value, press the encoder shaft. This encoder contains a switch]
Manually set Altitude {Btn 4,  same… turn and press encoder…]

Manually setting only does integers (from 0 to 360 deg).
Good coding will enable continuous  tracking…

    1)    Trimpot (2)  5k to 20k [used for LCD contrast and brightness)
    2)    ATmega 328p-PU-ND
    3)    28 pin chip mount block
    4)    xtal 16MHz
    5)    CAP (2) 22pF  for chip xtal
    6)    CAP 10uF  for Power smoothing filter (use capacitance as needed)
    7)    Button Switches (4)  6x6mm, (16mm height if using an enclosure)
    8)    Slide switch SPST
    9)    Encoder (for manual setting of Reference star/object)
    ⁃    Panasonic:  EVE-JBBF2020B  (Digikey #: P12336-ND )
    10)    Encoder (2) for telescope positions (Altitude & Azimuth)
    ⁃    Depends on your desired resolution
    ⁃    See the links/design info
    11)    LCD  Dark background, Red Text
    ⁃    Newhaven NHD-0216K1Z-NSR-FBW-L-ND
    ⁃    Digikey #: NHD-0216K1Z-NSR-FBW-L-ND
    12)    Resistor: 220Ω (or other - it’s for the Chip reset pin)