(First post, and first real Arduino project!)
I want to put some LEDs onto an object, and have them start to flash within a few seconds after the object starts moving, and to stop flashing shortly after the object stops moving. But the lights should flash only if it's dark. The object will be idle for long periods of time, and the project will be battery powered, so the ability to save power while the object is idle is imperative.
I've looked at a lot of different sensors for this, and have ruled out piezo vibration sensors because I can't find one that can "interrupt" an Arduino to wake it up from sleep mode. If someone knows of something like this that CAN trigger a wake-up, I'd like to know about it, as it seems like they require no power at all when idle.
I think the following components may be good choices for my project, but I would love to hear opinions of those with experience doing this kind of thing:
-
Adafruit Trinket (or Trinket Pro - whichever is smaller/cheaper and can do what I need).
-
Triple Axis Accelerometer Breakout - ADXL345 (It has programmable interrupts.)
Triple_Axis_Accelerometer_Breakout_-_ADXL345__SKU_SEN0032_-DFRobot
I know an accelerometer can do a whole lot more than I need, but this one is very small, consumes very little power, and most important, has a smart "interrupt out" that I think I can use to conserve a lot of power. -
Seems like any basic photocell should do the trick, right? Something like this:
Photo cell (CdS photoresistor) : ID 161 : $0.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Here are some specifics that may help you evaluate the suitability of these components, or to suggest others:
-
The power and controller parts of the project needs to be small. (Don't worry about the physical size of the LEDs.) No more than about 3 cubic inches - the shape isn't all that important - it can be long and narrow, or rectangular and thin. I just don't want it to take up much space.
-
It may end up being produced in lots of 1,000 or so, and at that volume, the cost needs to be no more than about US$5.00. I know the prototypes will cost more - I'm saying this so no one suggests a component that might cost several dollars each, even in volume.
-
I want to be able to distinguish between the object being "bumped" (moved for just a few seconds) and actually being "in motion". Ideally, the Trinket won't even wake up when "bumped". But aside from that distinction, I don't care how much the object is being moved. In my programming, I will base all of my important decisions on "Is it moving or not?", rather than "How much is it moving?".
-
The object will be idle far more often than it will be moving, so low power consumption is critical. Rough guess - the lights will be flashing only about 1/2 of 1% of any given day. I'd love to power it with an AA battery or two, but a 9V would be OK. Hopefully nothing bigger than that will be required.
-
The whole point of this project is to visibly draw attention to the object when it's moving and it's dark. (Not pitch black, just dark, like a normal night, outside.) I don't know which LEDs to use, nor what color is better, nor how to flash them for maximum visibility, nor how bright to flash them, etc. I figure that will be a matter of trial and error, after I get the basic project working. (But if anyone has thoughts on this, I'd love to hear them.)
-
The object that will be moving or not - the object to which the LEDs will be attached - is about the size of a briefcase, and only one of the "big" sides of the object will ever be visible. (That may help someone who wants to comment on the LEDs.)
Thanks so much for any input!
Brian