Uwes Blog

Rust driver for AS5048A

there is now a driver for the AMS AS5048A crates.io / github.

It uses the embedded_hal, here is my test setup

Test setup

Test setup disassembled

It uses the

  • Sparkfun Qwiic Hat

  • a simple SMD to DIL converter board together with a 3d printed cover. You can download the cover as ready to print STL, or copy the Fusion 360 part. The test axis with a magnet consists of two Lego parts.

Example output

diag: 00000001 gain: 50
magnitude: Ok(4713)
angle: Ok(15814)

diag: 00000001 gain: 50
magnitude: Ok(4655)
angle: Ok(15988)

diag: 00000001 gain: 53
magnitude: Ok(4542)
angle: Ok(1271)

Thanks for reading. Comment on this post!

Back to index