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.
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).
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).
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
I connected the AS5048A as the pictures shows below. The VCC(Red) is bridged with (MISO)
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.
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.