I'm trying to make a device which needs to be turned on when it's picked up and might sit in standby for several weeks before getting picked up. Right now I'm considering using a Photo resistor at the bottom of my device or using a piezoelectric sensor for this purpose, but both of them use electricity and might drain the battery before actual usage of the device. Is there any other way for a device to detect its own movement without draining its battery?
A vibration sensor switch can be built or bought using a spring, wrapped around a central pin.
When moved, the spring contacts the pin, closing a circuit. Gravity alone isn't strong enough to close the circuit. They are surprisingly effective in all dimensions, not just in the axis perpendicular to the pin.
They are available in a variety of sensitivities and constructions, including bare and enclosed. I have seen versions made of just coiled steel wire soldered to the board.
Similar to Solar Mike's suggestion, these avoid any energy usage while not triggered.
Microswitches are available in a range of formats, are very small, are mechanically simple and very reliable.
Figure 1. A selection of microswitches.
The lever types are very sensitive so little force is required to operate them due to the lever's mechanical advantage.
Figure 2. Wiring is as a simple as using the normally-closed contact (which will be usually open when the weight of the container is applied to the switch).
Should the unit be stored in a dedicated holder, a 'NC' type magnetic reed switch would suffice.
The reed switch could be mounted in the unit and wired in its supply line.
A magnet, located in the holder, would keep the reed switch open.
The reed switch would close and the unit would power up, on retrieval from it's holder.
You could use capacitive sensing to detect when the device is picked. If it is a box, you'd need to put some conductive tape or spray conductive paint on all sides on the inside.
This adds a feature: the device can know where it is touched. For example if it is a box, it will be able to detect fingers on all sides independently. So it will know if it is touched (one finger detected) or picked up (at least two fingers, on opposite sides).
For example, MSP430 microcontrollers implement capacitive sensing with very low power:
The few µA required are lower than battery self-discharge. If you design the circuit for lowest standby power, it doesn't really matter if it is drawing a few µA from a couple AAA batteries or if it is fully off.
I am assuming that the object picked up is an eCommerce package left at the door step or something similar.
Base on the above assumption, I recommend look at solutions that is based on energy harvesting. This should address the requirement for no battery, lack of power or low power. Take a look at solutions offered by enocean self powered IOT solutions
Below is an example of a push button transmitter module. The following is used as light fixture switch. The system uses on/off motion of mechanical light switch motion to generate sufficient electrical power. The electrical power is generated using the built in electro dynamic generator.
The electro-dynamic energy transducer is actuated by a bow, which can be pushed from outside the module on the left or right by an appropriate pushbutton or switch rocker. When the energy bow is pushed down, electrical energy is created and a RF telegram is transmitted including a 32- bit module ID (PTM 210J optional 48 bit). Releasing the energy bow generates different telegram data, so every PTM telegram contains the information that the bow was pressed or released.
I suggest taking a look at PTM 215 Push button multi-channel switch module or something similar
Alternatively you could use a pressure sensor, but this would require power.
A magnet near a coil of wire only generates a current when the magnet is moving. Put a spherical magnet in a short and wide box with a coil on the lid (by "short", I mean similar height to the width of the magnet). When the device is moved, the magnet will roll around, generate a current in the coil, and that could be enough to power a startup circuit that turns on the main one.
If the device is overall flat in shape you might be able to make the coil out of a corner of the main PCB and just clip a plastic cover over that area to keep the magnet in the appropriate area, or even design it into the case.
Possibly not quite what you're after, but you could tether the device with an easily removed string. When you pick up the device, the tether comes undone, and the device knows it's been picked up. This would be sort of the reverse of a "tether kill switch" that you might find on a motorbike or jetski: https://www.mpsracing.com/products/MPS/hc01.asp