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

#1051 Nemo51

Nemo51

    Surveyor 1

  • *****
  • Posts: 1,705
  • Joined: 25 Aug 2021

Posted 20 December 2023 - 12:40 PM

https://rtr.ca/hbg3/history.html has the updates. Mark updated the OLED status text to be more descriptive. 

Yes, I found that, but no solution to my issue. I can’t get sky portal to connect to either mount in direct or access point modes.

 

please indulge me as I’m old and visually impaired. 


Edited by Nemo51, 20 December 2023 - 12:42 PM.


#1052 mlord

mlord

    Cosmos

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

Posted 20 December 2023 - 12:48 PM

I have idle in direct and access point modes, using firmware .28 which it loads wirelessly. I have tried an evo and slt mount to the same effect. 

Does it give the three BLUE BLINKs after power-on when connected to a mount?

If not, then have you tried a different AUX cable yet?

 

If it does have the three BLUE BLINKs, then try connecting to it from SkyPortal in Direct Connect mode.  Remember to set SkyPortal to use that mode in Settings-Communications, and have the RED switch on the HBG3 in the DOWN position to select Direct Connect.


Edited by mlord, 20 December 2023 - 01:43 PM.


#1053 mlord

mlord

    Cosmos

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

Posted 20 December 2023 - 12:58 PM

It quotes 2.6 digits here but during testing it was 2.5 digits. Can up to 6 be held for increased accuracy?

fakegps 45.35165 -76.04777

It will retain up to six digits after the decimal point.


Edited by mlord, 20 December 2023 - 01:45 PM.

  • Astro Andy likes this

#1054 Nemo51

Nemo51

    Surveyor 1

  • *****
  • Posts: 1,705
  • Joined: 25 Aug 2021

Posted 20 December 2023 - 02:28 PM

Does it give the three BLUE BLINKs after power-on when connected to a mount?

If not, then have you tried a different AUX cable yet?

 

If it does have the three BLUE BLINKs, then try connecting to it from SkyPortal in Direct Connect mode.  Remember to set SkyPortal to use that mode in Settings-Communications, and have the RED switch on the HBG3 in the DOWN position to select Direct Connect.

None of these methods work, and you may recall from email that mine only blinks once on start up. Thanks 

 

addendum-your belief was that it blinked so fast I could not see it. I believe it has always blinked but once. 
 

Could I try going back to .23. And if so, where can I find it?

 

thanks!


Edited by Nemo51, 20 December 2023 - 02:55 PM.


#1055 mlord

mlord

    Cosmos

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

Posted 20 December 2023 - 04:14 PM

Older versions won't change the BLUE BLINKs, so no point in installed older/worse firmware.

 

Try it with whatever other AUX cables you have available.  The object here is to see the three BLUE BLINKs.  Nothing else will work if those don't happen.

 

If all of that fails, on ALL ports (including the HC port), on all mounts, then something has been fried on the HBG3 itself.

 

Cheers


Edited by mlord, 20 December 2023 - 04:28 PM.


#1056 Nemo51

Nemo51

    Surveyor 1

  • *****
  • Posts: 1,705
  • Joined: 25 Aug 2021

Posted 20 December 2023 - 04:43 PM

From the first start up, months ago, I’ve always gotten one blink, never three.  The only change in several weeks has been the firmware. It does say connected for less than a second and goes back to idle when I try direct connect and sky portal. 



#1057 mlord

mlord

    Cosmos

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

Posted 20 December 2023 - 05:16 PM

It does say connected for less than a second and goes back to idle when I try direct connect and sky portal. 

That is SkyPortal connecting, unable to communicate with the mount, and so then disconnecting.

 

Nemo51 is going to mail the HBG3 to me for repair now.  Cheers!
 



#1058 mlord

mlord

    Cosmos

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

Posted 20 December 2023 - 05:48 PM

Here is version v8.27 of the Arduino ESP32 source code for this project:

 ..

  • Add new "send" command.  Requires device and at least one (hex) command byte as args. Eg.  send ALT f

When that command got added, it was so I could poke at devices to learn more about their responses. But a use I had not anticipated has come to mind..

 

One can telnet to the HBG3 (port 3000), issue the "debug" command to gain access to the full set of commands, and then use "send" to remotely control things.. such as a Focuser!  This can be automated and hidden beneath a veneer of GUI, a phone app, or an ASCOM driver, etc..

 

Mmm..


Edited by mlord, 20 December 2023 - 05:55 PM.


#1059 Astro Andy

Astro Andy

    Explorer 1

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

Posted 21 December 2023 - 10:46 AM

V8.28+ issues:

  • NTP time seconds reach 99 sometimes but not always! This is now fixed
  • Fakegps 50.000000 -2.000000 changes to
    • N 49.99998
    • W  1.99998

Get all shows an exact dd.dddddd setting but the OLED shows dd.ddddd (less a digit, and different value). The different value is now fixed

 

Should the format be degrees decimal, degrees minutes decimal or degrees minutes and seconds decimal? I'm not familiar with "Pure Degrees". My source is https://www.findlati.../l/mhs/3922079/

 

The screen grab circled area matched my Nexus DSC.

 

Edit: Corrected OLED output W to 1.99998 from 2.99998

 

Cheers.

Attached Thumbnails

  • 1000013529-01~2.jpeg
  • P-BillJPG.jpg

Edited by Astro Andy, 21 December 2023 - 02:48 PM.


#1060 mlord

mlord

    Cosmos

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

Posted 21 December 2023 - 11:40 AM

V8.28+ issues:

  • NTP time seconds reach 99 sometimes but not always!
  • Fakegps 50.000000 -2.000000 changes to
    • N 49.99998
    • W  2.99998

Get all shows a dd.dddddd setting but the OLED shows dd.ddddd (less a digit, and different value).

 

Should the format be DD or DMS? https://www.gps-coordinates.net/

The format is ddd.dddddd as shown earlier.  Pure degrees with decimal fraction of a degree.

This is subject to computer floating-point rounding error, so a nice even number like 50.000000 will turn into something like 49.99998 because it cannot be exactly represented as 50.000000 in computer floating-point numbers.

 

The above also shows -2.000000 --> W2.99998.  Did that get transcribed correctly, or did you intend to say W1.99998 ?

EDIT: just tried it here, and confirmed that was just a transcription (human) error. smile.gif
 

And yes, this will happen with actual GPS readings too.

I'll fix the NTP seconds > 59 problem though!


Edited by mlord, 21 December 2023 - 12:24 PM.

  • Astro Andy likes this

#1061 masi

masi

    Explorer 1

  • -----
  • Posts: 53
  • Joined: 09 Nov 2023
  • Loc: Öhningen, Germany

Posted 21 December 2023 - 12:42 PM

For the common bipolar "NEMA 17" style motors, a "STEP/DIR" driver chip is normally used, and those connect via these pins:

 

  #define STEPPER_STEP_PIN      23
  #define STEPPER_DIR_PIN       18
  #define STEPPER_ENABLE_PIN    19

TMC 2209 does also needs to be powered, I can see that it has 2 connections, one for the logic itself second one for the powering NEMA 17

VM,GND -> Motor

VDD, GND -> Logic

 

can both be connected to 5V?

and which type of NEMA 17 should be used? any restrictions?

 

Thanks Martin



#1062 mlord

mlord

    Cosmos

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

Posted 21 December 2023 - 12:53 PM

There are a few things one can do to minimize the GPS floating-point errors.  So I have gone through the code just now, and removed all unneeded conversions of coordinates between floating-point (double) and integer representations.

 

The code used to use 24-bit integers wherever possible, because that's what the Celestron AUX protocol uses.  But the coordinates are not human-recognizable when displayed in that format!  smile.gif

 

So here's an update for you to try out:  Attached File  hbg3.ino.txt   292.45KB   13 downloads

 

Or use the OTA Firmware Update directly, by first setting the ota.update.path:

 

   set ota.update.path /hbg3/ntptesting.bin

   save

   reset

   ota_update

 

Cheers


Edited by mlord, 21 December 2023 - 01:00 PM.

  • Astro Andy likes this

#1063 mlord

mlord

    Cosmos

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

Posted 21 December 2023 - 01:06 PM

TMC 2209 does also needs to be powered, I can see that it has 2 connections, one for the logic itself second one for the powering NEMA 17

NEMA 17 steppers want 12V power for the Motor.  You can take that from the RAW pad on the HBG3.

But use 3.3V for the logic.

 

Otherwise, no restrictions on which motor, but I recommend the smallest type you can get, to keep the weight down.  Even the small ones have lots of torque for focusing.  smile.gif  I use a small (23mm thick) NEMA 17 stepper motor here.

 

EDIT: Also, ensure you do this:

 

// For STEP/DIR, wire STEPPER_PIN_D to ground on the driver board.

(or on the HBG3 itself).


Edited by mlord, 21 December 2023 - 05:22 PM.


#1064 masi

masi

    Explorer 1

  • -----
  • Posts: 53
  • Joined: 09 Nov 2023
  • Loc: Öhningen, Germany

Posted 21 December 2023 - 01:49 PM

// For STEP/DIR, wire STEPPER_PIN_D to ground on the driver board.

Translated to TMC2209 I have A2,A1,B1,B2

 

means B2 -> to GND  (should it also be connected to PIN 5 of ESP?)


Edited by masi, 21 December 2023 - 01:49 PM.


#1065 mlord

mlord

    Cosmos

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

Posted 21 December 2023 - 01:51 PM

Translated to TMC2209 I have A2,A1,B1,B2

means B2 -> to GND  (should it also be connected to PIN 5 of ESP?)

A,B,C,D are labelled pin/pads on the HBG3.  That is what it refers to.
 

Pin D5 of the ESP32 corresponds to "D".

 

ABCD.jpg

 

Note that whenever connecting any wire to the outer set of holes (either side) on the HBG3, the wire must extend through to to ESP32 side and be soldered there, as well as on the HBG3 side.

 

Those four pins are used for both kinds of stepper motor drivers, as well as for the Ethernet module.  And possibly some day for a ST-4 auto-guide port on the HBG3.   Only one of those functions can be wired up at a time though.


Edited by mlord, 22 December 2023 - 12:44 PM.


#1066 mlord

mlord

    Cosmos

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

Posted 21 December 2023 - 04:07 PM

Here is v8.29 of the Arduino ESP32 source code for this project: Attached File  hbg3.ino.v8.29.txt   292.5KB   21 downloads

  • Where possible, eliminate unneeded double<-->int32_t conversions of GPS coordinates.
  • Tweak Nunchuck settings for Celestron Focus Motor speeds.
  • Be even more tolerant of extra spaces in commands.
  • Ensure Factory Reset clears NVRAM only once.

Nothing Earth-shattering, no super novas, just gradual improvements in a few areas.

Trying to get things settled nicely for the Christmas break.

 

This version is available as an OTA Firmware Update for both the HBG3 and the All-In-One (AIO) projects.

Also, the full/pre-configured HBG3_Arduino build packages are being updated with this version now too.

 

Cheers

Mark


Edited by mlord, 21 December 2023 - 04:33 PM.

  • jmoflhrc likes this

#1067 Astro Andy

Astro Andy

    Explorer 1

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

Posted 21 December 2023 - 04:53 PM

No more boards when this supply is gone? 

I notice above is the November Gen3h board with double Raw, Gnd and 5v pad. There may be more features but it also may not have had a production run.


Edited by Astro Andy, 21 December 2023 - 06:46 PM.


#1068 mlord

mlord

    Cosmos

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

Posted 21 December 2023 - 05:19 PM

The Gen3h is the current PCB version, and the last one for a while.  I have some travel planned for the winter, so will likely not be distributing more for a while after this batch runs out.


  • Astro Andy likes this

#1069 Astro Andy

Astro Andy

    Explorer 1

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

Posted 21 December 2023 - 06:57 PM

Maybe quarterly board releases or even longer would be easier or less hassle for you Mark. The current boards are amazing and cheap enough that having a couple of spares isn't breaking the bank as well as ensuring there is always a working model for actual use.

 

I really appreciate the effort you put in to this. I'm sure as word gets out to more Celestron owners there will be more interest as well as repeat orders for new boards as spares and alt setups. You definitely need a 'buy me a coffee' QR code.


  • Rac19 likes this

#1070 Rac19

Rac19

    Soyuz

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

Posted 23 December 2023 - 08:43 AM

Some candidates as new features for next year (sometime). Just floating them as suggestions.

 

1. A function to print the contents of the OLED screens to the Telnet screen. Print_OLED could print all screens, Print_OLED 1, Print_OLED 2 the first and second screen etc. This would be useful for permanently mounted scopes during daylight hours when the OLED screen can be illegible. Also useful for more remote Telnet sessions.

 

2. Support for Bluetooth game controllers, such as Xbox One. The Nunchuck is good but a wireless game controller is just a little nicer. The is currently available with CPWI but it would be nice to have when not using CPWI. Not sure if this is easy or difficult to support on Arduino.

 

3. Provision to reverse one or other game controller axis. I find that the Nunchuck Alt axis is the reverse of what I would. like it to be. I can deal with it but being able reverse it would be useful.

 

Thanks Mark, for the super fast, overnight response. Not really expected until next year. Thus will be very useful for documentation and debugging, come to think of it.


Edited by Rac19, 23 December 2023 - 04:06 PM.


#1071 mlord

mlord

    Cosmos

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

Posted 23 December 2023 - 10:13 AM

Here is v8.30 of the Arduino ESP32 source code for this project:

--> Primary  hbg3.ino source code:   Attached File  hbg3.ino.v8.30.txt   293.49KB   27 downloads

--> Optional eth.h Ethernet support: Attached File  eth.h.txt   17.22KB   19 downloads

 

What's new:

  • New "oled" command dumps all OLED displays to Serial/Debug, even when no OLED is wired up.
  • Use .println() instead of .write() for p3000 SERIAL_PRINTLN().

The new "oled" command (below) is quite nice, and ticks someone's Holiday wishlist. smile.gif  While implementing that, I found/fixed a bug that affected Debug over ethernet, and did some tidying.  Thus the updated "eth.h" file also included above.

 

As usual, binaries and full source/build archives are in all of the usual places for both the HBG3 and the AIO projects.

 

Enjoy!

thankyou.gif

 

+-----------------------+
| Dewpoint:   8.7C      |
| Air:  22.5C  RH:  41% |
| Ch0:  21.8C  +9C   0% |
| Ch1:        Man:   0% |
+-----------------------+
| v8.30 HBG3 Idle       |
| WiFi: AccessPoint     |
| SSID: BETHLEHEM       |
|   IP: 192.168.99.125  |
+-----------------------+
| GPS Sats: 00/00       |
| Latitude:  ----.----- |
| Longitude: ----.----- |
| 23/12/23 NTP 15:16:50 |
+-----------------------+
| OTA Firmware Update   |
| ===================   |
| Push/hold button      |
|  to trigger update.   |
+-----------------------+
| Display Off.          |
| HBG3 v8.30            |
| 2023-12-23            |
| MinFree: 24460        |
+-----------------------+


Edited by mlord, 23 December 2023 - 12:15 PM.

  • Rac19 and Astro Andy like this

#1072 Astro Andy

Astro Andy

    Explorer 1

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

Posted 23 December 2023 - 10:52 AM

2. Support for Bluetooth game controllers, such as Xbox One. The Nunchuck is good but a wireless game controller is just a little nicer. The is currently available with CPWI but it would be nice to have when not using CPWI. Not sure if this is easy or difficult to support on Arduino.

I use the gyro pan tilt in SkyPortal on my Pixel to slew. This only has fast slew speed so not the best but with practice works well. Xbox controller would have plenty of inputs (I use one with a 'Big Big Won' adaptor in a PS4) - possibly too many! A full size USB female for joypad (Nintendo style) or flight controller would be really cool. 


Edited by Astro Andy, 24 December 2023 - 05:34 AM.


#1073 mlord

mlord

    Cosmos

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

Posted 23 December 2023 - 12:03 PM

The Nunchucks have built-in accelerometer sensors. Ignored by the HBG3 for now.


Edited by mlord, 23 December 2023 - 12:14 PM.


#1074 Rac19

Rac19

    Soyuz

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

Posted 24 December 2023 - 12:57 AM

 

  • New "oled" command dumps all OLED displays to Serial/Debug, even when no OLED is wired up.

Works very nicely, thank you. In addition to the uses stated originally (post #1070), it should be useful for documentation and remote debugging. I just got my 12 VDC connection to the Aux port (post #953) working but it's probably not necessary now.


  • Astro Andy likes this

#1075 masi

masi

    Explorer 1

  • -----
  • Posts: 53
  • Joined: 09 Nov 2023
  • Loc: Öhningen, Germany

Posted 26 December 2023 - 07:59 AM

 

     set focus.limits 20000 40000

     set focus.calibrated 1

     save

     reset

 

Today I found some time to try the Focus Calibration, currently I am using an ULN Driver Modul, and of course the latest 8.30 Version.

By using the Nunchuck I can see the motor moving, very slow but its moving.

If I use the Focuser out of SkyPortal and I enter a value between my limits, it starts moving and stops 1/2 second later by telling me I have to recalibrate. Also some time later my connection is lost and I have to restart HBG3.

 

Second question I have is that the limits 0-60000 does not seem to handle the full range of the focusknob should it be like this? or should be the whole range handeled I can use by manual using the focusknob?

 

thanks

Martin




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