Author Options:

I want a circuit to close when I OPEN a glass jar ... Answered

I'm working on a project where I have a glass jar, and I want a circuit to close when I OPEN the glass. Need ideas on how I can solve that in clever ways...?

I know how to program it in flash, but my current project is all hardware based, and I don't want to use a computer to solve it.

I've tried using a photo cell, but for some reason it won't trigger on the circuit I'm circuitbending. I've used a photocell on another bend, and it worked there, but on this project I'm circuitbending one of those greeting cards where you can record your own voice, and it seems that it needs a good solid connection before it will trigger.

Would greatly appreciate all tips.

Addition: I need a solution that takes as little space as possible.


Magnetic reed switch in the jar, and a magnet in the jar lid to keep the circuit open while the lid is in place?

I'm not familiar with magnetic reed switches but sounds interesting. Do you knw of a good source for buying them?

I haven't used them extensively (I used them to make some "booby trap" devices for a Killer game I was in several years ago), but I got them at Radio Shack for a couple of bucks each, with a magnet included. The most common application is for home security systems as window triggers, so you should be able to find them pretty easily at electronic or home improvement stores.

I read this, seems like the perfect solution. http://en.wikipedia.org/wiki/Reed_switch

Does anyone know if common products that might have a magnetic reed switch I could salvage?

Maybe something in the Spy Kids toy line, but that's just a guess.

Hm, yes, I think I've seen something like that at kids r us, must check it out.

Seems like I once saw some kind of "traveler's door alarm" type of device that may have used a reed switch. You know, the blister-packaged, as-seen-on-TV, discount store kind of product. That's something you'd probably just have to stumble upon by accident, though.

Some burgular alarm switches have the.  If they use a magnet then there is a reed switch in them.

Nice idea on the reed switch and the magnet!  I never even considered it.

Thanks. They are handy little devices, in the right application. This just sounded like one of those applications.

You could mount a miniature lever switch inside the jar.  The lid holds down the switch.  Could be mounted on the outside of the jar also as long as the lever lays under the lid.

Expanding on knektek's idea with the foil, you could mount two strips of foil on the rim.  The metal lid makes contact between the two.  Contact between the two holds an spdt relay closed.  When contact is broken the relay opens but the switch closes.  Could be done with a transistor also.

Do you know a good source for spdt relays?

Radio shack still has a few, but now the I know what you're doing I would do it some other way.  For my circuit to work it will be drawing power all the time.

Using the reed switch you can get normally open or normally closed reeds.

For your use you would want a normally closed (I think).

You want one the is normally closed unless the magnet is near, then you want it open.  When the magnet is removed the switch closes and the circuit works.  You should be able to get burglar alarm switches lots of places on the net, radio shack, maybe even home depot or ace hardeware.

use negative logic to un-complicate your solution.

Do you know of any schematics for such a circuit?

I believe re-design spelled the same circuit out for you., although it can be done with logic chips as well, (which is the "relay" i had conceived of using for the negative logic) in order to minimize current draw, since it requires uAs to load the inputs, thereby reducing the power drain on any power supply, espdcially if run off battery power.

Since you're familiar with programming to flash,. I would expect you know something about logic chips?

I'd be glad to share a schematic, if I know what you're building with this circuit. Based on many of the questions posed at this website, I'm becoming leary of answering in detail in part because it seems that many here are bent on destructive, maladaptive, sociopathic goals, whcih I do not want to be a willing  party to supporting..

I've worked as a webdesigner for years and years and I've made simple games etc with flash, but I'm fairly new to electronics. I'm starting out with a few easy  circuitbending project to warm up and learn to solder, but I have alot to learn before I start designing anything more heavy.

I will have video on the prototype (without the lid contact solution I'm asking about here) on monday night, but I can explain it briefly here.

My daughter was running around the house with a glass jam jar, shouting and singing into the glass (she is 3 years old), and my wife thought it would be fun if it was possible to actually capture her voice in the jar.

So I got hold of one of those bithday cards that can record sound, and I took out the circuit, and placed it into the lid of the yar. A simple mod, but it lacks the finishing touches to make it more user friendly.

So, as you can see, nothing destructive or sociopathic going on, quite the oppsite actually. :)

If I where to make this with flash and a computer, I have a keyboard emulator card I can hook up switches to, and in flash I could make a keylistener that listens to eighter key down (contact) or key up (no contact). But I'd rather not be limited to hooking the glass up to a computer to get it to work.

When I'm done with the electronics I will work with camuflaging everything to make it appear "magic" at least to children and grandparents :)

you could use 2 pieces of foil one on the rim and one in the centre. the one in the centre could have a spring mechanism to ensure on/off.