Penile Plethysmograph

This is the place for all suggestions, releases and feedback regarding Milovana Hardware efforts.
Post Reply
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Penile Plethysmograph

Post by Jabber »

An interesting input device could be a penile plethysmograph. This is a sensor that measures blood flow to the penis.

A common type is the Indium Gallium Gauge (sold here: http://www.btimonarch.com/catalog/indium-gallium.php), which is basically a kind of rubber band around the penis acting as a resistor that varies with the circumference of the penis. I do not know the configuration of the sensor I linked to, but I would guess it is a whetstone bridge with a shielded cable. In that case an instrumentation amplifier is needed before the signal can enter an ADC.

If this sensor is sensitive enough, it may also be possible to use it as a stroke counter by postprocessing samples from the sensor in software. Basically very low frequencies (for example under 0.5 Hz) have to be filtered out, as they are due to real penile blood pressure, and the resulting waveform comes from the stroking, with the same phase and frequency.
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Hardware Goals

Post by seraph0x »

Jabber wrote:An interesting input device could be a penile plethysmograph. This is a sensor that measures blood flow to the penis.

A common type is the Indium Gallium Gauge (sold here: http://www.btimonarch.com/catalog/indium-gallium.php), which is basically a kind of rubber band around the penis acting as a resistor that varies with the circumference of the penis. I do not know the configuration of the sensor I linked to, but I would guess it is a whetstone bridge with a shielded cable. In that case an instrumentation amplifier is needed before the signal can enter an ADC.

If this sensor is sensitive enough, it may also be possible to use it as a stroke counter by postprocessing samples from the sensor in software. Basically very low frequencies (for example under 0.5 Hz) have to be filtered out, as they are due to real penile blood pressure, and the resulting waveform comes from the stroking, with the same phase and frequency.
Can't believe I didn't come across this before. Definitely worth exploring - and the pricetag looks great assuming we can find a cheap way to do the signal processing.


Update: Ordered one to play around with. Probably the weirdest thing I've ordered in a while. Also found an interesting setup that might be quite close to what we'd need.
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Hardware Goals

Post by seraph0x »

Package arrived this morning. :-P

I tested it right away with my trusty multimeter and stretched it carefully using a pen:

http://www.youtube.com/watch?v=6rcjvFNibJ8

It turns out that I was able to measure the change in resistance as I stretched the plethysmograph. The range went from 1.1 Ω to 1.3 Ω. So to turn this into a device that is useful for our purposes, we simply need to create something that can measure resistance fairly accurately within that range and that can be hooked up to a computer. Can't be too difficult, can it?

I've also become the first person to post a video about a penile plethysmograph on YouTube. Woo, never been done before. :lol:
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Re: Hardware Goals

Post by Jabber »

seraph0x wrote:The range went from 1.1 Ω to 1.3 Ω. So to turn this into a device that is useful for our purposes, we simply need to create something that can measure resistance fairly accurately within that range and that can be hooked up to a computer. Can't be too difficult, can it?
Problem is that the resistance is so low. So we have to trade-off between picking up a lot of AC mains noise, or use a lot of power (but not so much power that the plethysmograph runs too hot).

There is a circuit here: http://bayimg.com/image/kaonhaabf.jpg

Please note that I am not an electrical engineer, and I have not tried building it. It uses about 50 milliamperes, and less than 1 milliwatt in the plethysmograph. It should be possible to use another instrumentation amplifier than the INA122, but the gain should be about 1000 with this input bridge.
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Hardware Goals

Post by seraph0x »

Alright, fuck it. I'll build this thing. Worst case is I get a great new story to tell about how I fried my Indium-Gallium penile plethysmograph. (Best sex toy name ever.) :-D

So I ordered the following parts:

- Arduino Duemilovana, ... uh I mean Duemilanove of course
- Starter kit with breadboard, tons of jumper wires, you know, the usual

One of the power pins on the Arduino is labeled like so:
5V. The regulated power supply used to power the microcontroller and other components on the board. This can come either from VIN via an on-board regulator, or be supplied by USB or another regulated 5V supply.
I could use this line to power your circuit, right? Also: The analog inputs on the Arduino have a 0-5V range. Seems like a perfect match!

I found the INA122, but right now I'm struggling to figure out what type of resistors I need. They just bombard you with all kinds of terms. I found this datasheet, but I don't know what wattage rating I need.

Thanks for the help - if we get to the point where the hardware is hooked up and it starts being about software - I'll feel a lot more at home. ;-)
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Re: Hardware Goals

Post by Jabber »

seraph0x wrote:So I ordered the following parts:

- Arduino Duemilovana, ... uh I mean Duemilanove of course
- Starter kit with breadboard, tons of jumper wires, you know, the usual

One of the power pins on the Arduino is labeled like so:
5V. The regulated power supply used to power the microcontroller and other components on the board. This can come either from VIN via an on-board regulator, or be supplied by USB or another regulated 5V supply.
I could use this line to power your circuit, right? Also: The analog inputs on the Arduino have a 0-5V range. Seems like a perfect match!
The Arduino was exactly what I was thinking about for the ADC and computer interface. (I wish I had the $$$ to buy the parts needed today, but unfortunately I don't.) Using the same power supply for the Arduino and my circuit should be no problem. You need your power supply to deliver at least 50 mA more than you need for the Arduino.
seraph0x wrote:I found the INA122, but right now I'm struggling to figure out what type of resistors I need. They just bombard you with all kinds of terms. I found this datasheet, but I don't know what wattage rating I need.
The resistor using the most power is R4, which is using slightly less than 0.25 watts.
seraph0x wrote:Thanks for the help - if we get to the point where the hardware is hooked up and it starts being about software - I'll feel a lot more at home. ;-)
Hehe, me too. My education is in software, and I never had any education in electronics design though I played a bit with it as a hobby many years ago.

If you build this circuit and want to be able to tune it more precisely to be able to measure the exact range of resistance of the plethysmograph (it may be a smaller range than the Youtube video shows), you can modify the circuit like this:

- Instead of 1.3 ohm for R1, R2 and R3 you use 1.2 ohm, and instead of connecting R2 and R3 directly you use a 0.2 ohm linear potentiometer between R2 and R3, and connect V-IN on the IC to the slider on the potentiometer. This makes it possible for you to offset the voltage measured at the IC, and thus the measured resistance of the plethysmograph.

- Instead of R5 you use a slightly smaller resistor (like 180 ohm) in series with a potentiometer (like 40 ohm linear). This makes it possible to change the gain of the amplifier for the best possible measurement in the range you need to measure.

Please let me know if you are in doubt about the description of the change of the circuit I made here, and I will try to make a new circuit diagram. But if you are ordering electronics anyway, you may want to order these relatively inexpensive components too, so you can adjust your circuit for the best possible measurement.
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Hardware Goals

Post by seraph0x »

Jabber wrote:Please let me know if you are in doubt about the description of the change of the circuit I made here, and I will try to make a new circuit diagram. But if you are ordering electronics anyway, you may want to order these relatively inexpensive components too, so you can adjust your circuit for the best possible measurement.
Ok, I think I understood all the proposed changes and I'm ordering the components now! :)
User avatar
Evals
Explorer At Heart
Explorer At Heart
Posts: 424
Joined: Mon May 07, 2007 2:42 am
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: Hardware Goals

Post by Evals »

It's something that has crossed my mind too, which I first saw on this video a long time ago here. The video talked about a "study" used a similar device to measure homophobic men's sexual arousal when viewing homoerotic images. There are some teases based on the idea of a device like that such as the one Piper tease too. I've always imagined it had something to do with variable resistance, with that video I just mentioned in my mind.

Anyways, here's some patents that might be of some help, the first one being most similar to what you guys are looking to do.
  • US Patent #6162188 Measures changes of resistance in two elastic bands, once placed on the shaft and one right under the head
  • US Patent #4747415 Measures changes in pressure of liquid filled in an expandable compartment on an elastic band
  • US Patent #6050959 Measures electromagnetic changes between the spacing of two magnets placed on either side of the shaft
Study mentioned can be found here and the corresponding paper (pdf) here.
Evals
Image
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Hardware Goals

Post by seraph0x »

The Arduino is here and boy, that thing is a ton of fun to play with. It was total Plug'n'Play - I'm on Ubuntu Linux, but I suspect other platforms to be just as easy. And I've been making LEDs blink in all kinds of shapes and patterns all day yesterday. :lol:

Now, back to business. The INA122 is still on it's way, but in the meantime I've grabbed a copy of TI's TINA software, which is a free tool that allows you to build and simulate circuits with TI components. So first I built Jabber's original design and his modified design. The former giving me a range of about 0.4V...2.4V. Unfortunately I wasn't able to find a 0.2 ohm potentiometer in real life. The lowest I could find was 10 ohm. While playing around I plugged that into the simulator and the 10 ohm actually gave me a pretty good result. See circuit below:

Image

(Note: V1 is a 5V battery. In reality this would be the 5V line from the Arduino.)

I'm not saying this is better than Jabber's design, simply adopted to the components that are available at my supplier. The range I get with P1 set at 50% and P2 set at 40% is about 0.5V...3.1V for the 1.1...1.3ohm range of the PPM.

My main question at this point is - why does this still work, even though P1 is a much larger resistance? And am I missing anything? (Such as 10A flowing somewhere? :lol:)
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Re: Penile Plethysmograph

Post by Jabber »

I was just on the net looking for components, and also found out that pots cannot be found in low values. I couldn't even find 10 ohms pots, so I'll probably order some 100 ohms multiturn trimpots.

Your diagram looks fine to me, and having a larger value for P1 is a good idea as it means that you waste less current. The bridge below R4 is simply two voltage dividers, and the amplifier is measuring the voltage difference between the two inputs.

The only difference is that with your circuit a bit more current flows through the penile plethysmograph. If we ignore the smaller resistors below R4, about 50 mA flows through R4. Because the voltage divider on the plethysmograph side of the bridge has a lower resistance, most of the current runs on this side of the bridge, and thus through the plethysmograph. If we simplify further and say all the 50 mA current flows through the plethysmograph when it is at 1.3 ohms, the effect is 1.3 * 0.05² W, or 3.25 mW. In reality it will be less because of the simplifications.

The good thing about this is that the larger current in the plethysmograph means that the voltage over the plethysmograph varies more when the resistance of it varies, so you should be able to get a more accurate reading with less gain in the amplifier (and thus less mains noise picked up).

If the plethysmograph becomes warm because of the effect, you could reduce the current by increasing R4.

Basically P1 works as a bias adjustment. It should be adjusted so that the amplifier reads zero (or just over zero) when the plethysmograph resistance is at max. resistance. Then the gain can be adjusted with P2 so the amplifier reads +5V when the plethysmograph resistance is at min. resistance.
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Penile Plethysmograph

Post by seraph0x »

Image

Works! You plug it in and numbers start appearing on your screen. 1012,1012,1012... pull on the ppg and the numbers decrease 648,593,389... The calibration works reasonably, although in my quick test yesterday I think the gain was moving both ends of the scale. The noise level seems to be less than one thousandth (±0.005V) and the readout is incredibly precise and sensitive. Put two fingers through the loop and you'll see your heartbeat.

Overall a big success, I'm really busy at the moment but I'll try and get some software written so I can make a little demo video. :-)
Jabber
Explorer
Explorer
Posts: 32
Joined: Fri Jun 20, 2008 9:07 pm

Re: Penile Plethysmograph

Post by Jabber »

That's great to hear. I am quite surprised that there is no AC noise picked up.

I just received an Arduino Duemilanove and some INA122s. Because the Arduino had the 328 chip and I was running the old Ubuntu 7.10 I'm currently upgrading my OS and hope to be on Ubuntu 9.04 with a working Arduino setup tomorrow.

Unfortunately it looks like Behavioral Technology isn't selling the plethysmograph outside the US, so I will not be able to build this nice project as I have found no other place where this is sold.

But I have some ideas for other sensors that could be interesting for us pervs:
- A rectal pressure sensor.
- An ECG, measuring heartbeat - looks like you managed that with the plethysmograph already.
- An EMG, measuring muscle activity. I think this could be used for orgasm detection if placed in the right place.
User avatar
cumhardy
Experimentor
Experimentor
Posts: 1139
Joined: Wed May 28, 2008 10:54 pm
Gender: Male
I am a: None of the above
Location: UK

Re: Penile Plethysmograph

Post by cumhardy »

could you use it to see how full your balls are getting?
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Penile Plethysmograph

Post by seraph0x »

Jabber wrote:- An EMG, measuring muscle activity. I think this could be used for orgasm detection if placed in the right place.
Absolutely, I've been playing with that idea for years. Especially since the PC muscle contracts involuntarily as you approach the point of no return. Can't stop it. So a device that provides stimulation and turns off for say 15 seconds whenever it detects a PC contraction would be one nasty-ass sucker indeed. :-P
cumhardy wrote:could you use it to see how full your balls are getting?
Assuming they actually physically increase their size (which I'm not sure they do)... maybe. But my guess is that it would be such a small change that it would be impractical to measure. Imagine trying to tie a string around your balls. They'd probably slip right out. :-D

The main purpose of this device is certainly to measure arousal. And for that it's surprisingly precise. You'll be able to see changes that you would not have picked up yourself. Very insteresting to experiment with.
Jabber wrote:Unfortunately it looks like Behavioral Technology isn't selling the plethysmograph outside the US, so I will not be able to build this nice project as I have found no other place where this is sold.
I ordered mine through a mail forwarding service called MyUS. It's a lot of paperwork to sign up and they charge monthly, but it happens quite frequently that I need stuff only available through US retailers, so it's been quite useful for this kind of thing. I would only recommend if you need more than 3-4 shipments a year though. One good tip is to tell all your friends that you can order stuff from the US and to tell you if they want anything. If you're particularly thrifty you could even make a profit that way. :-P
seraph0x
Administrator
Administrator
Posts: 2654
Joined: Sun Jul 23, 2006 8:58 am

Re: Penile Plethysmograph

Post by seraph0x »

Jabber wrote:- An EMG, measuring muscle activity. I think this could be used for orgasm detection if placed in the right place.
I feel like sharing some more thoughts on the EMG. Anything where the body is part of the circuit brings with it a whole new range of noise and safety concerns. Noise is especially problematic with surface EMGs (the kind where you don't stick a needle into the muscle which is something we obviously can't do).

For that reason sEMG devices tend to be quite expensive ($100-500), since they have to use very well-shielded high quality components. Also - if you're wearing your synthetic socks and happen to scratch the carpet - your EMG signal is toast.

One extremely cheap and possibly viable alternative may be found in the form of MMG. Some quotes from the Open Prosthetics project:
We have built a very simple data collection system for recording MMG signals (muscle sounds). It consists of a 3.5mm audio plug, a Panasonic microphone cartridge (part number WM-64PNT), some wire, and a laptop. Not including the laptop, the components cost less than $5
The results were much better than we expected, especially after we rolled Jon’s silicone suspension sock over the microphone for isolation, which made the sound much louder. We processed the data to make it more audible by filtering out all frequencies above 40Hz and raising the pitch by two octaves. Here’s an mp3 of the processed sound. In this recording, Jon is making the motions that would have opened and closed his hand. The microphone is over the muscle that opens his hand, so you can hear it loudest, but the muscle contracting on the other side is also audible. You can hear the muscle sounds getting louder over the course of the recording as he grips with progressively more force.
You had me at "less than $5". :-D

Now the above post is quite old, since then a lot of people have been playing around with the technology. An absolute must-see is this super-detailed guide to building an MMG sensor. It's by Jorge Silva who wrote this along with his MSc thesis on the subject.

You can also use one of these to record a person's heartbeat. Note that the CMASP is a combined microphone and accelerometer so perhaps it a bit more precision than we actually need.
Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests