Removed

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

Post Reply
OneAndOnlyOdin
**
Posts: 109
Joined: 31 Mar 2019, 16:00

Removed

Post by OneAndOnlyOdin »

Removed
Last edited by OneAndOnlyOdin on 12 Jan 2022, 13:25, edited 1 time in total.
RIP Odin - Odin was killed to make place for other things. This forum will forever be a part of Odin's soul.
lj
Moderator
Posts: 2255
Joined: 14 Oct 2008, 18:22
Location: East Anglia, UK

Re: Electromagnet WiFi Release - Arduino like device

Post by lj »

just a quick safety warning

make sure the key WILL detach from the electromagnet when the power is off. Electromagnets can have "remanent" magnetism - that is, the core of the magnet retains weak magnetism when not powered, so use a weight of some kind to overcome this, to guarantee the key falls.
be a switch, double the fun :-)
User avatar
sweh
***
Posts: 235
Joined: 10 Aug 2017, 01:14
Contact:

Re: Electromagnet WiFi Release - Arduino like device

Post by sweh »

Hmm..

Code: Select all

    while(!client.available()){
      delay(1);
    }
That may have a failure mode where a client connects but never sends data. Now the loop() function won't move on and so won't test the tickOccured.

Also not sure how accurate your timing is; multiple ticks could occur in the "read from client" part, but it'll only count as 1 second.

Do you want a persistent connection, or should there be a client.stop() call to force close the connection?

I would recommend putting a secondary backup of having the power supply on a time switch, so if the ESP crashes internally with the relay locked then eventually you'll get to "powerfail" state... even if it's an hour later!

And also don't put the electromagnet above your head; you don't want it falling on you when the release happens!
lj
Moderator
Posts: 2255
Joined: 14 Oct 2008, 18:22
Location: East Anglia, UK

Re: Electromagnet WiFi Release - Arduino like device

Post by lj »

sweh wrote:Hmm..

Code: Select all

    while(!client.available()){
      delay(1);
    }
And also don't put the electromagnet above your head; you don't want it falling on you when the release happens!
excellent advice from sweh!

and why don't you put the electromagnet above you ?

because if your arms are above your head for a surprisingly short time (minutes) they will go numb and the muscles will simply "flop" when the release occurs :shock:
be a switch, double the fun :-)
OneAndOnlyOdin
**
Posts: 109
Joined: 31 Mar 2019, 16:00

Removed

Post by OneAndOnlyOdin »

Removed
Last edited by OneAndOnlyOdin on 12 Jan 2022, 13:26, edited 1 time in total.
RIP Odin - Odin was killed to make place for other things. This forum will forever be a part of Odin's soul.
Onwrikbaar
**
Posts: 95
Joined: 21 Sep 2018, 17:17
Location: The Netherlands
Contact:

Re: Electromagnet WiFi Release - Arduino like device

Post by Onwrikbaar »

Just as a suggestion, I would like to mention that if you can control a magnet to release a key, you can also control a magnet to release a limb :-)
OneAndOnlyOdin
**
Posts: 109
Joined: 31 Mar 2019, 16:00

Removed

Post by OneAndOnlyOdin »

Removed
Last edited by OneAndOnlyOdin on 12 Jan 2022, 13:27, edited 1 time in total.
RIP Odin - Odin was killed to make place for other things. This forum will forever be a part of Odin's soul.
Onwrikbaar
**
Posts: 95
Joined: 21 Sep 2018, 17:17
Location: The Netherlands
Contact:

Re: Electromagnet WiFi Release - Arduino like device

Post by Onwrikbaar »

OneAndOnlyOdin wrote:@onwrikbaar I agree that would be an interesting use case however I would suggest to use a different relais* . I assume the one used on the picture over at github might not be strong enough and could cause the ESP to burn out if the blind current gets to high. This might in turn result in you/someone to be locked up forever. I strongly suggest you talk to someone who understands electricity better than me to avoid that.

* The thing separating the circuit of the ESP from the circuit of the electro magnet to prevent the blind current of the electromagnet from destroying the ESP.
The 12V electromagnet in my picture uses only between 100 and 150 mA, which practically any relay will be able to handle. That said, I use a MOSFET, not a relay to switch the magnet.
And of course there's always a backup timer to eventually cut the power to the magnet in case of hardware or software failure.
Post Reply