AstroEQ Tutorials Wiki

Back

Building Your Own Controller

I am more than happy for people to make their own controllers if they have the tools required. There are two options for building your own controller:


  • (1) Build it around the Arduino Mega (or clone) board, which is fully supported
  • (2) Build a custom PCB using the same design/microcontrollers as the purchased AstroEQs.

There options have different merits. Building with a Mega is easier if you don't have the tools required to make a single sided PCB, or don't want to have a PCB manufactured. However the Arduino Mega uses a poor quality oscillator as a clock source which could mean that tracking speeds are not as accurate as they could be, but if you are using autoguiding, this probably isn't an issue as the guider can correct for this.

If you build the custom hardware, it is designed to fit neatly in an enclosure and has a higher quality crystal as a clock source. To make building the custom hardware easier, I am now selling the PCBs and pre-programmed microcontrollers through the AstroEQ store. It will be much cheaper and more reliable to purchase the PCBs pre-made compared with attempting to home etch a PCB.


Top

Building an AstroEQ with an Arduino Mega

Option 1 is using an Arduino Mega. This is probably the simplest option. A schematic is attached below. For this option, you will need some additional components. The values of the required capacitors/resistors can be found in the schematic.

The parts in the Mega schematic use the same names as the parts in the standard AstroEQ design, so for ordering information you can look up the corresponding parts in the tables at the bottom of this page. The circuit is actually pretty much the same as a normal AstroEQ, but with the microcontroller and USB parts removed and replaced by the Arduino Mega.




Top

Building an AstroEQ - Purchased PCB V4.6

This approach is the simplest if you don't have the necessary kit to DIY

Option 2 is based around a PCB and the ATMega162. I have now made it possible for you to buy pre-made PCBs through the AstroEQ purchase page, along with the pre-programmed microcontrollers. You will need a soldering iron and tools (cutters, plyers, etc.). The current PCB version is V4.6, and I have now updated this tutorial to contain all the necessary informatoin.


The Motor Driver used on the new version of AstroEQ is the DRV8825 Stepper Driver which is capable of providing up to 1.25A without a heatsink. The power input has a protection diode selected as it can run at ~5A continuously, meaning that it shouldn't heat up too much. By using this diode, the board is protected from accidentally connecting a supply with the wrong polarity. Care should be taken when installing the diode to make sure it is the correct way round.


The board should be supplied with no more than 15V DC, and no less than 9V DC. For best performance, a 12V DC Supply capable of sourcing a current of around 4A to 5A should be used.


There is an onboard LM78L05 Regulator to supply the Atmega IC with a regulated +5v supply. As such, if the power is disconnected, the whole board, except for the USB-Serial port will be shut down. This means that you can reset the board by simply unplugging the power. By using an onboard regulator, AstroEQ is compatible with USB hubs which can only supply a small amount of power. The AstroEQ5 board draws <30mA from the USB hub meaning it is fully compatible with bus powered USB hubs.


At the moment, AstroEQ is only capable of driving Stepper Motors, so is not compatible with mounts which use either Servo or DC Motors. Furthermore, only 2 phase Bipoloar stepper motors are supported, however Unipolar motors can be used by leaving the centre tap unconnected, and 4 phase motors can be connected by wiring pairs of phases in series.


There are a couple of solder bridges on the PCB (SJ1 and SJ2 in the centre). You will need to bridge these either with some pin-header and jumper, or simply with a bit of off-cut wire from one of the other components. The jumpers allow for the DRV8824/DRV8825/A4988 driver chips if bridged with the bold line (marked 882x/4988), or alternatively the DRV8834 low-voltage driver which will be supported by the next firmware version if bridged the other way.



Top

Parts List

The following parts are required to assemble the DIY circuit board. Included are values, quantities and Farnell order codes for the parts. You can either buy these from Farnell or use them as a guide as to what parts to buy from your favourite retailer. Many of the parts like resistors and capacitors are not critical and any parts with similar spec will do. The crystals were selected as they have a high accuracy (<20ppm) which makes them ideal for accurately timing the tracking speed.

The PIC18F14K50 and ATMega162 ICs will need programming before use. If you don't have a PIC programmer and AVR programmer, then you can instead choose to purchase just these two ICs pre-programmed from the purchase page.


Resistors:

Qty. Part Name(s) Value Farnell Code Description
6 R13, R14, R15, R16, R19, R21 1k Ohm 9342400 1k Resistor, 1/4W, 5%
3 R1, R18, R20 10k Ohm 9342419 10k Resistor, 1/4W, 5%
1 R22 120 Ohm 9342516 120R Resistor, 1/4W, 5%


Capacitors:

Qty. Part Name(s) Value Farnell Code Description
7 C1, C3, C5, C9, C10, C11, C15 100nF 1216438 100nF Ceramic Capacitor, 50V, 2.54mm pitch
3 C2, C4, C12 100uF 9451188 100uF Alu Electrolytic Capacitor, 25V, Dia 6.3mm
1 C6 470nF 1457660 470nF Ceramic Capacitor, 50V, 2.54mm pitch
4 C7, C8, C13, C14 22pF 1100369 22pF Ceramic Capacitor, 2.54mm pitch


Crystals:

Qty. Part Name(s) Value Farnell Code Description
1 X1 16MHz 1842217 XTAL, 16.000MHZ, 18PF, HC-49S, 20ppm or 10ppm
1 X2 12MHz 1842203 XTAL, 12.000MHZ, 18PF, HC-49S, 20ppm or 10ppm


Connectors:

Qty. Part Name(s) Value Farnell Code Description
1 USB (Connector) USB Connector 1125347 MINI USB RECEPTACLE, THT, R/A (MOLEX 565790519)
1 PROG Program Header 3418492 2ROW, 6WAY, 2.54mm Pitch Header
1 J1 Power Jack 1737246 DC Barrel Jack Socket, PCB Mount
2 RA, DEC RJ11 Connector 1560166 RJ11 JACK, 6/4 LOW PROFILE (MOLEX 95501-2641)
1 ST4 RJ11 Connector 1536490 RJ11 JACK, 6/6 LOW PROFILE (MOLEX 95501-2661)
1 PWM 3.5mm JACK 2518188 PHONE AUDIO CONNECTOR, JACK, 3.5MM (CLIFF FC68131)
1 IC1 DIP40 Socket 4285669 40Way DIP IC Socket, 0.6“ Pitch
1 IC2 DIP20 Socket 4285608 20Way DIP IC Socket, 0.3” Pitch
2 M1, M2 Driver Socket 1667522 RECEPTACLE, 2.54MM, SINGLE, 16WAY


Case:

Qty. Value Farnell Code Description
1 HAMMOND-1593N 9287566 CASE, ABS, HANDHELD, 110X75X25MM
1pk Washer 7047472 WASHER, FLAT, NYLON, M2.5, PK50
1pk Screw 1420119 SCREW, POZI PAN, STEEL, BZP, M2.5×6


Microcontrollers:

These will need programming, but can be purchase pre-programmed from me through the purchase page of this site.

The firmware for the PIC can be downloaded from here, download the “AstroEQ USB-Serial.hex” file.

The bootloader for the ATMega can be downloaded from here, download the “optiboot_atmega162.hex” file. Additionally the fuse settings are in the readme file at that link.

Qty. Part Name(s) Value Farnell Code Description
1 IC1 ATMEGA162-16PU 9171169 IC, ATMEGA162-16PU, DIP40
1 IC2 PIC18F14K50-I/P 1648501 IC, PIC18F14K50-I/P, PDIP20


Semiconductors:

Qty. Part Name(s) Value Farnell Code Description
1 IC3 78L05 1467367 5V 100mA Voltage Regulator, TO-92
3 PWR, STAT, USB (LED) 3mm LED Red 1142499 Flat Top Red LED, 3mm
1 D1 MBR1060 1611585 TO-220 Schottky Diode, 10A
1 D2 1N4148 2675146 DIODE, 100V,150MA, DO-35
1 Q1 BS270 1017689 MOSFET TRANSISTOR, N CHANNEL, BS270


Driver Boards:

Qty. Part Name(s) Value Pololu Code Description
2 M1, M2 Driver #2133 Pololu DRV8825 Motor Driver board


Top

Design Files

The list below contains download links to the schematic, BOM, and component reference for the V4.6 PCB.