Arduino Vibrator

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

Clarkey
*
Posts: 6
Joined: 06 Oct 2012, 11:01

Arduino Vibrator

Post by Clarkey »

For those who are interested in or have an Arduino, I've been developing the software for a vibrator that has basically every single mode or setting I think you could want.
The software is in it's final stages, although I am happy to take suggestions from the community, as well as give instructions on how to connect and set the vibrator up.

The source code is available here: http://pastebin.com/qnA5ib1C

The hardware includes an Arduino ( http://www.freetronics.com/products/eleven#.UGm18_lrapM ), an LCD shield ( http://www.freetronics.com/collections/ ... HATfvlrapN ), and a vibrator that you can plug into the Arduino board. (this involves having access to the leads that enter into the vibrator)

It took some ingenuity to put the thing together. Personally I used an xbox controller vibrator, and a film canister for the container; using some super glue to make sure the seals are water tight, and filing down the notches on the cap to make it comfortable to insert. Although you could plug in a store bought vibrator if you'd prefer, I'm just working with what I've got.

I'm approaching the physical limit of features that I can give it (The Arduino is basically full on the software side of things). It has 4 main settings; constant, wave, wave of waves (I'll explain further down), and random (my favourite).

It outputs a voltage (0 to 5v at a maximum of 1.8amps (usb max) ) through one of the pins (digital pin 10) on the board to ground. (I can give further instructions to how this all works and is constructed if anyone would like)

Now for the settings:
-Constant: I believe this is fairly self explanatory. You can select a level from 0 -> 255 (0 being 0volts, 255 being 5volts) and that will continue indefinitely.

-Wave: I spent a long time coming up with different wave settings. There are 4 wave settings; the standard sine wave; triangle wave; square wave; and sawtooth wave. You can also select the minimum and maximum levels, as well as the amount of time it takes the wave to oscillate (this can be from 1 -> 9999 seconds, roughly 3 hours).

-Wave of Waves: Because I'm rather mathematically inclined, I wanted a way to make the waves increase in frequency, and then decrease in frequency, as if it were breathing. (for those who are also mathematically inclined, I used the following function as my basis: y = cos( tan( x ) ), with some modification to make it work for my purpose. (for those who really want to know, you can always look through the source code.)
Again, this setting allows you to chose the minimum and maximum levels, the period between cycles, and a constant term that changes how many waves there are per cycle (if you put a constant before tan(x), you'll understand what I'm talking about http://www.wolframalpha.com/input/?i=y+ ... %28x%29%29 )

-Random: Finally, my favourite setting. This setting will randomly choose what it will do, it will select a random wave setting with random maximum and minimum values as well as a random period with a random amount of time that it will spend on that setting, or it will choose a constant setting for a random amount of time, or turn off for a period of time. The maximum and minimum values that the random program can choose from can be set, as well as the maximum period, and the maximum and minimum amount of time it can spend on a single setting.

In all modes, you can choose to have the vibrator remain off for a period of time before it begins it's cycle. This was added so users could set the vibrator up, tie themselves up and not have the vibrator get themselves off ahead of time, or possibly to frustrate the user. This time can again be up to 3 hours.
Last edited by Clarkey on 06 Oct 2012, 14:39, edited 2 times in total.
cooper1337
**
Posts: 153
Joined: 10 Sep 2011, 00:37
Location: Germany
Contact:

Re: Arduino Vibrator

Post by cooper1337 »

Cool. Thanks for sharing that one.
Clarkey wrote:It outputs a voltage (0 to 5v at a maximum of 1.8amps (usb max) ) through one of the pins (digital pin 10) on the board to ground. (I can give further instructions to how this all works and is constructed if anyone would like)
Just keep in mind that the USB specification does not allow a device to draw more than 100mA without negotiation with the host controller. As far as I know the maximum allowed current is 500mA for one connector, but I could be wrong.
However, I'd recommend to use an external power supply, also because you don't need the USB cable for communication (at least that's what I get by quickly skimming your code) and a small power supply is more portable than a laptop.

The link to the LCD-board is broken (maybe this one?), but from your description I don't see any power stage for the output. ATMEGA-Controllers usually only can deliver 20-50mA per pin.
Clarkey
*
Posts: 6
Joined: 06 Oct 2012, 11:01

Re: Arduino Vibrator

Post by Clarkey »

Yes, you're probably right about the USB amperage. I apologise, I was only running off information that I had briefly read when looking up specs on USB. It's great that there are other people here who have an understanding on this subject.

The Arduino can be run off USB or an external DC power source (there is a mini-USB and DC power jack on the board) anywhere from 7v to 12v, I'm not clear on the amperage though; I'm limited when it comes to my understanding of electronics. And you are correct, once the Arduino has had the software loaded from the computer, the only reason that it remains connect to the computer is for a power source. Personally, I use my laptop as the power source as I don't plan on having my girlfriend move around very much when I'm using it on her. However I haven't experimented that much with using external power supplies, the only one that I do have laying around is rated for 5v at 1.2A, which is not enough power to keep the board running.

I'm not sure I understand what you mean when you say:
cooper1337 wrote:... but from your description I don't see any power stage for the output.
If you could please explain that to me?

Also, I apologise on the limited amount of commenting in the code. It's difficult enough already to read other people's code sometimes.

Finally, thank you for pointing out the error in the link; I'll get to fixing that up right away.

Regards,
Clarkey
User avatar
Coraline
**
Posts: 150
Joined: 16 Feb 2009, 05:52
Location: In Tight Bondage And Put Away For Later Use.

Re: Arduino Vibrator

Post by Coraline »

I love my random vibrator! There's nothing quite like frustrating orgasm denial while tied tightly. I can't wait to see your finished product. From the looks of it, its going to be great!
I won't beat around the bush. I love being shaved smooth, in tight girly clothing, tied up tight and tormented to no end. Call me crazy, but that's a idealistic day for me.
cooper1337
**
Posts: 153
Joined: 10 Sep 2011, 00:37
Location: Germany
Contact:

Re: Arduino Vibrator

Post by cooper1337 »

Clarkey wrote:I'm not sure I understand what you mean when you say:
cooper1337 wrote:... but from your description I don't see any power stage for the output.
If you could please explain that to me?
The I/O pins of the board can only deliver 40mA. If you are using more, the chip will overheat and be destroyed.
You need some additional electronic components if you want to use bigger currents. They can be thought of some sort of amplifier. Since you mentioned 1.8A, I assume you don't want to be stuck with 40mA.
If you are not familiar with electronics, it's easiest to use an arduino shield like this one: http://arduino.cc/en/Main/ArduinoMotorShieldR3
Clarkey wrote:However I haven't experimented that much with using external power supplies, the only one that I do have laying around is rated for 5v at 1.2A, which is not enough power to keep the board running.
That depends. If it is a good one (with very stable output of 5V), you can bypass the arduino on-board voltage regulator and directly plug into the "5V" header. However, this is not possible on all arduino boards.
You can buy cheap external power supplies for less than a dollar if you look at the right places. I'm currently sorting old stuff out and I have loads of them lying around.
Just google for "12V power supply" or similar. Best choice is if the output matches the power jack on the board. Otherwise you have to use the "VIN" header on the board.
Coraline wrote:From the looks of it, its going to be great!
Did I miss the pictures?
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Arduino Vibrator

Post by qwerty212 »

Thanks for sharing it with us.

If you don't mind I'm going to include in your thread to explain how users can turn on and off teasing devices to be used with most of the selfbondage programs that people can download in the forum.

I use servomotors atached to an Arduino to run my teasing methods (I do already have servomotors and I don't want to buy any other electronic component).

But time ago one user asked me via pm how can he wire up and control an Arduino board to control any device just setting to igh or low state one particular output pin of his Arduino (I guess he was attaching a relay to this pin). I sent to him via pm a possible solution and he never mailed back, so I guess that it worked for him.

This is the .pde that he must upload to his Arduino board:

Code: Select all

/* Sketch Name..: Pain.pde to turn pin 13 HIGH or LOW state due to COM port data recieved
 * Author.......: Qwerty212
 * Email......: qwertybcn121@gmail.com
 * Description..: Turn a LED pin either on or off using an AutoIt program
 *                       comunicating using a serial connection.
 * Date Created.: 24/08/2012
 * Modifed......: -
 */
 
// Include Function Library
#include


int val = 0; // a value accumulated from data on the serial port
int led = 13;


void setup()
{
Serial.begin(9600);
pinMode(led, OUTPUT);
}

digitalWrite(led, LOW); // turn pin 13 to low before sart playing
delay(50);

void loop()
{
if ( Serial.available())
{
char ch = Serial.read();

if(ch >= '0' && ch <= '9') // is ch a number?
val = ch // then val = to the recieved number
{
if(val = 0)// if the arduino get a 0 from the serial port
digitalWrite(led, LOW); // turn pin 13 to low
delay(50);
}
else if(val = 1) // if the arduino get a 1 from the serial port
{
digitalWrite(led, HIGH); // turn pin 13 to high
delay(50);
}
}
}
After uploading this .pde to the Arduino board you are going to need a program that can send data via the COM port to the Arduino to turn HIGH or LOW the pin (in this case pin 13)You can download this pain.exe:

Image
(click on the image to download)

This pain.exe is coded like that:

Code: Select all

#include 'CommMG.au3'
#include <resources.au3>
#AutoIt3Wrapper_Icon=ico.ico


;Internal for the Serial UDF
Global $sportSetError = ''
_CommSetDllPath(@ScriptDir & "\commg.dll");The dll must be i the same folder that the pain.exe

;COM Vars
Global $CMPort = IniRead(".\Settings.ini", "Settings", "COM_Port", "4");Read the ini file for the COM Port to be used, default is 4
Global $CmBoBaud = 9600 ; Baud
Global $CmboDataBits = 8 ; Data Bits
Global $CmBoParity = "none" ; Parity
Global $CmBoStop = 1 ; Stop
Global $setflow = 2 ; Flow

;Sleeping Time
Global $TimeSleep = IniRead(".\Settings.ini", "Settings", "Time_Sleep", "1000");Read the ini file for the time that the pin will be set at HIGH.
; REMEMBER Time in MILISECONDS!!!

_CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow)
_CommSetRTS(0)
_CommSetDTR(0)


Sleep(20)
_CommSendString("1");send data through Com port to set pin to HIGH
Sleep($TimeSleep);Sleep the required miliseconds
_CommSendString("0");send data through Com port to set pin to LOW
Sleep(20)
Exit
Inside the zip you'll find a .ini file. Edit it to change the port used by the program and the time the pin is set at HIGH state (after this amount of time it will get back to LOW state) :

Code: Select all

[Settings]
COM_Port=4
Time_Sleep=1000
So now you can visit places as smartstim to know how you can build your own teasing devices.
Clarkey
*
Posts: 6
Joined: 06 Oct 2012, 11:01

Re: Arduino Vibrator

Post by Clarkey »

Strange, I was just looking at motor shields a few moments before reading your comment, Cooper. I think that a motor shield will be my next Arduino investment - I'll probably get a bit more kick out of the motor that way as well. Currently with the motor that I'm using, an xbox rumble vibrator, it's not achieving it's peak performance in my opinion. However I'd be almost certain that smaller motors/vibrators would be adequately powered.

To Coraline, thanks for the feedback!

I think that software is like poetry, in that it's never finished, only given up on. There's probably more features and fine tuning that I could give it, however it's in a pretty decent state at the moment. Although I feel Cooper is giving me the nod that I should make sure I understand what I've produced and what it's capable of before I consider this remotely complete. And I would agree, electronics is not my forte.

I could possibly include pictures, and I'm also considering creating a short video to show how it's used and setup - however I may be a little camera-shy. The menu's are pretty easy to understand and navigate in my opinion, but I created them so that doesn't say very much, so for the sake of completeness, I should create some user documentation.

I'll try and keep you guys updated.
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Arduino Vibrator

Post by qwerty212 »

Clarkey wrote: I could possibly include pictures, and I'm also considering creating a short video to show how it's used and setup - however I may be a little camera-shy.
It would be great!

Once again thanks for sharing your work with us.

Greets from Barcelona
Clarkey
*
Posts: 6
Joined: 06 Oct 2012, 11:01

Re: Arduino Vibrator

Post by Clarkey »

Over the past few days in my quest to learn more about electronics, I've been experimenting with TIP122 transistors so I can power my device off an external power source that is capable of generating adequate current flow for the vibrator - these experiments have proven to be worthwhile. I'm sure that some people from the community that are so inclined could figure out how to do this, but in the coming weeks I shall attempt to have a completed product with clear images that include circuit diagrams for your own personal construction.

The extra parts that I've bought can be bought from any local electronics store for around $10 total. To be honest, at the end of the day you're probably not saving any money from buying a conventional vibrator, but if you have the resources laying around, the satisfaction that you get from making it yourself is something.

The parts list so far is:
- xbox controller for vibrator: ~$20
- Arduino and LCD shield $50-60
- TIP122 transistor $2
- Project box: $4-5
- then you've gotta decide on your power source, thankfully I have a variable power supply just laying around
So as you can see, the prices really do add up; you'd be looking at approximately $100 at the end of the day if you didn't already have some of the things lying around, so it's maybe not a project you'd go out of your way on to create.
GoodVibrations
*
Posts: 10
Joined: 05 Feb 2012, 22:38

Re: Arduino Vibrator

Post by GoodVibrations »

---
Last edited by GoodVibrations on 15 Jun 2013, 22:02, edited 1 time in total.
Clarkey
*
Posts: 6
Joined: 06 Oct 2012, 11:01

Re: Arduino Vibrator

Post by Clarkey »

Thanks, GV for pointing that post out to me.

After a little while looking through what you had produced I came across the Instructables article on controlling motors with an Arduino. The circuit diagram depicts what I've created almost exactly, the only difference being that they use a TIP120 and my circuit uses a TIP122 (to my knowledge there isn't much of a difference between them), so I'll instead refer people to: http://www.instructables.com/files/deri ... .LARGE.jpg which comes from: http://www.instructables.com/id/Use-Ard ... trol-moto/

I suppose the only thing that distinguishes the two devices is the software that is used. Personally, I like the software solution that I've created and I still use version 6, that is available at: http://pastebin.com/qnA5ib1C and I would be thrilled if other people made use of it and got back to me. In my eyes there aren't (m)any improvements that can be made to the solution, however I'd be more than happy to attempt to incorporate more features into the device upon request. (but be aware that data storage is a limitation on an Arduino, and new features - especially large ones - could lead to other features being removed... or a lot of back breaking work on my part to manually compress the other parts of the software solution)

At the moment I'm interested in creating a circuit that can have several 9v batteries connected to it (utilising one at a time), that can automatically change between them as the voltage in the battery being used reaches a critical point (I suppose at around ~4-5v the battery begins to loose it's efficacy in producing a stimulating vibration). This would allow me to torment my subjects for extended periods of time (mwahahahaha!). I could attempt to imagine such a circuit, however my knowledge of electronics is still limited and I'm not sure what I would be looking for online, so it would be appreciated if someone could point me in the correct direction(? (please!))

Due to time restraints recently, I haven't been able to tend to completing the project, however next weekend I should have more free-time and be able to create a series of photographs - possibly a video, however I'm contemptuous to speaking as I'd prefer to remain anonymous - detailing the use of the device.

Clarkey
Clarkey
*
Posts: 6
Joined: 06 Oct 2012, 11:01

Re: Arduino Vibrator

Post by Clarkey »

I should also add that I've become interested in creating a self-bondage release mechanism that involves an Arduino. It would replicate the function of the CD tray release method, however because it's an Arduino it can be taken and placed almost anywhere.

I'm thinking of using either a servo or a solenoid linear actuator as the main release mechanism. At the current moment, I'm more tempted to use a linear actuator because it has an inherent fail safe over a servo. Allow me to explain, a servo can retain it's position due to the internal friction that the gears produce, so if current were to be lost the keys may never be released. Whereas a solenoid has two states that are determined by there either being current or no current, the only issue is that no current means the device is locked, however some basic mechanics would be able to invert this function, making it much safer to use.

There are many issues to take into consideration with concerns to the physics of this project; my main question at the moment is: how long can a 9v battery supply constant power to a solenoid? Of course, if the battery can't keep the solenoid closed for a significant amount of time the project isn't that useful; on the flip side of the coin, if there is a bug at some point and the battery keeps the solenoid closed for too long there may be health risks. Upon knowing the answer to that question I can make more decisions with regards to the efficacy of this project - safety is always the main concern. I would consider it a health risk to power the solenoid off a mains power-supply due to the prior mentioned reason of permanent entrapment.

The software solution would be relatively simple, at the moment I can only imagine two main features that would be required: fixed amount of time and random amount of time selected between a maximum and minimum time-frame. However as always, I'm open to suggestions; there's a world of possibilities with regards to Arduino.
jason88888
**
Posts: 175
Joined: 30 Jun 2011, 17:24

Re: Arduino Vibrator

Post by jason88888 »

Clarkey wrote: At the moment I'm interested in creating a circuit that can have several 9v batteries connected to it (utilising one at a time), that can automatically change between them as the voltage in the battery being used reaches a critical point (I suppose at around ~4-5v the battery begins to loose it's efficacy in producing a stimulating vibration). This would allow me to torment my subjects for extended periods of time (mwahahahaha!).
If I understood correctly what you want to archive, - to have the vibs running for a longer time span, all you have to do is to wire them "parallel", like in this very simple example:
http://www.zbattery.com/Connecting-Batt ... r-Parallel

This will not use one battery after the other, but all conected batteries at the same time, so if you have 4 batteries, you can vibe the vibs 4 times longer than with just one battery.
Whereas a solenoid has two states that are determined by there either being current or no current, the only issue is that no current means the device is locked, however some basic mechanics would be able to invert this function, making it much safer to use.
You can buy magnetic locks, they can be "locked" or "unlocked" when no current is on them, depends on how they are build.

In general, to be more safe: You could use 2 timed switches instead of batteries, I mean something like this:
http://www.omron-ap.com/product_info/H5 ... switch.jpg

Use 2 of them, so if one is broken and doesn't stop the current after a desiered time, the second one would do the job.
cooper1337
**
Posts: 153
Joined: 10 Sep 2011, 00:37
Location: Germany
Contact:

Re: Arduino Vibrator

Post by cooper1337 »

If you want to be completely failsafe, I'd suggest to use something like this:
http://www.ebay.de/itm/New-280KG-Electr ... 43b49707fa
They will definitely open when power is off, there is no way the mechanics can get stuck (which could happen with a pin that is under pressure).
Still have those lying around, never had the time to build the mechanical part of it. :(
qDot
*
Posts: 2
Joined: 26 May 2012, 19:34

Re: Arduino Vibrator

Post by qDot »

If you're just interested in getting a vibrator running with a FET without having to design something new yourself, we open sourced all of the layout files for the Pen15 Board arduino vibrator shield we did last year (http://slashdong.org/pen15/)

They're available in the github repo:

http://www.github.com/qdot/pen15-board/

BTW: Mining xbox controllers is a REALLY expensive way to get motors. Just look for replacement bullet vibes. You can get them for $5-10 from places like blowfish, and they come with the standard 2.5mm mono audio jack connector.
Post Reply