2
\$\begingroup\$

I'm building a smart bottle cap. Every time it's twist-open it records a long timestamp to local storage. When user opens a smartphone app it syncs data from storage to phone via bluetooth LE. It is powered by button cell.

What would be the best low-power cost-effective way to detect when cap is twist-open? I have the following sensors: http://amzn.com/B00CBDUD60

I was considering:

  • Potentiometer
  • Rotate Encode
  • Hall Sensor
  • Tilt/Mercury Sensor

EDIT: Thanks for the inputs! I've actually had the same discussion on arduino.cc forum, and people had reached the same consensus: a simple tactile/pushbutton attached to the inner "roof" of the cap, and covered with a waterproof lid. Here's a sketch: http://goo.gl/MdxIGZ

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Too Broad? FFS! This is a great question! \$\endgroup\$
    – Passerby
    Feb 24 '14 at 3:54
  • \$\begingroup\$ This is really not my field.. But how about a magnetic reed switch? Mount that one side a magnet the other? You could offset them then count the amount of times they cross each other path then divide by 2 to get the amounts opened? \$\endgroup\$
    – james
    Feb 24 '14 at 4:30
  • \$\begingroup\$ Do you have the option of a smart bottle instead of a smart cap? If the smarts are mostly in the cap can there be anything required on the bottle? I'm thinking about simple ohmic paths that are completed only when the cap is fully screwed down. \$\endgroup\$ Feb 24 '14 at 4:50
  • 1
    \$\begingroup\$ That sketch is a great idea. Fairly detailed. Only concern with that setup is obviously waterproofing/safety. And possibly the weight of the pcb+battery on the switch when the bottle cap is placed upside down (false triggering) \$\endgroup\$
    – Passerby
    Feb 25 '14 at 12:25
3
\$\begingroup\$

Assuming 1, this is a proof of concept with a standard soda bottle and bottle cap, 2, no liquid will be used for this (waterproofing and safety is not being accounted for), and 3, your handling the bluetooth and sensor input on your own.

A mercury or tilt switch is not practical. Any movement of the bottle will trigger it, let along twisting it off. Also, mercury in possibly a drink bottle? No thanks.

A hall sensor would require a magnet placed on the bottle (a fixed point). This might increase production costs from new material and changes in manufacturing.

A rotary encoder is expensive compared to a potentiometer. And so much more complex in terms of input. A pot is also more complex than you need.

A simple push button or momentary lever switch is really the most practical thing. Just mount it so it is closed when on the bottle, and it is opened when off the bottle (or vice-versa). That's all you need. Just two states (On/Off). The rest is your coding.

A slightly better option is a photoresistor. No moving parts, as long as the bottle is black/dark or there is a label around the neck up to the cap, and the bottle is used in a lit room, it will work. Then again, it might not work in a dark room like say someone watching a movie with the lights off. Nah, a simple switch is best.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ +1 for simplicity / common sense. I'd vote either a push-button or contact that's closed when the lid presses against the top of the bottle (membrane keypad style conductive material on the rim of the bottle might lend itself to this), or some simple opto thing using a black/dark bottle or marking on the top. Intrigued as to the use of this, must look out for the inevitable kickstarter... \$\endgroup\$
    – John U
    Feb 24 '14 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.