# DIY piezo switch



## DIWdiver (Oct 12, 2010)

Inspired by another thread, I decided to see if I could make a DIY piezo switch. It proved to be remarkably simple. I haven't yet built the latching portion of the switch, but some applications will not need it. The TaskLED drivers which require short and long contacts, for example, could be driven with just the piezo and '555. This is something that cannot be done with most commercial piezo switches.

I took a piezo sounder from Radio Shack (part number 273-0073) and removed the plastic housing. Just applying a little finger pressure to the element, you can get quite a few volts from it!

Thinking that its 26mm diameter might fit well in the tailcap of a d-cell light, but not having one handy to hack, I made a small mock-up and mounted the piezo in it with hot-melt glue. Testing on the oscilloscope shows I can still get a couple of volts with light to moderate finger pressure. After seeing it quite a few times, it still amazes me that the tiny amount of deflection of the metal cap can cause that output. By the way, the cap is 0.060" thick 6061-T6 aluminum. I wish I had left the cap 0.100" thick, because I think the sensitivity is a little too high, and it would be more impressive at 0.100"!





After hooking up the ICM7555 timer chip to it as shown in figure 1, I found the LED would light for as long as I cared to hold finger pressure on the cap. I tried as long as 60 seconds. It's not hard to create pulses from 20 mS to 60 S or more. 









It works from 2V to 15V (my supply doesn't go above 15.45V). It's a little more sensitive at lower voltages, and at less than 6V it's kind of tricky to keep long pulses going. The trick seems to be using light, steady pressure.

With the circuit of figure 2 and a little finger training, I could get the circuit to latch on. You have to apply pressure, then gradually release. I found that rolling my finger to the side of the cap works best. To turn it off you just press and release normally. This is easier at higher voltages where the sensitivity is less. 

The values of R1 and R2 don't really matter much, but they should be the same and not draw too much power from the supply. That gives you quite a bit of range. The value of R3 should be 1M or higher. At 1M it reduces the sensitivity quite a bit and makes it easier to get the circuit to latch on.

***WARNING: TECHNICAL CONTENT***
The ICL7555 is a low-power CMOS version of the venerable NE555. Mine draws 50-80 uA at supply voltages from 3 to 15V, which agrees with the typical specs.

Set up this way, the '555 is a schmitt trigger. The output turns on when the input voltage exceeds 2/3 of the supply voltage, and turns off when the input falls below 1/3. The input voltage is applied at the Trigger and Threshold pins, which are tied together.

The piezo acts like a capacitor. Bending one direction adds positive charge to the capacitor, bending the other way adds negative charge. So theoretically, if you have no load on the piezo, the output voltage should remain as long as you hold the pressure. In practice, this seems to hold true. The input current of the ICL7555 is so low that it does not bleed off the charge fast enough to matter. 

The one thing I can't quite explain is that when you press and release the piezo, you get first a positive pulse, then a negative pulse roughly equal in size to the positive one. This is not what I expected since the piezo is being stressed one direction then returned to neutral. But it is very fortunate, because the positive pulse turns the '555 on, and the negative one turns it off. I don't think the negative pulse is caused by the cap springing back past neutral when released. The dynamics just aren't right for this to be the explaination.

***END TECHNICAL CONTENT***

I tried a much smaller element, with much less success. Starting from a Radio Shack 273-074 beeper, I opened it up and modified it to give me a direct connect to the piezo element. This was a little tricky due to the really really fine wires between the element and the controller board. This element is less tha 1/2" (12.5mm) in diameter. It was mounted in a brass mockup, but even with the cap thinned out to 0.015" (0.4mm) it takes much more force than the larger element, and I cannot get more than about a 1 second pulse out of the '555.

I only wish I could take credit for more than about 5% of this idea. In fact it was inspired by the work of others, and I've only added the finishing touch.

I think the next step is to get piezo elements of several different sizes and see how well each works. I'm thinking of building a controller board to take advantage of this remarkable discovery. I'll post that in another thread. 

D


----------



## b-bassett (Oct 14, 2010)

excellent work!
I'm glad this idea has worked out so successfully, it should allow us to create fully waterproof switches without the need for additional latching circuits.

i was looking down the route of building and programming my own drivers for use with a comercial piezo switch, but coupling this idea with a ready made driver seems much simpler and space efficient.

thanks for trying this out

and thanks to everyone else who inspired this.

jon


----------



## b-bassett (Jan 4, 2012)

sorry to dig up an old thead

iv been playing with this circuit a bit using the housing and piezo element from an old Apem piezo. ( burnt out the switching so cut it up to look inside) 
so far iv only tried circuit 1 which works very well, however im wondering whether water pressure will activate the switch?

being as sensitive as this is im a bit concernd that after a certain depth, the water presure wil deflect the pad enough to activate the circuit. 
i know the water pressure would be evenly distibuted but iv got a nagging doubt that this may not work.

anyone tried this circuit in water? my pressure pot dosnt have a window, so i cant knock up a test rig


----------



## HaloclineDiving (Jan 10, 2012)

I know this is now very old but if there has been progress I'd be very interested as I'm building 2 high powered underwater lights an piezzo switches were my first choice given that it's one less hole to drill in the housing!
There are some dive computers out now that have this "TAP" technology built in to them. It's made by a company called Liquivision. This is not a sales pitch at all - but their site explains how he switch works which might be of interest. Just google their name and X1 which is their flagship computer
Computer or light - they're all objects inside housings..
Very cool kit - just $$$$$


----------



## b-bassett (Jan 10, 2012)

from the testing iv done, i think a micro controller is required to differentiate between a voltage spike (a tap) or a gradual increase in output voltage ( increasing water pressure)
although it is possible to make the above cicuits less sensitive, i still found they would switch if pressed against a flat surface. this make me believe that water pressure would be enough to activate the circuit. but i havent got any practical way of testing this at the moment.

a standard piezo switch bought from a shop can be used with the addition of a latching circuit, though it requires a hole to be drilled, (perhaps not it it was mounted inside the housing with a very thin wall??)

for a programmer, i dont think using a micro in conjunction with a piezo element is too tricky, however it is far beyond me ( i cant even get a led to light using a PIC lol)

iv seen and used the liquivision units and they are indeed a clever box of tricks, hopefully theve got all the system bugs worked out now.


----------



## HaloclineDiving (Jan 12, 2012)

I'll do some digging on RS when I have my current project worked out. That's using IP68 latching switches which have a hole drilled in to the housing but are VERY good quality. Should be for that price!
They're on > off > on switches - I think normally used for forward > stop > reverse from looking at their design. Definitely not home electronics. 
If anyone's interested let me know as I couldn't find anything that was IP68 and looked good. The long toggle switches aren't suitable for what I'm building as they'd get caught on things..

There's a co. out there who make lights using what I think is a magnet driven piezzo switch. It has a magnet on a round disc mounted on the putside which triggers the switch through the aluminium housing. Very smart! 

I'm still hoping for a commercially available unit to become available - cause I've still got so many things to work out!


----------



## josb (Jan 12, 2012)

b-bassett said:


> sorry to dig up an old thead
> 
> iv been playing with this circuit a bit using the housing and piezo element from an old Apem piezo. ( burnt out the switching so cut it up to look inside)
> so far iv only tried circuit 1 which works very well, however im wondering whether water pressure will activate the switch?
> ...



I have been playing with one of my diving lights in my pressure pot, I can go down to ± 90 meters (9 bar)and I have a big Polycarbonate lid on top so I can look inside.

I have not tried to make my own piezo switch but I’m very interested in this project and it would be very nice if it works, it could be a super replacement for the very expensive prolongated piezo switch.
I can only give you my experience with piezo switches in a pressure pot.

I’m using a APEM prolongated piezo and one of the Taskled drivers on my diving light.
The function of the switch is OK down to that depth, going down on a normal decent rate the switch will not react on the increase of the water pressure. Going down very rapid (much faster as men can go down) the switch is activated, stopping and holding the depth the switch goes back off.
Being at depth and increasing the pressure very rapid for a couple of bars the switch reacts again which will mean that the piezo is also usable at higher depths e.g. it still reacts on the extra pressure difference like a finger pressure.




HaloclineDiving said:


> .......There's a co. out there who make lights using what I think is a magnet driven piezzo switch. It has a magnet on a round disc mounted on the putside which triggers the switch through the aluminium housing. Very smart!.....



For HaloclineDiving:
A switch using a magnet on the outside is not a piezo but a reed switch whereby the reed contact is on the inside of the housing.
The biggest advantage of this kind of switches is no trough hole at all in your design and this kind of switches can also be used with the Taskled drivers although it’s a little bit tricky to use with the short and long pulses.


----------



## b-bassett (Jan 12, 2012)

josb said:


> I’m using a APEM prolongated piezo and one of the Taskled drivers on my diving light.
> The function of the switch is OK down to that depth, going down on a normal decent rate the switch will not react on the increase of the water pressure. Going down very rapid (much faster as men can go down) the switch is activated, stopping and holding the depth the switch goes back off.
> Being at depth and increasing the pressure very rapid for a couple of bars the switch reacts again which will mean that the piezo is also usable at higher depths e.g. it still reacts on the extra pressure difference like a finger pressure.



im sure there is a micro or some other circuitry in the commercial units that makes them only react to a sudden pressure change. these 555 based circuits however dont really differentiate between a slow pressure change or a fast change. perhaps biasing or sumthing could be used so that the circuit dosn activate at normal diving pressures, but will react to a harder tap?

best thing to do is for someone to build a test circuit and put it in a pot to see what actually happens, unfortunalty my pot dosn't have a window, but im thinking of maby biuilding sumthing with a buzzer in it?


----------



## CKOD (Jan 12, 2012)

While I'm not sure what commercial piezo switches would have, I do have a bit of experience with piezo based gauges. Any piezoelectric device has a "charge" output. I.E. with a given deflection, its output isnt a current or a voltage, but a predictable number of electrons (measured in coulombs). 

http://www.ti.com/lit/an/sloa033a/sloa033a.pdf
on section 3.2 page 4, shows a basic charge amplifier schematic with parasitics shown. The formula for voltage out is given on the right (qp being the pizeo charge [q] in coulombs) 

Do you need all of that for the switch? probably not, but it is only one high impedance FET input amp + passives. If you put a capacitor in parallel with your piezo element, it will lower the voltage output for a given deflection, the bigger the cap, the less the voltage. If you have a resistor across the cap, that will let the voltage bleed back down to 0, and you can make a hi-pass filter to keep pressure changes from activating the light. But this would also limit how long you can hold down the button and recognize it as a button press. 

However with the circuit in the 2nd schematic which is almost spot on for what you'd want imo, you could filter at a higher frequency, and look for a positive going pulse when you push the button, and a negative going pulse when you release it. But a high-pass filter will just help ensure better behavior. 

cliff notes: DIW diver was barking up the right tree, and was very close with circuit 2, but a cap in parallel with the piezo too may make it more predictable, dampen unwanted sensitivity. (I.e. cap sized determines how hard you have to press, and resistor size would determine how "fast" you have to press)


----------

