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 All-In-One: WiFi+BT+USB+Ethernet+GPS+Joystick

  • Please log in to reply
468 replies to this topic

#101 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 14 May 2021 - 09:26 PM

I'm back to exploring the idea of using one of the Android apps that will re-route a Bluetooth connection to a TCP port on the phone/tablet, which then could be connected to as "wifi" from the smart device (really using Bluetooth underneath though).

 

The hitch with that, is getting the smart device to send the required UDP broadcasts that advertise the connection.

It.. works!!!  bounce.gif With both SkyPortal and SkySafari!

To recap:

1. This is "mount Bluetooth" from the AUX bus, the same as provided by either this project or by the original WiFi+Bt+GPS project.

2. The Android BT/USB/TCP Bridge Pro app is used to connect to the Bluetooth, and make it appear as if it was a WiFi server connection at port 2000 on my smartphone.

3. A Termux app session on my smartphone runs the Linux socat command in a loop at 2-second intervals, with suitable parameters to generate the periodic UDP broadcast advertisements that SkyPortal and SkySafari both listen for.

4. SkyPortal and SkySafari both connect to and control the mount successfully through what they think is a "wifi" connection, but really over Bluetooth to the HomeBrew adapter.

5. All functionality is there, including alignments, calibration, mount settings, etc..

 

Very happy!

 

Now I just have to ponder how to lessen the wizardry requirements so that others can also get it working!  wink.gif


Edited by mlord, 14 May 2021 - 09:29 PM.


#102 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 14 May 2021 - 10:02 PM

Now I just have to ponder how to lessen the wizardry requirements so that others can also get it working!  wink.gif

I feel that the set-up to make this work involves way too many components.  I do have a solution for myself, but why stop there?  smile.gif

 

To make this a lot more accessible, it will probably require a custom Android app, that takes care of the Bluetooth bridging to TCP/IP _and_ the UDP broadcasts, all-in-one again.

 

For starters, I have emailed the app guy who did the Android BT/USB/TCP Bridge Pro app, to see if he's at all interested.  I doubt it, but hey.. one can always hope!

 

But if that goes as far as I expect (aka. "nowhere"), then it looks like I may have to learn to code for Android or something.  smile.gif   Major undertaking, but I do have considerable Linux experience already from prior lives, and the app itself doesn't need to be very fancy.. so it may be doable.

 

It'll just take a little while because Summer(!) has finally arrived here in the Great White North. smile.gif


Edited by mlord, 14 May 2021 - 10:03 PM.


#103 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 15 May 2021 - 09:05 AM

Moving discussion of configuring an Android device for the AUX (not HC) Bluetooth connection over to its own thread, here: https://www.cloudyni...aux-connection/


Edited by mlord, 15 May 2021 - 09:06 AM.


#104 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 15 May 2021 - 10:38 AM

Mark will this tiny 2A Buck Converter be able to handle the entre thing or should I go for something slightly bigger? 

 

 

Attached Thumbnails

  • Capture 3.JPG


#105 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 15 May 2021 - 10:46 AM

The electrical current requirements of this project are rather modest, and pretty much any DC-to-DC buck style converter can handle them with tons of spare capacity.  I have not measured the exact current draw, but fully expect it to be no more than perhaps 0.5A with everything running and an HC plugged into the mini-USB host port.  Probably closer to 0.25A in reality.

 

So.. yes, you could use that one.  It does require adjustment for the output voltage, so you will need a Voltmeter for that purpose.

 

Cheers


Edited by mlord, 15 May 2021 - 10:48 AM.


#106 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 15 May 2021 - 10:58 AM

Measured it now.  Around 175mA with everything hooked up except the hand-controller, and 205mA (0.2A) with a StarSense HC plugged into the USB port.

 

So yes, anything rated for 0.3A or higher should be plenty safe enough, with a bit of margin to spare.

Adding an OLED display will suck a bit more, so say 0.5A and higher is fine.


Edited by mlord, 15 May 2021 - 11:01 AM.

  • Sakcyb likes this

#107 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 15 May 2021 - 01:36 PM

Measured it now.  Around 175mA with everything hooked up except the hand-controller, and 205mA (0.2A) with a StarSense HC plugged into the USB port.

 

So yes, anything rated for 0.3A or higher should be plenty safe enough, with a bit of margin to spare.

Adding an OLED display will suck a bit more, so say 0.5A and higher is fine.

Great thanks man waytogo.gif - At least now I have managed to find everything online and order, hopeful the wait for delivery is not that long but I think it wil be. 

 

I want to offer doing the PCB but I only knew PCAD way back in the good old MS-DOS days and this software is long gone now but it was way ahead back then at least. So I basically will have to learn something completely new now from scratch. Is it worth the effort and what...KiCAD or Eagle? Really not sure at all what is worth taking on now?. Thing is all these PCB CAD programmes are all only as good as their parts libraries and understand how to find/make parts yourself too. Or at least building one yourself of all the parts you usually use. This is how it worked with PCAD at least....So I am really unsure what to go for and start learning to use. So anyone please feel free to share your thoughts.....confused1.gif

 

Kind regard

Johann


Edited by Sakcyb, 15 May 2021 - 01:37 PM.


#108 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 15 May 2021 - 02:10 PM

There is a chap who is working on a PCB design for this, which most likely will use bare surface mount devices (SMDs) for most things.  We'll see how that effort goes, but I do have confidence it'll see the light of day at some point.  Perhaps both as a bare PCB and also as a mostly assembled module, using the W5500 ethernet chip (after the GPS interference issue is taken care of).

 

But there could be room for another, simpler-to-construct version, using the ENC28J60 ethernet module, without the GPS interference concerns.  I am kind of hoping that perhaps coollick might reprise his excellent earlier work (WiFi+BT+GPS project), and have a go at a basic PCB to which one solders off-the-shelf modules and a few other through-hole components.

 

The ESP32 Arduino code works for either, and can be configured to work with the omission of things like an ethernet module if that's not needed for a particular situation.

 

I do know that I am very happy with my own soldered up prototype -- one little plastic box on the side of the fork arm of my telescope, with GPS and tons of connectivity options.  Over time this project could be nearly everyone's first choice for a reliable mount accessory.

 

And there will likely also someday be a HomeBrew dew heater accessory to bolt onto it.

 

allinone.jpg


Edited by mlord, 15 May 2021 - 02:11 PM.

  • Sakcyb likes this

#109 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 15 May 2021 - 03:07 PM

 

But there could be room for another, simpler-to-construct version, using the ENC28J60 ethernet module, without the GPS interference concerns.  I am kind of hoping that perhaps coollick might reprise his excellent earlier work (WiFi+BT+GPS project), and have a go at a basic PCB to which one solders off-the-shelf modules and a few other through-hole components.

Yes this is exactly what I had in mind. A simple plug-in PCB board what will take all the modules exactly like your prototype kind of plug and play. Including a 3D printable box. This will make it really easy for anyone to slap together and cutting out any chance of making critical mistakes with the wiring up that could end up guys damaging there hardware.


Edited by Sakcyb, 15 May 2021 - 03:09 PM.


#110 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 15 May 2021 - 09:38 PM

There is a chap who is working on a PCB design for this, which most likely will use bare surface mount devices (SMDs) for most things.  We'll see how that effort goes, but I do have confidence it'll see the light of day at some point.  Perhaps both as a bare PCB and also as a mostly assembled module, using the W5500 ethernet chip (after the GPS interference issue is taken care of).

The invisible chap working on the PCB has whispered to me that he does plan for an initial DIY PCB that will use off-the-shelf modules (ESP32, mini-USB, W5500, ..) for easy assembly.  So it looks like that need may get filled by him early on.   Probably still a month or two out.  Life gets busy sometimes. :)


  • Sakcyb and Jdlucas like this

#111 Jdlucas

Jdlucas

    Explorer 1

  • -----
  • Posts: 72
  • Joined: 13 Dec 2020
  • Loc: Bath, Ohio US

Posted 16 May 2021 - 01:20 PM

The invisible chap working on the PCB has whispered to me that he does plan for an initial DIY PCB that will use off-the-shelf modules (ESP32, mini-USB, W5500, ..) for easy assembly.  So it looks like that need may get filled by him early on.   Probably still a month or two out.  Life gets busy sometimes. smile.gif

Its closer than that...  I'm shooting to order some first spin boards by the end of next week. 

Attached Thumbnails

  • AIO_PCB.JPG

  • Chote, tjay, mich_al and 6 others like this

#112 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 16 May 2021 - 02:52 PM

Its closer than that...  I'm shooting to order some first spin boards by the end of next week. 

Wow that looks AMAZING!


  • Jdlucas likes this

#113 Chote

Chote

    Messenger

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

Posted 17 May 2021 - 01:13 AM

That looks great. Just wonder what the top left connector is for?

Attached Thumbnails

  • homebrew_all_in_one.jpg

  • Sakcyb likes this

#114 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 17 May 2021 - 02:06 AM

Just a suggestion from my side to have all the connection sockets where possible sticking out slightly (3mm or so) over the edge of the PCB so that when it comes to designing a 3D printable box for this it makes so much more sense. I will also use 90 degree turn switches but these can stay as is I think.....


Edited by Sakcyb, 17 May 2021 - 02:07 AM.


#115 Jdlucas

Jdlucas

    Explorer 1

  • -----
  • Posts: 72
  • Joined: 13 Dec 2020
  • Loc: Bath, Ohio US

Posted 17 May 2021 - 06:29 AM

That looks great. Just wonder what the top left connector is for?

It’s to allow an additional aux peripheral ( star sense for example)  to be added. This will be particularly  useful for those who have only one aux port on their mount (e.g. SE owners). 


  • Chote and Sakcyb like this

#116 Jdlucas

Jdlucas

    Explorer 1

  • -----
  • Posts: 72
  • Joined: 13 Dec 2020
  • Loc: Bath, Ohio US

Posted 17 May 2021 - 06:43 AM

Just a suggestion from my side to have all the connection sockets where possible sticking out slightly (3mm or so) over the edge of the PCB so that when it comes to designing a 3D printable box for this it makes so much more sense. I will also use 90 degree turn switches but these can stay as is I think.....

Not to worry, the placement is still very preliminary.  I’m also designing an enclosure to go with it.  


  • Sakcyb likes this

#117 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 17 May 2021 - 06:50 AM

Not to worry, the placement is still very preliminary.  I’m also designing an enclosure to go with it.  

Great thanks looks great  too. What pcb CAD software are you using here. I am keen to learn but not sure what software to go for.


Edited by Sakcyb, 17 May 2021 - 06:54 AM.


#118 Chote

Chote

    Messenger

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

Posted 17 May 2021 - 06:57 AM

For the male DB9, will this type be used on your board? If so, I’ll order it now so it will arrive before you release your board.

Attached Thumbnails

  • 78DAF7E2-6FB7-4924-AB33-A6BE48BE7124.jpeg


#119 Jdlucas

Jdlucas

    Explorer 1

  • -----
  • Posts: 72
  • Joined: 13 Dec 2020
  • Loc: Bath, Ohio US

Posted 17 May 2021 - 07:25 AM

Great thanks looks great  too. What pcb CAD software are you using here. I am keen to learn but not sure what software to go for.

I’m currently using Altium, but prior to that; Mentor Expedition, Viewdraw ( with a pads back end tool), Cadstar, and some experience with Eagle. But I started with PCAD 4.5 and used it up to version 8. That was in the mid 80’s to early 90’s.  The tools have changed dramatically over the years, but today they are pretty equal in most respects. No matter what tool you choose, there will be a learning curve.


  • Sakcyb likes this

#120 Jdlucas

Jdlucas

    Explorer 1

  • -----
  • Posts: 72
  • Joined: 13 Dec 2020
  • Loc: Bath, Ohio US

Posted 17 May 2021 - 07:30 AM

For the male DB9, will this type be used on your board? If so, I’ll order it now so it will arrive before you release your board.

It looks like it, but DB-9 connectors can vary in depth.  I’d hold off just yet. I’ll provide a bill of materials with manufacturers part numbers and alternates as soon as I can.


  • Chote, mich_al and Sakcyb like this

#121 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 17 May 2021 - 09:07 AM

I’m currently using Altium, but prior to that; Mentor Expedition, Viewdraw ( with a pads back end tool), Cadstar, and some experience with Eagle. But I started with PCAD 4.5 and used it up to version 8. That was in the mid 80’s to early 90’s.  The tools have changed dramatically over the years, but today they are pretty equal in most respects. No matter what tool you choose, there will be a learning curve.

Yes I do realise that, just finding the right parts in the hundreds of libraries these days is enough to put anyone off. I basically stopped at PCAD 4.5 so never really made it past the MS-DOS environment into Windows and I suspect this is where the big development where so I am now way behind. But it is OK I will start slowly and take it one step at a time starting with simple analog boards and work my way up from there. But thanks I am sort of already leaning towards Eagle for many reasons. May be KiCAD as well because it is free. Looking forward to your final board it looks hell of a exciting already. Thanks so much for your effort thus far. bow.gif



#122 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 17 May 2021 - 11:05 AM

So.. an interesting story, for me at least:

 

One of the main features of this All-In-One accessory, is the USB Host port.  This was intended as a way to connect to a USB Nexstar+/Starsense Hand-Controller, so that SkySafari could then be used to communicate with such over a BlueTooth connection.

 

That part works fine, by the way.  But it turns out that SkySafari is somewhat crippled when connecting through a hand-controller: it cannot do mount alignments, and lacks access to many of the mount's internal settings.

 

So lately I have been working on a way to make the original "AUX" bus bluetooth connection usable by SkyPortal and SkySafari.  And good progress has been made quickly on that front, with a working (but currently complex) solution already being used by myself and a few others:  https://www.cloudyni.../#entry11106322.  Because this is an AUX bus connection, it has full capabilities with no limitations, just like the Ethernet and WiFi methods.  And a simpler way to set it up is in the works for near-term availability.

 

With that in place and working, the question then becomes.. what of that USB Host port in this project?  The USB sub-module itself is still essential, because it doubles as a GPIO port expander.  So we'll keep it for that.  And.. there just may be other quite good uses for the USB port.

 

Eg. One of the devices that the Arduino USB library already supports, is the IR Camera on a Wii remote controller.  If one reads the relevant section from the Wikipedia article (http://wiibrew.org/w...imote#IR_Camera), you'll notice this this bit:

 

"The Wii Remote includes a 128x96 monochrome camera with built-in image processing. The camera looks through an infrared pass filter in the remote's plastic casing. The camera's built-in image processing is capable of tracking up to 4 moving objects, and these data are the only data available to the host. Raw pixel data is not available to the host, so the camera cannot be used to take a conventional picture. The built-in processor uses 8x subpixel analysis to provide 1024x768 resolution for the tracked points."

 

Now, I'm not at all experienced in such things, but that sounds an awful lot like the basis for a decent DIY AutoGuide camera to me!  Not to mention that a Wii remote could also be used for slew/focus control etc.

 

And that's just a couple of possible uses for that port, so I think it is very much worth keeping it around.


Edited by mlord, 17 May 2021 - 11:10 AM.

  • Chote and Sakcyb like this

#123 Sakcyb

Sakcyb

    Explorer 1

  • -----
  • Posts: 58
  • Joined: 29 Sep 2019

Posted 17 May 2021 - 04:18 PM

Now, I'm not at all experienced in such things, but that sounds an awful lot like the basis for a decent DIY AutoGuide camera to me!  Not to mention that a Wii remote could also be used for slew/focus control etc.

 

And that's just a couple of possible uses for that port, so I think it is very much worth keeping it around.

Oh yes I like that idea!


Edited by Sakcyb, 17 May 2021 - 04:20 PM.


#124 mlord

mlord

    Mercury-Atlas

  • *****
  • topic starter
  • Posts: 2,569
  • Joined: 25 Oct 2020
  • Loc: Ottawa, Canada

Posted 18 May 2021 - 04:14 PM

Time for another code snapshot for the HomeBrew All-In-One.

 

Attached File  allinone.zip   36.68KB   21 downloads

 

Lots of the usual tidying and code rearranging, but the noticeable new feature is that the HomeBrew WiFi now gets switched OFF while a BlueTooth connection is active.  I also had a go at fixing the "first BT connect attempt sometimes fails issue" with SkyPortal/SkySafari.

 


Edited by mlord, 18 May 2021 - 04:50 PM.

  • Sakcyb likes this

#125 demarko69

demarko69

    Mariner 2

  • *****
  • Posts: 266
  • Joined: 20 Feb 2020
  • Loc: Arizona

Posted 18 May 2021 - 06:55 PM

works for me!

cpwi pc to wifi homebrew

cpwi pc to wiznet5500 homebrew

celestron skyportal android to wifi homebrew


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