I wanted a release based on dildo riding. The goal would be to define a number of strokes on the dildo to reach and then get released when the number would be achieved.
So I came a very simple yet effective solution : capacitive touch sensor. With a raspberry pi/arduino, a condutive material (aluminium sheet for example) and a resistor, you can detect if the material has been touched or not.
The prototype I build is simple as that : The red wire is connected directly to the aluminium plate with a clamp. I chose an aluminium plate as a material because it is flexible and can easily be wrapped around the dildo.
The setup looks like this : And the dildo setup : I wrapped a piece of aluminium at the base of the dildo in order to be force the user to go deep. Then the aluminium foil is maintained by a condom, witch is secured in place with a plastic cable tie.
With this setup, I can then run a simple script :
Code: Select all
import RPi.GPIO as GPIO, time
import webbrowser
timeout = 10000
total = 0
DEBUG = 1
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
def CapRead(inPin,outPin):
total = 0
# set Send Pin Register low
GPIO.setup(outPin, GPIO.OUT)
GPIO.output(outPin, GPIO.LOW)
# set receivePin Register low to make sure pullups are off
GPIO.setup(inPin, GPIO.OUT)
GPIO.output(inPin, GPIO.LOW)
GPIO.setup(inPin, GPIO.IN)
# set send Pin High
GPIO.output(outPin, GPIO.HIGH)
# while receive pin is LOW AND total is positive value
while( GPIO.input(inPin) == GPIO.LOW and total < timeout ):
total+=1
if ( total > timeout ):
return -2 # total variable over timeout
# set receive pin HIGH briefly to charge up fully - because the while loop above will exit when pin is ~ 2.5V
GPIO.setup( inPin, GPIO.OUT )
GPIO.output( inPin, GPIO.HIGH )
GPIO.setup( inPin, GPIO.IN )
# set send Pin LOW
GPIO.output( outPin, GPIO.LOW )
# while receive pin is HIGH AND total is less than timeout
while (GPIO.input(inPin)==GPIO.HIGH and total < timeout) :
total+=1
if ( total >= timeout ):
return -2
else:
return total
count = 0
maxCount = int(input("Number of strokes for release : "))
image = input("Release file name : ")
while True:
total = 0
check = 0
for j in range(0,10):
total += CapRead(18,17)
while total > 300 :
#print(total)
total = 0
for j in range(0,10):
total += CapRead(18,17)
if (total > 600) and check == 0 :
count += 1
check = 1
print(count)
if count == maxCount :
webbrowser.open(image)
exit()
#print(total)
I took the CapRead(inPin,outPin) function from this project : https://bitbucket.org/boblemarin/raspbe ... ?at=master
Basically, this function returns a value depending on how much we are touching the plate. With the condom on, you have to apply a little bit of pressure in order to be detected.
When my fingers are aroud the plate, the returned value is a little bit above 600 and when nothing touches the plate, the value is aroud 150~200. With this treshhold of 600, I can detect if there is something around the aluminium foil and add 1 to the counter. The counter value cannot be increased until the Cap value goes under 300, so you can't stay in place waiting for the counter to go up.
When the counter reached it's final value, the specified image file shows up on the screen.
I have not tested the system yet, but it works very well when testing with a handjob.
This is just a first prototype and there are a lot of improvements to be made. With this setup, the plate is not really attached to the dildo and I don't think it's durable and it has to be better fixed. Also, you can increase the counter pretty quiqkly by doing very small movement at the limit of the foil. A fix to this would be to install another strip upper on the dildo but it would be tricky to implement.
Another method to achieve the same result (or even a better one) could be to implement infrared sensors at the base of the dildo to check if we are near to its base or not.
That's it for today, I will post again if i'm doing some improvement or if i'm testing it in a real scenario.
Sorry for my poor english, that's not my main langage