Arduino Vibrator

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

PiJoy
**
Posts: 89
Joined: 07 Sep 2011, 18:26
Location: Boston Metro Area, Massachusetts, USA

Re: Arduino Vibrator

Post by PiJoy »

Clarkey wrote: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/

<snip>
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!))

<snip>

Clarkey
Clarkey,

The TIP120 or TIP122 are both fine devices for controlling higher power DC devices from an Arduino. The circuit from instructables.com is OK, but not optimal. Both the TIP120 and TIP122 have built-in diodes to protect the transistor(s) from the inductive back-kick that happens when switching off inductive loads (like a motor), so you can omit those if you like. I would lower the base resistor from 1K to 470 ohms, to ensure that the transistor is completely saturated when driven on; it'll run cooler that way, and the current from the Arduino pin will still be well below its per-pin current limit (under 10 mA vs. a limit of 40 mA.)

9 volt batteries are an expensive way to buy battery power. I think you'll do better with six AA or C cells in series, either one-shot or rechargeable ones. Even better, use a (boost or SEPIC) switching regulator, and you'll be able to use much more of the energy from the batteries for your kinky pleasure, because the switching regulator can make use of the batteries' power even when they're discharged almost to zero. I've used little switching regulators from http://www.pololu.com/catalog/category/84 and had good luck with them. There are probably other sources for such modules; I have no affiliation with pololu except as a satisfied customer.

Hope this helps!
0385
*
Posts: 21
Joined: 09 Jul 2012, 23:36

Re: Arduino Vibrator

Post by 0385 »

Sory to bump such an old topic but i recently bought some arduino items and as much fun as blink is, i want to try some thing else.
Unfortunatly, i have no lcd screen yet or proper programming skills to dissect the code in the OP.

Could some one cut the code up in usuable individual chunks?
like a pde that would just have a start/stop button and left/right buttons for increasing or decreasing power/intensity?
stefani
*
Posts: 8
Joined: 17 Sep 2013, 23:16

Re: Arduino Vibrator

Post by stefani »

I like this idea, but I have very little electrical skill. Can someone post a wiring diagram?
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Arduino Vibrator

Post by Sir Cumference »

stefani wrote:I like this idea, but I have very little electrical skill. Can someone post a wiring diagram?

A couple of possibilities:

http://forum.boundanna.net/board/viewto ... fet#p53381
http://forum.boundanna.net/board/viewto ... =28&t=7135
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
User avatar
FoxBilt
*
Posts: 4
Joined: 30 Jan 2014, 01:53
Location: In The Lab

Re: Arduino Vibrator

Post by FoxBilt »

Great code!
I found this by searching Arduino Vibrator :lol:

I hacked together a 3-channel Arduino motor controller (Pro-Mini & ULN2004 Darlington array) and wanted to
be able to switch between different modes but just couldn't figure out how to do that.
Your code finally showed me how to do it, something Arduino.cc, Adafruit, etc couldn't do...

Now I have a fully functional variable intensity, variable speed, and variable mode motor controller and it works great!
I have pics, code, and schematics. If anyone's interested, I'll create a separate post for it.
I like having my wire nuts twisted.
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Arduino Vibrator

Post by Sir Cumference »

FoxBilt wrote:?....

Now I have a fully functional variable intensity, variable speed, and variable mode motor controller and it works great!
I have pics, code, and schematics. If anyone's interested, I'll create a separate post for it.
Please do.

It is always interesting to see how others have solved the task.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
blacksheep
*
Posts: 5
Joined: 22 Jun 2006, 01:36

Re: Arduino Vibrator

Post by blacksheep »

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)
Can anybody give me further instructions how i need to connect everything because i am absolutely new into this. The software is installed and the LCD shows the right things but i don´t know how i need to connect it and i have very often no response on the buttons at the shield (except Reset :? )

Thanks Everybody and sorry for my bad english
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Arduino Vibrator

Post by Sir Cumference »

First a warning:
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)
This is wrong!
If you try to draw more than 40 mA from a pin, or a total of more than 200 mA from the board, you are likely to damage it.

And arduino receives inputs, handles those, and gives you a low current output.
Those outputs can be used to control things, but they do not have the energy to do the actual work.


(Edit. I can see this has already been pointed out...... But it is quite important!)







we will need to see the following:

- your code
- a photo of your setup
- a schematic drawing of your setup


If we do not know exactly what you are doing and what you are trying to achieve, there is no way we can guide you.


The normal setup would be something like:

- An arduino that gets some kind of inputs from switches/sensor/potentiometers
- Based on the inputs, the arduino decides to do something
- The arduino outputs a signal: It will be either 0V, 5V or some value in between by using pulse width modulation (PWM) of the signal
- If you want to make that signal do anything more than just lighting a diode, you feed the signal to an appropriate transistor, solid state relay, optocoupler or "shield", that is capable of handling the power.
- Then the power reaches "whatever gizmo you have attached", and you hopefully have fun
:mrgreen:

There is an unlimited number of ways to give the inputs, write the code and handle the outputs. The art is to find an affordable, safe and reliable combination.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
wolfstoker
*
Posts: 2
Joined: 26 Jul 2014, 13:16

Re: Arduino Vibrator

Post by wolfstoker »

hi im new to this site but ive been watching for a long time. i have a arduino r3 and a sainsmart lcd shield.
i would like to use this with my collection of sextoys to give me a BOOST. i would really like some help. please please help as i would like to get on the road to self bondage and plesure. :lol:
Brand X mk2
**
Posts: 80
Joined: 07 Oct 2013, 12:40

Re: Arduino Vibrator

Post by Brand X mk2 »

Hi Wolf, it sounds like you're on the same page as me. I just ordered an Arduino UNO and a Motor Shield for the same reason.

There are a number of video tutorials on YouTube of how to run a motor, but this is the first one I encountered:
https://www.youtube.com/watch?v=lAKY201 ... 8W6pxdjvuQ
They use a "HackOff" as the motor shield, but from what I can gather, the HackOff is very similar to add-ons you can buy for about £3 or $5. If n doubt, you can buy the HackOff because it definitely works.


There are a lot of guides and tutorials on the internet, unfortunately they all seem to be aimed at people who want to play with electronics rather than those of us who don't really care how it works just so long as it does. This Dummies Guide tutorial might fit the bill: http://www.dummies.com/how-to/content/h ... e-ard.html
I'm trying to find a super-simple guide on YouTube, but so far the HackOff video is the only one I've found, and it doesn't really explain how to control the speed of the motor. This is worth reading: http://arduino.cc/en/Tutorial/PWM It's a fairly easy-to-understand explanation of what Pulse Width Modulation is. Basically it just means the motor gets turned on and off extremely quickly as a quick-and-dirty way to control the speed of the motor. If it works, that'll do me just fine.

I have no idea how to set up the LCD controls, but it looks pretty cool.

edit*
I just found this: https://www.youtube.com/watch?v=gnyylPOKwEU
It's a GUI interface for Arduino. :)
wolfstoker
*
Posts: 2
Joined: 26 Jul 2014, 13:16

Re: Arduino Vibrator

Post by wolfstoker »

Found how to use this with sainsmart lcd keypad shield and a wired vibrator will be re writing the software to suit my needs.
I found out it all depends on the type of motor used!(im using one from a vibrating prostate stimulator 4.5v) :roll:
Brand X mk2
**
Posts: 80
Joined: 07 Oct 2013, 12:40

Re: Arduino Vibrator

Post by Brand X mk2 »

Hooray! Finally some progress. :)
My programming skills are limited to 10 PRINT HELLO 20 GOTO 10, but with some trial and error I now have a functioning toy.

to get it working I used a code from the Examples > Motor Library and changed the number of the motor to "1" (M1 on the board. Here's the code:

Simple short pulse:
// Adafruit Motor shield library
// copyright Adafruit Industries LLC, 2009
// this code is public domain, enjoy!

#include <AFMotor.h>

AF_DCMotor motor(1);

void setup() {
  Serial.begin(9600); // set up Serial library at 9600 bps
  Serial.println("Motor test!");

  // turn on motor
  motor.setSpeed(100);
 
  motor.run(RELEASE);
}

void loop() {
  uint8_t i;
  
  Serial.print("tick");
  
  motor.run(FORWARD);
  for (i=0; i<255; i++) {
    motor.setSpeed(i);
    delay(2);
 }
 
  for (i=255; i!=0; i--) {
    motor.setSpeed(i);
    delay(5);
 }
  

 
 
  

  Serial.print("tech");
  motor.run(RELEASE);
  delay(100);
}
Now I have it running I can start playing around with the vibrator and create new patterns.

edit* delete the "serial print" bits, they're not needed.
Flawless
*
Posts: 5
Joined: 22 Apr 2016, 21:30

Re: Arduino Vibrator

Post by Flawless »

I love the idea of this, the code is brilliant.
I'm not too hot with Arduino yet, and most code I've found of this sort of thing have hinged on lookup tables, programming as 8 bit DAC/fast pwm or something...??? This really helps!!!
I hope to use this with blynk which would allow me to control it from anywhere!!!... or even allow complete strangers to control it!
At the minute I'm just struggling removing the lcd code which is a huge part of it, or changing things to work with blynk since it has the option of a lcd.
Post Reply