Smartifying a dumb vibrator

If a device doesn't meet your needs improve it!

Once again spending time in the bottomless pit that is the internet I found this great article from scanlime: Hacking my vagina. She explains from a very technical point of view how she reversed engineered and reimplemented a Lelo sensemotion remote to make it work her way.

I wanted to get my feet wet with a similar project, but instead of improving on an already connected vibrator I asked myself if I could transform a dumb vibrator to make it interactive and more versatile. There is no shortage of cheap devices on the market which one can only turn on or off. Could they also be improved?

Establishing a control interface

The vibrator I had lying around at home was a cheap, dumb on/off bullet vibrator. You'll probably find those in any basic sex toy, and are also sold on their own. Some of the higher end devices offer wider control options, like different vibration intensities or patterns.

As with many of my hacking projects I wanted to alter the device physically as less as possible. Given this condition, the obvious way to start with such a device would be to be able to control the power delivery. The chosen vibrator works with a AAA 1,5V battery which is stored inside it. The lid or cover which secures the battery has an embedded on/off switch.

The positive terminal can be found deep inside the device and the negative one is a piece of metal that runs up to the exit through a metal contact. Reaching the positive one seemed like quite of a challenge, but a 5,25 audio jack fit perfectly and made contact with its tip. The jack I found at home was an adapter, so I connected and old earbuds cable, peeled of the plastic and attached a dupont connector to it. The negative contact was easier to access, I simply lodged a cable between the audio adapter and the existing metal contact.

This way I achieved power delivery control. Form here on I connected the vibrator to an Arduino UNO through a MOSFET. The vibrator consumes a higher amperage than the Arduino is capable of delivering, therefore this transistor is needed. A relay could also be used, but would be pretty cumbersome to have, regarding the future minification of the control system.

Ways to control the vib

Having established a way to control the vibrator, even with some leeway to set the intensity I thought out different ways to adjust its power.

Distance through ultrasound

The first one was using an ultrasound sensor to measure distance, for example from a hand to the device, like scanlime wrote in her blogpost. This way the vibrator could be used like a theremin!

The experiment went quite well, but regarding a more realistic implementation, the sensor would need to be calibrated to detect movements in a smaller range near the sensor. It wouldn't be very practical to stretch your arm (or leg?) a meter into the air to make the device go faster. A non-linear mapping between distance and power would also be advisable.

Temperature

A vibrator belongs in a hot setting, does it not? Why not try to control its buzzing through temperature? I reckon that for this to work in a final product the thermometer would need to be somehow embedded in the vibrator and be able to quickly read temperatures in the range corresponding to the human skin.

Sadly, I didn't have such a thermometer. The only sensor available in my drawers was made to measure temperatures in the range from 0 to 400ºC (it was a 3D printer extruder thermistor). But it would suffice to set up a demo. The main obstacle I faced with this sensor was correctly mapping the temperature values to sensible power levels.

In the following video you can see the thermistor being drawn near a soldering iron at 300ºC and some ice.

Inclination

Going the Lelo sensemotion way, using inclination to set the vibration power would also be easily implemented. Using a GY-521 or MPU6050 accelerometer/gyroscope one could measure the angle of the vibrator and make it buzz accordingly.

Although this doesn't sound like a very practical way to control it if the sensor is embedded in the device. Having the accelerometer in a separated in its own device making it work as a remote control, would be more useful.

One could also detect sudden or heavy movements with such sensor. Or maybe even detect a movement pattern with some clever post-processing on the raw data. This could be applied to gamify the vibrator use and reward the user when achieving a series of movements shown in an app, for example.

Music

Last but not least, I wanted to achieve buzzing control through music, but it ended up being more difficult than I anticipated.

I tried to reuse the ultrasound sensor for this use case, but as expected, it didn't really pick up the frequencies used by music. I then got a KY-038 sound detection sensor, but it also didn't work for music. Even though it could see it faintly detected the sound of music, it couldn't really be separated from the background noise baseline.

Music cannot be clearly told apart from background noise

In the previous image I plotted the raw values the KY-038 sensor picked up during a few seconds. In the middle portion of the graphic you can see some seconds in which I played some music. In the image it may be pretty clear when it happened, but the differential between the values is too small to build a system that detects music reliably. And it even isn't able to pick up the music's rhythm.

After a bit of research I saw some people connected an audio jack directly to the microcontrollers analog input, which seemed like a pretty good idea, but I imagine that having cables around when using a vibrator isn't exactly exciting or practical. On top of that, modern smartphones are abandoning the headphone jack...

App control

I want to devote a whole section to the final way of controlling the vibrator. Nowadays smartphones are ubiquitous and most of the sex toy companies have jumped into the app bandwagon. Almost all of them have at least one smart or interactive device which can be used with a smartphone app.

Such an app could be used to enjoy solo play (for example synchronizing the device to music, like in the previous section), to maintain intimate contact in long distance relationships or enable discreet public play.

In some of the previous cases, internet connection is a must, in others not really, but the manufacturers force it onto their consumers. I'm personally very privy to personal data and hate sharing any info which is not necessary. I therefore think that projects like Buttplug.io are great initiatives to take control back and create our own experiencies in the field of sex toys.

But, coming back to the smartifying a dumb vibrator project, integrating my device with buttplug.io and building a client based on that library would be too much work.

Therefore I decided to build a webapp which would be hosted in the microcontroller which controlled the vibrator directly. I switched the Arduino UNO for a Wemos Mini D1 based on the ESP8266 and started writing some code based on my previous Cyberspikes project which used a similar control interface.

I designed four vibration patterns, rising intensity, sinking, sinusoidal wave and a random surprise pattern. I also added a way to control the maximum vibration power in order to avoid an uncomfortable situation.

I wanted to represent all of these patterns using mathematical functions instead of lookup tables, in the first place to avoid using more memory than needed (pretty constrained in a microcontroller) and to be able to generate a wave with the highest resolution possible.

One programmed, I tested the app by plotting the output voltage values, instead of connecting it to the vibrator directly. In the following video you may see the test:

After ironing out a few bugs and seeing everything was in order I assembled the prototype and tried it out with a spoon and come sugar. I really didn't know how to convey the vibrations in a safe for work video without relying entirely on sound:

Future work

It's clear from the previous video that the vibrator cannot really be used with a few cables and a protoboard hanging around. Having finalized the software part the next one would be minification of the system.

The cool thing to do would be to design my own PCB board and create a self-contained small device, but I'm not knowledgeable in that field yet. Therefore I would chose a smaller ESP8266 development board, squeeze all the electronics together and design a case I would later on 3D print.

Exploring the control ways I didn't get working would also be a nice way to improve this device. I'm still interested about controlling the device with a thermometer, I haven't seen yet a sex toy using temperature this way.

Finally I still have to test what would happen if I exceed the 1,5 volts my vibrator is designed for, I think it could easily take at least 3V. It's just a DC motor and the vibrations could be much more powerful (= more fun?). But on the other side I still want to respect the device's limits, I wouldn't like to use an unsafe device.