Go Down

Topic: Can a Time Of Flight sensor (LIDAR) wake up an arduino from sleep state? (Read 643 times) previous topic - next topic

Rimbaldo

Hi everyone! I need a little bit of advice...


I´m thinkingon building a really small DC-DC adapter from a lithium 7.4V battery down to 3.0V to power two small slave strobes (flashes) that I use frequently, so I can use one bigger battery (and replace only one battery - Sony´s NPF550) instead of everytime having to open each strobe and replace the 2 batteries inside needed for each.

But my two small units, when fully charged, they keep consuming 0.5W to keep the charge, even if I don´t fire the strobes. So when I forget the flashes turned on, in a couple of hours the batteries are depleted.

So I want to know if I could put an arduino in a sleep mode, for instance, when not using the strobes for, for instance, 5 minutes, and have it woken up by just approaching my hand on a TOF sensor, that would detect if my hand is close to the units (I´m using them) or not  (my hand is far away)

The sensor is the VL53L0X, and has I2C pins (GND, VIN, SCL and SDA)




So, with arduino in a sleep mode, would the sensor still be operational? Could it by sensing movement wake arduino? Or it would also be shut down?

I have another simpler alternative that is, when detecting for instance, 5 mins. of no movement in fron of the sensor, arduino would switch of a transistor that would cut power to the strobes, without needing putting the MCU to sleep..

But I wanted to conserve energy to the max possible. Don´t know which alternative would be best. Don´t know if putting it to sleep would make so much of a difference.

By the way, I´m using this micro arduino version: SS Micro ATmega32u4





Thanks for reading!


jremington

It looks like you have to actively read out that sensor using I2C. So, it is not possible for the sensor to wake the processor up.

Sensors that can wake a processor usually have an "INT" output.

Rimbaldo

Thanks!

I guess I´ll have to leave the MCU always on then.. and with a transistor switch cut power to the flashes..

dougp

The chip does provide a programmable interrupt but it's not brought out on the board you show.  Adafruit has a board which does show one GPIO available. 

However, even if the Arduino sleeps the sensor must remain active to be able to generate the interrupt.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

Rimbaldo

The chip does provide a programmable interrupt but it's not brought out on the board you show.  Adafruit has a board which does show one GPIO available.  

However, even if the Arduino sleeps the sensor must remain active to be able to generate the interrupt.
Hi! Thanks!

Actually this board I own has two extra pins on the right side. One marked X (Which is the Xshutdown - Reset) and the other is marked G, which is the GPIO!


So, if the sensor keeps powered up (Vin and GND always on), even when arduino is at a sleep state, it could trigger an interrupt to wake up arduino?

Would it be possible?



jremington

Quote
So, if the sensor keeps powered up (Vin and GND always on), even when arduino is at a sleep state, it could trigger an interrupt to wake up arduino?
Yes. The GPIO (interrupt) output is open drain, so you need a pullup to the Arduino Vcc in order for it to be active.

dougp

Yes. The GPIO (interrupt) output is open drain, so you need a pullup to the Arduino Vcc in order for it to be active.
You'll also need to look at how to program the device to configure the interrupt feature.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

Rimbaldo

You'll also need to look at how to program the device to configure the interrupt feature.
Well.. It seems that most of the boards, Adafruit´s, generic ones have level converters from 5.5 to 2.8V, but not in the Gpio pin. This is no big deal, an extra level converter would do the trick.

But it seems that the libraries available for arduino lack functions for this pin, and I don´t have the skills on coding a function for it...

I´ll leave my arduino always on, but cut power to the flashes using a transistor switch to save energy.

Thanks for all your help and ideas!

Go Up