Lamprey2 12bit read on Talon

Hey @ajlapp, maybe you can shed some light on this…
With the Lamprey2, in UART (via USB) read, I can see 0-4096 (12 bits), but when I connect to the Talon, I had previously been using FeedbackDevice.Analog with the Lamprey1 which returns values 0-1024.

Do you know if/how I would gain the 12bit resolution when connected to Talon? Can I use FeedbackDevice.Quadrature, or do I just leave it as analog and let the lamprey map down to a 10bit result?

You may benefit from reading the conversation starting with this post and the subsequent comments:

I was never able to get a satisfactory answer as to why it behaves the way it does. I would also be very wary of using this if you need to measure values close to 0 degrees, because as you can see from my posts, depending on how you read it, you may get inaccurate results.

Because of all of this, and because the “random resets” being described in most of that thread don’t seem to have been fully solved, we’ve stopped using this encoder for this year’s robot. It’s a shame because it could be a very useful tool, but we’ve found it to be just too unreliable.

It should work with FeedbackDevice.PulseWidthEncodedPosition

I don’t know anything about the Talon settings…

In general you are at the mercy of whatever device is doing the “reading” of an analog signal.

If the reading device is 10-bit then you’ll get up to 10-bit and the extra bits from the “sending” device will just be wasted.

AFAIK, the random resets issue was resolved. IIRC, it was a floating voltage issue when TTL was not connected, resolved by enabling the pull-up resistor. I believe AJ said the issue still existed in the lamprey2 hardware at the time of production, but the pull-up resistor was already there and just not enabled in firmware, meaning the fix was then a software one at that point. I am sure he can correct me if I am wrong.

Either way, using them as FeedbackDevice.Analog on a Talon is working properly for us, I was just trying to get some input on our findings. It seems using them as an Analog device is the appropriate way when connected to a Talon in order to get reliable answers.

Talon Analog is 10-bit, but you can get 12-bit resolution if your sensor output is pulse-width encoded:

Analog:

Mag Encoder Absolute Pulse Width:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.