Analyser for quadrature encoder

@wolfgang.kopp

I figured out you could infer the rising/falling edge by including the ENCA as a data line in the Simple Parallel LLA setup, and using Dual edge rather than Rising edge for clock state:
image
:
image

With this configuration, I believe you can get an X1 or X2 (but not X4) decoder,.

Here’s the beginning of your waveform (t = 0 / trigger: initial incrementing of position):

Starting to decrement (t = [170 - 180] ms):

Going negative (t = ~248 ms):

Note: not sure why zero value (‘0’) didn’t show up in the HLA bubble text (HLA display bug?), as it was in the position data – see Data table view:

Here are some likely ‘noise’ / oscillations in the rotational movement (while changing direction):

I am assuming that motor is rotating back & forth across the ‘ENCA’ or ‘ENCB’ edges here?

Finally, a quick XY chart of position export in Excel:

[Edit] … and, XY chart of scaled_position with Scale_Factor = 2 (to emulate X4 behavior):

So, is this more of what you were looking for (other than it cannot do X4, as that would require an LLA)?

Note: For my latest draft, I also modified to use D0 = ENCA and D1 = ENCB (was D0 = ENCB and D1 = ENCA), as that might be more ‘natural’ for new users that hadn’t setup anything before (screenshots above used original mapping):
image

Dear Bitbob, yes it will work with x2 with reduced resolution. How did you make it counting? I just have 0/1/0 with parallel analyzer. Do you want to share your HLA here, I would like to test it.

@wolfgang.kopp

Here’s my working draft implementation ( v0.0.1 :wink: ):
Quadrature_Encoder_v0.0.1.zip (3.4 KB)

… and how it was applied to your capture file (re-saved w/ LLA + HLA added):
Session01_6moves-HLA.sal (77.3 KB)

Note: it was based on a ‘locally installed’ HLA (on Windows), from the directory path:

C:\temp\saleae\Quadrature_Encoder

Note: you must be using a new enough version of Logic 2 software that has the ‘Dual edge’ support added in the Simple Parallel LLA. It looks like this was merged into Logic 2 release as of v2.4.4, that was released in Jan, 2023.

Also, for anyone on any other supported platform (MacOS / Linux), the save file probably won’t work unless you remove/add the HLA and install it in your own local filesystem path.

For more information, see: HLA / LLA / Measurements - Properly Identify Installed Extension - Logic 2 - Ideas and Feature Requests - Saleae
(this is a technical constraint on official/published HLA’s, too)

Disclaimer: this is truly a quick draft implementation – no guarantees it would work for anything, other than a basic example of an HLA running on top of the Simple Parallel LLA (download & use at your own risk); please follow-up if it actually works well for you, or if it is actually worth uploading/publishing vs. demo/example only.

Edit:
This draft also has implemented a workaround for displaying ‘0’ on the bubble text, as per other support discussion:

(depending on final feedback on that thread – might want to tweak that solution as well)

Hi BitBob, got it running, many thanks!