My team wants to try using the AS5145B magnetic encoder as an absolute sensor. Per page 18 on this pdf datasheet, it says we need to make an RC circuit with “R1,R2 ≥ 10kΩ” and “C1,C2 ≥ 2.2µF / 6V,” followed by “R1 should be greater than or equal to 4k7…”
Does this mean each resistor should be larger than 10kΩ or the sum of the two should be above 10kΩ with R1 at least 4.7k? Also, for anyone who has used this sensor as an absolute encoder, what size resistors and capacitors did you use and what kind of precision and how much lag did you get?
I would agree with your first interpretation, they are recommending that each resistor be 10k or greater. They specify a minimum of 4.7k for R1 to avoid excessive current draw from the PWM pin, which can only supply 4mA or 2mA depending on the supply voltage.
I’d recommend a quick LTSpice simulation if you want to experiment with different RC values quickly. If you’ve not used LTSpice before, there is a great tutorial video here:
Otherwise, a breadboard with a couple of pots, adjustable caps, a function generator and an oscilloscope will also allow you to play with your filter values quickly (if you happen to have access to a well equipped lab).
You are probably best to install the filters on a small piece of breadboard located near the Digital Side Car. Connect it to the DSC using short lengths of PWM cable. You can put a piece of heatshrink tubing or some electrical tape over the piece of breadboard to keep it from shorting to anything.
I second the advice given by philso, although in this case I assume you’d want the analog output of your filter to go into the analog breakout board on the cRIO.
And if/when you’re ready to move beyond the prototype stage and if your team has the interest, it is really fun to create your own PCBs. Here is a link to an excellent series of videos that covers the topic of building simple PCBs and getting them manufactured using Kicad (a free tool):