AstroEQ Discussion Board

AstroEQ Forum => DIY AstroEQ => Topic started by: michelb on June 13, 2015, 13:11:11

Title: Which handcontroller would be best for testing functionality without PC
Post by: michelb on June 13, 2015, 13:11:11
I've recieved almost all parts to build my AstroEQ controller, only the steppers are still on there way.
There is a topic on this forum regarding a question if a handcontoller could be used. It says is not tested, but with some small changes a handcontroller could be connected. What handcontroller would be best? A syntrek or the more simple square one, with the square buttons for a dual axis motor drive?
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on June 13, 2015, 16:02:34
It would have to be the syntrek one. But I have absolutely no idea whether it would work nor do I plan on buying a syntrek hand controller to find out ;).
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: michelb on June 13, 2015, 19:59:03
Oke, thank you for your fast reply.
I will buy one from somebody who has one left, then I'll try to find out what the pin-out is, that shouldn't be hard. You mentioned it shoud be TTL level, I lack the equiipment to measure that so I hope I can find that on the net or deduct it from the electronic parts that connect to the cable.

Then I'll try to connect it as you mentioned in an other, when that won't work I'll report back, just as I will when I find out how it works.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 18, 2015, 16:34:57
Hi
I was hopping so but no the synscan handpad is not working with astroeq, or at least not with mine.
Synscan keep saying board both axis no response.
I may investigate the reason unfortunatly i'm not as good programmer as Thom is ^^
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on November 22, 2015, 16:12:46
How are you connecting it? Presumably you removed the PIC and are connecting to the TX/RX pins of the ATMega?

Do you know what the signal voltages are? it's possible the hand controller either uses RS232 levels (+/-12V) which would fry the ATMega, or using a low voltage like 3.3V which may not be properly detected.

Do you have a multimeter? If so, probe the TX line of the hand controller to see what voltage it is when there is no communication happening (it should idle at a logic 1, so it would be useful to know what voltage that is).
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 22, 2015, 19:51:52
What i've done is the way the synscan handpad is connecting to original mainboard.
I took the gnd/rx/tx out of controler connector (db9 for eq6 and rj45 for azeq6) that is in TTL (not the PC-DIRECT connector wich is a RS-232).
Then i connect it to the mega RX/TX0 ( shared with usb).
The handpad says that controler is not found. My serial sniffer doesn't listen anything between two device.

The sniffer listen that request from the handpad if it is powered but standalone.

?¦2É:
f1

If i connect handcontroler to azeq6 board this what i got :

?¦2É
=100
:
f1
=100
:
e1
=020B05
:
e1
=020B05
:
q1010000
=0B3000

and then if i choose the equatorial mode here is the end of initialisation :

W1050000
=
:
W2050000
=
:
c1
=002001
:
c2
=002001
:
a1
=00A08C
:
a2
=00A08C
:
P12
=
:
P22
=
:
f1
=100
:
b1
=BED100
:
g1
=20
:
s1
=00C800
:
V100
=
:
V200
=
:
f1
=100
:
F1
=
:
F2
=
:
E1000080
=
:
E20028A3
=
:
j2
=0028A3
:
j1
=000080
:
f1
=101

Don't know if it help,but may get further time on it and will tell you (i think it would be a nicechallenge getting the handpad working with astroeq).
regards
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on November 22, 2015, 20:19:54
Two things:

(1) Make sure the USB IC (PIC) is not installed if you haven't already - the two will interfere.

(2) Make sure you have TX and RX the correct way around. Where Pin 10 of the PIC is should be the TX pin from the hand controller, and Pin 12 of the PIC is the RX pin from the hand controller.

---

Having said that, it seems the hand controller is sending some commands which are not actually in the published spec. I have no idea what :Wn###### and :Vn## do.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 22, 2015, 21:06:18
there is no pic as i'm using the arduino mega 2560 chineese version, which has chd340 usb to serial.
Instead of,i don't know could it be doable to activate one of the 3 other UART of the mega to act as a repeater in case of interefering with the principal uart ?

TX from handpad is 4.97volt at idle.
Don't know about V and W maybe the feature of azeq mount (worm or encoder indexer...).
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on November 22, 2015, 21:34:33
Do you have a USB to UART adapter to connect the hand controller to the PC?

If so, connect it to the PC (also connect AstroEQ to the PC). You should have two COM ports, one for the USB-UART and one for AstroEQ.

Download and run the following:
http://astroeq.co.uk/FileDump/SerialEcho.exe

There are two drop-down menus. If you select the hand controller in the top one, and AstroEQ in the bottom one, then power up the hand controller. Does anything appear?
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 22, 2015, 22:18:34
I get it ...making a software link instead to bypass the "busy" arduino uart.
Good, I'll try tomorrow.

Quote
Don't know about V and W maybe the feature of azeq mount (worm or encoder indexer...).
V is a returned value for polarscope LED and W is about activating auxiliary encoders :-)
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 23, 2015, 17:45:32
Hi Tom
Last news, today the synscan handpad and astroeq talked togeither for the first time!
It initialized with astroeq using your software bridge and an external UART for the handpad.

I think that the usb shared UART0 of the arduibo mega is not initialized unless there is a connection to it.
But If i connect usb to it, there will be interfering into his RX/TX.

anyway here is pictures :
https://www.dropbox.com/sh/t1bo3656duh5txl/AABwopvtAtdt1R2XXIKA_v_wa?dl=0 (https://www.dropbox.com/sh/t1bo3656duh5txl/AABwopvtAtdt1R2XXIKA_v_wa?dl=0)

Looks like most handpad command are working, slewing, tracking, speed...
But i noticed goto acting weired (jercking), it could be due to serialEcho not keeping the rate.


I will try again with UART0 see if i missed something ...




Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 23, 2015, 18:51:40
Noticed something strange related to lower microstepping mode when high speed slewing with handpad.

Some détails:
https://www.dropbox.com/s/8eepw3k1gillfwu/Screenshot%20-%2023_11_2015%20%2C%2019_24_35.png?dl=0 (https://www.dropbox.com/s/8eepw3k1gillfwu/Screenshot%20-%2023_11_2015%20%2C%2019_24_35.png?dl=0)
https://www.dropbox.com/s/b5pf332zkmhn026/Screenshot%20-%2023_11_2015%20%2C%2019_33_56.png?dl=0 (https://www.dropbox.com/s/b5pf332zkmhn026/Screenshot%20-%2023_11_2015%20%2C%2019_33_56.png?dl=0)

Nico
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 23, 2015, 19:30:46
Tried over with UART0 and no luck at all.
My guess is that this shared uart is not the way to go.

Any idea?
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on November 23, 2015, 23:00:06
The high speed tracking thing seems to be a bug in the hand controller, or something undocumented that EQMOD doesn't do. There is no G110 command to tell the mount to return to microstepping, so AstroEQ dutifully obeys and continues in the current mode.

I suppose I could change back to microstepping mode automatically after a :K command is received, but without investigating whether that would cause problems with EQMOD, I'm not about to jump into doing it.

If you want to try it out, I think from a cursory glance, the following should work:

(1) Find the decodeCommand() function
(2) Scroll down until you find the case statement for 'K'
(3) Add the following line just before the break; statement for 'K':
Code: [Select]
cmd_setGVal(axis, 1);
That should return the internal variables to microstepping enabled slew when the :K command is issued. It won't immediately take affect if done here, instead it will take affect next time the :J command is called.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 24, 2015, 21:56:38
thanks for reply.
For now the priority (for me) is to have a standalone connection of the handpad to the astroeq.
About it, i verified and the rx0 is unusable (chinese mega2560) for serial usage as the internal CHD340 TTL to USB is interfering.
After unsoldering R12 i was able to use TX0 and RX0 through the headers again (serial echo in an arduino program ok).

But next is frustrating as I thought it would solve the problems, but no.
While EQMOD is working nice with a TTL to USB connected to those RX & TX UART0, I cannot get the handpad get initialized to that same one.
AstroEQ is answering the first handpad sentence by "=100" then nothing. I don't understand that problem...
Why would it initialize with two serial independant TTL to USB and serialECHO.exe whereas it doesn't  in direct RX to TX ?!

Any suggestion ?
Could it be a timing buffer problem?
regards
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 26, 2015, 19:53:25
Fresh news.
Still no chance with the hardwareserial.h code instead of your own one...
I'm not giving up. Thinking about timing issue, i may try soon to the oscillo if i see something about timing .

What serialecho.exe does have so special about ?
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on November 26, 2015, 22:13:16
The only thing I can think of is if the hand controller baud rate is significantly out, or the signals are getting distorted somehow.

A scope would be useful to identify both cases.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 27, 2015, 17:05:46
Here is the result.
Left is astroeq, right azeq6.
Yellow :handpad
blue:motorboard

Signal looks clear.
Notice that first sentence is different, but why?
Both motorboard answers seems identical. Timing looks ok, i may look closer.
Something interesting is the lower tx voltage of azeq6.

Nothing more to the astroeq side, the handpad goes mute and screen says "dec/alt no response".

Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 27, 2015, 17:33:11
I don't think this is a timing issue as there is just 40microseconds difference for the same message.
left azeq6, right astroeq.
Astroeq is not noisier, it is the acquire sampling that is different.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on November 27, 2015, 19:48:12
Really have no idea.

If you want to try Serial 1, I've made some changes to the SerialLink file to make it possible.

Attached is the new .cpp file. If you look on line 6, you can now change which serial port to use by changing the #define. For example to use Serial1, change the #define value to 1.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 27, 2015, 21:34:29
I'm happy to say that the synscan handbox is now working with astroEQ  ;)
See attached picture.

Finally there were two things that prevented it to work.
- chd340 usb to ttl interfering with uart0.
- wrong timing ( those tiny 30 micro seconds earlier)

Initialisation at 9900bps made the difference. Starting like a charm now.
Will make further test in days to come.
Regards
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on November 27, 2015, 21:36:21
Thanks Tom for the last upgrade  8)
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on November 27, 2015, 22:39:03
I wonder if the oscillator on the clone board is inaccurate - if it is a simple resonator (quite possible), then it's accuracy will be probably +/-5%, which could lead to timing issues if the hand controller is very sensitive to baud rate. It would also mean that any timing for say the sidereal rate would be out.

It would be worth trying to accurately measure with the scope the length of one packet (10bits) and see how close to 9600baud it really is.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 04, 2015, 17:49:26
Hello Thom,
I had some time to play with astreq and synscan today and i think the tracking issue after slew is located.

After comparing the azeq6 communication with handcontroller then the astroeq, we found out a little.

We did not see difference about com between the boards, but more of a missing loop .
Looks like the motorboard is not listening when it is in deceleration phase so handscan has to wait deceleration has finished to send the last sentence:

I mean the difference is that the azeq6 board is sending another f1 value until the decelleration is done.
Only when it stopped ,azeq6 is sending the last f1 value so then handcontroler is answering and az board can listen to it and return back to tracking.

For the astroeq it immediatly sends the end f1 value, and handcontroler  respond as well but the deceleration is still going one and so on astroeq is not validating it.

I hope it is suffient self explanatory as my English is a little poor. If not i could be happy to had some explanation.

Unfortunatly i don't feel i have the capability to make the modification myself so i won't be helpful .
And also i do think that this issue and the handcontroler goto issue is the same problem and if this issue is elimated the handcontroler will be fully workable.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 04, 2015, 18:18:48
The serial command attached. ;)

Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on December 05, 2015, 00:10:16
It shouldn't matter that deceleration is not complete, AstroEQ is quite happy to accept new commands while decelerating.
 
From what I could tell in the previous commands you showed, basically the hand controller is not sending a new ':Gn##' command after the slew, meaning that it starts tracking in the wrong direction because the direction isn't changed.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 05, 2015, 09:28:12
As always thanks for responsivness,
I try to understand why this issue is not happening with azeq6 board, does synscan motor board not using high speed microstep change ?

You are right about decelerating loop, i used to disabled deceleration for any speed, and it does not change anything about tracking back to normal.


Line 46 commands.cpp : cmd.minSpeed = 0;
But doing this we discovered a very interesting thing!
I don't know why but now the goto from handpad is working, the catalog  is fully fonctionnal as well as X stars alignement.
Can i help somehow resolving this point?
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 05, 2015, 10:32:11
The only thing i see is that the g110 value is done silently in the synscan motor board when a sideral tracking is calledback again.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 05, 2015, 13:47:46
Quote
I don't know why but now the goto from handpad is working, the catalog  is fully fonctionnal as well as X stars alignement.

My mistake,it start but then it is moving forever ...

Attached the starting of a goto with synscan handpad.
While i understand the 'G' and 'J' command, i do not see why the 'S'  in this context.
I also noted that this 'S' command is not called in eqmod for goto but only with handpad one.

I also have some difficulties with 'f' command and how to interpret it.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 05, 2015, 13:53:00
The way handpad goto are failing with astroeq :
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 05, 2015, 14:06:46
Next is with azeq6 :

Sequence looks the same but axis status code are different.

Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: TCWORLD on December 05, 2015, 15:42:36
I have a sneaking suspicion that there is more to the protocol than they have published. There seem to be commands going on there that I don't recognise, and extra status bits in the :f command. It's possible that they have made revisions to the command set since they published the protocol.

Unfortunately I haven't got the time at the moment, nor access to a handcontroller to try and reverse engineer what is going on.
Title: Re: Which handcontroller would be best for testing functionality without PC
Post by: grizli21 on December 06, 2015, 08:29:56
Ok then maybe when you will be less busy i could send the handbox to you.