Author Topic: AS5048A Magnet and SPI questions  (Read 2798 times)

0 Members and 1 Guest are viewing this topic.

Offline JoelTopic starter

  • Newbie
  • Posts: 5
  • Country: us
  • Engineering is fun.
    • JoelSimonoff.com
AS5048A Magnet and SPI questions
« on: April 29, 2015, 12:59:52 am »
I am going to be implementing an AS5048 Absolute encoder into my project.  I am using the AS5048A which is the api one not the B which is the i2c version.
I have several questions:

In the data sheet it says the magnet holder can not be ferromagnetic, I am connecting it to a steel rod, is steel ferromagnetic?  If it depends on the type how would I test it?  If it is how much of an insulation should I put between the chip magnet and the steel rod?

To daisy chain them together it shows a style I have never seen before and need help with.  See the attached image of the datasheet.  It looks to me like instead of splicing the 3 SPI pins and adding one slave select pin for each board they are putting the MISO pin of each board to the next pins MOSI until the last board.  This is really cool because my project requires a wire tether and the less wires the better.  I am specifically confused on how to control them.  "MCU shifts n x 16-bit (e.g. READ command FFFFh) through the chain"  and "MCU shifts n x 16-bit (e.g. NOP command 0000h)".  I think this has to do with bit shifting, I just don't know what it wants me to shift.

Would this be better for the micro controller forum?

Any help would be greatly appreciated thanks very much,
Joel
« Last Edit: April 29, 2015, 01:17:19 am by Joel »
 

Offline cyr

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: se
Re: AS5048A Magnet and SPI questions
« Reply #1 on: April 29, 2015, 03:42:09 pm »
Shifting simply means to do the SPI transfer, so with N devices in series you would repeat your command (16 bits) N times while keeping the SS signal low. After the first 16 bits are transferred the device starts shifting the bits it has received back out on MISO, propagating the command to the next chip in the chain.

Do the same thing again, and out the other end of the chain will come the data bits you wanted - first the ones from the last chip in the chain.

Think of each chip as a 16-bit shift register with some added intelligence.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3322
  • Country: gb
Re: AS5048A Magnet and SPI questions
« Reply #2 on: April 29, 2015, 04:14:02 pm »
In the data sheet it says the magnet holder can not be ferromagnetic, I am connecting it to a steel rod, is steel ferromagnetic? 

If it is a mild steel rod, then it is ferromagnetic.  Some stainless steels are not magnetic, but this is very easy to test with a permanent magnet.
 

Offline JoelTopic starter

  • Newbie
  • Posts: 5
  • Country: us
  • Engineering is fun.
    • JoelSimonoff.com
Re: AS5048A Magnet and SPI questions
« Reply #3 on: May 06, 2015, 11:46:02 pm »
I tested it with a permanent magnet and it is magnetic.  How do I insulate the magnet for the sensor from the magnetic steel shaft?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf