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

#301 hpservertech

hpservertech

    Vostok 1

  • *****
  • Vendors
  • Posts: 184
  • Joined: 11 Jul 2021

Posted 18 April 2023 - 01:27 PM

No, it is still there, just didn't post it cause that wasn't being changed.



#302 hpservertech

hpservertech

    Vostok 1

  • *****
  • Vendors
  • Posts: 184
  • Joined: 11 Jul 2021

Posted 18 April 2023 - 02:24 PM

yes


  • mlord likes this

#303 KenF9000

KenF9000

    Ranger 4

  • -----
  • Posts: 389
  • Joined: 04 Jun 2004
  • Loc: UK, East Yorkshire (54N 0W)

Posted 18 April 2023 - 05:14 PM

The difference between each display type is defined in "SSD1306init.h" which can be found in the SSD1306Ascii-master library.

It may be you need to define a different display type for your display.

 

It has entries for:

MicroOLED64x48

SSD1306_96x16

Adafruit128x32

Adafruit128x64

SH1106_128x64

 

In case its the library I used this one from: https://github.com/g...1306AsciiWire.h

 

That works with my display.


Edited by KenF9000, 18 April 2023 - 05:17 PM.

  • mlord likes this

#304 mlord

mlord

    Fly Me to the Moon

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

Posted 18 April 2023 - 05:29 PM

Here is v5.31 of the Arduino ESP32 source code for this project.

 

Attached File  esp32_wifi.ino.v5.31.txt   85.28KB   38 downloads

  • GPS:  Fixed under-reporting of Satellites-In-View..
  • OLED: Fixes for more than one type of 128x64 display.
  • OLED: Don't sleep the GPS when using an OLED display.

There is also a pre-built binary version for simpler flashing, at https://rtr.ca/teles...stuff/flashing/

This version of the code now has these lines for selecting the correct type of OLED display:

 

// Uncomment ONE of these three depending upon the exact model of OLED. Experiment if you don't know which.
#define OLED_TYPE         Adafruit128x32  // Green tab on factory screen cover
//#define OLED_TYPE       Adafruit128x64
//#define OLED_TYPE       SH1106_128x64   // Green tab on factory screen cover

 

The default OLED type remains the usual Adafruit128x32 display.  The SH1106 ones should use the SH1106_128x64 setting, and the display that user hpservertech has should be set for Adafruit128x64 instead.  Tested here with a 128x32 display, as well as a SH1106_128x64 version.

 

Note that a 128x32 OLED uses about 1/4W of power, similar to what the BN-180 GPS unit uses when not in "sleep" mode.  So the combination of those two chews 1/2W of power, or about 40% more than the basic HomeBrew Gen3 without an OLED.


Edited by mlord, 19 April 2023 - 02:48 PM.

  • KenF9000, pbddict1 and fdboucher like this

#305 mlord

mlord

    Fly Me to the Moon

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

Posted 18 April 2023 - 11:02 PM

And.. here is v5.32 of the Arduino ESP32 source code for this project.

 

Attached File  esp32_wifi.ino.v5.32.txt   86.9KB   47 downloads

  • GPS: Support the Beitian BE-180 and others that use 38400 baud.
  • fixed configuration information output over USB at startup.
  • Fixed default for OLED_ENABLED to be false again.

There is also a pre-built binary version for simpler flashing, at https://rtr.ca/teles...stuff/flashing/

 

The new Beitian BE-180 GPS module is less expensive than the original BN-180, and seems to be a better unit in all respects.  But it defaults to 38400bps at start-up, so the code has been modified to auto-switch to that speed (from 9600bps) as needed.

 

 


  • KenF9000 likes this

#306 b079

b079

    Sputnik

  • *****
  • Posts: 48
  • Joined: 04 Jan 2023
  • Loc: Illinois

Posted 22 April 2023 - 01:25 PM

Any chance the homebrew could directly drive a cheap stepper motor? Below is the code I am using with a nunchuck now. Could be a nice option for those who do not want to spend $200 on a Celestron focus motor.  Just a thought.

Arduino code
https://pastebin.com/raw/zc8VUd1H

3d printed parts and instructions for building focuser.
https://www.thingive...m/thing:3552339
 

Also, got your boards yesterday. Looking forward to putting these together. Still waiting on some parts from Ali to arrive though. I appreciate you keeping your source open. I can always add it in myself otherwise.


Edited by b079, 22 April 2023 - 01:39 PM.


#307 mlord

mlord

    Fly Me to the Moon

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

Posted 22 April 2023 - 02:40 PM

Any chance the homebrew could directly drive a cheap stepper motor? Below is the code I am using with a nunchuck now. Could be a nice option for those who do not want to spend $200 on a Celestron focus motor.  Just a thought.

Arduino code
https://pastebin.com/raw/zc8VUd1H

3d printed parts and instructions for building focuser.
https://www.thingive...m/thing:3552339

Not enough current on the pins to directly drive a motor, but no problem with any of the commonly available motor drivers between the ESP32 and a motor.  There are lots and lots of spare GPIO pins available.

 

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

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

 

This actually looks like fun.  I'm thinking of getting a Bambu Labs printer, and this would be a good project to start with.  I would program that part of the HomeBrew Gen3 to pretend to be a Celestron Focus Motor, so that it would automatically become compatible with the hand-controllers and CPWI etc.

 

And of course it would also work just fine with the existing HomeBrew Gen3's Nunchuck focuser interface too.


Edited by mlord, 22 April 2023 - 02:51 PM.

  • KenF9000 likes this

#308 coollick

coollick

    Explorer 1

  • -----
  • Posts: 64
  • Joined: 21 Feb 2021
  • Loc: Ottawa, Canada

Posted 22 April 2023 - 03:40 PM

3d printed parts and instructions for building focuser.
https://www.thingive...m/thing:3552339

I printed that one a few weeks ago, it is a very nice design.

But I had to remix the adapter because the 3 screws are further appart on my 8SE optical tube and I think some other minor adjustment.

Here is the remixed piece for 8SE https://www.thingive...m/thing:5985382

 

Wanted to integrate focuser motor control into Gen3, (with a ULN2003 driver board).

Was thinking after pressing Z, nunchuck is in focus mode, C slewing ... or while holding one of the buttons it is in focus mode.

But I realized that we need to be careful not force the focus knob beyond limits.

Between reboots, Gen3 would need to remember the previous focus position, how many turns from end-to-end, how to setup limits...

There is no "clutch" system with this design, I think the stepper motor is strong enough to break the focus in your optical tube.

After thinking about this, I put the project on hold.


  • mlord likes this

#309 mlord

mlord

    Fly Me to the Moon

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

Posted 22 April 2023 - 10:24 PM

.. I don't the Celestron version keeps tracks of steps.

It actually does keep track, and respects the "limits" that are figured out during the initial set-up steps.
 

Please move discussion of a HomeBrew Focus Motor to a new thread, rather than growing this one beyond a reasonable size.

 

Thanks.


  • b079 likes this

#310 servitecnic3999

servitecnic3999

    Lift Off

  • -----
  • Posts: 8
  • Joined: 29 Dec 2021

Posted 24 April 2023 - 05:50 AM

Hello Mark, I have installed Gen3 with vers.5.31 on Nexstar 6se with starsense and OLED screen, when I turn on the telescope, the oled shows no GPS but in a few seconds I have everything, time, location, but in the telescope I have to indicate each Sometimes there is GPS because it is set to manual, before I had version 5.18 and I did not have that problem, is there a solution or is it that I have forgotten to modify something in the .ino, I am using the Betiana BE-180



#311 servitecnic3999

servitecnic3999

    Lift Off

  • -----
  • Posts: 8
  • Joined: 29 Dec 2021

Posted 24 April 2023 - 06:48 AM

Hello Mark, I have another question, if I want to have an OLED screen and a nunchuck, how could I have it, with a switch that will cut the positive (VCC), or can't have both, thank you very much for all the effort you put in



#312 mlord

mlord

    Fly Me to the Moon

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

Posted 24 April 2023 - 08:24 AM

I am using the Betiana BE-180

The BE-180 did NOT work with versions prior to 5.32, unless you hacked the code to make it work.

In v5.32, it does work now by default, but perhaps is taking too long in the auto-baudrate detection.  The StarSense hand-controller polls for the GPS more quickly at start-up than the Nexstar+ HC, so I may need to change how that works.  Stay tuned.

 

 

if I want to have an OLED screen and a nunchuck, how could I have it?

Just plug them both in.  They will both work.  Nothing else needed.

If your Gen3 is one of the earlier versions, then just wire them both in parallel onto the same 4-pins.


Edited by mlord, 24 April 2023 - 08:25 AM.


#313 servitecnic3999

servitecnic3999

    Lift Off

  • -----
  • Posts: 8
  • Joined: 29 Dec 2021

Posted 24 April 2023 - 08:57 AM

Thanks for your answer. I made a mistake, the version I have is 5.32.

#314 mlord

mlord

    Fly Me to the Moon

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

Posted 24 April 2023 - 10:09 AM

Here is v5.33 of the Arduino ESP32 source code for this project, with a few tweaks for OLEDs and the new BE-180 GPS modules:

 

Attached File  esp32_wifi.ino.v5.33.txt   87.58KB   35 downloads

  • GPS:  Speed up auto-baud so GPS detection finishes before StarSense HC polls for GPS.
  • GPS:  Increase sleep timeouts.
  • OLED: Show HomeBrew SSID on top line of 128x64 displays.
  • OLED: Fixed bug in "Don't sleep the GPS when using an OLED".

There is also a pre-built binary version for simpler flashing, at https://rtr.ca/teles...stuff/flashing/

 


  • fdboucher likes this

#315 mlord

mlord

    Fly Me to the Moon

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

Posted 24 April 2023 - 10:24 AM

Another month, and time for another batch of PCBs.   The new ones are labelled as Gen3d on one side, and feature three extra pads for the AUX bus BUSY, TX, and RX signals.  These pads, in conjunction with the existing GND and RAW(12V) pads,  make it easier to wire in an extra RJ12 jack for those who want it.  Here is the Gen3d alongside the previous Gen3c PCB:

 

gen3d.jpg

 

Note that there is an error on the silkscreen labels on the flip (components) side, where it still says "Gen3c" rather than "Gen3d" there.  Oops!  shocked.gif

 

As always, message me if you want a PCB with or without parts.

 

Cheers!


Edited by mlord, 24 April 2023 - 10:33 AM.

  • KenF9000, Chote and fdboucher like this

#316 mlord

mlord

    Fly Me to the Moon

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

Posted 24 April 2023 - 12:39 PM

Here is v5.34 of the Arduino ESP32 source code for this project.

 

Attached File  esp32_wifi.ino.v5.34.txt   89.12KB   71 downloads

  • GPS:  Work around bad/varying satellite counts in the "SV" messages from BE-180.

There is also a pre-built binary version for simpler flashing, at https://rtr.ca/teles...stuff/flashing/



#317 servitecnic3999

servitecnic3999

    Lift Off

  • -----
  • Posts: 8
  • Joined: 29 Dec 2021

Posted 25 April 2023 - 11:56 AM

Hi Mark, everything working perfectly, thank you very much


  • mlord likes this

#318 mlord

mlord

    Fly Me to the Moon

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

Posted 27 April 2023 - 08:11 PM

Here is a HomeBrew Gen3d that I assembled this morning.  Nice and simple/

 

gen3d.jpg


  • KenF9000, Chote, tjay and 3 others like this

#319 fdboucher

fdboucher

    Mariner 2

  • -----
  • Posts: 245
  • Joined: 25 May 2022
  • Loc: Les Eboulements, QC

Posted 27 April 2023 - 08:20 PM

Here is a HomeBrew Gen3d that I assembled this morning.  Nice and simple/

…gettin' better all the time…  :-)


Edited by fdboucher, 27 April 2023 - 08:20 PM.


#320 fdboucher

fdboucher

    Mariner 2

  • -----
  • Posts: 245
  • Joined: 25 May 2022
  • Loc: Les Eboulements, QC

Posted 27 April 2023 - 08:23 PM

A question that no doubt shows my ignorance… but I'm always glad to share it.

 

But how does one upload the software (esp32_wifi.ino.v5.34.txt) to the thingy? Do I need a serial interface?


Edited by fdboucher, 27 April 2023 - 08:26 PM.


#321 mlord

mlord

    Fly Me to the Moon

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

Posted 27 April 2023 - 08:26 PM

A question that no doubt shows my ignorance…

 

But how does one upload the software (esp32_wifi.ino.v5.34.txt) to the thingy? Do I need a serial interface?

You would just need a USB Type-A to Micro-B cable, the kind that mobile phones used to use before USB-C took over.  Then either install the Arduino IDE and stuff, or take the easier route and do this:  https://rtr.ca/teles...stuff/flashing/


  • fdboucher likes this

#322 fdboucher

fdboucher

    Mariner 2

  • -----
  • Posts: 245
  • Joined: 25 May 2022
  • Loc: Les Eboulements, QC

Posted 27 April 2023 - 08:27 PM

You would just need a USB Type-A to Micro-B cable, the kind that mobile phones used to use before USB-C took over.

Thank you Mark. I have a large number of these cables around the house.


Edited by fdboucher, 27 April 2023 - 08:30 PM.


#323 mlord

mlord

    Fly Me to the Moon

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

Posted 01 May 2023 - 04:40 PM

A friend of mine has released his designs for 3D-printable cases for the HomeBrew Gen3c/Gen3d units.  Test prints seem work fine using PLA filament on an Ender-3, as well as on the BambuLabs X1C.  Probably others too.

 

case.jpg

 

It's a two-part design, with a bottom "lid", and a larger top box.  A friction fit combines the two, possibly with a bit of tape added, depending upon how the 3D print turns out.  This is for the regular HomeBrew Gen3c/Gen3d, with no GPS and no OLED display.  There are cut-outs for the standard connectors and the LEDs -- one can fill the LED openings with white/translucent hot-melt glue for a nicer finish, if desired.

 

You can find them on Printables here:  https://www.printabl...cope-controller

and on Thingiverse here:  https://www.thingive...m/thing:6002204


Edited by mlord, 01 May 2023 - 08:45 PM.

  • tjay, John Laidlaw and fdboucher like this

#324 mlord

mlord

    Fly Me to the Moon

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

Posted 02 May 2023 - 04:42 PM

The development of a 3D-printable case for the HomeBrew Gen3c/d left me with a few empty prototype cases.  So this afternoon I populated three Gen3d units to fill them!

 

HomeBrews.jpg

 

But one of the three units failed to work after final assembly.  And it would no longer respond at all in the Arduino IDE either.  So I painstakingly separated the ESP32 module from the Gen3d PCB, and installed a fresh ESP32 in place of it.  Better (BLINK BLINK BLINK), but the Nunchuck interface was not working.

 

So I got out the ohm-meter and discovered that the Nunchuck I2C signal SDA was shorted somewhere to 3.3V.   Ugh.  So.. got out the de-soldering braid and hot air gun again, and removed the Nunchuck connector.. and there was the culprit:  The SDA pin had bent during insertion, making unwanted contact with the adjacent 3.3V pin of the connector.  This should have been caught by visual inspection prior to soldering, but somehow I missed it.  And that short could well be what fried the original ESP32 module too.  shocked.gif

 

Just documenting one of the (few) things that can go wrong here, for the benefit of others!

 

Cheers


Edited by mlord, 02 May 2023 - 08:16 PM.

  • Chote, MikeHC8 and fdboucher like this

#325 spacenebula

spacenebula

    Lift Off

  • -----
  • Posts: 10
  • Joined: 24 Feb 2023

Posted 02 May 2023 - 08:35 PM

Hey Mark,

 

Is there a anyway to make RTS available? Not sure if with all the other functions, I could to try and use the pin to trigger a shutter circuit. 




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