Advice on type of movement sensor

Hi! I have an arduino micro (Leonardo) project that uses a LIDAR DOF sensor so when I put my hand in front of the sensor it wakes arduino and it charges two small flashes connected to my camera.

It works but I want to make it wake arduino and charge/turn on the flashes when I get my camera from over the counter (the device is attached to my camera). So I’d prefer to use some sensor that detects any movement of my camera (from still to any move) but in any direction and without the need to put my finger, arm in a certain fixed position.

What kind of sensor it would be easier to implement to do it? The smaller the sensor the best, because the housing I have is really small. Also, if it has some kind of interrupt pin I can put arduino in low power mode when the camera (and sensor) is standing still (not being held).

Many, if not most of the popular accelerometers (e.g. ADXL345) have a motion-activated interrupt output that can be used to wake an Arduino from sleep.

Thanks!!

For this purpose I need, would an accelerometer sensor be best? I checked and there are also magnetometers sensors. Would they work also for my need? Which one would be best?

Thanks!

Magnetometers measure magnetic fields and are rarely useful for detecting motion.

A shake switch will also detect motion and would be cheaper and easier to use than an accelerometer.

That’s a great idea this shake sensor switch! And really easy to implement!

The only setback, as I read, is that it outputs an analog signal, and the interrupt for arduino to wake is a digital one... would it be possible to wake an arduino from sleep by a certain variation in value of an analog signal of this switch?

Any digital signal is really an analog signal, it's just interpreted as "high" or "low" (these words show you how analog it really is). A voltage >0.6Vcc is read as logic 1, everything <0.3Vcc is read as logic low, somewhere in between is the changeover point. So as long as your analog sensor produces the correct levels when shaking/not shaking you're in business.

There is also an analog comparator interrupt (see datasheet for details) but this would of course require the ADC to be active all the time, and then you can't use the deepest sleep modes.

A shake switch is just a switch.

Use it like any other switch, with a digital input and a pullup (preferred) or pulldown resistor.