Configure an AMS-AS5048 encoder
The AMS-AS5048
encoder model supports AMS’s AS5048 encoder.
This is an absolute encoder that uses an I2C or SPI interface to connect.
To can configure the encoder, you must change some other configuration details:
You must configure an I2C bus on your board:
{ "name": "<board_name>", "type": "board", "model": "<model_name>" "attributes": { "i2cs": [ { "bus": "<bus>", "name": "<bus_name>" } ] }, "depends_on": [], }
Any motors using the
AMS-AS5048
encoder must setticks_per_rotation
to1
. This is because the AS5048 encoder is an absolute encoder which provides angular measurements directly.
Now you can configure the encoder:
On the COMPONENTS subtab, navigate to the Create Component menu.
Enter a name for your encoder, select the type encoder
, and select the AMS-AS5048
model.

Fill in the attributes for your encoder:

{
"name": "<encoder_name>",
"type": "encoder",
"model" : "AMS-AS5048",
"attributes": {
"board": "<board_name>",
"connection_type": "i2c",
"i2c_attributes": {
"i2c_bus": <string>,
"i2c_addr": <integer>
}
}
}
The following attributes are available for AMS-AS5048
encoders:
Name | Inclusion | Description |
---|---|---|
board | Required | The name of the board to which the encoder is connected. |
connection_type | Required | Use "i2c" . |
i2c_attributes | Required | The attributes to configure i2c connection:
|