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

M5-DSC: simple plug-n-play Digital Setting Circles

  • Please log in to reply
39 replies to this topic

#1 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 12 June 2018 - 04:14 AM

Thanks to nice projects on DIY Digital Setting Circles in this forum. I tried developing the DSC based on M5Stack (ESP32) which has the display, buttons, and battery add-on. The M5Stack core is available for about $31 and the battery add-on $13 in Aliexpress  and Banggood.com. I want to make the M5-DSC as simple as possible. There is no need to have the knowledge in code compilation.

 

Setup steps for Windows:
1. Install the device driver from:
http://m5stack.com/d...VCP_Windows.zip

2. Get the M5-DSC firmware from
https://drive.google...0xy?usp=sharing
Download and uncompress M5-DSC.zip

NOTE: Inside the zipped file, there is an executable file “esptool.exe” which may be flagged as a virus. Please ignore the warning. If you are unhappy, choose the file: M5-DSC NO EXE FILES.zip. And get the executable file from the chip manufacturer: https://dl.espressif...24e-windows.zip and put the executable file “esptool.exe” in the unzipped folder.

3. Plug the M5Stack to your PC.
4. Inside the folder M5-DSC, double click the file “Upload.bat” The firmware will be uploaded to the M5Stack. DONE!

 

Wiring:
AZ encoder: Ch A to Pin 2, Ch B to Pin 5
ALT encoder: Ch A to Pin 21, Ch B to Pin 22
For CUI AMT102 encoders, use 3.3V Pin to supply voltage. For other 5V encoders, use 5V Pin to supply voltage.

ESP32 is 5V tolerant. Refer to the response by Espressif CEO in:
https://www.facebook...hc_location=ufi

With the battery add-on, the M5-DSC can work for 5 hours. 

 

How to use:
1) When M5-DSC is powered on, the screen will show
- SSID as M5-DSC_XXXX,
- Password which is the MAC address of the device,
- IP address (192.168.4.1) and
- Port (8888).
The display will turn off after 5 sec. You can press the middle button (Button B) to turn on the display.
2) Use your mobile device to connect to the Wifi access point created by the M5-DSC
3) In Skysafari, set the protocol as “Basic Encoder System” and “Alt-Az Push-to”. And input the IP address and Port as shown in the display.
4) Click “Telescope” and then “Connect”. Now you can enjoy using the M5-DSC.

Attached Thumbnails

  • 20180612_151649.jpg
  • 20180612_151745.jpg
  • 20180611_103955.jpg
  • Screenshot_20180612-000246.jpg
  • Screenshot_20180612-000259.png

Edited by anat, 12 June 2018 - 05:23 PM.

  • brave_ulysses, Ernesto.Nicola, bvillebob and 4 others like this

#2 Jack Day

Jack Day

    Ranger 4

  • *****
  • Posts: 376
  • Joined: 04 Mar 2005
  • Loc: Wenatchee, WA

Posted 14 June 2018 - 11:15 AM

Wow, still no comments.  Fine, I'll bite!

 

My question is do you have to specify encoder counts only on your phone/tablet,  or also in the programming on the M5 unit itself?

 

As to additional battery power, can you "stack" additional batteries to extent operational time?

 

Also is there any risk of the unit taking over your vehicle and/or starship and trying to destroy everything nearby?

 

Thanks! 



#3 brave_ulysses

brave_ulysses

    Apollo

  • -----
  • Posts: 1,446
  • Joined: 19 Apr 2009
  • Loc: far outside the wire

Posted 14 June 2018 - 11:24 AM

i have used micropython on the esp32 - any thoughts on that?



#4 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 14 June 2018 - 04:20 PM

Wow, still no comments. Fine, I'll bite!

My question is do you have to specify encoder counts only on your phone/tablet, or also in the programming on the M5 unit itself?

As to additional battery power, can you "stack" additional batteries to extent operational time?

Also is there any risk of the unit taking over your vehicle and/or starship and trying to destroy everything nearby?

Thanks!

You specify the encoder steps for both axes in Skysafari. No need to set in the M5-DSC. Nexus II doesn't require setting of steps in the device. Skysafari will handle it.

Yes you can stack the battery to get more operation time. i am getting another battery to stack.

Anat


Sent from my SM-G930F using Tapatalk

#5 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 14 June 2018 - 04:40 PM

i have used micropython on the esp32 - any thoughts on that?

I am not sure if the quadrature encoder library is available on micropython.



#6 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 22 June 2018 - 02:25 AM

M5stack has just released M5stack Fire ($50).

https://twitter.com/...400283904929792

 

It has a 600mAh battery which should make M5-DSC work for 3-4 hrs. Two additional grove connectors will provide the solid connection to encoders with these cables:

https://www.aliexpre...2801421897.html

 

I will soon revise the Pin assignment to be compatible with the Fire.


Edited by anat, 22 June 2018 - 02:34 AM.


#7 Antares89

Antares89

    Vostok 1

  • -----
  • Posts: 189
  • Joined: 27 Apr 2016

Posted 23 June 2018 - 11:22 AM

This looks like another neat take on the diy dsc. The big dilemma I’m running into with my own diy dsc project is physically mounting the encoders to the alt/az axis. Any tips on how to mount them? Thx!
  • Ernesto.Nicola likes this

#8 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 26 June 2018 - 11:34 PM

This looks like another neat take on the diy dsc. The big dilemma I’m running into with my own diy dsc project is physically mounting the encoders to the alt/az axis. Any tips on how to mount them? Thx!

The typical installation for dobsonian scopes looks like this

http://www.astrodevi...le---AMT102.pdf



#9 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 26 June 2018 - 11:38 PM

I did an extensive test of M5-DSC with my M2c mount having 311,296 step encoders. The device can handle the slew rate up to about 45deg/s, equivalent to about 40,000 steps/s. So, it should work well with encoders having 8,192 - 40,000 steps per rev (in quadrature encoding mode). I use Pins 26&36 for the AZ axis, and Pins 16,17 for ALT axis. I have updated files 

https://drive.google...0xy?usp=sharing

 

I found that Pins 21, 22 should not be used.  The pins are pulled up for I2C and cause count errors.

Attached Thumbnails

  • 20180627_110234.jpg

Edited by anat, 27 June 2018 - 12:24 AM.

  • coloradodan likes this

#10 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 12 July 2018 - 03:03 AM

Greetings,

 

I've too also attempted to a Digital Setting Circles project  based on ESP32 development kit instead of M5Stack.

So far, everything was going smoothly, I've managed to connect to WiFi node from my cellular phone (iPhone SE)  which SkySafari6 Pro has been installed.

 

However, once I power up ESP32 & AMT102 rotary encoders, there is nothing on SkySafari6 screen yet.

 

I've used upload.bat to load the firmware written by Anat (thanks a lot btw) and probably this phase is also OK.

 

Since I'm using ESP32 instead of M5Stack, I used the following pins to connect my Alt & Az encoders:

 

AZ encoder: Ch A to Pin 2, Ch B to Pin 5 ---->  AZ  axis: GPIO26, GPIO36
ALT encoder: Ch A to Pin 21, Ch B to Pin 22 ---> ALT axis: GPIO16, GPIO17

 

gallery_16487_9650_986186.png

 

I wonder if my mapping between M5Stack to ESP32 is correct and also how can I be sure that rotary encoders send data to ESP32 properly.

Also, is there a documentation for SkySafari6 Pro, which I can use to double-check my setup (which was almost identical to Anat's example above)

 

Best regards,

 

Curisosis



#11 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 12 July 2018 - 03:38 AM

Please download the latest firmware and code from

https://drive.google...0xy?usp=sharing

 

Pins 21 and 22 are not suitable for digital input because it is for I2C.  The updated code uses Pins 16+17 and 26+36.

Please provide the manufacturer's pinout diagram of the ESP32 board you use.

 

Anat


Edited by anat, 12 July 2018 - 03:40 AM.


#12 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 12 July 2018 - 05:00 AM

I've just downloaded the new code and will use upload.bat to to refresh the firmware.

 

Below is the pin-out diagram of ESP32 which I'm using. According to the new code,  should I still use 16+17 (altitude encoder)  and 26+36 (azimuth encoder) ?

 

gallery_16487_9650_1843894.png



#13 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 12 July 2018 - 05:08 AM

Yes but refer to the indicator with GPIOxx.

Sent from my SM-G930F using Tapatalk

#14 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 12 July 2018 - 05:11 AM

Even without encoders, Skysafari should show the crosshair at Az 0 and Alt 0.

Sent from my SM-G930F using Tapatalk

#15 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 12 July 2018 - 05:50 AM

I have installed the new firmware & changed the pin connections but still nothing on SkySafari6 Plus screen. Maybe iOS version may not have support for telescope control since I couldn't see any menu items like Telescope  | Connect.

 

gallery_16487_9650_41678.jpg



#16 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 12 July 2018 - 06:02 AM

Your Skysafari supports telescope control. Find the menu.

Sent from my SM-G930F using Tapatalk

#17 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 12 July 2018 - 09:28 AM

Heey, I've just noticed that if I hold the phone in landscape mode instead of portrait then I may see the whole menu :=)

 

Now everything works perfectly and I can see the cross-hair moving as I turn the encoders by hand.

 

Thanks a lot for sharing your code & other details generously throughout this project.


  • anat likes this

#18 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 22 July 2018 - 09:05 AM

Greetings,

 

I've finally succeeded to finish making a small PCB with required pin connections and installed the rotary encoders to my 6" Dobsonian telescope.

First I've installed SkySafari 6 Plus to an iphone SE and then an ipad (4th generation w/ 16 GB memory)

 

Everything so far so good except, I see some irregular freezing / latency in telescope responsiveness.

 

med_gallery_16487_9650_324906.jpg

 

 

med_gallery_16487_9650_80069.jpg

 

From time to time, even though I rotate the telescope around altitude and/or azimuth axis, SkySafari 6 Plus screen fails to respond in real-time but after an irregular time (~ 15/30 second) delay.

 

I've experimented with various read-out rates, decreased to star magnitude, reset everything a couple of times ... but in both iphone and ipad couldn't get rid of this problem.

 

I even connected an oscilloscope to make sure that ESP32 is generating pulses in real-time without any latency but probably the problem seems to lie in SkySafari 6 Plus side.

 

Has anyone experienced a similar problem?

 

Curiosis


Edited by curiosis, 22 July 2018 - 09:16 AM.


#19 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 22 July 2018 - 08:59 PM

Greetings,

I've finally succeeded to finish making a small PCB with required pin connections and installed the rotary encoders to my 6" Dobsonian telescope.
First I've installed SkySafari 6 Plus to an iphone SE and then an ipad (4th generation w/ 16 GB memory)

Everything so far so good except, I see some irregular freezing / latency in telescope responsiveness.

med_gallery_16487_9650_324906.jpg


med_gallery_16487_9650_80069.jpg

From time to time, even though I rotate the telescope around altitude and/or azimuth axis, SkySafari 6 Plus screen fails to respond in real-time but after an irregular time (~ 15/30 second) delay.

I've experimented with various read-out rates, decreased to star magnitude, reset everything a couple of times ... but in both iphone and ipad couldn't get rid of this problem.

I even connected an oscilloscope to make sure that ESP32 is generating pulses in real-time without any latency but probably the problem seems to lie in SkySafari 6 Plus side.

Has anyone experienced a similar problem?

Curiosis

Try saving the log file in Skysafari and see if there is any communication problem.

Sent from my SM-G930F using Tapatalk

#20 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 22 July 2018 - 10:45 PM

Hi again,

 

Here is the content of the latest log file, sorry for the length, I couldn't find a way  of attaching this as a *.txt file.

 

Sent ASCII at 2018/07/23 06:26:47 with error 0:
QQQQQQQQQQQQ
Received ASCII at 2018/07/23 06:26:49 with error 0:
-00002 -00001
Sent ASCII at 2018/07/23 06:26:49 with error 0:
Q
Received ASCII at 2018/07/23 06:26:49 with error 0:
+00000 -00001
Sent ASCII at 2018/07/23 06:26:52 with error 0:
Q
Received ASCII at 2018/07/23 06:26:54 with error 0:
-00001 -00001
Sent ASCII at 2018/07/23 06:26:54 with error 0:
Q
Received ASCII at 2018/07/23 06:26:57 with error -13:
Sent ASCII at 2018/07/23 06:26:59 with error 0:
Q
Received ASCII at 2018/07/23 06:26:59 with error 0:
-00002 -00001
Sent ASCII at 2018/07/23 06:27:00 with error 0:
Q
Received ASCII at 2018/07/23 06:27:03 with error -13:
Sent ASCII at 2018/07/23 06:27:04 with error 0:
Q
Received ASCII at 2018/07/23 06:27:05 with error 0:
-00002 -00001
Sent ASCII at 2018/07/23 06:27:05 with error 0:
Q
Received ASCII at 2018/07/23 06:27:05 with error 0:
+00001 +00000
Sent ASCII at 2018/07/23 06:27:05 with error 0:
Q
Received ASCII at 2018/07/23 06:27:08 with error -13:
Sent ASCII at 2018/07/23 06:27:08 with error 0:
Q
Received ASCII at 2018/07/23 06:27:10 with error 0:
-00001 +00966
Sent ASCII at 2018/07/23 06:27:10 with error 0:
Q
Received ASCII at 2018/07/23 06:27:10 with error 0:
-00001 +00987
Sent ASCII at 2018/07/23 06:27:10 with error 0:
Q
Received ASCII at 2018/07/23 06:27:13 with error -13:
Sent ASCII at 2018/07/23 06:27:14 with error 0:
Q
Received ASCII at 2018/07/23 06:27:16 with error 0:
-00001 +01135
Sent ASCII at 2018/07/23 06:27:17 with error 0:
Q
Received ASCII at 2018/07/23 06:27:20 with error -13:
Sent ASCII at 2018/07/23 06:27:20 with error 0:
Q
Received ASCII at 2018/07/23 06:27:22 with error 0:
-00001 +01136
Sent ASCII at 2018/07/23 06:27:22 with error 0:
Q
Received ASCII at 2018/07/23 06:27:22 with error 0:
+00000 +01135
Sent ASCII at 2018/07/23 06:27:22 with error 0:
Q
Received ASCII at 2018/07/23 06:27:22 with error 0:
+00004 +01136
Sent ASCII at 2018/07/23 06:27:22 with error 0:
Q
Received ASCII at 2018/07/23 06:27:25 with error -13:
Sent ASCII at 2018/07/23 06:27:25 with error 0:
Q
Received ASCII at 2018/07/23 06:27:27 with error 0:
-00002 +01135
Sent ASCII at 2018/07/23 06:27:28 with error 0:
Q
Received ASCII at 2018/07/23 06:27:31 with error -13:
Sent ASCII at 2018/07/23 06:27:31 with error 0:
Q
Received ASCII at 2018/07/23 06:27:33 with error 0:
+00000 +01136
Sent ASCII at 2018/07/23 06:27:33 with error 0:
Q
Received ASCII at 2018/07/23 06:27:36 with error -13:
Sent ASCII at 2018/07/23 06:27:36 with error 0:
Q
Received ASCII at 2018/07/23 06:27:38 with error 0:
+00000 +01038
Sent ASCII at 2018/07/23 06:27:38 with error 0:
Q
Received ASCII at 2018/07/23 06:27:41 with error -13:
Sent ASCII at 2018/07/23 06:27:45 with error 0:
Q
Received ASCII at 2018/07/23 06:27:48 with error -13:
Sent ASCII at 2018/07/23 06:27:49 with error 0:
Q
Received ASCII at 2018/07/23 06:27:49 with error 0:
+00000 +00880
Sent ASCII at 2018/07/23 06:27:49 with error 0:
Q
Received ASCII at 2018/07/23 06:27:49 with error 0:
+00000 +00881
Sent ASCII at 2018/07/23 06:27:49 with error 0:
Q
Received ASCII at 2018/07/23 06:27:49 with error 0:
-00002 +00881
Sent ASCII at 2018/07/23 06:27:49 with error 0:
Q
Received ASCII at 2018/07/23 06:27:52 with error -13:
Sent ASCII at 2018/07/23 06:27:52 with error 0:
Q
Received ASCII at 2018/07/23 06:27:54 with error 0:
-00002 +00954
Sent ASCII at 2018/07/23 06:27:54 with error 0:
Q
Received ASCII at 2018/07/23 06:27:57 with error -13:
Sent ASCII at 2018/07/23 06:27:58 with error 0:
Q
Received ASCII at 2018/07/23 06:28:00 with error 0:
-00002 +00954
Sent ASCII at 2018/07/23 06:28:02 with error 0:
Q
Received ASCII at 2018/07/23 06:28:05 with error 0:
-00001 +00952
Sent ASCII at 2018/07/23 06:28:05 with error 0:
Q
Received ASCII at 2018/07/23 06:28:05 with error 0:
-00002 +00954
Sent ASCII at 2018/07/23 06:28:05 with error 0:
Q
Received ASCII at 2018/07/23 06:28:08 with error -13:
Sent ASCII at 2018/07/23 06:28:08 with error 0:
Q
Received ASCII at 2018/07/23 06:28:10 with error 0:
-00003 +00953
Sent ASCII at 2018/07/23 06:28:11 with error 0:
Q
Received ASCII at 2018/07/23 06:28:11 with error 0:
-00003 +00953
Sent ASCII at 2018/07/23 06:28:11 with error 0:
Q
Received ASCII at 2018/07/23 06:28:11 with error 0:
-00004 +00954
Sent ASCII at 2018/07/23 06:28:11 with error 0:
Q
Received ASCII at 2018/07/23 06:28:11 with error 0:
-00004 +00955
Sent ASCII at 2018/07/23 06:28:11 with error 0:
Q
Received ASCII at 2018/07/23 06:28:11 with error 0:
-00005 +00954
Sent ASCII at 2018/07/23 06:28:11 with error 0:
Q
Received ASCII at 2018/07/23 06:28:11 with error 0:
-00006 +00953
Sent ASCII at 2018/07/23 06:28:11 with error 0:
Q
Received ASCII at 2018/07/23 06:28:14 with error -13:
Sent ASCII at 2018/07/23 06:28:14 with error 0:
Q
Received ASCII at 2018/07/23 06:28:17 with error 0:
-00016 +00957
Sent ASCII at 2018/07/23 06:28:17 with error 0:
Q
Received ASCII at 2018/07/23 06:28:17 with error 0:
-00015 +00956
Sent ASCII at 2018/07/23 06:28:17 with error 0:
Q
Received ASCII at 2018/07/23 06:28:17 with error 0:
-00016 +00956
Sent ASCII at 2018/07/23 06:28:17 with error 0:
Q
Received ASCII at 2018/07/23 06:28:17 with error 0:
-00015 +00957
Sent ASCII at 2018/07/23 06:28:17 with error 0:
Q
Received ASCII at 2018/07/23 06:28:20 with error -13:
Sent ASCII at 2018/07/23 06:28:20 with error 0:
Q
Received ASCII at 2018/07/23 06:28:22 with error 0:
-00015 +00955
Sent ASCII at 2018/07/23 06:28:23 with error 0:
Q
Received ASCII at 2018/07/23 06:28:26 with error -13:
Sent ASCII at 2018/07/23 06:28:26 with error 0:
Q
Received ASCII at 2018/07/23 06:28:28 with error 0:
-00015 +00956
Sent ASCII at 2018/07/23 06:28:28 with error 0:
Q
Received ASCII at 2018/07/23 06:28:28 with error 0:
-00016 +00956
Sent ASCII at 2018/07/23 06:28:28 with error 0:
Q
Received ASCII at 2018/07/23 06:28:31 with error -13:
Sent ASCII at 2018/07/23 06:28:31 with error 0:
Q
Received ASCII at 2018/07/23 06:28:33 with error 0:
-00015 +00940
Sent ASCII at 2018/07/23 06:28:33 with error 0:
Q
Received ASCII at 2018/07/23 06:28:36 with error -13:
Sent ASCII at 2018/07/23 06:28:36 with error 0:
Q
Received ASCII at 2018/07/23 06:28:39 with error 0:
-00015 +00963
Sent ASCII at 2018/07/23 06:28:39 with error 0:
Q
Received ASCII at 2018/07/23 06:28:42 with error -13:
Sent ASCII at 2018/07/23 06:28:42 with error 0:
Q
Received ASCII at 2018/07/23 06:28:44 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:28:44 with error 0:
Q
Received ASCII at 2018/07/23 06:28:44 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:28:44 with error 0:
Q
Received ASCII at 2018/07/23 06:28:44 with error 0:
-00015 +00967
Sent ASCII at 2018/07/23 06:28:44 with error 0:
Q
Received ASCII at 2018/07/23 06:28:44 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:28:44 with error 0:
Q
Received ASCII at 2018/07/23 06:28:45 with error 0:
-00016 +00968
Sent ASCII at 2018/07/23 06:28:46 with error 0:
Q
Received ASCII at 2018/07/23 06:28:49 with error -13:
Sent ASCII at 2018/07/23 06:28:49 with error 0:
Q
Received ASCII at 2018/07/23 06:28:50 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:28:50 with error 0:
Q
Received ASCII at 2018/07/23 06:28:50 with error 0:
-00015 +00968
Sent ASCII at 2018/07/23 06:28:50 with error 0:
Q
Received ASCII at 2018/07/23 06:28:53 with error -13:
Sent ASCII at 2018/07/23 06:28:53 with error 0:
Q
Received ASCII at 2018/07/23 06:28:55 with error 0:
-00016 +00968
Sent ASCII at 2018/07/23 06:28:55 with error 0:
Q
Received ASCII at 2018/07/23 06:28:55 with error 0:
-00016 +00968
Sent ASCII at 2018/07/23 06:28:56 with error 0:
Q
Received ASCII at 2018/07/23 06:28:56 with error 0:
-00015 +00967
Sent ASCII at 2018/07/23 06:28:56 with error 0:
Q
Received ASCII at 2018/07/23 06:28:59 with error -13:
Sent ASCII at 2018/07/23 06:28:59 with error 0:
Q
Received ASCII at 2018/07/23 06:29:01 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:29:01 with error 0:
Q
Received ASCII at 2018/07/23 06:29:01 with error 0:
-00015 +00968
Sent ASCII at 2018/07/23 06:29:01 with error 0:
Q
Received ASCII at 2018/07/23 06:29:04 with error -13:
Sent ASCII at 2018/07/23 06:29:05 with error 0:
Q
Received ASCII at 2018/07/23 06:29:07 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:29:07 with error 0:
Q
Received ASCII at 2018/07/23 06:29:07 with error 0:
-00016 +00968
Sent ASCII at 2018/07/23 06:29:07 with error 0:
Q
Received ASCII at 2018/07/23 06:29:10 with error -13:
Sent ASCII at 2018/07/23 06:29:10 with error 0:
Q
Received ASCII at 2018/07/23 06:29:12 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:29:12 with error 0:
Q
Received ASCII at 2018/07/23 06:29:15 with error -13:
Sent ASCII at 2018/07/23 06:29:15 with error 0:
Q
Received ASCII at 2018/07/23 06:29:17 with error 0:
-00016 +00968
Sent ASCII at 2018/07/23 06:29:17 with error 0:
Q
Received ASCII at 2018/07/23 06:29:17 with error 0:
-00015 +00968
Sent ASCII at 2018/07/23 06:29:18 with error 0:
Q
Received ASCII at 2018/07/23 06:29:21 with error -13:
Sent ASCII at 2018/07/23 06:29:21 with error 0:
Q
Received ASCII at 2018/07/23 06:29:23 with error 0:
-00017 +00967
Sent ASCII at 2018/07/23 06:29:23 with error 0:
Q
Received ASCII at 2018/07/23 06:29:23 with error 0:
-00017 +00967
Sent ASCII at 2018/07/23 06:29:23 with error 0:
Q
Received ASCII at 2018/07/23 06:29:23 with error 0:
-00016 +00967
Sent ASCII at 2018/07/23 06:29:23 with error 0:
Q
Received ASCII at 2018/07/23 06:29:23 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:23 with error 0:
Q
Received ASCII at 2018/07/23 06:29:26 with error -13:
Sent ASCII at 2018/07/23 06:29:27 with error 0:
Q
Received ASCII at 2018/07/23 06:29:29 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:29 with error 0:
Q
Received ASCII at 2018/07/23 06:29:29 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:29 with error 0:
Q
Received ASCII at 2018/07/23 06:29:29 with error 0:
-00027 +00968
Sent ASCII at 2018/07/23 06:29:29 with error 0:
Q
Received ASCII at 2018/07/23 06:29:32 with error -13:
Sent ASCII at 2018/07/23 06:29:32 with error 0:
Q
Received ASCII at 2018/07/23 06:29:34 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:34 with error 0:
Q
Received ASCII at 2018/07/23 06:29:34 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:35 with error 0:
Q
Received ASCII at 2018/07/23 06:29:38 with error -13:
Sent ASCII at 2018/07/23 06:29:38 with error 0:
Q
Received ASCII at 2018/07/23 06:29:40 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:40 with error 0:
Q
Received ASCII at 2018/07/23 06:29:40 with error 0:
-00027 +00968
Sent ASCII at 2018/07/23 06:29:40 with error 0:
Q
Received ASCII at 2018/07/23 06:29:43 with error -13:
Sent ASCII at 2018/07/23 06:29:44 with error 0:
Q
Received ASCII at 2018/07/23 06:29:45 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:49 with error 0:
Q
Received ASCII at 2018/07/23 06:29:51 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:52 with error 0:
Q
Received ASCII at 2018/07/23 06:29:55 with error -13:
Sent ASCII at 2018/07/23 06:29:55 with error 0:
Q
Received ASCII at 2018/07/23 06:29:56 with error 0:
-00028 +00968
Sent ASCII at 2018/07/23 06:29:56 with error 0:
Q
Received ASCII at 2018/07/23 06:29:56 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:29:57 with error 0:
Q
Received ASCII at 2018/07/23 06:29:57 with error 0:
-00028 +00968
Sent ASCII at 2018/07/23 06:29:57 with error 0:
Q
Received ASCII at 2018/07/23 06:29:57 with error 0:
-00027 +00968
Sent ASCII at 2018/07/23 06:29:57 with error 0:
Q
Received ASCII at 2018/07/23 06:29:57 with error 0:
-00028 +00968
Sent ASCII at 2018/07/23 06:29:57 with error 0:
Q
Received ASCII at 2018/07/23 06:30:00 with error -13:
Sent ASCII at 2018/07/23 06:30:00 with error 0:
Q
Received ASCII at 2018/07/23 06:30:02 with error 0:
-00027 +00967
Sent ASCII at 2018/07/23 06:30:02 with error 0:
Q
Received ASCII at 2018/07/23 06:30:05 with error -13:
Sent ASCII at 2018/07/23 06:30:06 with error 0:
Q
Received ASCII at 2018/07/23 06:30:08 with error 0:
-00028 +00966
Sent ASCII at 2018/07/23 06:30:08 with error 0:
Q
Received ASCII at 2018/07/23 06:30:08 with error 0:
-00027 +00967
Sent ASCII at 2018/07/23 06:30:08 with error 0:
Q
Received ASCII at 2018/07/23 06:30:11 with error -13:
Sent ASCII at 2018/07/23 06:30:11 with error 0:
Q
Received ASCII at 2018/07/23 06:30:13 with error 0:
-00028 +00968
Sent ASCII at 2018/07/23 06:30:13 with error 0:
Q
Received ASCII at 2018/07/23 06:30:13 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:30:13 with error 0:
Q
Received ASCII at 2018/07/23 06:30:16 with error -13:
Sent ASCII at 2018/07/23 06:30:17 with error 0:
Q
Received ASCII at 2018/07/23 06:30:19 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:30:19 with error 0:
Q
Received ASCII at 2018/07/23 06:30:22 with error -13:
Sent ASCII at 2018/07/23 06:30:22 with error 0:
Q
Received ASCII at 2018/07/23 06:30:24 with error 0:
-00027 +00968
Sent ASCII at 2018/07/23 06:30:24 with error 0:
Q
Received ASCII at 2018/07/23 06:30:27 with error -13:
Sent ASCII at 2018/07/23 06:30:28 with error 0:
Q
Received ASCII at 2018/07/23 06:30:29 with error 0:
-00027 +00967
Sent ASCII at 2018/07/23 06:30:32 with error 0:
Q
Received ASCII at 2018/07/23 06:30:35 with error -13:
Sent ASCII at 2018/07/23 06:30:35 with error 0:
Q
Received ASCII at 2018/07/23 06:30:35 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:30:35 with error 0:
Q
Received ASCII at 2018/07/23 06:30:38 with error -13:
Sent ASCII at 2018/07/23 06:30:38 with error 0:
Q
Received ASCII at 2018/07/23 06:30:40 with error 0:
-00027 +00968
Sent ASCII at 2018/07/23 06:30:40 with error 0:
Q
Received ASCII at 2018/07/23 06:30:43 with error -13:
Sent ASCII at 2018/07/23 06:30:44 with error 0:
Q
Received ASCII at 2018/07/23 06:30:45 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:30:46 with error 0:
Q
Received ASCII at 2018/07/23 06:30:49 with error -13:
Sent ASCII at 2018/07/23 06:30:49 with error 0:
Q
Received ASCII at 2018/07/23 06:30:51 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:30:51 with error 0:
Q
Received ASCII at 2018/07/23 06:30:54 with error -13:
Sent ASCII at 2018/07/23 06:30:54 with error 0:
Q
Received ASCII at 2018/07/23 06:30:56 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:30:56 with error 0:
Q
Received ASCII at 2018/07/23 06:30:56 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:30:56 with error 0:
Q
Received ASCII at 2018/07/23 06:30:59 with error -13:
Sent ASCII at 2018/07/23 06:31:00 with error 0:
Q
Received ASCII at 2018/07/23 06:31:02 with error 0:
-00031 +00968
Sent ASCII at 2018/07/23 06:31:02 with error 0:
Q
Received ASCII at 2018/07/23 06:31:05 with error -13:
Sent ASCII at 2018/07/23 06:31:05 with error 0:
Q
Received ASCII at 2018/07/23 06:31:07 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:31:07 with error 0:
Q
Received ASCII at 2018/07/23 06:31:07 with error 0:
-00027 +00967
Sent ASCII at 2018/07/23 06:31:07 with error 0:
Q
Received ASCII at 2018/07/23 06:31:10 with error -13:
Sent ASCII at 2018/07/23 06:31:10 with error 0:
Q
Received ASCII at 2018/07/23 06:31:12 with error 0:
-00028 +00967
Sent ASCII at 2018/07/23 06:31:13 with error 0:
Q
Received ASCII at 2018/07/23 06:31:16 with error -13:


Edited by curiosis, 22 July 2018 - 11:52 PM.


#21 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 23 July 2018 - 05:30 PM

I've also posted my question to https://support.simu...ncurriculum.com and here is what gentleman there thinks about it;

 

---------

The -13 error code is a timeout.  We are waiting for a response but don't get one within the 2 second (I think) timeout period.

If you lower the readout rate to 4 per second (the default) do you still have the problem?  How about 2 per second?

The "Q" command we are sending asks for the encoder angles.

---------

 

I've replied back that I've had tried other values for readout between 1 to 10 but problem continued. 

 

Probably, ESP32 is failing to provide the required bandwidth , which is generated channel A + B's encoder ticks in real time and this is causing  a mismatch between the data being sent to SkySafari and data coming to the ESP32 itself.

 

I wonder  if it is possible to decrease the encoder ticks to a fraction (since Telrad in SkySafari moves with 0.1° increments) and still keep the angular accuracy high enough for  reliable navigation.

 

BTW, the good thing is even  though the system becomes unresponsive, final coordinate in sky map is still stays consistent.


Edited by curiosis, 23 July 2018 - 05:36 PM.


#22 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 23 July 2018 - 06:01 PM

Do you use the basic code I sent without the M5stack functions? The buttonpressed function can cause such a delay.

Sent from my SM-G930F using Tapatalk

#23 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 24 July 2018 - 12:02 AM

I'm using the code you've sent  from https://drive.google...0xy?usp=sharing  with  Pins 16+17 and 26+36 on ESP32

 

 

Do you use the basic code I sent without the M5stack functions? The buttonpressed function can cause such a delay.

Sent from my SM-G930F using Tapatalk


Edited by curiosis, 24 July 2018 - 12:18 AM.


#24 anat

anat

    iAstroHub 3

  • *****
  • Vendors
  • topic starter
  • Posts: 1,120
  • Joined: 03 Jun 2004

Posted 24 July 2018 - 10:43 PM

Try this code...

The Wifi password is "1234512345123"

#include <WiFi.h>
#include <Encoder.h>
Encoder encoder0(26, 36); // AZ axis: Ch A to GPIO26, Ch B to GPIO36
Encoder encoder1(16, 17); // ALT axis: Ch A to GPIO16, Ch B to GPIO17
WiFiServer wifiServer(8888);
void setup() {
  WiFi.mode(WIFI_AP);
  uint8_t mac[6];
  WiFi.softAPmacAddress(mac);
  String macID = String(mac[4], HEX) + String(mac[5], HEX);
  macID.toUpperCase();
  String AP_Name = "ESP32-DSC_" + macID;
  char AP_NameChar[AP_Name.length() + 1];
  memset(AP_NameChar, 0, AP_Name.length() + 1);
  for (int i=0; i<AP_Name.length(); i++)
    AP_NameChar[i] = AP_Name.charAt(i);

  boolean result = WiFi.softAP(AP_NameChar, "1234512345123");
  if(result == true)
  {
    wifiServer.begin();
  }
}
void loop() {
  WiFiClient client = wifiServer.available(); // wait for connection
  if (client) {
    if (client.connected()) {
      while (client.available()>0) {
        uint8_t c = client.read();
        if (c == 81) {  //ascii for "Q"
             long encoder0Pos = encoder0.read();
             long encoder1Pos = encoder1.read();
             client.printf("%+06d\t%+06d\r",encoder0Pos,encoder1Pos);
        }
      }
    }
    client.stop();
  }
  delay(50);
}


#25 curiosis

curiosis

    Sputnik

  • -----
  • Posts: 34
  • Joined: 02 May 2006
  • Loc: Istanbul, TURKEY

Posted 24 July 2018 - 10:57 PM

Thanks a lot for your patience & generosity.

 

I had previously used upload.bat in M5-DSC folder, in order to renew the firmware of ESP32.

 

This time, how should I save the code file above, so that  upload.bat can  process it and refresh the firmware in ESP32?

 

Would you please kindly provide me the basic workflow so that I may proceed?


Edited by curiosis, 24 July 2018 - 11:06 PM.



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