AM data flow between remote uP and AM - ie - Arduino and AM ?

Support for Arduino in combination with Air Manager and Air Player

Moderators: Ralph, russ

Post Reply
Message
Author
User avatar
jph
Posts: 641
Joined: Fri Apr 10, 2020 12:50 pm
Location: Portugal

AM data flow between remote uP and AM - ie - Arduino and AM ?

#1 Post by jph » Sun May 09, 2021 9:33 am

Hi chaps.
Maybe a question for @Corjan ?
Please can you provide a little bit of insight into the following.

In the case of a stepper motor hardware addition via the AM interface to a flashed Arduino, which is the dominant player ?. for example. If data is being sent to the Arduino to step 'X' steps at 'Y' speed, then is the data sent as a couple of value from AM to the arduino, and the code you have on the arduino does the rest of the processing, or, does AM constantly send a signal pulse for each step ?. That is obviously putting it in the most basic terms. I am interested in what does what in the case of steppers and encoders. Stepper motor actions are initiated FROM AM whereas encoder steps - are initiated from the Arduino TO AM.
I presume, with an encoder on an Arduino that each step is sending an event to AM ? is this reasonably accurate ?
And, that in the event of AM sending stepper movement data to Arduino that AM is sending it step by step (not the actual decoding of - say a ULN BYJ interface) but each step is possibly a single command from AM to the Arduino - that Arduino then sees as an 'event' and the arduino only sorts the drive commands for the appropriate stepper ?
I hope that makes sense ?
Joe
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

User avatar
Corjan
Posts: 2368
Joined: Thu Nov 19, 2015 9:04 am

Re: AM data flow between remote uP and AM - ie - Arduino and AM ?

#2 Post by Corjan » Sun May 09, 2021 9:50 am

Hi,

For the encoder, the Arduino is sending a message with +1 or -1 for the direction. (can also be higher then 1 if you turn really really fast ;).
For the stepper motor, AM only sending the required position. The generation of the step signals are all done by the Arduino.

Corjan

User avatar
jph
Posts: 641
Joined: Fri Apr 10, 2020 12:50 pm
Location: Portugal

Re: AM data flow between remote uP and AM - ie - Arduino and AM ?

#3 Post by jph » Sun May 09, 2021 11:01 am

Corjan wrote:
Sun May 09, 2021 9:50 am
Hi,

For the encoder, the Arduino is sending a message with +1 or -1 for the direction. (can also be higher then 1 if you turn really really fast ;).
For the stepper motor, AM only sending the required position. The generation of the step signals are all done by the Arduino.

Corjan
Thanks @Corjan - really appreciated.
So in normal encoder usage, the Arduino 'message' of a single step action causes an event in AM per step ? . If you turn - an encoder- really fast - then I can see how this could be problematic - to say the least . ;) Can I presume that, if turning an encoder faster than would normally be expected (quite reasonably) to AM that the >1 value would be a collection of steps in a buffer, or, a >1 signal from the Arduino as a specific number ? . I am in no way criticising - simply am trying to understand the flow backwards and forwards. There has to (imho) be a limit where the turn rate of an encoder excedes the accepted parameter limit - ? . and therefor causes missed 'encoder steps' deliberately - (I would do that) .. and - what if the user turns the encoder rapidly in one direction then the other ? - I see no point in trying to action each. Which I would imagine would tend to indicate that there is a logical limit as to the speed of the action of - for example - an encoder... and that speed can also be dependent on the complexity of the code in AM ? - which seems perfectly reasonable. - ?

It is interesting, and logical, that the stepper only sends the position (and logically direction) and the Arduino does the rest. That seems perfectly sensible.
Would I be correct in thinking that 'IF' a stepper signal changed - as in - for example - an altitude or whatever reading, that due to the fixed speed (afaik?) of the arduino set by the AM initial setup... that during the movement from one event from the sim - that is sent to arduino, that if a new position comes in, that the arduino event - and possibly buffer, has to be stopped and revised ? - for example, a VSI ? - where one can be hitting a dive of say - 3000 fpm, but a slight pull up slows this to 500 fpm in a very rapid sequence. ?. This would need a new event / command set to arduino, previous data removing, and new data entered for the stepper action, and that data would still be limited by a 'limited' speed of movement that is dependent on a multitude of factors. As in complexity of AM code, frequency of events, and also within the arduino a similar issue. ? - and also, this would seem to be potentially limited by the processor speed in AM and the type of arduino or uP in use at the hardware end ?
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests