Manual for Vibrator-Control?

Ideas and instructions how you can make your own bondage toys.
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Manual for Vibrator-Control?

Post by Sir Cumference »

I personally prefer to power bullet vibes and the like from 2 or 3 AA batteries.

I really do not trust a cheap wall wart as the only thing between my tender parts and 230V, and I'll get tired long before the batteries do.
Should the motor die, I also consider it nice to know, that there is a limited amount of electrons available to heat up the bullet.
:shock:

Likewise, I power the Uno from a 9V battery when used for "those" activities.


Even though you could power the Uno and the vibe from the same 4,5V battery pack, it has given me trouble whenever I have attempted it. I think it is because the motors make a lot of noise and draw a rather large current when starting, making the voltage drop, resetting the Uno.
It could probably be solved with capacitors and filters.... But two battery packs are so much easier.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
amity
**
Posts: 61
Joined: 14 Jan 2009, 14:15

Re: Manual for Vibrator-Control?

Post by amity »

@PiJoy
Thanks, I have received your google-document, but didn´t had the time to read it thoroughly.
Real life interfers right know :-)

I really struggle with all the electrical details you guys throw in here :shock:

Has anybody a sketch, where I could see all the reqiured elemts?
If it is already somewhere in the writing you all have done so far (thank you): I either missed it or didn´t get it.
Sorry about that.

So, can I use the battery pack that comes with the bullet vib???
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Manual for Vibrator-Control?

Post by Sir Cumference »

amity wrote: Has anybody a sketch, where I could see all the reqiured elemts?
....
So, can I use the battery pack that comes with the bullet vib???

How to connect a MOSFET and an inductive load (solenoid or motor):
Some say, that you should also connect a couple of hundred ohms in the lead feeding your signal to gate on the MOSFET..... it works without it. The 10K is a "pull down" to make sure that the MOSFET will not see a stray current or noise as an excuse for opening.
Image

Yes, you can use it (if it is a simple on/off.... if it does something by itself, it might get messy)
Remember to use correct polarity on the MOSFET, or I think it will die.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
PiJoy
**
Posts: 89
Joined: 07 Sep 2011, 18:26
Location: Boston Metro Area, Massachusetts, USA

Re: Manual for Vibrator-Control?

Post by PiJoy »

Sir Cumference wrote:
How to connect a MOSFET and an inductive load (solenoid or motor):
Some say, that you should also connect a couple of hundred ohms in the lead feeding your signal to gate on the MOSFET..... it works without it. The 10K is a "pull down" to make sure that the MOSFET will not see a stray current or noise as an excuse for opening.

Remember to use correct polarity on the MOSFET, or I think it will die.
@Sir Cumference,

That's a nice drawing! Note the diode across the source and drain of the MOSFET!
Did you find it online, or did you create it? If the latter, what graphics program(s) did you use?

I don't design electronics by trusting to luck, so I would put in a resistor (150 Ohm nominal) to replace the long green wire in the above diagram. It will probably "work" without it, perhaps for months or years, but could then fail without notice. Here's why:

Horowitz' and Hill's classic electronics text, _The Art of Electronics_ explains that a resistor between the MOSFET's gate and what ever's driving the gate should be sized to protect the driver from accidental damage from over current. If you're using a designed-for-it MOSFET driver circuit or chip, you probably don't need any resistor. However Arduino outputs (from the chip's spec sheet) are rated for 40 mA absolute maximum; that means drawing even a little over 40 mA can cause damage. Using Ohms law, you need a resistor of value: 5 volts / 0.040 Amps = 125 Ohms, minimum, to keep the current below 40 mA. Since a 130 Ohm, 5% resistor could be under 125 Ohms, I recommend using the next larger standard 5% tolerance value, namely a 150 ohm resistor.

The resistor is an inexpensive part, IMHO well worth including to protect your Arduino. The only impact of the resistor (other than increasing reliability) is that it, together with some characteristics of the MOSFET (gate capacitance and total turn-on charge) limit how fast the Arduino's output can switch the MOSFET on or off. Details below; feel free to skip, since it's not critical to what you're doing right now.

If you try using your Arduino's PWM to adjust the speed of your vibrator -- something well worth trying! -- the turn-on time for the MOSFET could eventually become an issue, but that (a) won't happen with the default PWM frequency for Arduinos and (b) would only become an issue if you wanted to PWM either a very old or very high-power MOSFET (for those, the gate capacitance could be big) so fast that you couldn't hear any PWM effects (20 KHz. or higher so outside human hearing.) I doubt this will come up, but it might give you a little insight into how/why circuit components are chosen and why datasheets have so many parameters and graphs.

Hope this helps!
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Manual for Vibrator-Control?

Post by Sir Cumference »

I found the drawing online, I was a bit in a hurry.
My guess is, that it is made using "Fritzing".

Thanks for the explanation regarding the resistor on the gate connection.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
User avatar
Dark_Lizerd
*****
Posts: 2416
Joined: 22 Oct 2006, 11:30
Location: New Mexico

Re: Manual for Vibrator-Control?

Post by Dark_Lizerd »

... 0-60V!!! :shock:
I'm not sure I would want to be connected to a vibrator connected to 60V!!!!
12-20 or 24V sure...
(Also... very good on the drawing... better than the labeled boxes from most of the people around here... Yes, me too... :roll: )
And PiJoy... good input from you on this as well...
All advice is checked, re-checked and verified to be questionable...
Don't ask, we both wont understand the answer...
http://www.mediafire.com/download/09dtr ... e_V2_2.exe Not just for nubies any more...
amity
**
Posts: 61
Joined: 14 Jan 2009, 14:15

Re: Manual for Vibrator-Control?

Post by amity »

Have you seen this one?
http://www.orgasmatronics.com/pages/how ... a-vibrator
https://www.youtube.com/watch?v=lAKY201O0bg

Even I can do it - I guess :D

What is missing, is this Hack-Off.
Can the HackOff be replaced by something that I can buy round my corner (internet), or it is something special?
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Manual for Vibrator-Control?

Post by Sir Cumference »

amity wrote:Have you seen this one?
http://www.orgasmatronics.com/pages/how ... a-vibrator
https://www.youtube.com/watch?v=lAKY201O0bg

Even I can do it - I guess :D

What is missing, is this Hack-Off.
Can the HackOff be replaced by something that I can buy round my corner (internet), or it is something special?
Nothing special, just a breakout board for the power electronics.

You can do exactly the same with the small MOSFET break out board I linked to earlier or Slashdong's "Pen15" shield for the Arduino.
http://www.slashdong.org/2011/10/15/pen15-board/
If you know how to solder, this little kit from Sparkfun is nice: https://www.sparkfun.com/products/10256


they all do the same: Take the output from the arduino, and use it to control enough current to run a vibrator.


Of course you can do it!



May I ask about your gender and what part of the world you live in?
In many respects it will make it easier to refer you to electronics pushers, and especially the next step: (wo)man-machine interfacing.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
amity
**
Posts: 61
Joined: 14 Jan 2009, 14:15

Re: Manual for Vibrator-Control?

Post by amity »

amity is from Germany
amity is actually male and female, as we are a couple who are exploring things here together.

I (we :D ) have ordered an arduino, just to get things going.
I am not 100% sure what is the next item I need.
For ex. in the brilliant sketch in one of the last posts, I have seen to restistors.
Do I need to buy them, how to connect them?
Questions over questions.

Have you got a link where and what to buy next?
I guess, I am looking for the easiest solution (plug and play).
If soldering has to be done, I would need guidance (a sketch) which parts exactly have to be soldered...
Thanks a lot for your support - to all of you here in this post.
PiJoy
**
Posts: 89
Joined: 07 Sep 2011, 18:26
Location: Boston Metro Area, Massachusetts, USA

Re: Manual for Vibrator-Control?

Post by PiJoy »

amity wrote:amity is from Germany
amity is actually male and female, as we are a couple who are exploring things here together.

I (we :D ) have ordered an arduino, just to get things going.
@Amity,

You've taken a first step, great! If I may ask, which Arduino did you buy, and where did you order from? As you'll see, the details matter re what to order next.

It looks like both sparkfun.com and adafruit.com both have distributors in Germany. Either of those can supply you with enough components and tools to get started. I'm sure there are many other companies, but I'e had good luck with both. (And they both have user forums that do not require a purchase or subscription fee. Check those out!) Another IMHO good company, also with German distributors is: http://www.pololu.com/distributors


In any case, you'll need some basic tools and materials:
1. Wire cutter and stripper. (I like two separate tools, a flush cutting wire cutter, and a stripper that strips 22 gauge solid wire.) You can get by with pretty much any wire cutters, but learning how to strip the wire without nicking it takes some practice (and the occasionally scrapped wire.)

2. A DMM (digital multimeter) that can measure AC/DC volts, AC/DC current and resistance. A basic (read, relatively inexpensive) meter will do.

3. Insulated wire, 22 AWG *solid* , at least three colors, five is better. (Look for a starter bundle with ballpark 10 meters of each. Unfortunately copper is expenive right now, so so is copper wire.)

4. Electrical tape (or pretty much any tape, in a pinch.) A non-black color makes it easier to see labels written onto the tape.)

5. Some sort of DC power supply. I suggest using A DC "Wall-wart" that produces 3 -- 12 volts; 5 volts DC is ideal. Start scrounging these up; you'll find them useful. Sparkfun and Adafruit sell these. Pololu might also.

6. A little screwdriver, preferably with both straight and phillips tips. Something like this: http://www.google.com/imgres?imgurl=htt ... =0&ndsp=22

If you bought a shield-compatible Arduino, then the simplest thing for you to buy is either an Arduino motor-control shield or some other motor control shield that has screw terminals. (Even if you got a breadboard-friendly Arduino -- thus one that does not plug directly into a motor-control shield, you could still use such a shield, but you'd have to wire it up, instead of just plug it in.

Note: many motor-control boards/shields require more voltage than would be needed if you wired up a MOSFET. So check the specifications and keep scrounging wall warts; they'll come in handy eventually.

Safety note:
Do NOT assume you can wire the outputs of multiple wall-warts together in series, like you would batteries!



Some Arduino shields -- and some Arduinos themselves can come without connectors at all, or with connectors supplied but not soldered in. Check this before ordering, especially if you want to get started without any soldering.

You can order header pins; I'd suggest stackable M/F ones.

A motor shield/controller board without either Arduino-shield-style connectors nor screw terminals can be made to work, but you'd have to do a little soldering.

amity wrote: I am not 100% sure what is the next item I need.
For ex. in the brilliant sketch in one of the last posts, I have seen to restistors.
Do I need to buy them, how to connect them?
Questions over questions.
If you buy a motor shield or similar motor-controlling board or module, you won't need separate components, except for wire and perhaps connectors.
Please tell us exactly which Arduino you ordered -- and the voltage range on whatever "wall-warts" you've found.
Then I/we can advise on some specifics for what to order next. Candidly, you'll get something working faster if you work at the board/module level first -- less chance of making a mistake and burning something out. If you stick with it, you can do more/different things by assembling components, but that only works once you're learned a bit more.

Please keep us posted,

PiJoy
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Manual for Vibrator-Control?

Post by Sir Cumference »

amity wrote:amity is from Germany
amity is actually male and female, as we are a couple who are exploring things here together.

I (we :D ) have ordered an arduino, just to get things going.
I am not 100% sure what is the next item I need.
For ex. in the brilliant sketch in one of the last posts, I have seen to restistors.
Do I need to buy them, how to connect them?
Questions over questions.

Have you got a link where and what to buy next?
I guess, I am looking for the easiest solution (plug and play).
If soldering has to be done, I would need guidance (a sketch) which parts exactly have to be soldered...
Thanks a lot for your support - to all of you here in this post.
Great to hear (and great to hear you are having fun together!)

I buy components on ebay, but as PiJoy wrote: With a motor shield or a MOSFET break-out board like the one I linked to above, you need no other components.


I've written a simple random vibrator controller for you:
There are lots of comments in it. Try to read through it, and see if it makes any sense.

Code: Select all

/*
Random motorcontroller
06 September 2014

From the infamous Sir Cumference to Amity.
Welcome to the wonderful world of perverted programming!

:-)

*/

// you input the following four values, and upload to the Arduino:
int minTime=500; //value in ms. Minimum length of pulse or pause
int maxTime=5000; //value in ms. Maximum length of pulse or pause
int minInt=50; // Minimum intensity value (0-255) MUST BE SMALLER THAN maxInt !
int maxInt=255; // Maximum intensity value (0-255) MUST BE LARGER THAN minInt !

// defining the other values the program needs:
const int signalPin = 6; //output. You can change this, but it must be a PWM-pin!
int onTime; //how long to be on
int intensityVal; // with this intensity
int offTime; // how long to be off


//****************SETUP***********
void setup() // runs once to get things ready
{  
  pinMode(signalPin, OUTPUT); //define signalPin as OUTPUT
  randomSeed(analogRead(0)); //listen to an unused pin, to generate (mostly) random values.
  Serial.begin(9600); // start serial monitor, to see in text what is happening
  // I'll use that, and write the values you gave above to the monitor:
  // No real use, just to show you how to send some text.
  
  Serial.println (" "); // empty line
  Serial.println ("Welcome to Amity's Random Vibrator Controller");
  Serial.println ("The following defining values have been chosen:"); 
  Serial.print ("Pulse and pause durations will be between ");
         Serial.print (minTime);
         Serial.print (" and ");
         Serial.print (maxTime);
         Serial.println (" ms.");
 Serial.print ("Intensities will be between ");
         Serial.print (minInt);
         Serial.print (" and ");
         Serial.print (maxInt);
         Serial.println (".");

delay   (1000);   
Serial.println (" "); // empty line
Serial.println ("Let the fun begin!");
Serial.println (" "); // empty line
}

// *************and this is where things happen!***************
// loop runs over and over and over and over.....
void loop() {
// draw some random numbers in the intervals defined by you:
onTime = random(minTime,maxTime);
offTime = random(minTime,maxTime);
intensityVal = random(minInt,maxInt);

// And use those random numbers! (While writing to the serial monitor what is happening)
analogWrite (signalPin, intensityVal);  // switch signalPin on with intensity = intensityVal
    Serial.print(" ON!   Int = ");      // and write it in the serial monitor
    Serial.print(intensityVal);
    Serial.print("   On-time = ");
    Serial.println(onTime);
delay (onTime);                          //keep it on for "onTime"
analogWrite (signalPin, 0);              // switch off
    Serial.print(" OFF!   Int = 0");      // ...and write that in the monitor
    Serial.print("   Off-time = ");
    Serial.println(offTime);
delay (offTime);                        // stay switched off for the duration of "offTime"

// That's it! Now it will go back to the start of the loop and run it again with fresh values

}


Once you get the arduino, try following the tutorials on LadyAda's site, to learn the basics and make things work.
http://www.ladyada.net/learn/arduino/
Programming is just a language with some new words and some grammatical peculiarities....
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Manual for Vibrator-Control?

Post by Sir Cumference »

A few extra comments:

In the code, "//" before text means that it is a comment, and the compiler will not see that line when it translates the code you have written, to something the microprocessor can understand.

Likewise, larger blocks of text can be "commented out" by putting it between
/*
Compiler will
Not see any
Any of this
*/

The text is just there as a service to the programmer, and anybody else reading the code in plain text. Write lots of comments. In no time you will forgets what your initial idea was.



Notice lines of code ending in ";" That is important. Forget the ";" and the compiler will not go on.
Likewise, blocks of code is enclosed in {brackets} .


Start by making small programs, test them, then expand with more code.
In that way, debugging is made a lot easier.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
freddylocks
*
Posts: 28
Joined: 19 Aug 2012, 22:54

Re: Manual for Vibrator-Control?

Post by freddylocks »

Nice write up Sir Cumference.

I agree regarding the ; it is the bane of my life! I tweak code and then spend an hour fault finding only to find out that it is a missing ;

Cheers
Freddy
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Manual for Vibrator-Control?

Post by Sir Cumference »

freddylocks wrote:Nice write up Sir Cumference.

I agree regarding the ; it is the bane of my life! I tweak code and then spend an hour fault finding only to find out that it is a missing ;

Cheers
Freddy
Thanks.

Not to mention when you mess up the brackets bracketing some other brackets!
:oops:
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
amity
**
Posts: 61
Joined: 14 Jan 2009, 14:15

Re: Manual for Vibrator-Control?

Post by amity »

I have ordered an Arduino UNO R3 Atmegs Board328
Tell that this is the right one... :D
Ordered from ebay but has (of course not) arrived yet.

...wall-wart: I thought i could use the batteries (seperate box) that came with the vibe. Is that correct?

Is that the right item I need to buy next?
http://www.ebay.com/itm/TOP-MOSFET-Butt ... 2ed5359f1d
Found a similar item on ebay.

something else

After that I go get the wires and the screwdrivers an so on.

amity
Post Reply