Arduino key dropper:

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

Arduino key dropper:

Post by Sir Cumference »

I like the CD tray key release, but I would like something simple and reasonably fail safe.


I had a solenoid from a 24 V relay.
The resistance was 300 ohms, meaning that it would draw less than the 40 mA an Arduino can deliver.
It is an inductive load, so a reverse biased diode must not be forgotten, lest you want to fry your pin!

It is mounted on a stick, hanging over an appropriate edge.
image.jpg
Write how many minutes delay you want, upload the code and place your key ring on the magnet.
(If the code is loaded, and the Arduino is powered up, you just push the reset-button to reset the timer)
Once time is up, it drops.




And a bit of code:

Code: Select all

/*
Drop!
Energize an electromagnet for some time, then switch it off to 
drop whatever is hanging from it.

Remember to put a free wheeling diode on the coil, and do not power it directly
from the Arduino before making sure, that it will draw less than 40 mA!
(He who ignores this, has deserved to fry his pin!)

Sir Cumference October 2014
*/
 

const int time = 1;       //give time in minutes here

const int finishLED = 8;  // to show time is up
const int coilLED = 10;    // light when coil is energized
const int coil = 7;        // Power for the coil


// the setup routine runs once when you press reset. In this case,
// we just want to run the important parts once, and thus put them in setup.
void setup() {                
// initialize the digital pins as an output.
pinMode(finishLED, OUTPUT); 
pinMode(coilLED, OUTPUT); 
pinMode (coil, OUTPUT);

// coil on, LED on, WAIT, coil off, LED off.
digitalWrite (coil, HIGH);
digitalWrite (coilLED, HIGH);
delay (time * 60000);
digitalWrite (coil, LOW);
digitalWrite (coilLED, LOW);
}

//Loop to say that time is up. I like blinking LEDs.... but it could be empty!
void loop() {
  digitalWrite(finishLED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(50);               // wait for a moment
  digitalWrite(finishLED, LOW);    // turn the LED off by making the voltage LOW
  delay(250);               // wait for a moment
}

The very important diode!
image.jpg

Safety:
No system is fool proof! Somewhere out there, a new and improved fool is lurking!

- If the power fails, the coil will loose power and drop the key.
- If you power the Arduino from batteries, they will run down, and the key will drop.
(Do the math based on your coil, measurement and battery, then test it to see, if the numbers were right)
- If you power it from a computer, and it enters power save mode, the key will drop... unless you have one of the "always powered"-USB ports.

But strings can tangle, keys drop out of reach, fingers become numb and locks can get stuck. Remember a reliable back-up!
~ 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: Arduino key dropper:

Post by Sir Cumference »

Just for the fun of it.

The minimum amount of code to do it:

Code: Select all

/*
Drop!
Bare bones code, that just operates the coil.
Sir Cumference October 2014
*/
 

const int time = 1;       //give time in minutes here
const int coil = 7;        // Power for the coil

void setup() {                
pinMode (coil, OUTPUT);

// coil on, WAIT, coil off
digitalWrite (coil, HIGH);
delay (time * 60000);
digitalWrite (coil, LOW);
}

//The loop has to be here, even when it is empty and does nothing
void loop() {
}
An alternative to the relay solenoid is this one:
HP Solenoid.png
There has been one in every HP printer I've ever taken apart.
It only has a resistance of 110 Ohm (meaning that at 5V it will draw 45mA). It is in the high end, meaning that it should be used with a small transistor or in series with a 100 Ohm resistor, to save the output pin.
The diode must still be used.

Remove the spring, and the arm drops off, giving free access to the magnet.
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
User avatar
bound_jenny
Moderator
Posts: 10268
Joined: 09 Dec 2007, 12:37
Location: Montreal, Canada, Great Kinky North

Re: Arduino key dropper:

Post by bound_jenny »

Nice gizmo. Clean and simple.
Sir Cumference wrote:No system is fool proof! Somewhere out there, a new and improved fool is lurking!
I like that! :D

Jenny.
Helplessness is a doorway to the innermost reaches of the soul.
If my corset isn't tight, it just isn't right!
Kink is the spice of life!
Come to the Dark Side - we have cookies!
User avatar
Dark_Lizerd
*****
Posts: 2416
Joined: 22 Oct 2006, 11:30
Location: New Mexico

Re: Arduino key dropper:

Post by Dark_Lizerd »

For the timer alarm...
drop a bell when the keys drop...
or, another line of code to control another device...
And to be devious...
a third device could be a slow motor that will wind the key up if you don't grab it in time...
(and code to lower the key later...)
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...
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Arduino key dropper:

Post by Sir Cumference »

Dark_Lizerd wrote:For the timer alarm...
drop a bell when the keys drop...
or, another line of code to control another device...
And to be devious...
a third device could be a slow motor that will wind the key up if you don't grab it in time...
(and code to lower the key later...)

The possibilities are endless!

A simple way to make sound, is to attach a piezo beeper to a PWM output, then just analogWrite to it, to make it beep:

Code: Select all

  analogWrite(piezo, 100);   // beep with the PWM frequency
  delay(250);               // time to beep
  analogWrite(piezo, 0);    // stop beep
  delay(250);               // time to keep quiet

I wanted to keep it simple, but only a dirty mind is the limit to how annoying the key delivery could be made.
~ 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: Arduino key dropper:

Post by Sir Cumference »

Final revision:

Stuck the code in a Pro Mini and fitted a battery pack.
image.jpg
It works like a charm.

Once the batteries are down to 3V total, the key will drop.
(I have not timed it, just tested with old batteries)
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
BAFer69
*
Posts: 2
Joined: 08 Oct 2014, 23:33

Re: Arduino key dropper:

Post by BAFer69 »

Another approach which may be more available to the less inclined to program is a time delay relay and electromagnet connected to a small 12v battery.

In the photo attached we have a programmable http://www.ebay.com/sch/i.html?_nkw=FRM01&_sacat=0 FRM01 electronic timer bought via eBay for $7 and a 2.5Kg lifting electromagnet http://www.ebay.com/sch/i.html?_nkw=2.5+electromagnet also from eBay for $4 attached to a left over 12v gel cell battery.

This timer can be set up to 270 hours ( yes 270 hours ) at 10 second resolution and 9999 seconds (2.77) hours at 1 second resolution. It remembers the settings via flash memory and can be set to start at power on or wait for a trigger signal.
Attachments
2014-10-08 16-59-16.608.jpg
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Arduino key dropper:

Post by Sir Cumference »

BAFer69 wrote:Another approach which may be more available to the less inclined to program is a time delay relay and electromagnet connected to a small 12v battery.

In the photo attached we have a programmable http://www.ebay.com/sch/i.html?_nkw=FRM01&_sacat=0 FRM01 electronic timer bought via eBay for $7 and a 2.5Kg lifting electromagnet http://www.ebay.com/sch/i.html?_nkw=2.5+electromagnet also from eBay for $4 attached to a left over 12v gel cell battery.

This timer can be set up to 270 hours ( yes 270 hours ) at 10 second resolution and 9999 seconds (2.77) hours at 1 second resolution. It remembers the settings via flash memory and can be set to start at power on or wait for a trigger signal.

Nice!
In some applications, it will be really nice to se how much time is remaining.

(Not to mention, the entire set-up costs less than just an original Arduino Uno :shock: )

Welcome aboard.
:hi:
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Arduino key dropper:

Post by qwerty212 »

I sitll don't know how can I missed this HUGE contribution.

Thanks a lot for sharing it with us.
natq
**
Posts: 90
Joined: 12 Jun 2012, 02:29

Re: Arduino key dropper:

Post by natq »

Nice to someone else building something similar. I have something quite similar built up for similar use, but I still don't trust it enough to use it.
User avatar
Sir Cumference
Moderator
Posts: 1606
Joined: 29 Jan 2012, 22:00
Location: Scandinavia

Re: Arduino key dropper:

Post by Sir Cumference »

natq wrote:Nice to someone else building something similar. I have something quite similar built up for similar use, but I still don't trust it enough to use it.
I know how you feel.

The important part, is how you build safety into the design (and to remember to have a really primitive, but safe emergency escape method).

In this case, the magnet can only just carry the key, meaning, that once the batteries drain, the key will drop.

"If it does nothing, it will activate"
It has the accuracy of the micro-controller, but running down the batteries gives it the inevitability of an ice release as an intrinsic backup release mechanism.


If on the other hand, you let a small motor pull a pin to release the key, the key will never drop if it does nothing.
~ 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: Arduino key dropper:

Post by Sir Cumference »

Alkaline batteries (2500 mA/h) and a 25 mA draw, could on the other hand keep you occupied for 100 hours.

I'd test the real release time before letting it be an important backup.
:shock:
~ Leatherworking, blacksmithing , woodworking and programming are the most pervertable skills you can learn! ~
natq
**
Posts: 90
Joined: 12 Jun 2012, 02:29

Re: Arduino key dropper:

Post by natq »

Yeah. Properly done electronic releases are a hard thing to do properly, and absolutely must fail open. I have a liking for mechanical relays for that, except for high DC loads where the contacts might stick or arc.
I should build a better case for mine and use a separate battery for the solenoid coil keeping the key up.
I also recently came in to the possession of a 24V electromagnet made for keeping doors open, that one might find some use as a nearly direct restraint.
Interestingly the case has a built in "release" button as is.
tkv
*
Posts: 32
Joined: 25 Jul 2009, 14:42
Location: Finland

Re: Arduino key dropper:

Post by tkv »

Using an arduino for this seems a bit difficult and over-engineered to me?

Since I seem to be on a picture posting roll tonight...

Here's my setup:
IMG_3247_res.jpg
Two mechanical six-hour timers power a charger from an old Ericsson mobile phone which powers a solenoid found from a VCR.

The cork keyring is for weight. You want weight because residual magnetism can be a bitch, as I once discovered the hard way. And oh yeah, my backup is a knife and there will always be something cuttable in my bondage.
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Arduino key dropper:

Post by qwerty212 »

tkv wrote:Using an arduino for this seems a bit difficult and over-engineered to me?

Since I seem to be on a picture posting roll tonight...

Here's my setup:
IMG_3247_res.jpg
Two mechanical six-hour timers power a charger from an old Ericsson mobile phone which powers a solenoid found from a VCR.

The cork keyring is for weight. You want weight because residual magnetism can be a bitch, as I once discovered the hard way. And oh yeah, my backup is a knife and there will always be something cuttable in my bondage.
Great setup
Post Reply