Close

anaQuad Communication - LVMDS?

A project log for anaQuad!

Reliably increase your quadrature-encoder's resolution using an ADC (or a bunch of comparators?)

eric-hertzEric Hertz 03/11/2016 at 14:523 Comments

Low Voltage Multi-Digital Signalling...?

Maybe.

Imagine LVDS... I'll go with FPD-Link, as I've used it before...

First: You have a clock... typically a "bit" clock...

Then you have a data line (or several)... It's not so much unlike, say, SPI... (Clock/Data on separate signals).

Electrically, it's a bit different than SPI, in that, in part, LVDS uses *differential* signal-pairs...

Now here's where it gets interesting for anaQuad...

One of the more-difficult aspects of anaQuad is the fact that you need to "invert" the inputs... If you have a signal that's *not* centered at *ground*, then inversion is a bit difficult, requiring knowledge of the magnitude and offset of the signal. Even more complicated is *scaling*... I'll come back to that.

In my experiments, it was found to be surprisingly reliable *despite* this, but if you *didn't* have to do this--if the inverted signal was *part* of the signal--then it would be even more reliable.

So, back to LVDS... We have *two* wires for each signal... They are *differential*, meaning that one is essentially the inverse of the other. This is for several reasons, including increased noise-immunity *and* decreased noise-emission.

When this data's fed into a receiver, the receiver *typically* looks for... duh duhn dunnnnn... *crossover* of the two signals.

So now... that's *exactly* what makes anaQuad so much more reliable than I even expected when designing it with that goal in mind... it's looking for *crossover* of (various multiples of) the signals...

So, I mentioned *scaling* of the input signals... In order to achieve anaQuad4x, we have to use not only the *non-inverted* and *inverted* signals (used also by anaQuad2x), but we *also* need the two signals *scaled*... (I use signal*2, but that isn't *exact*, it's just *easy math* for the processor). But: Scaling (properly) *absolutely* requires knowledge of the DC-offset (and magnitude?) of the original signal... which, again, I just threw in a random value that was close, and it seems to work surprisingly well despite having-done. But, it would be *great* if the DC-offset was not in the picture... and, low-and-behold that's exactly what using differential signaling does for yah... removes the DC-offset. BooYah!

So, now... Could it be used as a *communication* method... similar to LVDS...? e.g. anaQuad4x can detect 16 different positions in a single cycle... Comparing that to LVDS, that would mean for every singular bit transmitted in LVDS (alongside the clock signal), 8 different levels could be detected.

Is this helpful...? I'm not certain... I'll come back to that in the next project-log...

Discussions

Morning.Star wrote 03/30/2017 at 12:12 point

Just... Wow :-) Electronic Quantum Symmetry Protocol down at the fundamental level.

Ingenious, Eric, its reminiscent of a balanced XLR-style audio line to eliminate the noise in implementation.

I have a few analogue pins spare if I use two Atmel328s to join the two 'hemispheres' of an ICU Origaime and power the servos, instead a single Mega1284 or 2560 that would unbalance the Pi0's handling the video streams.

WOOT :-)

  Are you sure? yes | no

Eric Hertz wrote 03/31/2017 at 11:32 point

Haha, glad you got something from this rambling! Differential-signalling (LVDS) is definitely akin to balanced XLR. I have yet to re-achieve the mindset that wrote this log... 

The thing about anaQuad is that it requires two signals in quadrature, which wouldn't really contain noise-immunity. I think I was thinking to use two separate differential-pairs, then each pair would be balanced. And, I suppose, I was thinking that each "bit" could be e.g. 1/8th as long as a comparable bit in LVDS (plausibly bumping up the transmission rate 4 times, since it requires two wires?) But... "math" must occur at the receiving-end, making it more susceptible to noise... (plausibly four times more suceptible?) hmmm....

Thanks for getting me to reread this, I'm running it through the ol' noggin' again :)

What's this quantum symmetry protocol thing? Search-fu says it's got to do with encryption?

  Are you sure? yes | no

Morning.Star wrote 04/01/2017 at 00:20 point

QSDP? It was something I designed a while back that does in code what you're doing and less elegantly I might add. I needed an efficient semaphore and realised that there is a class of data that describes itself as it it sent - a symmetrical one. If it is corrupted in transmission it is no longer symmetrical and thus errors can be detected without a handshake.

https://hackaday.io/project/19515-aimos/log/53140-skeletronics explains very quickly how the protocol works, however using a binary stream the data rate is halved. Using multi-voltage to encode bits in parallel restores the speed that the protocol breaks. It was error recovery I was interested in more than immunity... ;-)

  Are you sure? yes | no