2024-11-12 07:44 PM - edited 2024-11-12 08:08 PM
Hello,
I'm designing a custom board with a LIS2DW12 accelerometer for motion detection. I want to use INT1 to send a signal to the MCU when it detects movement, which should wake up the whole system. The accel supports both i2c & SPI communication but I intend to use SPI. I would like to verify how I plan to make my connection between the accelerometer and MCU. Please refer to the images below.
Note: VBAT is sourced from a 3V CR 2032 coin cell
Q1) I'm aware that the datasheet mentions that to enable SPI communication, the CS pin must be set to logic '0' as seen in the image below. Is it okay if I directly connect the CS of the accel to a GPIO pin on the MCU through ACCEL_CS or should I add a pulldown resistor on the ACEEL_CS connection?
Q2) The datasheet mentions using 100 nF (C6) ceramic and 10 µF (C5) aluminum decoupling capacitors for pin 9 (VDD). Is it okay if I use a 10 µF ceramic capacitor instead. I'm constrained for both real estate and budget on this project?
Q3) Are my connections for all other accel pins looking good?
Thanks
2024-11-13 01:13 AM
Hi @neeld ,
Q1) No pull-down is needed on the CS, because it is forced low by the uC, otherwise it would create a resistive partition with the internal pull-up. At most we put an external pull-up in case the internal one is not enabled: since it is enabled by default, you can put no resistor at all, but maybe provide an unsoldered pull-up just in case
Q2) 10uF+100nF is optimal for all operating conditions: you can still mount just the 10uF and have no impact on sensor operation
Q3) it's fine
2024-11-21 05:04 PM - edited 2024-11-21 05:13 PM
Hello @Federica Bossi
Thank you for answering my questions regarding the Accel CS and SPI connections. I appreciate the clarification!
However, you still haven't answered Q2 above properly. What I mean to ask is if a 10 uF aluminum electrolytic capacitor is absolutely necessary? Could I use a 10 uF ceramic capacitor instead because it's smaller and cheaper? All the 10 uF aluminum electrolytic capacitors are very large in size and expensive.
If I must place an electrolytic capacitor, could I use a tantalum capacitor instead? 10 uF tantalum capacitors are also smaller and cheaper than 10 uF aluminum capacitors.
Thanks
2024-11-22 05:11 AM
Hi @neeld ,
Yes, no problem to use a ceramic capacitor!