Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Another Alternative to Sky Watcher Wifi Adapter


stash_old

Recommended Posts

I have just finished testing my Alternative to Sky Watchers Wifi Adapter - I use ESP2866 chip wired directly to the SW AZ GoTo mount (should work with other SW mounts). The Esp2866 chip is loaded with a UDP to UART bridge (sends/converts signals from UDP (ip- ethernet) to UART(TTL3.3v) which goes thru a voltage level converter as the AZGOTO uses 5v for TX/RX - Ground is also used - else bang goes the ESP2866 chip).

After pulling most of my remaining hair out I have got the device to work with Sky Watchers SynScan App Pro and Sky Safari on Android (Sony Xperia St21i tepo)- plus SynScan App Pro / CDC /Sky Safari (via Android but connected to SynScan via Windows) on Windows using Ascom Synscan Mobile driver.

In a nutshell I now have an another Alternative to the Sky Watcher Wifi Adapter @ £60 costing £15. Last ones I made were using Raspberry Pi 3 and Raspberry Pi Zero(w) but using ESP2866 means no SD cards or operating systems

I don know if my version would get over the Apple Ipad problems with the SynScan/Sky Safari App's - I dont own an Apple :-)

Still have some more real world testing to do but looking good

Link to comment
Share on other sites

Hi stash_old, that sounds very amazing! I've been exploring this too but having no technical background found all a bit difficult. Can you possible share how you connected all these pieces of hard- and software? This will save the remaining hair to many others I believe.

Edited by apvit
Link to comment
Share on other sites

6 hours ago, apvit said:

Hi stash_old, that sounds very amazing! I've been exploring this too but having no technical background found all a bit difficult. Can you possible share how you connected all these pieces of hard- and software? This will save the remaining hair to many others I believe.

When I am totally convinced it works 99% of the time I will but for now its too new.  So W.I.P :laugh2:

 

Link to comment
Share on other sites

No worries, thanks for letting us know. Meantime I attempted to buy this device:

https://www.ebay.co.uk/itm/TrekFiAZ-WiFi-module-for-direct-control-of-AZ-mounts-of-SkyWatcher-ORION/112730356268?hash=item1a3f40ba2c:g:J40AAOSwoVNaTOUc

But after a few minutes it stopped working and wifi network disappeared. I am returning it. I trust there should be a very simple solution to connect via wifi or bluetooth.

Link to comment
Share on other sites

11 hours ago, apvit said:

No worries, thanks for letting us know. Meantime I attempted to buy this device:

https://www.ebay.co.uk/itm/TrekFiAZ-WiFi-module-for-direct-control-of-AZ-mounts-of-SkyWatcher-ORION/112730356268?hash=item1a3f40ba2c:g:J40AAOSwoVNaTOUc

But after a few minutes it stopped working and wifi network disappeared. I am returning it. I trust there should be a very simple solution to connect via wifi or bluetooth.

Yes I did see them advertised on Flea Bay.

"I trust there should be a very simple solution to connect via wifi or bluetooth." - LOL There is a balance between size the SOC and power consumption plus functionality - you are not going to get a pretty GUI interface,long range Wifi or Bluetooth etc They are small/cheap for a reason  !

If you want the above I would suggest going down the RPI route with a 5ghz Network dongle (or dual) perferably with an Omni aerial - this one is without an aerial but is dual Wifi band https://www.modmypi.com/raspberry-pi/communication-1068/wifi-wireless-1070/wifi-dongle-dual-band-5ghz  or https://www.modmypi.com/raspberry-pi/communication-1068/wifi-wireless-1070/wifi-dongle-ultra-long-range-high-gain-w-5dbi-antenna- you could then use the older non RPI (or zero) - this is perhaps more what you are looking for. This would give you remote access to the PI (via inbuilt ( Stretch PI OS) realvnc) , Longer range (2nd one says 100m line of sight), no hubs / external power and low power consumption , Ser2net (needs to be installed onto PI) using UDP (Wifi protocol) o connect to a USB/TTl-Serial cable. I have used this approach and it works but the costs do start to add up (£30 for the PI ,£15 for the Wifi dongle,£12 for the USB/Serial-TTl cable, £5 for the PI case plus sundries/time).

or just buy a Sky Watcher Wifi Adapter :laugh2:.

I am creating my "Esp8266 link" for my "Grab and Go DSLR" - where no of items,size,power usage etc does matter - it isn't being built to be pretty or even easy to set up via a GUI!

Link to comment
Share on other sites

Pics from project - sorry for focus - hopefully it might inspire others to try similar approach. Basis of ESP8266 software (but modified) based on https://github.com/roboremo/ESP8266-WiFi-UART-Bridge. No able to control my Grab and Go dslr kit from just my Sony Android Phone using Synscan Pro App and Sky Safari 5 -line of sight comms about 20 feet max to keep 5 bar Wifi level

On mounts that are 3.3v logic (Thinks thats AZeq6/5 - BUT check) tou could do away with the 5v-3.3v Logic Level converter.

DSC_0009.jpg

DSC_0010.jpg

DSC_0008.jpg

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hi stash_old,

Your creation is very attractive to me. Because in Japan it is difficult to obtain SynScan WiFi adapter reasonably. On the other hand, ESP8266 boards are easily available. And, I have some experience in electronic craft and programming, so I'd like to follow your makeing.

In particular, can you publish patch information you modified for roboremo's ESP8266-WiFi-UART-Bridge software on github etc?

 

Satoru

Link to comment
Share on other sites

  • 1 month later...

I bought a couple of the ESP boards right after reading your post. the arrived today. It took half hour to work out how to program it from arduino ( half of that was a duffy cable). quickly messed with the compiler directives and got it connected to my phone directly. You mention having to change the original sketch to get things working with the phone app. Any direction on what needed changing? I am hoping it will use the phone's GPS for time and location auto setting. Thanks for posting your project.

Link to comment
Share on other sites

I've been looking at this myself and had seen the project on github.

How does an app that expects to see a serial port talk to this remote port ? Would I use a specific virtualised comm port app or is it safe to assume that all virtual come port apps package the serial data for transmission over IP without changing it in any way and that the receiving device does the same ?

At that point, I don't see why the esp project you reference needs any change in code, just the logic level management you have shown.. is that correct ?

Mike

Link to comment
Share on other sites

As I understand it the app is strictly only a WiFi client. The Skywatcher and this interfaces do all the translation to and from serial. I expect Skywatcher have obfuscated the exact control protocol much as they have done with the GPS accessory.

Link to comment
Share on other sites

I get that the synscan app is a Wi-Fi client but it doesn't make a lot of commercial sense to invent another interface to maintain. I'd like to put a network sniffer on this and I bet the app has just  wrapped the serial commands into a udp packet which the Wi-Fi receiver just unwraps. Hence any Wi-Fi to serial should  do. 

 

 

Link to comment
Share on other sites

Sorry I had forgot about this thread - apologies !!

1. I use UDP not serial to talk to the ESP8266/ESP32 - later is faster but there are some problems. One as they use RTOS you have to be vary careful of the delays in your code(use none if possible or very small) else you will get time outs and no connections. The serial/TTL link is from the ESP8266/ESP32 to the mount using just 3 connections RX,TX and ground - 9600,N,8,1 works. 

2. The other problem is that , depending on the hardware (so many clones), you will have problems using any serial connection pins on the ESP8266 as most are shared with memory SPIFF extentions(Wemos was the most reliable) and using the USB port on ESP8266/ESP32 is not reliable. I have found that ESP32's (best with built in OLED for info)  at least allow you to use H/W serial pins but the info is sketchy/inaccurate to say the least - I used https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/HardwareSerial.cpp.

3. The Android SynScan App does have some hidden extra's - tap the blank line between "Wifi" and "help" eight times move the screen up and down and extra inputs appear - a. The ability to input fixed IP address , resend tries ,read timeout,serial port . the resend and time out are important as this allows you time lag in getting replies over Wifi. The Fixed IP address also makes it easier to connect the Android Synscan App to the ESP device (in AP or STA mode)

4. You need to convert TTL on some mounts from 3.3v to 5v else ESP devices wont work and will be damaged. 4 channel logic converter work fine.

5. Depending on your Wifi set up on your ESP you may need to use ESP8266 Smart Config (works for both esp8266 and esp32) - this enables you to configure your Wifi on your ESP device - i.e. which AP to connect to if you are using the ESP in STA mode. Be very careful where you put the code for this as I had many problems (ESP device rebooting) until I found the correct place in my code plus a good delay(300) seemed to help after the smart config. The documentation is very bad about this - trial and error I am afraid.

6. My code (lots of versions) does not look anything like the clone bridge softwareI stared with (totally rewritten) but I may upload it at some point.

7. The set up works 75% of the time but ESP32 is still in raw dev and as I say ESP8266 has serial problems. I have found that using Ser2net (UDP version) and a RPI zero W(plus a CH340 or FDTI TTL serial convert) is far more reliable and at £12 better value and support is better. But I am still playing with ESP devices

Link to comment
Share on other sites

Hi stash_old,

For your Raspberry Pi setup, what code/ports are you using in the ser2net.config file for the Synscan app to connect?

I have a Raspberry Pi connected to my AltAZGOTO using a usb to serial cable into the handset port. I've previously been able to control the scope using the  Android SkySafari app with ser2net, but so far have had no luck getting a connection with the  Android Synscan app instead.

Based on something you posted in another thread, I may have got initial communication though. As I recall, if the handset is in PC direct mode, the Synscan app tries to connect and asks to select EQ or AltAz mode, connection then fails after this point. If the handset is in normal mode then I dont get the EQ/AltAz selection box in the app and connection fails, so I think I must be on the right track.

Regards

Steve

 

Link to comment
Share on other sites

Hi Steve,

I do not use the handset at all !

USB/Serial adapter (correctly wired for your mount - your responsibility be careful !!!! ) connects from port on mount to usb port on PI. 

I am using UDP in Ser2net to allow ANY Windows or Android SynScan App Pro connection(not both at the same time). So Running SynScan App in Windows I can connect Sky Safari on Android to the Windows PC IP address and port 11885 in Sky Safari.  

Running SynScan App pro/Sky Safari  on Android just requires Sky Safari to use 127.0.0.1 and port 11885

The critical parts of Ser2net are :-

setting up a UDP port 11880 to TTY USB (thats where your Serial(ttl) to com port device connects - use LSUSB on PI before and after connecting the USB/Serial adapter to make sure its being picked up. Plus the DMESG command to see the device is being setup correctly - normally users USB0

mod ser2net.conf to add lines as follows #
#                         UDP port on Here is 
#                         11880 it works with
#                         synscan app and still allows Sky Safari on Android
#                         while app on Windows

udp,11880:raw:0:/dev/ttyUSB0:9600 8DATABITS,NONE,1STOPBIT NOBANNER

 

plus you need, I have found, the following: DEFAULT:kickolduser:true        otherwise it never releases the UDP port unless to power off/on the PI

You may/will have to compile the latest Ser2net as the one in PI rep is old and does no support UDP - might have changed since I did it last. 

https://www.raspberrypi.org/forums/viewtopic.php?t=40729

Hope that helps !

 

  • Thanks 1
Link to comment
Share on other sites

Hi stash_old,

Brilliant- That's done the trick! Thank you :-)

I was just missing the 'DEFAULT:kickolduser:true' line in my ser2net.conf file

Connection is working with the Rpi plugged into the handset multi-purpose port using a RJ-12 to D-Sub 9/usb-to-serial cable. The handset is connected to the mount as usual but has to be in PC Direct mode.

Steve

  • Like 2
Link to comment
Share on other sites

  • 3 months later...

Hi stash_old,

Nice achievement! But I can't replicate it :(

You said that you connect directly to the mount - what mount you use? I have a SW Synscan AZ goto without hand controller and it won't work. I've traced the TX/RX lines from the two PIC16f886 inside, and it looks only the RX is wired to the connector. The TX pin is trough a diode wired back to RX pin, and both RX-es are connected in parallel.

The Synscan app is sending :e1 string on connection. I've tried connecting the RX/TX from the USB-serial (TTL) parallel via 1k resistor, it only "hears" what was sent from the computer - no response from the mount.

Later I'll try to check with logic analyzer but I doubt anything will come out of it.

Z

Link to comment
Share on other sites

11 hours ago, _Zoltan said:

Hi stash_old,

Nice achievement! But I can't replicate it

You said that you connect directly to the mount - what mount you use? I have a SW Synscan AZ goto without hand controller and it won't work. I've traced the TX/RX lines from the two PIC16f886 inside, and it looks only the RX is wired to the connector. The TX pin is trough a diode wired back to RX pin, and both RX-es are connected in parallel.

The Synscan app is sending :e1 string on connection. I've tried connecting the RX/TX from the USB-serial (TTL) parallel via 1k resistor, it only "hears" what was sent from the computer - no response from the mount.

Later I'll try to check with logic analyzer but I doubt anything will come out of it.

Z

But what kit are you connecting to the SWAZ Port - please describe your set up so I may help ?

Link to comment
Share on other sites

8 hours ago, stash_old said:

But what kit are you connecting to the SWAZ Port - please describe your set up so I may help ?

I decided to skip the ESP8266 for now because I want it to communicate first, when I know it works with a simple serial port then I can insert complications like WIFI UART bridge.

I'm now using a 5V PL2303 USB serial adapter, the board inside the mount (Synta MC001 rev. D) is also 5V. That board has four wires connecting to it from outside - +12V, GND, RX and something else I didn't identified yet (but it's not TX). Initially I was connecting RX/Unknown(TX?)/GND to the serial converter, then ser2net that usb port (ipv4,udp,11880:raw:0:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT), ser2net version 3.5. This configuration works as far the serial part is concerned, the Synscan pro app can send data and I can verify that by another serial port.

As I said in previous post, the TX pin from PIC16f886 is rerouted to the RX via diode, and both RX'es are connected in parallel.

I'm bypassing the RJ-11 connector by soldering directly to the PCB holding the connector.  

My main concern now is that I am chasing something impossible, and that I had misread all the discussions about this topic. Do you use the same mount as I do and connect your serial port directly to it (without hand controller)? I bought a new mount from astroboot (Description: Full size version (ie not the smaller one for the 70mm Mercury 707) Sky Watcher AZ GoTo mount) with plans to modify it to wifi and internal LiPo.

Link to comment
Share on other sites

3 hours ago, _Zoltan said:

I'm now using a 5V PL2303 USB serial adapter, the board inside the mount (Synta MC001 rev. D) is also 5V. That board has four wires connecting to it from outside - +12V, GND, RX and something else I didn't identified yet (but it's not TX).

If you mean the mount then there is a shared TX/RX line (quite common years ago) - My AZGOTO (both silver and black versions both not Merlin) provide exactly the same interface at ,as you say 5v TTL (not to be confused with RS232 which users 12v+ and will blow the moun board !!!!)

The wiring i use on my 2 mounts (cant say they would be the same for yours so at your risk !) are RJ11  1 - not used(NU),2 -RX , 3 NU , 4 TX, 5 - ground,6 - NU  as you look with the rj11 pins uppermost and rj11 key tab underneath see image below .

Obviously the TX/RX have to be crossed so TX becomes RX and RX becomes TX on the USB TTL Adapter.

I do not use the 12v from the Mount !!!.

3 hours ago, _Zoltan said:

I'm bypassing the RJ-11 connector by soldering directly to the PCB holding the connector.

I didn't bother but so long as you know what you are doing fine !

"My main concern now is that I am chasing something impossible, and that I had misread all the discussions about this topic. Do you use the same mount as I do and connect your serial port directly to it (without hand controller)? I bought a new mount from astroboot (Description: Full size version (ie not the smaller one for the 70mm Mercury 707) Sky Watcher AZ GoTo mount) with plans to modify it to wifi and internal LiPo"

I have used RPI2,3 and zero(W) all work fine no problems

Plus I have used ESP286/ESP32 - these are more difficult as you are dealing with 2 OS (one is RTOS - so delays are a no no and cause problems). I also found that the different versions of SW AZGOTO boards have to be handled differently - even though the protocol is the same the timings are critical and different (does not apply to RPI)!!! ?

All my attempts involve no handset.

Hope that helps ?

 

rj11.jpg

Link to comment
Share on other sites

Thanks!

7 hours ago, stash_old said:

Hope that helps ?

TLDR, It helped a lot!

7 hours ago, stash_old said:

If you mean the mount then there is a shared TX/RX line (quite common years ago)

Yes, exactly that! I don't know why they did it, this especially when the timings are so critical. Its a major pita.

For future reference, attached is the image of the connector board with pins marked. TX/RX polarity is not important as they are shorted anyway on the PCB. 

This time I connected directly with a laptop while powering the laptop from battery and the mount from lab power supply. Initially it did nothing, then I connected a second serial port to watch the traffic. I got some garbled junk data back.

Then I cranked the PSU from 12V to 13V and up the current limit to 1A. Now it started receiving something that looks like a response. But still no connect. So I connected my logic analyzer (Saleae 16) and bam! It connected from first try.

I played around with this connection for a while, it looks reasonable stable with a latency of 10-15 ms. But as soon I disconnect the logic analyzer it goes offline and won't connect (the LA is powered from laptop USB).

I guess it's time for the big guns now, tomorrow is oscilloscope time!

 

 

SynScan_PCB.png

Link to comment
Share on other sites

1 hour ago, _Zoltan said:

Yes, exactly that! I don't know why they did it, this especially when the timings are so critical. Its a major pita.

serial protocol is very old - I used it with acoustic modems - timing was critical then hence hand shakes via xon/xoff or DSR/DTR - today processors / memory are so fast not really needed and as the mount waits for the EOL character before sending anything something back (the recv should be waiting).

I dont use the Mounts 12v , as there is a good possibility you will overload the board (bang goes board) - IMHO = and the Micro processor the USB adapter is connected to provides the 5V. But they should have a common ground if you use both ???? (I am software not hardware LOL)

Good luck shout if you need any more info ?

Link to comment
Share on other sites

On 03/09/2018 at 08:52, _Zoltan said:

5V PL2303 USB serial adapter

Forgot to add these adapters , IMHO, are  bad even on Linux, try changing to CH340G or FDTI which in my experience are more reliable and seem to pick up TTL signals "better" ?

Link to comment
Share on other sites

23 hours ago, stash_old said:

I dont use the Mounts 12v , as there is a good possibility you will overload the board (bang goes board) - IMHO = and the Micro processor the USB adapter is connected to provides the 5V. But they should have a common ground if you use both ???? (I am software not hardware LOL)

I'm not, just noted that it is there. Actually it comes from the DC jack first, then goes to the board. No harm to the board if you use that 12V, just keep in mind that the wires are thin and there is no fuse (although it has a place for it).

8 hours ago, stash_old said:

Forgot to add these adapters , IMHO, are  bad even on Linux, try changing to CH340G or FDTI which in my experience are more reliable and seem to pick up TTL signals "better" ?

I don't have any at hand. Maybe I can repurpose one of my CH340 RS485 dongles. But I never had problems with these converters. Attached is a scope screenshot with pl2303 and CP2102 converter. I think the problem lies in the fact that the signal never goes to GND level. First test resulted in around 400 ms latency, the second over 1100 ms, and you can see that the response part stays higher in the second shot. I'l try to directly connect to the  pins on the board (before the diode) or use some line buffer IC to shape the signal to proper levels.

pl2303.png.9c6d5617bad50ac938461bf08dd01b8c.png

PL2303

CP2102.png.b7af99767201d8900611dd70813676b4.png

CP2102

 

 

Edited by _Zoltan
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.