Allegro A1335. Is it any good? Will soon find out.

Hi

looking for a magnetic angular sensor… Had a look at various sensors and This A1335 looks promising.

Googled but could not find any arduino code for it. …
Found something: https://github.com/Roboy/A1335_Utils
If any body used it before, I would welkom some advise.

Angular feed back for slow moving shafts… steering angle, wheel shaft < 100rpm, robotic arm joints position and so on.

The datasheet tells you all need. Q is: can you write the code needed. (May it be smarter to find a commonly used sensor.. with a prewritten lib to follow?)

knut_ny

It would be simpler but theres no sensor out there on my budget.(Hobbyist) Besides I want to learn how to write a library and how to read sensors with registers through I2c or SPI.

I went a ahead and bought 10xA1335 sensor chips and I am planning to use them with I2C communication. Now they come pre-programmed with a I2C address and two hardware pins to change the address so you can use 4 of them out of the box by setting the hardware pins. :)

When you want to use more than 4 one need to change the first 5 bits in the register to a new address, coupled with the hardware pins.. gives you another 4 sensors and so on. :)

To set the new address in EEPROM memory you set a couple of enable bits and register addresses. Once everything is set you need to pulse the VCC pin (normally at 5V) with something like 17V to make it permanent.

How do you that? :confused: Extracts from Data sheet and programming manuals:

Address: 0x319 (continued) EEPROM Register Reference (continued) I2C_SLAVE_ADR [6:2] I2C Slave Address Sets the 5 MSB of the I2C slave address. 2 LSB of address set by the logic state of the SA0 and SA1 pins.

The final step in writing to EEPROM is sending programming pulses on the EEPROM programming pin (the VCC pin) to set the bitfields. The VCC pulse profile necessary for EEPROM programming is shown in Figure 17. Minimum and maximum times are described in Table 17. After EEPROM has been written, it is recommended to cycle power to the device.

Pulse Voltage min: 18V Typical: 19V Max:19.5V

Continued here: http://forum.arduino.cc/index.php?topic=545957.0