AS5048A 1x8 pin header
Encoder

AS5048A Rotary Position Sensor + VESC

Yesterday I received a bunch of different encoders that I will test one by one In a near future. Lets start by with the ams A5848A. The AS5048A is a 14-bit rotary position sensor (previously known as encoder) for absolute angular measurement and with a PWM (=pulse width modulation) output over a full turn of 360° based on contactless magnetic sensor technology.

The PCB is available in two versions. Either with an AS5048A with SPI or AS5048B with I2C interface. P1 has to be populated with a 1×8 pin header and is required for power supply as well as SPI/I2C and PWM interfaces.

AS5048A 1x8 pin header
AS5048A 1×8 pin header

The PCB is quite tiny and have the dimensions 28x22mm, making it fit almost everywhere. The thickness of the PCB is 1.8mm and with PCB and the AS5048A chip is 2.8mm. The 6×2.5mm diametric magnet (that comes with the dev board) must be placed over or under the AS5048 sensor, and should be centered on the middle of the package with a tolerance of 0.5mm. The airgap between the magnet surface and the package should be maintained in the range 0.5mm to 3mm.

I started by soldering a 90 degrees 1×8 pin header to the PCB. I went with a 90 degrees pin header because of the limited space in my setup. Soldering at a tiny PCB like this was the first time for me. But I think it came out quite good (Feedback always welcome).

soldering on a 90 degrees 1x8 pin header to the PCB
soldering on a 90 degrees 1×8 pin header to the PCB

In order to test the encoder with my motor I made an encoder mount that will be mounted between the motors brackets. The mount will hold two AS5048A encoders, one for each motor. In my design the air gap between the AS5048A chip and diametric magnet is 1.70mm. The first prototype of the encoder mount came out Ok, but some minor adjustment needed for next version. I want to make more space for the cables (increasing the hole-size which the cables should go through).

encoder mount and diametric magnet motor holder
encoder mount and diametric magnet motor holder

Before mounting the PCB to the mount I needed to connect the cables to the pin header because of the limited working space. The AS5048A will use SPI for communications with the VESC. The cable connection as below

SCL/SCK (P1-5) -> HALL 1
A2/MISO (P1-7) -> HALL 2
A1/MOSI (P1-6) -> VCC
SDA/CSn (P1-4) -> HALL 3

AS5048 adapter board and pinout

AS5048 adapter board and pinout
AS5048 adapter board and pinout

I connected the AS5048A as the pictures shows below. The VCC(Red) is bridged with (MISO)

AS5048A Connection VESC
AS5048A Connection VESC

This cables was giving me to much noise. So in order to reduce the noise I used an shielded network cable with 8 leads in twisted in pairs. Each twisted pair gave me one lead. I put the VCC without any shield as a separate cable. I used the ground pin to connect the S-GND for the cable foil.

Homemade shielded cable
Homemade shielded cable

With the new cable things started to look a lot better. Encoder detection worked fine but I could not get any measurements for 0-180 degress. from 180-360 degress it works fine. I have not yet found any solution for this. But will keep trying to figure this out.

raess

Chief Technology Officer with a demonstrated history of working in the internet industry. Skilled in Business Planning, Computer-Aided Design (CAD), Quality Process Development, and SolidWorks. Strong business development professional with a Higher Education Diploma with specialization in Mechanical Engineering focused in Product development from Blekinge Institute of Technology.

http://valify.se

Leave a Reply

Your email address will not be published. Required fields are marked *