Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

HomeBrew Gen3 PCB: WiFi+BT+GPS+MUSB+Relay !

  • Please log in to reply
2152 replies to this topic

#2076 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 09 June 2025 - 06:22 PM

It's possible that my ESP 32-C3 project file was compiled with incorrect versions of libraries or Arduino IDE.


That seems less likely than simply no one has yet ported the firmware to that microcontroller chip.

These are not generic computers like PCs. Each is quite different, and the firmware must be tailored to suit the specific hardware.

Some of us have experienced long and successful careers working with such systems. 😎

#2077 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 09 June 2025 - 07:21 PM

It's possible that my ESP 32-C3 project file was compiled with incorrect versions of libraries or Arduino IDE . 

Presumably you selected ESP32-C3 as the "board type" from the Tools menu within the Arduino IDE?  
 



#2078 Astro Andy

Astro Andy

    Explorer 1

  • -----
  • Posts: 64
  • Joined: 10 May 2021
  • Loc: SW UK

Posted 09 June 2025 - 11:39 PM

pmchan, on 09 Jun 2025 - 12:38 PM, said:

Now, regarding this specific thread, I contacted hbg3@pobox.com about a PCB or kit purchase, waiting for their reply but in the meantime, I'm also looking to add a DIY focus motor, based on a 28BYJ-48 stepper motor.

I have most of what is required and can post from the UK, at a cost. WiiMote port may be salvageable from a donor board. Not sure what a fair price would be.

 

The RJ12 and converter are not soldered yet.

https://ibb.co/N2vgJHSq


Edited by Astro Andy, 09 June 2025 - 11:42 PM.

  • pmchan likes this

#2079 pmchan

pmchan

    Lift Off

  • -----
  • Posts: 5
  • Joined: 09 Jun 2025

Posted 10 June 2025 - 09:04 AM

I have most of what is required and can post from the UK, at a cost. WiiMote port may be salvageable from a donor board. Not sure what a fair price would be.

 

The RJ12 and converter are not soldered yet.

https://ibb.co/N2vgJHSq

Hi Andy,
thank you for your kind offer, I might be interested because hbg3@pobox.com didn't answer my email regarding kit prices yet, I understand it's not their main activity so waiting a bit is fine but I'm eager to assemble HBG3 quickly for my wife (and put it in this nice 3D printed case) smile.gif
What would you include in this set? PCB+ RJ12 connector + converter (I understand those 2 are not soldered), or all the parts visible in your picture? At this point, I don't know how much hbg3@pobox.com is charging for such a kit so I'm relying on you to define a fair price smile.gif
Regarding shipping charges, I live in France, Aquitaine.
 


Edited by pmchan, 10 June 2025 - 11:21 AM.


#2080 pmchan

pmchan

    Lift Off

  • -----
  • Posts: 5
  • Joined: 09 Jun 2025

Posted 10 June 2025 - 09:13 AM

My advice there, is to get the HBG3 in "kit" form, unassembled.  It will be easier to attach the extra wiring for the Focus Motor if you plan ahead slightly, and do it during assembly.  It can be done afterwards, just a bit trickier.

 

Cheers

Thank you for your guidance, Mark, this is what I planned to do after looking at your post about DIY focus motor, soldering the needed pins upside for example will be easier with an unsoldered ESP32.



#2081 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 10 June 2025 - 12:03 PM

 

Tried all the options. Move pin ESP32_WIFI_MODE_PIN to gpio 1. But the wifi access point did not appear.

ESP-ROM:esp32c3-api1-20210207
..
abort() was called at PC 0x4207ed05 on core 0
..

One of the ESP32-S3 boards arrived here today, so I had a quick attempt to get the HBG3 firmware going on it.

 

The first attempt had pretty much the same abort/dump that Romanov_AA saw on the ESP32-C3 board.

Okay, good.  We have a baseline now from which to improve things!  smile.gif

 

So next, I disabled most of the optional stuff of the HBG3, and began editing the *_PIN definitions.  The built-in UARTs on the ESP32-S3 (and presumably on the ESP32-C3 as well) are not on the same pin numbers as with the ESP32.  So all of those needed changing.  I will try and make this automatic in the firmware, so it will work on most/all current ESP32 variants.

 

After fixing the *_PIN definitions for the serial ports and the two AUX buses, I tried again, and now the system boots up.  It sometimes even broadcasts a WiFi signal, but as "HomeBrew-000000" instead of with a correct MAC address.  The command-line interface on the debug USB port works fine, and it tries to talk to a mount (none connected, and I haven't wired up the HBG3 interface hardware yet).

 

So, progress.  This may actually work at some point, but I've got a bit more fiddling to do there.

=========== Before Setup Start ===========
Chip Info:
------------------------------------------
  Model             : ESP32-S3
  Package           : 0
  Revision          : 0.02
  Cores             : 2
  CPU Frequency     : 160 MHz
  XTAL Frequency    : 40 MHz
  Features Bitfield : 0x00000012
  Embedded Flash    : No
  Embedded PSRAM    : No
  2.4GHz WiFi       : Yes
  Classic BT        : No
  BT Low Energy     : Yes
  IEEE 802.15.4     : No
------------------------------------------
INTERNAL Memory Info:
------------------------------------------
  Total Size        :   349224 B ( 341.0 KB)
  Free Bytes        :   312100 B ( 304.8 KB)
  Allocated Bytes   :    32124 B (  31.4 KB)
  Minimum Free Bytes:   306832 B ( 299.6 KB)
  Largest Free Block:   253940 B ( 248.0 KB)
------------------------------------------
SPIRAM Memory Info:
------------------------------------------
  Total Size        :  8388608 B (8192.0 KB)
  Free Bytes        :  8386096 B (8189.5 KB)
  Allocated Bytes   :      136 B (   0.1 KB)
  Minimum Free Bytes:  8386096 B (8189.5 KB)
  Largest Free Block:  8257524 B (8064.0 KB)
  Bus Mode          : OPI
------------------------------------------
Flash Info:
------------------------------------------
  Chip Size         : 16777216 B (16 MB)
  Block Size        :    65536 B (  64.0 KB)
  Sector Size       :     4096 B (   4.0 KB)
  Page Size         :      256 B (   0.2 KB)
  Bus Speed         : 80 MHz
  Bus Mode          : QIO
------------------------------------------
Partitions Info:
------------------------------------------
                nvs : addr: 0x00009000, size:    20.0 KB, type: DATA, subtype: NVS
            otadata : addr: 0x0000E000, size:     8.0 KB, type: DATA, subtype: OTA
               app0 : addr: 0x00010000, size:  1280.0 KB, type:  APP, subtype: OTA_0
               app1 : addr: 0x00150000, size:  1280.0 KB, type:  APP, subtype: OTA_1
             spiffs : addr: 0x00290000, size:  1408.0 KB, type: DATA, subtype: SPIFFS
           coredump : addr: 0x003F0000, size:    64.0 KB, type: DATA, subtype: COREDUMP
------------------------------------------
Software Info:
------------------------------------------
  Compile Date/Time : Jun 10 2025 13:11:56
  Compile Host OS   : linux
  ESP-IDF Version   : v5.5-dev-3129-gd930a386da-dirty
  Arduino Version   : 3.3.0
------------------------------------------
Board Info:
------------------------------------------
  Arduino Board     : ESP32S3_DEV
  Arduino Variant   : esp32s3
  Arduino FQBN      : esp32:esp32:esp32s3:JTAGAdapter=builtin,PSRAM=opi,FlashMode=qio,FlashSize=16M,LoopCore=1,EventsCore=1,USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PartitionScheme=default,CPUFreq=160,UploadSpeed=921600,DebugLevel=verbose,EraseFlash=none,ZigbeeMode=default
============ Before Setup End ============
...
HBG3-v8.69+ 2025-05-03: AUXRELAY=0 FRAM=0 ETH=NONE
OLED not detected
000000843 wifi_mode_switch: server_mode
WiFi scan started.
bus_loop: auxbus_tx is alive
000001876 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000002888 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
WiFi scan: [0] ch=10 rssi=-47
WiFi scan: [1] ch=10 rssi=-47
WiFi scan channel loads: 1:0 2:0 3:0 4:0 5:0 6:4 7:10 8:20 9:40 10:80 11:40
esp32_wifi ON, server mode
wifi_begin_server_mode
esp32_wifi ON, softAP, ssid=HomeBrew-000000, passkey=
wifi_channel=1
000003900 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000004912 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000005924 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000006936 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000007948 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000008960 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000009972 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000010984 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
000011996 auxbus_tx: auxtest: 3b 03 e2 10 fe 0d    [HBG3   -> AZM   ] GET_VERSION
free
free_heap=8634268, min_free=8632716, largest_free=8632716
...

At least the firmware shouldn't be running out of "RAM" any time soon.. over 8 MBytes available after boot-up!

 

Cheers


Edited by mlord, 10 June 2025 - 02:36 PM.

  • Romanov_AA likes this

#2082 Romanov_AA

Romanov_AA

    Lift Off

  • -----
  • Posts: 11
  • Joined: 01 Jun 2025
  • Loc: Bulgaria, Varna

Posted 10 June 2025 - 03:02 PM

Presumably you selected ESP32-C3 as the "board type" from the Tools menu within the Arduino IDE?  
 

esp.png

My pins are:


#define AUXBUS_RX_PIN             20    // (RX2) from AUX bus RX pin
#define AUXBUS_TX_PIN             21    // (TX2) to AUX bus TX pin
#define AUXBUS_BUSYIN_PIN         3    // was 19; from AUX bus BUSY pin (could be same pin as BUSYOUT)
#define AUXBUS_BUSYOUT_PIN        0    // was 19; to   AUX bus BUSY pin (could be same pin as BUSYIN)

#define GPS_TX_PIN                2    // was 22; TX-to-GPS pin.   GPS RX Pin (green) connects here.
#define GPS_RX_PIN                6    // was 23; RX-from-GPS pin. GPS TX pin (white) connects here.
#define ESP32_WIFI_MODE_PIN       1    // was  5; Ground for "Access Point" mode; float high for "Direct Connect"
#define MUSB_SELECT_PIN           5    // Ground to use USB port as Mount-USB

#define OLED_BUTTON_PIN           4     // For push-button switch to cycle between OLED data screens and OFF.
#define BLUE_LED_PIN              8     // ESP32 DevKitV1 built-in (blue) LED
#define USB_RX_PIN                7     // Internal pad; no associated pin
#define USB_TX_PIN                10     // Internal pad; no associated pin 

Edited by Romanov_AA, 10 June 2025 - 03:18 PM.


#2083 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 10 June 2025 - 05:55 PM

[ESP32-S3] WiFi works.  Trying to get the AUX bus interface (74HCT125 etc..) going with it now.

It can talk to a Nexstar+ hand-controller, but gets confused when talking to either of the MCs.


Edited by mlord, 10 June 2025 - 08:42 PM.

  • Romanov_AA likes this

#2084 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 13 June 2025 - 10:47 AM

[ESP32-S3] WiFi works.  Trying to get the AUX bus interface (74HCT125 etc..) going with it now.

It can talk to a Nexstar+ hand-controller, but gets confused when talking to either of the MCs.

There's something funny with handling of the UART config registers (used for the AUX bus) deep in the ESP32-S3 operating system binary.  They use the wrong bit values for configuring the number of "stop bits", and this causes things to not work.

 

The Celestron AUX bus normally uses 8N2.

 

I've changed the code to use 8N1 instead of 8N2, and now the ESP32-S3 successfully talks to the mount, and SkyPortal can control it over WiFi.  But something is still not quite right -- the ESP32-S3 cannot talk directly to the hand-controller over AUX with 8N1, but does manage it (sometimes) with the (incorrect) 8N2 config value.

 

I'm going to have to put this on the scope later to see if I can puzzle out what isn't quite right there.

 

Cheers


Edited by mlord, 13 June 2025 - 12:38 PM.

  • Romanov_AA likes this

#2085 Romanov_AA

Romanov_AA

    Lift Off

  • -----
  • Posts: 11
  • Joined: 01 Jun 2025
  • Loc: Bulgaria, Varna

Posted 14 June 2025 - 04:50 AM

There's something funny with handling of the UART config registers (used for the AUX bus) deep in the ESP32-S3 operating system binary.  They use the wrong bit values for configuring the number of "stop bits", and this causes things to not work.

 

This effect can occur when the UART speed of the transmitter is slightly different from the required receiver speed. It is also possible that the signal on the line is distorted.



#2086 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 14 June 2025 - 09:31 AM

After some quality time with Google, it does seem that a number of people have been experiencing UART issues on the -S3.  Some of those were resolved by downgrading from the current board support to an earlier version.

I hope to get It on my scope later, to check the bit timings and look for any other issues.


Edited by mlord, 14 June 2025 - 11:26 AM.


#2087 RektX

RektX

    Lift Off

  • -----
  • Posts: 2
  • Joined: 21 Feb 2025

Posted 14 June 2025 - 03:27 PM

Is anybody accepting commissions for making these? I can Flash the firmware myself. It's a goal of mine to eventually get into small electronics, but for right now, my resources have to go elsewhere, like eyepeice upgrades and replacing my broken crosshair finder scope. If I wouldn't have to buy a soldering iron that was more expensive then the sum of the parts, I'd feel this was the perfect project to begin.

Edited by RektX, 14 June 2025 - 03:31 PM.


#2088 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 14 June 2025 - 03:35 PM

Is anybody accepting commissions for making these?

There's an email address on the project site, for a couple of UK-based guys who distribute kits and/or pre-assembled units:  https://rtr.ca/hbg3/



#2089 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 15 June 2025 - 06:32 AM

 

I hope to get It on my scope later, to check the bit timings and look for any other issues.

First looks on the scope:

  • The Evo Rev.F PCB shows very high amounts of voltage overshoot on the AUX bus Rx/Tx from the motor controllers.  The hand-controller (V5) and HBG3 are much cleaner.
  • The Evo Rev.K PCB is fine, similar to the hand-controller and HBG3.
  • Bit timings for the ESP32-S3 UART are bang-on (52us), so it's not a Tx clocking problem.
  • The BUSY line has perhaps 200mV of steady noise, and only ever hits around 4V instead of 5V when idle.

At first glance, I don't see why there's an issue with the ESP32-S3, but clearly there is.  Need a more detailed look at it next time, because nothing really stood out as "wrong", except that things don't work.


  • Romanov_AA likes this

#2090 Lardo5150

Lardo5150

    Explorer 1

  • -----
  • Posts: 78
  • Joined: 08 Sep 2024

Posted 15 June 2025 - 09:06 AM

When I ordered my HBGen3, I completely forgot about the cable.

Does it come with a cable?  If so, how long?

If not, or if it is to short, anyone have a link where I can go buy one, as I dont have the tools to make one.

 

Or will any RJ12 cable work?


Edited by Lardo5150, 15 June 2025 - 10:30 AM.


#2091 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 15 June 2025 - 10:27 AM

There's usually a short cable included, around 6" long or so.  More than enough to just plug it into an AUX port on the moving part of the mount and let it dangle.  It doesn't need to be "mounted" like heavier accessories.



#2092 Lardo5150

Lardo5150

    Explorer 1

  • -----
  • Posts: 78
  • Joined: 08 Sep 2024

Posted 15 June 2025 - 10:31 AM

There's usually a short cable included, around 6" long or so.  More than enough to just plug it into an AUX port on the moving part of the mount and let it dangle.  It doesn't need to be "mounted" like heavier accessories.

Great thanks.

These are just normal RJ12 cables correct?

Was thinking of grabbing a coiled one or short one, as I am trying to clean up my cables a bit.



#2093 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 15 June 2025 - 10:38 AM

These are just normal RJ12 cables correct?

Yes, but the two plugs on the ends do have to be the correct way around, otherwise something will get fried.
 



#2094 Lardo5150

Lardo5150

    Explorer 1

  • -----
  • Posts: 78
  • Joined: 08 Sep 2024

Posted 15 June 2025 - 11:16 AM

Yes, but the two plugs on the ends do have to be the correct way around, otherwise something will get fried.
 

Does anyone sell these?



#2095 dlwmacgregor

dlwmacgregor

    Viking 1

  • *****
  • Posts: 560
  • Joined: 17 May 2020
  • Loc: Ottawa CANADA

Posted 15 June 2025 - 11:40 AM

Does anyone sell these?

Here...

 

https://www.amazon.c...in_title_2&th=1

 

or here...

 

https://www.amazon.c...in_title_1&th=1


Edited by dlwmacgregor, 15 June 2025 - 11:42 AM.


#2096 Romanov_AA

Romanov_AA

    Lift Off

  • -----
  • Posts: 11
  • Joined: 01 Jun 2025
  • Loc: Bulgaria, Varna

Posted 15 June 2025 - 11:47 AM

Does anyone sell these?

There are many RJ-12 cables on ali xprss with a small price and different lengths.


Edited by Romanov_AA, 15 June 2025 - 11:48 AM.


#2097 Lardo5150

Lardo5150

    Explorer 1

  • -----
  • Posts: 78
  • Joined: 08 Sep 2024

Posted 15 June 2025 - 12:40 PM

the ends are wired correctly for the HomeBrew correct?



#2098 dlwmacgregor

dlwmacgregor

    Viking 1

  • *****
  • Posts: 560
  • Joined: 17 May 2020
  • Loc: Ottawa CANADA

Posted 15 June 2025 - 03:21 PM

the ends are wired correctly for the HomeBrew correct?

Yes, straight through.



#2099 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 8,027
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 15 June 2025 - 03:31 PM

Yes, straight through.

That term, "straight through", is ambiguous.  Especially because Celestron AUX cables (and the HBG3 cable) are NOT "straight through" in reality.  They are "flipped", or "reversed" from one end to the other.  Like "null modem" cables in the old days.

 

The terminology unfortunately has been "lost" on these forums, and on Amazon.  So don't rely upon terminology.

 

Each end of the cable should be identical to the opposite end, as shown in this photo:

 

aux_cable.jpg

 

This is technically a "/R" cable.  Notice the seam on the right half: the connector on the Right is on the opposite side of the flat cable from the one on the left, making it a "/R" (reversed, not straight) cable.

 

It is easiest to go by the wire colours order, which should be identical on both connectors.


Edited by mlord, 15 June 2025 - 03:33 PM.

  • MarkEHansen, Ice Cube and Romanov_AA like this

#2100 Rac19

Rac19

    Soyuz

  • *****
  • Posts: 3,991
  • Joined: 05 Aug 2016

Posted 16 June 2025 - 02:31 AM

I find the illustration below provides the clearest explanation. The "confusion" is due to fact the there are plugs at each end of the cable. If you imagine two sockets above the two plugs shown in post #2099, it is logical that the conductor sequence would be as shown for a 1:1 or "straight through" cable.

 

Attached Thumbnails

  • IMG_0069.jpeg

  • Astro Andy and Bartec like this


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics