Up one level   Page:    1 

Home-Brew DIY ESP32 based WiFi+BlueTooth+GPS+Serial accessory for Celestron Nexstar Telescope AUX port

This project provides some of the most wanted enhancements for Celestron Telescope mounts: a GPS receiver, a WiFi adapter, a BlueTooth interface, and a Serial Bridge over USB. All in one, easy to wire circuit. And unlike the Celestron WiFi product, this one works with the older Nexstar GPS mounts as well as with more recent mounts!

This project is being discussed in a thread at the Cloudy-Nights site.

WiFi works anywhere that a Celestron WiFi device would work, and also with the old Nexstar GPS mounts, enabling use of SkyPortal, SkySafari, and CPWI with them. Bluetooth also works in a variety of setups: including with SkyPortal/SkySafari. And the GPS (optional) works with everything as well.

Note: There is now (Oct/2022) an easier to build design for this project: New/simplified Build of HomeBrew ESP32 WiFi+Bluetooth adapter.

To build this project with the Arduino IDE, one must first also install ESP32 support into it from GitHub, following instructions here.

The Arduino "sketch" (aka. "program") that runs the entire project is available here: esp32_wifi.ino.txt (always the latest version).

To begin, click on the first photo below.


You may prefer the simpler HomeBrew GPS project.


The Arduino WiFi code now implements both the default SoftAP mode (aka. "Direct Connect"), as well as Client mode (aka. "Use Access Point") which can be configured from the SkyPortal app. At this point, we are beyond "feature parity" with the Celestron WiFi units. Yay!

ESP32 Pin D5 has been designated as the "mode switch" pin: it defaults to SoftAP mode, but if that pin is pulled LOW (using either a jumper or a switch), it will attempt Client mode, same as the Celestron dongles do.

As an alternative to wiring up a "mode switch", one can instead telnet to port 3000 over WiFi, and select the desired WiFi mode using the "wifi.mode" variable. Eg. "set wifi.mode 0" will force SoftAP mode, and "set wifi.mode 1" will attempt Client mode (falls back to SoftAP if parameters are messed up). Anything other than 0/1 there will rely instead on the state of Pin D5.

This same interface can also be used to change the SoftAP SSID name, as well as to set a WiFi passkey on the SoftAP. These settings, like all others, are persistent across resets and power-cycles! The "get all" command will show all of the current settings from the telnet interface (just like with the Celestron units).

There is not a lot of validation done on the settings, so if they get messed up then one can pull ESP32 Pin D18 LOW at WiFi "on" time, to restore "factory defaults". One could hook up a switch to this pin as well, if desired.

This wiring picture shows all of the components used:A 30-pin ESP32 dev board (get one that looks identical, otherwise the pins may be in different locations).One BN-180 GPS receiver (completely optional, and any GPSr with TTL serial output should be fine).A DC-to-DC buck voltage converter (any one that accepts 12V input and can be adjusted for 5V output).A 74HC125 quad tri-state buffer chip.A 6p6c RJ12 connector with about 24 inches of cable attached.Best to assume that the conductor colours of the 6p6c cable will be random, so don't rely on wire colours when hooking up!There is also one general purpose diode to the right of the buck converter in the diagram -- pretty much anything will do there, it just protects the telescope from current back-feeding from the USB connection of the ESP32 board. Two 50Kohm resistors are used as pull-ups on the TX and BUSY lines. Some mounts work without these, but they should really be present in all cases.The diagram shows three optional 330-ohm resistors that exist only because I am paranoid. This design does not require them. They provide current limits in case something gets wired incorrectly.There are two optional WiFi-enable switches: one controls the ESP32 WiFi, the other controls the built-in WiFi on a Celestron Evolution Telescope mount. It is useful to be able to switch WiFi completely off when using the hand-controller, to save battery power and minimize WiFi pollution.Note that if the switches are not installed, then both WiFi will be OFF by default. You can either tie the D15 and D4 pins to GND, or modify the Arduino sketch to enable WiFi by default.The latest design also now includes an optional WiFi-settings Reset switch, and an optional WiFi-Mode switch for selecting between "direct connect/SoftAP" (default), and "use an existing Access Point". These are the same switches as on the Celestron products.One can also add a GPS switch (not shown) for the GPS module: just insert it into the power lead (red/violet) of the BN-180, to cut power directly when desired.The Arduino "sketch" (aka. "program") that runs the entire project is available here: esp32_wifi.ino (always the latest version).For initial test instructions see here.To continue, click on the right-pointing little blue arrow near the top left.
esp32_wifi_bt_gps_project
The 74HC125 chip. Just a little 14-pin DIP package, but it solves all of the AUX bus interface issues for us! It acts as the go-between for the 3.3V ESP32 chip and the 5V Celestron AUX bus. As wired in this project, it properly pulls signals LOW when needed, and allows them to float HIGH otherwise.
74hc125
My own assembled circuit. I added headers for the various cables, so that I could detach them as needed when photographing the board or making design changes. The white 6-pole header at the top is for the 6p6c cable from the telescope mount. The one at bottom right is for the GPSr, and the one at bottom left is where three of the switches connect. My DC-to-DC buck converter is different than the one pictured earlier, but works exactly the same. I have one extra paranoia diode between the converter and the 6-pin header -- again not really needed.To continue, click on the right-pointing little blue arrow near the top left.
z040205253
Same board, the other way around.To continue, click on the right-pointing little blue arrow near the top left.
z040205305
Back side of the board, showing most of the wired connections between parts.
z040211241
Same board, the other way around.
z040211250
I didn't actually wire the 6p6c RJ12 cable directly to my module. Instead, I used a 6p6c modular jack, and wired that to my circuit instead. Again, the wire colours are completely random here, so just ignore those. The long "ends" of the wires shown here got trimmed off after the photo was taken.
z040164553
Here it is all hooked up together and hot-melt glued into a black box. The GPSr is oriented such that the flat ceramic antenna will point skyward when the box is attached (velcro) to the telescope fork arm.
z040214637
Closer view of the circuit board.
z040214649
Closer view of the switches.
z040214643
The finished (?) product attached to the telescope fork arm. Note also the extra cut-out for the USB port of the ESP32 module, so that it can be updated with newer software as time goes by.
z040221358
Later on, I opened up the box again, and added a slider switch for selecting between the two WiFi modes: SoftAP (default) or Client.
z040164539
The closed unit, with the new slider switch for "WiFi Mode" accessible at top right.
z040164452
This is my telescope: Celestron Evolution 8. With a few homebrew extras attached. The project box is visible on the left side of the fork arm.
z040221532
This 4/5-way splitter sold by Electronics-Salon on Amazon could be a useful addition to the project, especially with telescopes that have only a single AUX port.It has screw terminals for connecting to the project side of things, making it easier to use than hacking up a 6p6c cable. One would then just get a regular 6p6c cable to plug between this and the telescope, and still have three ports left over for other Celestron accessories. The 1,2,3,4,5,6 numbering here matches exactly the pin numbering used within this project. Eg. wire 3 is 12V power, and wire 5 is GND.
5-way_splitter
Click on any thumbnail to view larger images