I am currently trying to connect an ADXL362 accelerometer to an ESP8266 and have them communicate through SPI.
My final goal is to build a battery-powered device that submits motion events (activity or inactivity) through ESP's WiFi connection.
I use components from Sparkfun (Sparkfun ADXL362 breakout board / Sparkfun Thing (ESP8266))
SPI communication between both components works fine when power for the accelerometer is provided by ESP8266's 3v3-Pins:
However, to extend battery life, I'd like to be able to completely power down the ESP8266 after ADXL362 was set to wake-up mode (waiting for movement). As a first step towards this goal, I'd like to make the power supply for ADXL362 independent of the ESP8266 - my (naive) approach looks like this:
In this scenario, I cannot get any meaningful sensor readings. ADXL 362's status register reads "255" even after a soft reset was issued, apparently indicating a SEU fault.
In both cases two AA batteries are used as a power supply (~3.2V).
All this is leading me to my question: How can ADXL362 be powered independent of an MCU such that SPI communication is still possible?
Currently, I don't use any additional capacitors, resistors or voltage regulators although they may well be part of the solution. I assume that my source code is not causing the perceived issue - however, I'd be happy to share the code if needed.
Thanks in advance for any of your ideas to help a newbie :)