Open goran-mahovlic opened 2 years ago
Consider if this is a good replacement:
https://www.analog.com/media/en/technical-documentation/data-sheets/ADXL344.pdf
Old one:
CORRECTION: Old one is https://www.st.com/resource/en/datasheet/cd00274221.pdf
First, let's compare I2C interfaces:
LIS3DH supports both I2C and SPI. We have been using it in I2C mode. I2C address of the LIS3DH is either 0011000b = $18 or 0011001b = $19, with the SA0 pin being used to set the least significant bit of the address. Note that these are 7-bit addresses, so will translate to $30/$31 and $32/33 as 8-bit read/write addresses
According to https://www.analog.com/media/en/technical-documentation/data-sheets/ADXL344.pdf, the ADXL344 supports the following addresses: $1D or $53 if the ALT_ADDRESS pin is grounded. These correspond to $3A/$3B or $A6/$A7.
We now need to check for a collision with any other of the I2C devices. I am referencing the 2018 schematic for the MEGAphone, because that is what I have available, so checking for components swapped since then should also be done.
The audio amplifier https://www.analog.com/media/en/technical-documentation/data-sheets/ssm2518.pdf uses: 7-bit $34/$36 = $A8/$A9 or $AC/$AD. So no clash there.
The TCA9539 uses 7-bit addresses $74-$77, based on A0 and A1 pins, which corresponds to 8-bit addresses of $F8-$FF. So no clash there.
Also double-checked the i2c_wrapper.vhdl that has the code that drives the I2C peripherals for the R1 megaphone, and it also shows no clash for either of the addresses that the new accelerometer can use.
So I conclude that from an I2C addressing perspective, there is no problem. I have yet to consider the functionality of the device.
The LIS3DH has 3x ADC inputs, which we use for the thumb-wheels for volume control. The ADXL344 lacks these ADC inputs. Thus we need either an accelerometer that includes them, or perhaps more easily, we use a separate ADC chip. Such as this one:
It supports 7-bit addresses $48/$49/$4B = $90/$91, $92/$93 and $96/$97, which do not collide.
Thus I propose that we use the ADXL344 plus TLA2021IRUGT, which is currently in stock with Digikey.
If we approve this design change, I will need to update the digikey BoM order list.
OR we be lazy bums and get the old accelerometer from here:
https://www.digikey.com.au/en/products/detail/analog-devices-inc/ADXL344ACCZ-RL/3757932