How to wire up the Piezo Film Vibra
Ragtop
Posts: 406
I still have a hard time understanding circuit diagrams. Is
there no power going to this?
Comments
Power is not required. The piezo produces a voltage when it is flexed. That is why there is a zener diode there to limit the voltage to 5.1V (btw if it is going in to a prop should the diode not be 3.3V or the resistor 2.2K or more?).
I hooked the circuit to an led without the prop. I can not get the led to light at all with the diode.
Without the diode, I have to shake the thing like mad to just get the led to barely light.
Do these piezo film vibra's come in different ranges? I got this one here:
http://www.sparkfun.com/products/9197
kwinn is correct.
The Tab only produces a voltage signal during changes in its bending position, so these signals might be so fast that you could not see the LED blink even if it indeed does blink when you're shaking it. Because the Tab output signal is so transient, you might need to use an oscilloscope to measure the voltage output. But remember, too, that the Tab creates a voltage signal but not much current. The LED needs a certain amount of current and voltage to light up, and your voltage clamping diode might be dumping current, too. The inputs to the Propeller don't need much current to read a voltage, but you should limit the voltage to 3.3 volts by using a diode and make sure your software is set up so you can deal with the fast signals - for example have your software count Tab pulses on a pin and then perform functions based on the number of pulses you count in a given amount of time: see the information about the Propeller counter modules, for example.
hope that helps,
In your software, the state of the vibrasensor pin must be high at the exact moment the software happens to look at the vibrasensor pin. Because the voltage signal from the Tab changes so rapidly, the chances of the software seeing that pin in the high state is not 100 percent.
If you read how the Propeller counter modules work, you will see that they can be configured to "look" for pulses all the time and then you can occasionally check the counter registers to see if any pulses have been counted, then act on that information . And there are other ways, such as what kwinn suggested, for getting the Propeller to respond to transient signals.
I wonder if the sensor is defective.
If you used Pin 0 without a diode protecting it from voltage spikes coming from the Tab, perhaps those spikes might have zaped that pin???
The sensor is not as sensitive as I had hoped. I wanted to use it as part of an alarm system for my motion sensor/camera project, so that nobody walked off with my camera.
As the video shows, I can only seem to set it off by flicking it.
http://www.ragtopvideo.com/me/vibrasensor.wmv
BTW, switched it to turning the led off when sensor pin goes high.
See if the Tab can wiggle around by its pins (without the tab itself actually bending) while plugged into your breadboard. If the Tab body can wiggle around without actually bending, then that wiggle is effectively isolating the body of the Tab from some of the vibration around it. If that's the case, then the Tab might give a much better signal if its pins are soldered to a PCB or plugged into something that won't allow the pins to "pivot" or wiggle within their sockets.
Also, is the alarm sensor going to be somehow attached to the camera? If so, have you considered using an accelerometer?
could even sense the vibration of someone unscrewing the screws on the box.
Have you considered making a simple pendulum-type device that would close a contact if somebody were to pick up the unit? It's hard to imagine somebody could lift your unit and walk away without tripping a pendulum switch. Of course, you would have to be careful that floor vibrations can't set it off, too.
As for detecting the Dr. Evil Unscrewer attacking your device.... perhaps you could place some contact switches that can detect when the main panels have been opened. Inside, you could place a disarming switch or two that allows you to turn off the alarm when you need to access the device yourself, or for example use a reed switch or something to allow you to disarm the system even before opening it up.
Contact switches could be wired in series so that configuration would use up only one Propeller Pin.
In another direction, I've wondered out loud a couple of times why not use the PVDF piezo tab as a capacitor in a Prop sigma delta converter.
The PVDF tab generates charge, and the Sigma Delta acts to counter-balance in real time to hold the voltage across the tab constant.
The attached program is based on the above circuit, and it displays an ascii graph of response against time on the Parallax serial terminal. The response is dynamically offset against a low-pass average.
Remember that the tabs are also pyroelectric: they respond to heat unbalance as well as to flexing.
It is a rather large "game cam" for catching photos of bears that have been spotted roaming the neighborhood at night.
It is made from re-purposed parts from my Halloween project. A car alarm and offroad lights that run off a 12v battery and my digital Canon. The motion sensor turns on the spots and takes a series of photos.
So far no bear, but without the alarm system I haven't felt confident leaving it out all night.
Are you sure the zener diode is installed the right way? In my opinion, the zener is not necessary. These sensors are not capable of producing much current, and the protection diodes in the Prop are capable of absorbing all of the energy. To be sure, increase the resistor from 220Ω up to 1kΩ or 10kΩ.
Another thing to try would be a 10MΩ resistor in parallel with the sensor. That allows charge to leak off. The diodes can rectify the charge and leave the sensor with a net negative bias. I'm suspicious that something like that is going on.
Another suggestion, tie the 2nd side of the sensor to a the wiper of a potentiometer instead of to ground. Adjust the potentiometer wiper close to Vdd/2, near the Prop threshold. Put a 10MΩ in parallel with the sensor, too, over to the input pin. That should really push up the sensitivity, adjustable.
I tried the circuit with tab, resistor, zener, and LED as you have it hooked up and did not have any trouble making the LED light up. (I used a high intensity LED). Is your LED okay? To check the piezontab, just hook it alone across a voltmeter and see if there is a reading when it is flexed. I was using the following program snippet to both light the LED on p4 and to read the tab on p1. The LED was bright even without the pulse extender.
Tracy,
if he's got a slow voltmeter, is there some chance it won't see the transient signals from the Tab?
That's interesting. I didn't know it could do that.
thanks for the info!
with this demo Prop code that lights an LED on p4 and throws out 0's and 1's on the debug screen: Or Stamp