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

#201 mlord

mlord

    Fly Me to the Moon

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

Posted 04 March 2023 - 09:42 PM

Hi Mark. I got your 3b boards and an Adafruit nunchuck adapter the other day.

Speaking of which.  I bulk ordered a few of the AdaFruit adapters, and can re-mail them to people who want them for the cost of a letter-mail stamp.  Message me if interested.

 

adafruit_nunchuck.jpg


Edited by mlord, 04 March 2023 - 09:47 PM.


#202 mlord

mlord

    Fly Me to the Moon

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

Posted 07 March 2023 - 09:16 AM

There are still four of the Gen3b PCBs available from the last bulk batch.  Contact me if interested -- these are flat enough to ship via letter-mail with a Nunchuck adapter in the same envelope!



#203 mlord

mlord

    Fly Me to the Moon

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

Posted 13 March 2023 - 03:09 PM

Time for a new revision of the HomeBrew PCB:  The Gen3c "Purple" edition!  flowerred.gif

 

hb_gen3c_4.jpg

 

This revision is almost identical to the earlier Gen3b, except it got a little bit longer to accomodate a real Nunchuck Socket!  There's still the same cut-out for the ESP32 WiFi+BT antenna area, and the pins which need to be soldered now have little white circles around them as a visual hint.   There are also new on-board pull-up resistors for the I2C (Nunchuck) pins.

 

It all makes for a tidy build, suitable for the usual heat-shrink wrapper (not yet applied here).  I may also look into getting a 3D case designed for it.

 

hb_gen3c_1.jpg hb_gen3c_2.jpg hb_gen3c_3.jpg

 

As always, these PCBs are available for DIY construction.  I can also help with folks who (for whatever reason) cannot DIY.   Message me for details.


Edited by mlord, 13 March 2023 - 06:38 PM.

  • Chote, leszek, telesonic and 3 others like this

#204 mlord

mlord

    Fly Me to the Moon

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

Posted 13 March 2023 - 03:13 PM

The Nunchuck socket I'm using on the Gen3c PCB is harder than usual to find.  Thanks be to CN user coollick for discovering these at AliExpress:   https://www.aliexpre...3282079264.html

 

But the regular AdaFruit adapters can still be used, as there's also now an adapter board to enable them to be soldered onto the tail of the Gen3c PCB, in place of the socket:

 

hb_gen3c_5.jpg

 

Just stack those three things and solder wires through the outside four of the six signal holes, and then also through the 3V,GND,SCL,SDA holes of the Nunchuck adapter.


Edited by mlord, 13 March 2023 - 06:23 PM.

  • sparkythecat likes this

#205 mlord

mlord

    Fly Me to the Moon

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

Posted 16 March 2023 - 10:40 AM

OLED code sure, here is v5.23 + OLED support from all-in-one

Here is that exact same code, ported forward into v5.27+:

 

Attached File  esp32_wifi.ino.v5.27+.txt   85.05KB   77 downloads


  • SieglindeFestkochend likes this

#206 KenF9000

KenF9000

    Ranger 4

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

Posted 22 March 2023 - 05:00 AM

Thanks MLord for sending me the purple version.

Additional parts ordered, should have them all by mid April. smile.gif



#207 Paul Romero

Paul Romero

    Surveyor 1

  • *****
  • Posts: 1,820
  • Joined: 05 Apr 2005
  • Loc: Reno, NV

Posted 22 March 2023 - 08:20 AM

Thanks for all the work you do, MLord!
Software upgrades are important.

Clear Skies,

Paul
  • mlord likes this

#208 spacenebula

spacenebula

    Lift Off

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

Posted 24 March 2023 - 09:02 AM

Thanks Mark, 

 

Received my kit a couple days ago, built it last night, and everything works perfectly! Just

ordering the GPS receiver.



#209 pbddict1

pbddict1

    Explorer 1

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

Posted 24 March 2023 - 09:33 AM

Received my board last night.
Very nicely done!

I'm going off the map a little with the buck converter, as I will 3d print a custom case and I want to add a USB port to supply power to other devices (a 5volt focuser system I built that draws about 80ma max stalled and 15-20ma typical when driving the motor)
Does anyone know how much current I can VERY SAFELY source from the aux jack?

#210 mlord

mlord

    Fly Me to the Moon

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

Posted 24 March 2023 - 10:21 AM

I wouldn't go higher than half an amp at 12V.



#211 pbddict1

pbddict1

    Explorer 1

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

Posted 24 March 2023 - 10:34 AM

Sweet! Have you looked at how much the HomeBrew draws?

#212 mlord

mlord

    Fly Me to the Moon

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

Posted 24 March 2023 - 10:37 AM

Sweet! Have you looked at how much the HomeBrew draws?

https://letmegooglet...ew current draw

 

https://www.cloudyni.../#entry12387665


Edited by mlord, 24 March 2023 - 10:39 AM.

  • pbddict1 likes this

#213 pbddict1

pbddict1

    Explorer 1

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

Posted 25 March 2023 - 05:00 AM

I have mine put together tonight and it's pretty cool.

 

Thank you.

 

I opted to make a permanent cable, and add a larger DC-DC buck adapter with a USB port to power my DIY focuser.

built.jpg

Maybe I'll add a nunchuk adapter at some point when i start guiding... for now this slews nicely with the hand control.

 

I'll print a 3d box for this later... for now, the zip ties... as I wanted to test.

 

I have a question about a pulse sound in the drive motors that I'm experiencing while slewing while using this device with Sky Safari 7.

It sounds like the motors are almost trying to stop then continue a couple times a second

It doesn't happen with the hand unit alone. 

It does happen whether the hand control is plugged in at the same time as the HomeBrew or not.

At first I thought maybe I had something in my RA gear as it is cyclical but it does it on Dec slew too, and stopped and works as expected upon removing the HomeBrew.

Attached File  CGEM Mix.mp3   148.92KB   40 downloads

The first 5 seconds of the audio file are without the Homebrew(using the HC), the next 7 are with... I filtered it in Audacity to see peaks and get the mode and it Sounds/Looks like about every 565ms

 

Is SkySafari maybe polling for position data and interrupting communication?

Maybe Wifi packet transport?

 

This happens when using wither SkySafari "buttons", or the physical HC buttons to slew.

I'll try it with a different device(a tablet) later in the morning.

 

Edit: added a noise removed sample of just the pulse.

Attached File  CGEM Pulse.mp3   37.76KB   34 downloads


Edited by pbddict1, 25 March 2023 - 05:07 AM.

  • mlord and fdboucher like this

#214 mlord

mlord

    Fly Me to the Moon

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

Posted 25 March 2023 - 07:35 AM

That's a tidy looking job!

 

If you want to see if the SkySafari messaging correlates with whatever sounds you are hearing, then hook up the USB cable and use the Arduino IDE Serial Monitor.  115200.  Hit 'v' for a communications trace.

 

Cheers


Edited by mlord, 25 March 2023 - 07:40 AM.

  • pbddict1 likes this

#215 CuriousMark

CuriousMark

    Lift Off

  • -----
  • Posts: 22
  • Joined: 04 Jan 2022

Posted 26 March 2023 - 05:39 PM

I decided to give this a try. Thank you @mlord for the gen3 circuit board and nunchuck adapter board.

Here are some photos showing how I wired in a Nunchuck Slew/Focus controller to the HomeBrew Gen3 PCB.  There are two approaches one could take:  (1) Cut off the bulky connector, and then wire the Nunchuck permanently to the Gen3 PCB; or (2) use an AdaFruit #4836 Wii Nunchuck Breakout Adapter as a connector for plugging/unplugging the Nunchuck.  For this version, I used the latter approach.  Here are the core components required:

I have decided to go with option 1 and directly wire the Nunchuck to the PCB. I researched through the thread:

 

 

Meanwhile, here's the Nunchuck now connected to the I2C header.  This one is using one of the simple, totally passive WiiChuck edge connectors (https://www.aliexpre...2963862300.html) rather than the fancy AdaFruit module.  Because the ESP32 uses 3.3V logic already, the AdaFruit electronics are a bit redundant.  The simpler WiiChuck works fine, but doesn't click and grab like the AdaFruit one would:

 

attachicon.gifnunchuck.jpg

 

Everything works!   Happy!  grin.gif

So it appears all I need to do is determine the pinout. I used the adapter board, powered it up and figured out 4 of the five wires.

 

nunchuck wiring1.jpg

I assume I can just leave the black wire unconnected and be fine.

 

Next step is to get a soldering kit and then put it all together.


Edited by CuriousMark, 26 March 2023 - 06:01 PM.

  • pbddict1 likes this

#216 pbddict1

pbddict1

    Explorer 1

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

Posted 26 March 2023 - 08:08 PM

I was going to hard wire the Nunchuck.. but I decided that since both kids are grown (like done with 4yrs college and working...) and neither took the Wii with them... I could just "borrow" a jack from one of the 4 controllers that have been in the closet for like 6 years smile.gif

 

I also changed stuff in few places.

I did hard wire the rj12 cable. It is strain relieved with the case, and MLord put two holes in just the right spot for a tiny zip tie.

I used jumpers instead of switches.

I used a larger buck converter with a USB jack.

https://www.amazon.c...product_details

 

The case is fit tight to the outer dimensions of the HomeBrew board, I use PETG... its semi transparent(even black) so I just made a thin spot so I can see the lights though it nice and subdued. I'm pretty happy with the end result.

 

1.jpg

 

2.jpg

 

3.jpg

 

4.jpg

 

5.jpg

 

6.jpg


Edited by pbddict1, 26 March 2023 - 08:11 PM.

  • Chote, Frisk, MikeHC8 and 2 others like this

#217 pbddict1

pbddict1

    Explorer 1

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

Posted 27 March 2023 - 06:37 AM

Let's wrap this rascal!

I printed this case out of TPU... It'll do two things, a slight amount of drop protection, and it ties to two case halves together without having to make lock tabs or screws.

PSX_20230327_073053.jpg

PSX_20230327_073122.jpg

I'll have to work on getting my TPU smoother... I seem to get bubbles. Maybe it got damp or something on the way over here... This is my first roll.

I'm done smile.gif at least till I decide to add GPS...

Thank you MLord for all of your hard work deciphering the code and planning out and creating this fine PC board

Edited by pbddict1, 27 March 2023 - 06:52 AM.


#218 fdboucher

fdboucher

    Mariner 2

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

Posted 27 March 2023 - 06:46 AM

I was going to hard wire the Nunchuck.. but I decided that since both kids are grown (like done with 4yrs college and working...) and neither took the Wii with them... I could just "borrow" a jack from one of the 4 controllers that have been in the closet for like 6 years smile.gif

Your kids will kill you, man!

That part alone is probably worth $10K today on the Wii fans market!

lol.gif


  • pbddict1 likes this

#219 pbddict1

pbddict1

    Explorer 1

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

Posted 27 March 2023 - 07:19 AM

So it appears all I need to do is determine the pinout. I used the adapter board, powered it up and figured out 4 of the five wires.

 

I assume I can just leave the black wire unconnected and be fine.

 

From what I could find, the middle connector opposite the notch is for device presence detection.



#220 mlord

mlord

    Fly Me to the Moon

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

Posted 27 March 2023 - 01:19 PM

From what I could find, the middle connector opposite the notch is for device presence detection.

That is correct.  Only the four outside contacts are necessary/used here:

 

nunchuck_pinout.jpg

 

A note for people using the Nunchuck interfaces on the HomeBrew Gen3:

 

The original Nintendo-designed "Nunchuck" game controllers are the worst.  The design is old, and the devices frequently and randomly "drift" from centre without any applied force to the thumbstick.   The modern day clones are actually much better than those originals, and cost around CAD$10 at Amazon.

 

It is possible that one might also get a "bad one" of those, in which case just return it and purchase another from a different vendor.  Reports and emails I have received indicate a total of two people thus far who have gotten "bad" clones, but many, many more with bad original Nintendo sticks.   For Game Play, a slight amount of drift at centre usually doesn't matter -- one just adjusts their grip and all is fine.  But with a telescope mount, continuous unintended slewing is not usually something we want!  smile.gif

 

My experience here is limited to a total of six (6) clone Nunchucks, all of which worked perfectly.  My curse!

 

The current Gen3 firmware does a self-calibration at startup, trying to measure the actual centre point of a flaky Nunchuck, and then adjusts things to compensate.  But the original Nintendo ones manage to thwart even that logic.  The modern clones are totally digital with their own firmware, and appear to also self-calibrate at power on.

 

Cheers
 


Edited by mlord, 27 March 2023 - 07:19 PM.

  • pbddict1 and fdboucher like this

#221 coollick

coollick

    Explorer 1

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

Posted 27 March 2023 - 01:26 PM

The original Nintendo-designed "Nunchuck" game controllers are the worst.

I tried 2 originals, don't even bother with those, get a clone from Amazon ~10$ and its perfect.


Edited by coollick, 27 March 2023 - 01:27 PM.

  • pbddict1, mlord and fdboucher like this

#222 jamusick

jamusick

    Lift Off

  • -----
  • Posts: 7
  • Joined: 05 Aug 2020

Posted 27 March 2023 - 07:10 PM

I ordered the Gen3b PCB.  I was out of town last week, so the board had arrived when I returned home.  It was so easy to build and it worked the first time I connected to my telescope. I have it on my CPC 1100.  Also thanks for the easy to load pre-built binary image.  Your efforts are appreciated.  Now all I need are some clear skies.

 

Thanks


  • mlord likes this

#223 KenF9000

KenF9000

    Ranger 4

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

Posted 28 March 2023 - 09:46 AM

My purple board arrived a few minutes ago. 

Thanks to MLord.

Came well protected, I just need a few more components to turn up and i'll be fit for building it.


  • mlord likes this

#224 mlord

mlord

    Fly Me to the Moon

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

Posted 28 March 2023 - 06:33 PM

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

 

Attached File  esp32_wifi.ino.v5.28.txt   85.56KB   62 downloads

 

The pre-built binary image for this is also now available for easier flashing:  https://rtr.ca/teles...stuff/flashing/

 

ChangeLog:

The second point above is the most interesting one, to me at least.  With this version, one can now have a working Nunchuck for slew/focus on a Celestron "Starsense for Skywatcher" set-up, as well as WiFi and Bluetooth.  Probably also Mount-USB mode, though we didn't try that.  The HomeBrew GPS worked fine even before this update.

 

ss4sw.jpg

 

Tested with the SkyPortal app and a SkyWatcher AZ-GTi ALT/AZM mount.  The app appears to detect and control the mount just fine.  We were unable to perform a proper alignment (daytime), but the app and StarSense Camera did go through the motions correctly, so there's good hope that it might work for real on a suitable star-gazing night.

 

The thing that needed changing to accomplish this, was dealing with the response to "GET_VER" from the ALT/AZM motors.  With the StarSense-For-Skywatcher box, the reply comes "from" device 0xb8 rather than 0x10/0x11 as it normally might.  So the HomeBrew Gen3 translates that, for now just substituting 0x10 in place of the 0xb8 of the reply (and updating the checksum to match).  Not perfect -- it should really keep track of which MC was being polled, and reply with either 0x10 or 0x11 rather than always hard-coding 0x10.  But for now, it works with the SkyPortal app over HomeBrew WiFi.

 

EDIT:  Another CN site member has a HomeBrew Gen3 along with the StarSense-For-SkyWatcher with a SkyWatcher EQ style mount.  With a bit of luck, we ought to be able to get that working too.  Stay tuned.


Edited by mlord, 29 March 2023 - 01:54 PM.

  • Chote and Mike_vs_Mosquitoes like this

#225 Chote

Chote

    Viking 1

  • -----
  • Posts: 546
  • Joined: 31 Oct 2005
  • Loc: Bangkok, Thailand

Posted 28 March 2023 - 09:18 PM

Hi Mark. I'm very interested in the code support of StarSense-For-SkyWatcher..

 

I have Skywatcher Synscan compatible mount (AZ-GTi) which is compatible with StarSense For Skywatcher. I'm wondering with my existing "Celestron" Starsense being used with my 6SE, the homebrew software would be able to work with my AZ-GTi mount?

 


  • adog 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