window tapping trigger for led array fET-flipflop?

Thread Starter

mudboy

Joined Dec 9, 2007
5
Hi there- I am an artists, musician and half way closeted electronics wannabe. But I need some help. I am designing an art installation for a window and I am trying to figure out a simple circuit that would allow people to tap on the glass and by doing so turn on (and then off) a relay or mosfet or something that would drive say 250-500 millampes, basically a bunch of led's.
Ill probably have to make 20 different circuits so I would like to keep the price down. I think in principle I could use piezos on the inside of the glass attached to some kind of FET into a flipflop cicuit, into a relay... but it is a little over my head. I can follow directions well though! if you have any advice. or can point to some specific designs.

Also I am aware that there will inevitably be some noise from ajecent tapping and the like- but thats fine- a dirty signal will be okay and make it more organic and random- just looking for a little added interactivity. okay please respond and Ill be psyched! if any one can walk me through this I can send them some art or music in trade- look me up www.mudboymusic.com
 

lightingman

Joined Apr 19, 2007
374
Hi,A piezo sounder element can be stuck to a window, when the window is taped it will generate a very small voltage, this can be amplified, the output rectified and used to trigger other devices.... This is what the early drum pads used to trigger electronic drum kit's..... Daniel.
 

Thread Starter

mudboy

Joined Dec 9, 2007
5
ah- I figured that much out myself. I have a piezo attached through a switching transistor - I can get a led to flash when I tap it. That far I got.
I figure the next step is how do I turn that tap into a clean signal that can drive a flip flop circuit and then how can I get it to turn on and off something with some significant current.?
 

SgtWookie

Joined Jul 17, 2007
22,230
You could use the output of your existing circuit to trigger a 555 timer rigged in a monostable configuration.

Here's a software package you can download and use in freeware mode to design a 555 timer circuit:
http://www.schematica.com/555_Timer_design/555_Timer_PRO.htm

Driving your LED's is another matter. Your 555 timer can handle up to about 100 mA (0.1 Amp) by itself. I suggest you look at an old standby, the ULN2004 or ULN2804; Darlington pair driver IC's. The ULN2004 has 7 Darlingtons, the ULN2804 has 8. With proper heat sinking, each Darlington can handle up to 500mA. Connect the output of your 555 timer circuit to the inputs of however many Darlington pairs you need.

Use the Darlington pairs to provide the ground for your LED's. When the Darlingtons are ON, they will drop around 0.6 to 0.7 volts across them. Use that in your equation when you're calculating the limiting resistors for your LEDs.

Say you're using LED's that are rated for 15mA @ 2.5v, and you're using 12V for Vcc.
R = E/I (Resistance = Voltage / Current, Ohm's Law)
R = 12v - 2.5v - 0.7v / 15mA
R = 8.8V / 0.015 A
R = 587 Ohms (approx)
Then you'd use the next higher standard value of resistor.

But, you're wasting a lot of power on that resistor - you could have some more LED's in series for that string - three more, as a matter of fact.
8.8V / 3 = 3.52 - ditch the remainder.
R = 12v - (2.5v * 4) - 0.7v / 15mA
R = 12v - 10v - 0.7v / 0.015 A
R = 1.3v / 0.015 A
R = 87 Ohms (approx)
As before, use the next higher value of standard resistance.

Note that different color LED's will have different voltage @ current ratings. If you use too low value of a current limiting resistor, your LEDs will have a very bright and very short life.
 

Thread Starter

mudboy

Joined Dec 9, 2007
5
I looked into those darlington arrays- amazing. How do they have so much current going through them without heating up?! anyway- thats a seperate issue. I think what I am hearing from you is that we use the 555 to turn the crappy signal from the piezo (amplified by the transistor) into a stable pulse that can be read by the ULN2004 (remember Ill have 20 piezos., each turning on and off 20 seperate loads, -so Ill need 3 chips- but yeah in principal I get it)

However so what I am wondering is - at some point it seems that I need the first pulse to turn on the light via the ULN2004- but the second tap Ill need it to turn off. thats why I wasnt interested in the vibration sensor alarm- it wasnt clear if it would reset on its own. I imagine that the 555 might be able to this as part of its cleaning up the signal, but most of the schematics I have found for a 555 flip flop- involve a momentary physical switch - could I adapt it some how? like say here:
http://ourworld.compuserve.com/homepages/Bill_Bowden/page9.htm#toggle.gif
(scroll down for the 555 toggle relay)

(ps I'm um,... maybe I shouldnt mention it here- a mac guy... so that software emulator wont help much... sorry )
Thanks in advance. I am learning alot-

PS- for reference, I am using a 12v power supply. and these very bright led;s they run at about 20ma and 3.2-3.6 volts.
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, the ULN2xxx's can sink a fair bit of current; probably more than you'd need for a few dozen LED's - but everything has it's limits. ;) Power MOSFETs are really quite amazing, with their extremely low on-state resistance; many of them have small fractions of Ohms in their ON state, and some can carry 40 or more amps in a TO220 case!

But power MOSFETs would likely be overkill for what you're trying to do. Just make sure the ULN2xxx's have good heat sinking; large traces on the PCB and if you can't do that, then epoxy heat sinks to the top of 'em (use lots of pressure until the epoxy sets up so it's a really thin layer.) Old CPU heat sinks work pretty well. The copper ones are far better than aluminum.

OK, setting up a 555 as a oneshot (monostable) would mean that when a "tap" is sensed, the 555 would go from an "off" state to an "on" state for a period of time that you choose, and then turn off on it's own. Now if you want it to TOGGLE states, that can be done, too - as a matter of fact, to simplify your arrangement you may want to look at the CMOS 4017 IC - it's a decade counter. It has 10 outputs (O0-O9) that turn on in sequence; but only one at a time. If you used the output of the monostable 555 as a "debounce" circuit and the clock of the 4017 IC, it could turn on a different set of LED's, in sequence. That would enable you to tell a story of sorts, by leading people through your scene via lights that they control. It could also be set up so that if nobody made noise for a while, the lights could be slowly clocked through their display by themselves.

Let's face it, wiring up 20 transducers to twenty 555 timers is going to be a good bit of work, and you want to get this thing finished this year, right? ;)

Something else you might consider is to use a binary counter, or a pair of them to drive the ULN2xxx's. Each time the 555 was triggered, a different combination of LED's would light up - instead of just one string.

If your LED's are of the super-bright variety, I hope you're putting them inside of something so the kiddies can't stare directly at them. They CAN dama/for0vision, you know - very easily.
 

beenthere

Joined Apr 20, 2004
15,819
The old 7490 was famous for counting glitches that were just very small. Apply the amplified and conditioned tap to a couple of 7490's and decode the resulting count to change the light patterns.
 

SgtWookie

Joined Jul 17, 2007
22,230
Hmm - I forgot about the 7490. Well, that would complicate things, because he'd have to add a CMOS to TTL driver circuit to clock the 7490's, and then he'd need ULN2x03's instead of the ULN2x04's. But seems like the transducer circuit is "glitchy" enough by itself - we're having to de-bounce it at the moment ;) Well, we need to hear more from mudboy, I think.
 

Thread Starter

mudboy

Joined Dec 9, 2007
5
actually the more i play with using the piezo as a sensor and figuring out the prices and what not Im starting to think It will probably save me a lot of time to go with the item listed earlier - http://www.goldmine-elec-products.co...?number=G15777
Ill have to bring the electronics with me to LA- so I can really test them out totally until I get there- it would be nice to have something with an adjustable sensitivity- and frankly the piezo trigger I built (it siinks the 555 input through a transistot to produce a monostable output) while simple, isnt as sensitive (OR RELIABLE) as I wish it would be.

Also talking with some others I think it might be a more effective piece actually if the electronics were simpler- more car alarm style- Its essentially a large diorama that you cant see into unless you get real close. I think the idea of needing some vibration or tapping to "Wake it up" makes alot of sense, but I dont see people turning it off when they leave, so I am starting to think that a monostable pulse- a very long one, of maybe 30 seconds, (via a 555 and the pre-bought sensor and a relay) might be enough. a few sensors carefully placed might allow some very sensitve parts to wake up easily while others might require a direct tap in a particular area on the glasss- sort of sleepy monkey at the zoo style.

doing this also leaves me open to some other options- ie, maybe instead of clean "on" pulse, it can be a more complicated ramping ocillation via 556... that way it doesnt just turn on- it sort of shakily wakes up.....
ill try and attach a photo...Imagine a room of these
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Hmm - very interesting! Love the prototype crystal :)

Now that you mention it, I was playing around with a 555 model in SPICE earlier today; one that was set up for a constant 50% duty cycle at about 1kHz, but I was feeding a ramp-up voltage to one of the inputs (pin 5?) and had a fairly large capacitor on the output. The resultant waveform actually somewhat resembled your crystal prototype ;) I'll have to pull it up in the morning; it's after midnight now and I'm fried :p
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, here's a screen snapshot of what I was fooling around with yesterday.

The green trace is the signal output measured at pin 3. The blue trace is the input at pin 5, or CV.

I was thinking that if the output of your transducer(s) were amplified and rectified, fed into the CV input of a similar timer circuit (albeit much slower; perhaps 0.7 to 1 Hz, it would give your artwork a very organic "heartbeat" appearance and "feel" that would respond to the ambient noise level.

What do you think of that idea?
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Yet another whacky idea! :D

If your display is going to be in a museum or with another exhibit, tapping on the glass might not go over too well with those in charge. Also, the ambient noise level is rather low in such environments - most seem to stay relatively quiet.

However, if your display were to be stimulated by movement - that's a whole different ballgame! You could have your display respond to BOTH sound and movement.

Here's my latest iteration on the 555 circuit; I've slowed it down to around 1 Hz (give or take) - the "heartbeat" is more rapid at low CV input levels, and slows as the stimulation increases. See attached
 

Attachments

Thread Starter

mudboy

Joined Dec 9, 2007
5
sorry I didnt write back- didnt see the new posts!

sgt wooky your a hero! that program looks great. I wish I could run it.
I think though I am going to try and keep it simple- there is alot of stuff I have to put together besides the electronics (ask me about the one way vectored mirror drawing you have to look throught sometime!) so I think that its best if I go with a relay for the part that drives the LED's( remember they are in 200-300ma bundles) also what I am thinking is rather than responding to motion and touch-- I m going for more of a surprise style- ,... to see this thing people are going to have to look into a giant box basically that is more or less mirrored from the outside. the only way to see into it is by putting your face up close to the glass, or if its night time the light will show through a little from the inside to the outside. but there will be little windows to peer into. tapping on the glass will be okay

Think about it this way everything is dark- then someone comes to the glass- toches it to look in (its dark) and the crystals all wake up flashing at different rates and subsiding over time. at the end of the period (Ill have to experiment, some are left on and some are left off (they are essentially flashing but at very low frequencies- maybe something changes every five minutes or more) untill the next person sets it off.

I think I am going to be good with setting off a monostable pulese via the vibration detector - that pulse via a 556 could triggers an intersting pattern by which the crystal wakes up (read flashes quickly) and then subsides into a decreasing frequency on and off again pattern... I think all the schematics are out there for that- I attached the one I am working off of. It looks similar to what you have but sort of in reverse...
I assume I can swap out the caps and relays to get a generally lower start frequency and ending frequency...

Do I need to adjust anything so that in the place of the speaker I have a 5v relay? that way the relay goes on and off which drives the lights?...

Also is there any reason why the same pulse from the vibration sensor cant be used to trigger more than one 556 circuit at the same time?
That way I can gang a few 556 circuits to different crystals but use the same vibration detector.?
 

Attachments

Top