# Handling piezo sensor

Status
Not open for further replies.

#### this

##### Member level 2
Hello everyone.
I've got this piezo sensor
From the website and this pdf we can read that it will generate up to 70V.
I've set up simple circuit("Quick Start Circuit" from the pdf - sensor with 5.1V zener acros) and connect it to multimeter, I start tapping, bending and applying all kinds of stress on this little device, but max voltage it created was 0.6V.
What am I missing here?
TIA

The reverse-biased zener limits the voltage to 5.1 so the piezo can be used as an input to a microcontroller. The 70V rating would be for the piezo alone going into a high impedance instrument such as an oscilloscope.

#### X04

##### Newbie level 2
Piezoelectric sensors transform pressure to electrical current, is a pressure dependable generator, most of the time they just generate voltages in the range of millivolts, but since your device says it can produce voltage of about 70, this means it can, doesn't mean it will.

Piezo's have a rating of producing volt that is measured by V/force to be simple.

If you want to generate 70 volt, you have to generate a LOT of force.

#### this

##### Member level 2
I was actually trying to read it with the uC in the first place. But as it didn' work I measured it with multimeter, and it was only up to 0.6V, this is not enough to set hight state on my PIC.
From the attached pdf:
You can test for
functionality by checking the pin for a HIGH signal on the connected I/O pin when the sensor is tapped, flicked or snapped.
.

So what else i need to do, to use it as a switch?
I'm using PIC12F509, with led on GP1 and sensor on GP3.
All that program does is(pseudocode):
for ever{
if GP3 is high{
GP1 = high;
Wait(1s);
GP1 = low;
}
}

TIA

#### keith1200rs

##### Super Moderator
Staff member
A multimeter will be far too slow to measure the short pulse.

Keith.

#### jpanhalt

@this

The 12F5xx probably can be made to work; however, since you will be looking for a very short transient change at a pin, the 12F6xx, which allows interrupts, would probably be easier to implement.

Is this part of your door knock detector?

John

#### X04

##### Newbie level 2
I was actually trying to read it with the uC in the first place. But as it didn' work I measured it with multimeter, and it was only up to 0.6V, this is not enough to set hight state on my PIC.
From the attached pdf:
.

So what else i need to do, to use it as a switch?
I'm using PIC12F509, with led on GP1 and sensor on GP3.
All that program does is(pseudocode):
for ever{
if GP3 is high{
GP1 = high;
Wait(1s);
GP1 = low;
}
}

TIA

If your microControler has ADC inputs, you should stimulate the sensor, and check the reading with the debugger of your microControler and see how it reads the signal, then you just set a threshold depending on the readings...

ie:

" Analog Read of Sensor --> Signals read 20 of (1024) --> if ( signal > 20 ) switch == HIGH ; else { switch == OFF };

By adjusting this you don't have to generate 5 volts, it can be just millivolts.

#### this

##### Member level 2
@jpanhalt: I don't have any of the 12F6x but I got some 16F677 so I'll try to use it, I havn't deal with interrupts yet, so this looks like a good opportunity to start
And question about knock detector: yes I just decided to change it from comparator to uC. I just started with electronics few weeks ago and I'm still like a child left in toys'r'us for night just running around from one component to another and having fun

@X04: 12F509 doesn't have ADC, but 16F677 does, as I didn't use ADC and debugger yet, this sounds like a good opportunity to start.

I'm planning to use this sensor to detect intensity of the vibration, so I guess I will have to use ADC anyway.

Thanks guys.

#### jpanhalt

Be sure to use a voltage limiting circuit on your input, as shown in your first post. A 2mm deflection gives 7 V, so it is quite possible to exceed the input rating for most microprocessors. You may also want some sort of input buffer (e.g, see the knock detector) to capture what might be a very short pulse.

Based on your comment about just starting out, I suggest getting the knock detector to work before trying to incorporate an intensity measurement into it.

John

#### this

##### Member level 2
Yeap, thats definitely what I'm gonna do, first make it work as a switch, then I'll try with intensity.
Thnx.

#### this

##### Member level 2
It's been a logn time, I almost forgot about my piezo sensor

So now I want to connect it to ADC to read intensity of vibration. What should be the circuit for it?
I guess there has to be some voltage divider to convert 70V->5V, but what else do I need?
Is it enough to just ground one pin, and connect second through voltage divider to ADC input?

#### ark5230

Before any thing else, would it make sense to estimate the voltage developed using something like an oscilloscope?

Status
Not open for further replies.

Replies
10
Views
1K
Replies
2
Views
2K
Replies
10
Views
3K
Replies
7
Views
2K
Replies
1
Views
1K