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
2082 replies to this topic

#651 jproehl

jproehl

    Explorer 1

  • *****
  • Posts: 71
  • Joined: 26 Feb 2021
  • Loc: Cornish, NH

Posted 26 August 2023 - 07:20 PM

That should not be happening. Are you sure your power source was still giving 12V power during that episode?

Yes, if you are not using the WiFi/BT/USB features of the HBG3, then you could power it from 12V without plugging it into an AUX port. If it doesn't already have a DC-In jack, then the easiest way to accomplish that might be to create a special "AUX" cable with the 6P6C plug at one end, and a DC-In jack on the other end, connected only to the wires for pins 2 (12) and 4 (GND).

EDIT: Oh, Focus Motor.. Okay, so power the HBG3 with 5V through its USB port instead of connecting to the mount.

Hot-plugging _anything_ on a Celestron mount is risky to all of the electronics involved.

Cheers



#652 jproehl

jproehl

    Explorer 1

  • *****
  • Posts: 71
  • Joined: 26 Feb 2021
  • Loc: Cornish, NH

Posted 26 August 2023 - 07:20 PM

That should not be happening. Are you sure your power source was still giving 12V power during that episode?

Yes, if you are not using the WiFi/BT/USB features of the HBG3, then you could power it from 12V without plugging it into an AUX port. If it doesn't already have a DC-In jack, then the easiest way to accomplish that might be to create a special "AUX" cable with the 6P6C plug at one end, and a DC-In jack on the other end, connected only to the wires for pins 2 (12) and 4 (GND).

EDIT: Oh, Focus Motor.. Okay, so power the HBG3 with 5V through its USB port instead of connecting to the mount.

Hot-plugging _anything_ on a Celestron mount is risky to all of the electronics involved.

Cheers



#653 jproehl

jproehl

    Explorer 1

  • *****
  • Posts: 71
  • Joined: 26 Feb 2021
  • Loc: Cornish, NH

Posted 26 August 2023 - 07:24 PM

Most of my testing was using just an Aux connection and without 12v power. I did try it with 12v connected to the HBG3, but I didn’t see significant differences in behavior. However, I’ll have to revisit my testing with 12v power to carefully check how it’s working. I’ll avoid hot swapping cables going forward. I’ll also see how it’s behaving on my Evolution mount to see if perhaps my CPC mount is acting up.

#654 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 26 August 2023 - 07:29 PM

I've forgotten, but it sounds like your HBG3 has a 12V DC-In jack wired up, so that you could use it and the Focus Motor together without any AUX connection to the mount itself.  When using the DC-In, an AUX cable can be used directly from the HBG3 to the Focus Motor, to communicate with and power the motor.

 

The DC-In jack should NEVER be used when the HBG3 is connected to any mount via the AUX cable.



#655 jproehl

jproehl

    Explorer 1

  • *****
  • Posts: 71
  • Joined: 26 Feb 2021
  • Loc: Cornish, NH

Posted 26 August 2023 - 08:29 PM

Okay, good to know. So, let me know if I’ve got the possible connections correct:

 

1) Aux cable alone to HBG3 and Aux connection from the mount to the Celestron focus motor,

2) 12v cable to HBG3 with direct Aux connection to the Celestron focus motor,

3) 12v cable to HBG3 with a wi-if connection to the Celestron mount and the focus motor connected via Aux connection to the mount.

Are there other options?



#656 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 26 August 2023 - 09:04 PM

Okay, good to know. So, let me know if I’ve got the possible connections correct:

 

1) Aux cable alone to HBG3 and Aux connection from the mount to the Celestron focus motor,

2) 12v cable to HBG3 with direct Aux connection to the Celestron focus motor,

3) 12v cable to HBG3 with a wi-if connection to the Celestron mount and the focus motor connected via Aux connection to the mount.

Are there other options?

Option (3) above is not useful.  The HBG3 cannot communicate with the Focus Motor in that configuration.

 

And (1) as written also makes no sense.  Let's assume that for (1) we have an AUX cable between the HBG3 and mount, as well as another AUX cable between Focus Motor and mount.

 

With that correction, (1) and (2) make sense.  I would use (1) if possible.

 

In either (1) or (2), CPWI can connect to the HBG3 and control the Focus Motor over any of WiFi, BT, or USB.  But only option (1) also allows CPWI to control the mount as well.

 

Cheers


Edited by mlord, 26 August 2023 - 09:05 PM.


#657 jproehl

jproehl

    Explorer 1

  • *****
  • Posts: 71
  • Joined: 26 Feb 2021
  • Loc: Cornish, NH

Posted 26 August 2023 - 09:25 PM

 

And (1) as written also makes no sense.  Let's assume that for (1) we have an AUX cable between the HBG3 and mount, as well as another AUX cable between Focus Motor and mount.

 

What I meant in #1 by “Aux cable alone to the HBG3” was that the only connection to the HBG3 was an Aux cable to the mount. In addition, the focus motor was connected to the mount via Aux cable. So, I meant exactly what you assumed I meant. That appears to be my best option and what I was doing in my testing.

 

However, I forgot about the possibility of being up against the focus limit. I assume that CPWI will tell me the precise focus value  so I could tell where the focus motor is positioned.  I also seem to recall that I can also navigate around the hand control menu to find the focus motor position, is that correct?



#658 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 26 August 2023 - 09:45 PM

 I assume that CPWI will tell me the precise focus value  so I could tell where the focus motor is positioned.  I also seem to recall that I can also navigate around the hand control menu to find the focus motor position, is that correct?

I think both will tell you the position.

 

But if you encounter a situation where it won't go in a particular direction, then just go the other way briefly, and then try back again.  It should move both ways, and then stop at the limit again.  Right?



#659 Frapeno

Frapeno

    Explorer 1

  • -----
  • Posts: 54
  • Joined: 04 Oct 2017
  • Loc: Brazil

Posted 27 August 2023 - 12:53 AM

I strongly suspect they don't have a protocol analyzer like the HBG3 (or like the Celestron AUX Bus Scanner).  If they did, they'd be able to test their stuff better.

 

You said that already.  No need to keep repeating it.

Yeah sorry,

I spent few hours trying to do that, watching tutorials about it, and I failed, really no easy job, attached Saturn array data for reference.
Was tested by Arduino uno an it worked. But when try to implement in main code HBG3, no way to work.
Too many errors I got, even when no error also doesn't show the animation.

Attached Files



#660 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 28 August 2023 - 09:43 AM

With the recent change to clear and more interesting sky at night, I have actually managed to use my telescope outdoors a few more times now.  And based on experience, there's a change I am now planning to how the Nunchuck operates with the HBG3.

 

I use the Nunchuck mainly for fine slewing, centering objects in the field of view more often than doing longer range slews.  And I have been finding the Nunchuck a bit too twitchy for my liking.

 

Currently, there are five speed "ranges" for any given movement of the thumbstick from center, and in v7.12 those are mapped to produce motor speeds of 4,5,6,7,9, covering the full useful speed range of the mount.

 

In upcoming versions this will be changed to favour slower slewing, with motor speeds of 4,4,5,5,6 by default.  Speed freaks need not despair though, as the unused 'Z' button on the Nunchuck can be held in to produce the original faster speed ranges of 4,5,6,7,9.

 

EDIT: I'm also tweaking the movement widths of the five Nunchuck "speed zones" a bit too.

 

This change will first appear in v7.13, likely later this week.  But here's a preview copy: Attached File  hbg3.ino.txt   222.6KB   24 downloads

Comments and suggestions on this and other stuff are welcome!

 

Cheers


Edited by mlord, 28 August 2023 - 11:06 AM.

  • jameslew and Frisk like this

#661 dlwmacgregor

dlwmacgregor

    Viking 1

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

Posted 28 August 2023 - 10:18 AM

This week will be a welcome change to the cloudiness of this summer.

Normally I don't take my scope out if it's 2 days or less in a row.

Anxious to try out the new slewing speeds.



#662 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 29 August 2023 - 03:49 PM

Currently, there are five speed "ranges" for any given [slew] movement of the thumbstick from center, and in v7.12 those are mapped to produce motor speeds of 4,5,6,7,9, covering the full useful speed range of the mount.

 

In upcoming versions this will be changed to favour slower slewing, with motor speeds of 4,4,5,5,6 by default.  Speed freaks need not despair though, as the unused 'Z' button on the Nunchuck can be held in to produce the original faster speed ranges of 4,5,6,7,9.

 

EDIT: I'm also tweaking the movement widths of the five Nunchuck "speed zones" a bit too.

As promised, here is v7.13 of the ESP32 source code for this project:  Attached File  hbg3.ino.v7.13.txt   224.09KB   33 downloads

  • Show emulated device (eg. "gps_rx") instead of "emdev_rx" when tracing.
  • RELAY:  txq->busy_timeout was too short (1.25 seconds); increased it to 15.00 seconds. Reason is StarSense-HC sometimes holds BUSY while doing plate solve.. takes it a while..
  • RELAY:  Replace build variable SSFORWARD_ENABLED with NVRAM variable relay.ssforward (1=on, 0=off).
  • RELAY:  Fix SSFORWARD_ENABLED; was broken by recent memory-saving tweaks.
  • NCHUCK: Slower slewing by default; use 'Z' button for original "faster" slewing.
  • NCHUCK: Slight tweaks to make speed zone '4' a bit wider on the Nunchucks.
  • SSAA:   Emulator tweaks.

The obvious change for most people will be less twitchy slewing using the Nunchuck, along with the new Z-Button function for faster/twitchier slewing.  smile.gif

 

HBG3-Relay users can enable full bridging by settting the relay.ssforward variable to 1 in NVRAM, which enables StarSense AutoAlign accessories (camera, HC) to be plugged into any AUX ports (without it, regular operation requires that both be on the same side of the Relay).

 

The .zip/.tgz build archives have been updated now to include this new version, alongside most previous versions of the source code:

 

Project site:

https://rtr.ca/hbg3/

 

MS-Windows build environment and code:

http://feral.rtr.ca//HBG3_Arduino.zip

 

Linux build environment and code:

http://feral.rtr.ca/...ino_Linux64.tgz


Edited by mlord, 29 August 2023 - 06:39 PM.

  • KenF9000, Frisk and fdboucher like this

#663 Frisk

Frisk

    Viking 1

  • *****
  • Posts: 543
  • Joined: 28 Aug 2017
  • Loc: NJ

Posted 29 August 2023 - 04:45 PM

Will start using kids' nunchucks now! 



#664 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 30 August 2023 - 03:51 PM

Today I had an excuse to build another "standalone" HBG3 for using a Nunchuck to control a Celestron Focus Motor on a non-Celestron mount.  This is really just a "regular" HBG3, but with a 12V DC-In jack also wired in place, to power it and the Focus Motor.

 

Discovered two things:

 

1. The first ESP32 module I tried, was 100% completely dead from the factory.  Fortunately, I now always pre-program those before soldering them in place, so the bad one got tossed and replaced with another without wasting anything else.

 

2. I no longer have a Celestron Focus Motor, but I do have a HBG3 Focus Motor.  So I plugged that into the new "standalone" HBG3 for testing.  Nothing worked.  Mmm..  Humm.. Mmm.. Oh, right, nothing in that setup has RX/TX tied together, as a Celestron mount would normally do.  And since both HBG3 units are wired the same as a "mount" (but without RX/TX tied together), there was no compensating "cross-over" anywhere.  After adding a temporary "cross-over" (swapping RX/TX lines), it worked just fine.

 

That's not an issue when plugging a Celestron Focus Motor in -- it is wired as an "accessory", so there's an inherent cross-over when a regular HBG3 is attached to one!  Whew!  All good.  smile.gif

 

Cheers


Edited by mlord, 30 August 2023 - 03:53 PM.


#665 dansxmods

dansxmods

    Lift Off

  • -----
  • Posts: 2
  • Joined: 20 Aug 2023

Posted 31 August 2023 - 05:09 AM

Hi, got my kit from Mark this week and just took it out and got a gps time immediately. The problem I'm facing is when I slew to align with the kit connected the scope doesn't stop slewing and the hc says lost connection. I have a nexstar 130slt. I'll grab the version of firmware shortly. It doesn't matter if I use the hc or skyportal to slew, both cause it to lose connection. I am only running it off 8 AA batteries so would this cause the disconnection?

#666 dansxmods

dansxmods

    Lift Off

  • -----
  • Posts: 2
  • Joined: 20 Aug 2023

Posted 31 August 2023 - 07:01 AM

****. Yeah just discovered that. I updated my firmware. Still did it. Then found a 12v power supply and bam no drop outs and I can slew over wifi
  • mlord likes this

#667 jkfishking

jkfishking

    Sputnik

  • -----
  • Posts: 41
  • Joined: 24 Oct 2021
  • Loc: Knoxville, TN

Posted 31 August 2023 - 12:12 PM

Any idea if this could work with an ASIAIR to eliminate the Celestron hand controller?

#668 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 31 August 2023 - 03:16 PM

Any idea if this could work with an ASIAIR to eliminate the Celestron hand controller?

Best information about that was here:
https://www.cloudyni.../#entry12835417

https://bbs.zwoastro...-celestron-wifi

 

It sounds as if the ZWO/ASIAIR folks don't understand Celestron mounts, and support ONLY the hand-controller for connection and alignment.

 

EDIT: There's also this old youtube video:  https://www.youtube....h?v=haQj-kiE5ec

At offset 6:20 in the video, they describe an "ethernet" connection to the mount.  WiFi (port 2000) can easily be substituted for ethernet, as both are really TCP/IP.  But it is unclear whether or not the hand-controller connection is still required.


Edited by mlord, 31 August 2023 - 03:30 PM.

  • jkfishking likes this

#669 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 02 September 2023 - 10:49 AM

HBG3 with OLED, push button, and BE-180 GPS module:

 

3.jpg

 

I'm running out of places to add things inside the clear heat-shrink!  :)


  • tjay, MikeHC8, jkfishking and 1 other like this

#670 dlwmacgregor

dlwmacgregor

    Viking 1

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

Posted 02 September 2023 - 12:18 PM

Where did you get that cute little push button?



#671 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 02 September 2023 - 12:23 PM

Where did you get that cute little push button?

Those are widely available from any electronics vendor, AliExpress, Amazon, etc.

I use them a lot, so I got a larger pack of them:

 

https://www.amazon.ca/dp/B07VSNN9S2

https://www.amazon.c.../dp/B01CGMP9GY/

https://www.amazon.c...t/dp/B07VQF8P2Y

 

button.jpg


Edited by mlord, 02 September 2023 - 12:25 PM.


#672 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 04 September 2023 - 07:18 PM

Here is v7.14 of the Arduino ESP32 source code for this project:  Attached File  hbg3.ino.v7.14.txt   224.19KB   28 downloads

One very simple single-character change this time:

 

Fix an off-by-one length validation bug in packet_decoder().

 

That bug might cause use of SSAG to fail when using the HBG3 wireless or USB connections.

Updating is necessary for anyone using the StarSense AutoGuider (SSAG).

EDIT: Similar issue might also happen with the Smart Dew Controllers.. so update if you use one of those.

 

The .ZIP/.TGZ files have also now been updated to include v7.14.

 

Cheers


Edited by mlord, 04 September 2023 - 07:45 PM.


#673 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 05 September 2023 - 05:27 PM

I am testing some new GPS receivers here today (BE-182), and noticed a problem with GPS baud detection.  Once in a while, the HBG3 "detects" a GPS, but never gets a location "fix".  The reason is, it is listening at 9600 when the GPS module is using 38400.

 

The code already clumsily tries to deal with that, but still fails enough to bother me.  I have a fix, which appears to be VERY reliable.

 

Anyone else notice this?



#674 pbddict1

pbddict1

    Explorer 1

  • *****
  • Posts: 96
  • Joined: 06 May 2018
  • Loc: Stamford, NY

Posted 05 September 2023 - 07:23 PM

I've not had any issues with GPS fix time.
Thanks for the constant improvements either way though!

#675 mlord

mlord

    Cosmos

  • *****
  • topic starter
  • Posts: 7,892
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada.

Posted 05 September 2023 - 09:55 PM

Here is v7.15 of the Arduino ESP32 source code for this project: Attached File  hbg3.ino.v7.15.txt   230.41KB   35 downloads

  • GPS:  Always wait at least 10-minutes before powering-down GPS.
  • GPS:  Improve GPS/baudrate detection: wasn't reliable before.
  • SSAG: Emulate more SSAG commands.
  • SSAG: Decode SSAG commands.

This release was prompted by noticing that, once in a while, my own HBG3+GPS+OLED would never indicate a GPS fix.  But a quick power-cycle would then give an immediate GPS fix.  Huh?  shocked.gif

 

Well, it turns out that the GPS detection and auto-baudrate code were not working as well as hoped.  So I've completely redone them, and also worked around a bug in the hardware serial library:  the flush() function wasn't completely emptying the hardware receive buffers, and this was causing trouble when the auto-baudrate code changed speeds..

 

Anyway, all of that is (I think) fixed now, and still works quickly enough to satisfy the StarSense hand-controller (which checks for GPS at power-on, unlike the Nexstar+ version).

 

My "supported" GPS list now includes these Beitian modules: BN-180, BE-180, BE-182, and BE-122.  The BE-182 is quite good, and was a bit of a bargain last week from AliExpress.

 

The other nifty change in v7.15, is the StarSense AutoGuider (SSAG) simulation is now good enough for me to perform an indoor "alignment" of my Evolution mount using that with a Nexstar+ hand-controller.  Nifty!  If anyone else wants to try it, use the serial monitor on the HBG3 to issue these commands first:

 

   set emulate.ssag 1

   save

   reset

 

If you later want to disable the SSAG emulator, then repeat those commands with a '0' instead of the '1'.


Edited by mlord, 05 September 2023 - 10:01 PM.

  • KenF9000 likes 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