Low pass filter for AS5145B

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).


Dean Iverson

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):


And here is a link to a project recently completed by one of the kids on our team:

We were able to get three boards manufactured using OSHPark and order the parts for under $10 total.


If you need an absolute analog encoder, then I would suggest that you buy an absolute encoder. A cheap and one we have found good for our needs is the BI model 6127 series.

Thank you for both of these suggestions. I have played with LTSpice a little bit, and it is very neat.

Thanks for this too, except, as diverson pointed out, we plan on going to the cRIO.