AS5048B - overall questions

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

Im going to use AS5048B (I2C version) sensor

datasheet http://www.ams.com/eng/content/d...

to control position of servomotor (total 5 of sensors for 5 motors). Im starting with PCB project and im want to confirm something.

1. Does this chip can store data written to it (for example Slave address, programmable 0 position) even if power is cut off? Because i want to power it from external 5v, but if I'll have to write data every time i power it up i will consider using 3.3v button battery

2. A1 and A2 inputs. From what i understand they are simply hardware pins to set last two bits of Slave address? By default its 10000XX so if i set A2 and A1 as low the slave address of sensor will be 10000(0)(0) and if i pull them up it will be 10000(1)(1)? If yes, can i just connect them to GND (or VCC) to make them permanently in low or high state? (ill use bits 5,4,3 to write different slave addresses for 5 sensors)

3. PWM output, i think i didnt found anything in datasheet about it, but im not gonna use it, do you think i can leave it floating?

The sensors will be placed on motors, and will be connected to MCU that will be like 10-15 cm away from them so i want to minimise amount of wires going from sensors to MCU.

My schematic so far

(SCL and SDA will be connected to resistors on board where MCU will be)

Thank you kindly in advance for any help.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I havent read the datasheet for your device but the earlier ones stored to zero position in eeprom. You can leave pwm open as it is an output.

You need to be careful with your interconnections as i2c tends to lock up if it gets interference. You probably want to avoid sending pwm down the same cable as i2c as it may capacitively couple.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, that with PWM is good.

What about A2 and A1 inputs, did i get it right? Because if ill connect it to gnd or VCC ill have only 4 wires to each encoder GND+VCC and SCL+SDA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, you are correct. Tie A1,2 to the required logic levels to achieve the address.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just made a small PCB that can be attached somewhere, even in small places.

U1 - AS5048B
C1 - 100nF 1206 SMD capacitor
C2 - 10uF 1206 SMD capacitor (necessary when powered from 5V)
PWM pin not used, left unconnected

A1 and A2 are connected to GND for low state. Ill write with I2C command custom slave address for each of encoders (since two pins anyway wouldn't be enough to address 5 encoders),

About storing data, it seems there is something called OTP (one time programming), does this mean i can only write there once? Does it works same as regular I2C write?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The datasheet outlines the procedure for the one time program of the zero position via i2c. You can only do this once!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Last (hopefully) question. The 10uF capacitor attached to 3V and GND. Do you think it can be polarised capacitor (electrolityc, tantalum) or it has to be non-polarised capacitor? Because it datasheet it does not specify which kind of capacitor it has to be.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The symbol suggests a non polarized cap. 10uf in a ceramic is common these days.