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. This project is being discussed in a thread at the Cloudy-Nights site.

WiFi works anywhere that a Celestron WiFi device would work. Bluetooth has been proven to work with CPWI's "hand controller" interface. And the GPS (optional) works with everything as well.

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

The Arduino "sketch" (aka. "program") that runs the entire project is available here: esp32_wifi.ino (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 (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 -- pretty much anything will do there, it just protects the telescope from current back-feeding from the USB connection of the ESP32 board.The diagram shows three optional 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
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
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
There's another DC-to-DC buck converter board in the setup. This one takes the 18-20V from my Dewalt power-tool batteries and converts it to exactly 12V to power the telescope. Yes the Evolution also has a built-in battery, but the Dewalt one is much longer lasting in the cold.
z040221407
I also have a custom-made holder for the hand-controller, with an attached shelf to hold two eyepieces in a convenient location.
z040221347
The holder for the Nexstar+ hand-controller and eyepieces. That's the factory holder, attached to a shop-built accessory unit.
holder
Click on any thumbnail to view larger images