need help with piezoelectric circuit

I have ALS and am paralyzed below the neck. I use a very sensitive piezoelectric switch taped above my right eyebrow and an onscreen scanning keyboard program to control my computer. With a very slight twitch of my eyebrow and I can do everything I need to do. The problem is I don’t have a good backup in case my current ten-year-old switch box breaks. I have only found three piezoelectric switches, and only one is sensitive enough and doesn’t eat batteries quickly. Unfortunately, it is very expensive ($450) and I haven’t been able to find any for sale.

Anyway, I think the Arduino would be a great platform to make one of these switches, and very inexpensively (<$50). I have these requirements:

  1. 3.5 mm mini audio jack to connect piezoelectric sensor cable (I already have these)
  2. a knob to adjust sensitivity
  3. an LED and a quiet beep to indicate switch activation
  4. the Arduino should plug into a USB port and emulate a mouse click when the sensor is twitched
  5. the whole thing should be powered from the USB port (no batteries)

Does this seem possible? I think the most difficult part of this would be amplifying the very small voltages and currents generated by the piezoelectric sensor, without introducing much noise. Right?

David

Hey there,

just a question: do you think these cheap piezos for about $1 could do the trick? Or do you have any special needs in terms of size, sensitivity, etc.

I've been playing around with these for a week now. The easy setup (I didn't even thought about amplification) really impressed me: http://arduino.cc/en/Tutorial/Knock

Sammy

Richard: the sensors I use are pretty bare. They must be more sensitive than the ones enclosed in plastic. Here is a picture of the "wire side" of one of my sensors:

I usually have a piece of Velcro stuck to this side and this goes against my skin. I find that this makes it easier to activate the switch. I think it provides more leverage to bend the sensor.

Here is a picture of the other side:

This side is just flat copper and my caregiver puts a piece of paper tape over this side and tight across my skin.

I'm not aware of any volunteer groups doing this type of work, but it would be a good idea. I have had help a few times with electronic projects. Contact your local ALS Association or MDA chapter if you want to help someone out.

I am getting excited about this project and will publish the instructions if it works.

David

Sammy: as you can see, my sensors are pretty big. I have used smaller ones in the past, but these are easier and last longer. I have seen the $1 ones you mentioned, but haven't tried them yet.

I need to find a source for these too, because they charge way too much for replacements ($25 + shipping for two sensor cables).

I'm going to order a Uno and try the example you linked to. I'll report back my results.

Any suggestions for a quiet beeper?

David

p.s. I have experience programming, but very little with electronics.

Hello David,

I do not mean to be rude but does ALS affect the muscle or the nerves? Reason I ask is that I am trying to make an idea I had 20+ years ago actually work. I want to use myoelectric signals, such as those used in prosthesis to generate data rather than to run motors. I am quite a ways away from getting done but tonight I joined a group of people that want to create open source prosthesis and they currently use myoelectric input.

My goal is to have multiple myoelectric inputs to generate a data stream. However, it could also be used as a single input with the system you are currently using. I do not know how expensive the board would be to collect the myoelectric impulse but there would not be any moving parts to replace and electrodes are inexpensive.

Paul H

You may want to use the Teensy (which is Arduino-ish), instead. It's designed to work as a USB device, and has a mouse examply you could hack.

The new Uno is said to have similar capabilities, but I don't know whether there are examples available for it yet.

The piezo you showed us looks pretty generic, except that (nearly??) all the ones I have are made with a hole in the brass disk so that almost all the piezo part is exposed. Probably because they were made for use as speakers. The solid brass disk might be necessary to keep sweat and oils from getting on the piezo disk. Or it may be coincidental. You should find out before buying more.

A team at Penn State developed a electro impulse device that used muscles in the person's temple instead of a switch.

This might be something to consider.

Using two inputs would give an X and Y axis movement for something like BLINK but I am getting off topic here. One input to move X, one to move Y and move both to select.

PaulH

Is this switch a simple on/off, or is some type of signal generated by the piezo element? The small gyroscopic and accelerometer units used in model helicoptors might be of interest for detecting small movements made by an eyebrow.

Paul: unlike with MS which affects muscles, ALS affects the upper and lower motor neurons (sensory nerves are not affected). Upper motor neurons go from the brain to the spinal cord, and lower motor neurons go from there to the muscles.

I don't believe there is any myoelectric activity in the affected areas.

I am very dubious of systems that claim to pick up myoelectric signals. It always seems like they require some muscle movement in order to work. In that case, why not use the much less expensive piezoelectric technology? I would love to be proven wrong on this.

David

Richard: although my mother says I was in training for this eyebrow twitching stuff by watching so much Groucho Marx in my youth, I am unable to move my eyebrows independently. I might be able to find another spot for a sensor, I don't think it would buy me much improvement.

The switch I like the best is the P-Switch from this company:

http://www.prentrom.com/

But, I haven't been able to find it this week. My second choice is this one:

http://www.donjohnston.com/products/access_solutions/hardware/sensor_switch/index.html

The problems with this are it eats a 9 volt battery every 3 days, and adds noise to the signal if the sensitivity is turned up too high. I was able to use a wall wart to power it, but it would go crazy after a couple days and starts activating on its own. It never did this on battery, and I never figured out how to solve the sensitivity issue.

I tried to use the power adapter with the P-Switch and it went crazy immediately, firing randomly on its own. This isn't a problem because this switch lasts 3 months on a 9 volt battery. I tried rechargeable batteries and found they didn't last nearly as long.

I should mention the only reason I tried another switch is that two years ago I bought a new laptop with a dual band Dell 802.11n wireless networking adapter, which caused the P-Switch to go crazy as described above. After a year I happened to swap the Dell adapter with an Intel one (for other reasons), and the interference problem went away.

I use the sensors from the Don Johnston switch box with the PRC switch box because they are more sensitive and last longer.

See my previous post for comments about neurons.

zoomcat: these switches implement a fixed time momentary signal. You can't vary the length of the pulse like you would need for morse code. The accelorameter is a good idea. I'll look into that if I can't get piezoelectric working.

David

Ran: thanks for the Teensy recommendation. That is an awesome little board! Also, I think you are right and I was wrong about the large disk on these sensors. It's brass.

David

Hello David,

I am sorry to hear about your nerves being affected. That will make my approach a poor choice for you.

Paul

Hello David,

an hour ago i've tested my cheap and standard 2.9kHz piezo (which has the same size and looks a lot like yours on the images you posted) with my belt pressing it above my eyebrow. ... kind of Karate Kid ;-)

I used Processing with the sketch from the following tutorial to visualize my eyebrow movement as a first step: http://arduino.cc/en/Tutorial/Graph

The sensitivity was very good! Also slight movements has been triggered.

Hope this helps. Sammy.

sammy: that is great news! I can't wait until my Uno arrives and I can try it. If it works, I plan to order a Teensy, a small enclosure, and a USB A to mini B connector.

What does the 2.9kHz refer to? The cheap piezoelectric sensors usually don't show specs.

David

Paul: as Richard noted, my eyebrow muscle still gets a good signal. If you know of a good, inexpensive myoelectric sensor I can buy or make, I'll try it out. I'm only interested in a binary switch, but if you have other ideas, let me know.

Have you heard of ECoG implants? I think you will find this talk enlightening:

http://www.youtube.com/watch?v=mFWnTONOvVo&feature=youtube_gdata

David

Actually I dont know :-) ... I wrote it only for reference ... so far I've seen piezos comming in two flavors: some with 1.3kHz and others with 2.9 ... but dont ask me :-)

Teensy looks very intresting! Maybe I will use one of them for future projects. Thank you! Thats very good to know!

Sammy

I tried to use the power adapter with the P-Switch and it went crazy immediately, firing randomly on its own.

Was it a regulated adapter? Most 9V ones, especially those made for cheap consumer electronics, are not.

It could also be electrical noise: that long cable coming from the wall wart could be acting as an antenna.

Most "9V" rechargeable batteries are actually only 7.2V or so, because they're 6-cell. So they start off looking "half-dead". There are some 8-cell batteries available, but you have to shop carefully to find them. But they're pretty lame in the mAH department. Consider using an 8-AA holder and attaching a 9V snap (or whatever power connector you need) to it: that will give you several times the battery life.

Paul's approach might be made to work for you by attaching several sensors to your head: it's conceivable that it could be "trained" to recognize several different facial expressions, giving you a lot more "states" to control things with.

If you still have good control over moving your head around, you might be able to get a mouse-like control with a head-mounted accelerometer.

I don't know if the eye-tracking systems I've seen on NOVA-type shows are commercially available or within your budget. If not, and you live near a university, you might be able to get access to one by offering to be a guinea pig for researchers.

Hi all,

The 2,7 kHz reference is the frequency the piezo will oscillate on.
these piezo disks can be sensors but also beepers, and they are made to resonate (and therefore beep very loudly) at a specific frequency.
in this case 2,7 kHz.

I also suspect that any response you get from the disk as a sensor will likely also be a sinus from around 2,7 kHz.
I like to compare them to tuning forks.
it does not matter how/with what/where you strike a tuning fork, it will always reply with the tune it was designed to hum…

the piezo sensor will react to bending (and nothing else) so
the switch is basically reacting to movements/rippling of your skin.
a piezo sensor will not pick up electric signals from muscles or nerves.

It occurs to me that you need to be sure it actually is a piezo. normal
electrical medical probes can look similar, as can capacitive pickups.

for using a piezo with an arduino, maybe this link helps to shape ideas
http://www.dtic.upf.edu/~jlozano/interfaces/blow_sensor.html

I am very excited. I was able to hook up a sensor to my Uno board and ran the Graph sketch that sammy posted a link to. I wasn't able to get the graph working, but i was able to watch the serial monitor and the numbers flying by change from zero to a few hundred and back to zero as i twitched my eyebrow. I think this is going to work!

I have a few questions.

How do i get the graphing function working? I saved the java code to a file, but didn't know what directory to put it in so Processing would find it.

I had to take out the resistor in the Graph and Knock example circuits in order to get my eyebrow twitches to register. Am i in any danger of over loading and frying my Atmel chip without a resistor? The voltage produced by the piezoelectric sensor is high (about 12 volts if you really push on it) but the current is tiny.

Also, can someone explain why a resistor in parallel with the sensor has any affect at all. I would understand if it were in series.

Is there a usb mouse library for the Uno? I bought the Uno because it has a better usb chip, but nobody has written one yet. I should have paid attention to Ran and just gotten a Teensy straight off instead of waiting.

Richard: i don't have any neck strength but eye tracking is an option.

David

Hello Forum!

@David: I've written two simple sketches for arduino and processing that move your mouse pointer and perform mouse clicks with a single piezo unsing multiple thresholds to detect how hard you pushed it and which action to trigger.

This might not be the best interface for you and you would probably have to finetune the thresholds and train yourself a bit in using it. But i think its a good start.

@raalst: Thank you very much for the blow sensor link! This is really cool stuff!

@David: You might also consider using a blow sensor with multiple thresholds. To trigger different actions depending on how strong you blow. This could be easier to control than your eyebrow.

Enno