Thrifty Bot Absolute Encoder with SPARK MAX

Hi,

I’m trying to use the Thrifty absolute encoder for reading swerve module rotation on an SDS Mk4i. But, instead of reading the correct value from the encoder, the SPARK reads either a random value or 0.

I have the encoder connected to the SPARK MAX through an adapter board (PWM signal connected to pin 6). I’ve also checked the encoder’s PWM signal with a multimeter and it changes correctly as the wheel rotates.

Any ideas? Thanks in advance.

think you might be confusing PWM and analog signals here. Pin 6 on a spark max takes a PWM signal in (eg varies from x-y% duty cylce based on the position of the encoder), while the thrifty bot encoders output an analog signal (eg varies from x-y volts based on the position of the encoder)

edit:
definitely make sure you set the jumper to 3.3v as mentioned below :slight_smile:

3 Likes

The thrifty bot encoder works with an analog signal, and not PWM.

You’ll need to power the encoder at 3.3V (there is a jumper to do this). There is a 3.3V pin on the Spark Max. Then use Pin 3, and ground.

I’ve gotten this to work pretty well on a bench, and did something similar on our 2023 robot.

2 Likes

Thank you very much! Would the 5V amplifier on the breakout board let me run the encoder on 5V, or no?

This?
Yeah. That should work fine at 5V.

1 Like

Also, search here on CD – this topic has come up before, and the longer discussions are worth reading over.

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