Link
On this page

Position Sensors

This library supports these types of off-the-shelf position sensors:

Sensor Types at a Glance

Sensor Type Principle Interface(s) Popular Examples Key Strength
Encoder Counts A, B, index pulses ABI (direct pins) OMRON 1000P, AMT103, AS5047U High resolution
Magnetic Sensor Measures magnetic field SPI, I2C, Analog, PWM, ABI, UVW AS5048A, AS5047U, AS5600 Absolute position
Hall Sensor Detects magnet poles UVW (3 digital inputs) 49E Hall Sensor, 105 Hall Sensor Low cost
Generic Sensor Custom implementation Your choice Any custom sensor Maximum flexibility

All sensor classes are implemented in a generic way to support as many sensor variants as possible.

Supporting additional sensors

If you are interested to see what does it take to enable your code to run with different type of sensor or with the communication interface that has not been implemented in the Arduino SimpleFOClibrary yet, check out the short example.

Learn how to implement custom sensors Dig deeper into sensor implementation

NEW 📢

We've also created a simplified interface for implementing new sensors in a context of the GenericSensor class. With it you can add your custom sensor to the SimpleFOClibrary by implementing only one function. Check the new sensor class

SimpleFOC Community

Finally, if you have implemented a new type of sensor to the library or you are searching for help to implement some specific sensor type don’t hesitate to post in community forum

It is always helpful to hear the stories/problems/suggestions of people implementing the code and you might find a lot of answered questions there already!