phoenixsilverbird
Posts: 10
Joined: Fri Jan 03, 2014 6:41 pm

Solenoid Locking Project - HELP

Tue Mar 25, 2014 8:22 pm

Greetings.
I apologise in advance if this in the wrong place, or this confuses you. I'm a relative newbie to any kind of electronics.

As a basic, starting project, I thought I'd make a face-recognition solenoid locking door, adapting from this easy tutorial:
http://learn.adafruit.com/raspberry-pi- ... x/overview

Since then, I've made a whole lot of annoying discoveries.

The plan was simple - instead of the servo mentioned in the adafruit guide, use the pi gpio pins to control a relay. The relay will control a 12V power supply to the solenoid.

The solenoid:
http://www.amazon.co.uk/Stroke-Force-Fr ... s=solenoid

Unfortunately, for some reason, almost all the relays online are only for 'DC to AC' and it still puzzles me how a solid state relay with an input DC and control DC can output AC voltage.

Still, I managed to find one (be it shipped from China, but I still FOUND it), which seems to meet my specifications:
http://www.ebay.co.uk/itm/DC-to-DC-Sing ... 43c0d8f1cd

My main question here is - will that relay fry or hurt my pi. The 'maximum up to' current is 25A, and the pi outputs much, much less than that.
I heard some suggestions of a transistor, but I really haven't a clue how they work or which ones to buy and how to work them.

I apologise if I'm being confusing, I'd really appreciate somebody pointing me in the right direction.

Thanks,
phoenix
Last edited by phoenixsilverbird on Tue Mar 25, 2014 8:34 pm, edited 1 time in total.

phoenixsilverbird
Posts: 10
Joined: Fri Jan 03, 2014 6:41 pm

Re: Solenoid Locking Project

Tue Mar 25, 2014 8:34 pm

Bump.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Solenoid Locking Project

Tue Mar 25, 2014 8:46 pm

Hi,
phoenixsilverbird wrote:My main question here is - will that relay fry or hurt my pi. The 'maximum up to' current is 25A, and the pi outputs much, much less than that.
One thing is switching current (ability, load side) the other thing is driving current (consumption, control input) of the relay.
Consumption current is much lower (this data is absent for SSR on your 3rd link).
phoenixsilverbird wrote:I heard some suggestions of a transistor, but I really haven't a clue how they work or which ones to buy and how to work them.
Maybe you could connect the relay directly... but to be on a safe side, you can use a circuit with a transistor to drive it (eg. http://elinux.org/RPi_GPIO_Interface_Ci ... transistor). By rising the voltage you would also get more reliable circuit.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Solenoid Locking Project

Tue Mar 25, 2014 8:51 pm

Hi,
phoenixsilverbird wrote: by phoenixsilverbird » Tue Mar 25, 2014 9:22 pm
by phoenixsilverbird » Tue Mar 25, 2014 9:34 pm
Bump.
O God, give me patience... but quickly...


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

phoenixsilverbird
Posts: 10
Joined: Fri Jan 03, 2014 6:41 pm

Re: Solenoid Locking Project - HELP

Tue Mar 25, 2014 8:55 pm

Thank you Ivan.
I am going to contact the ebay seller for more details.

Have you any idea why all the amazon relays are 'dc to ac'? They almost appear to CONVERT it from DC to AC.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Solenoid Locking Project - HELP

Tue Mar 25, 2014 9:01 pm

Hi,
phoenixsilverbird wrote:Have you any idea why all the amazon relays are 'dc to ac'?
I haven't noticed this in any description. Generally speaking, Amazon and eBay, etc. are not really product pages where you can get much usable (and reliable) data... I'm avoiding them.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

phoenixsilverbird
Posts: 10
Joined: Fri Jan 03, 2014 6:41 pm

Re: Solenoid Locking Project - HELP

Tue Mar 25, 2014 10:30 pm

After a lot more research, it turns out that some relays are simply configured for AC and some aren't.

I have no idea why the DC ones are only available from china and the USA though.


I'm awaiting a response concerning the ampere input for the relay.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Solenoid Locking Project - HELP

Tue Mar 25, 2014 10:38 pm

Hi,
phoenixsilverbird wrote:After a lot more research, it turns out that some relays are simply configured for AC and some aren't.
Are you talking about driving voltage ?
phoenixsilverbird wrote:I have no idea why the DC ones are only available from china and the USA though.
You should take a search on decent distributors' web pages instead of Amazon/eBay sellers. For example, visit http://www.farnell.com.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

ddahms
Posts: 67
Joined: Tue Mar 18, 2014 3:38 pm

Re: Solenoid Locking Project - HELP

Wed Mar 26, 2014 1:00 am

Most solid state relays use a optoisolator connected to a triac. The input is a few milliamps of low voltage DC (typically 3-32V) that just lights the LED in the internal optoisolator. The optoisolator output triggers the big triac that carries the large output current to the load. A triac conducts in both directions so it can carry AC current. In fact, it requires AC so it can turn off. The solid state relays with DC output use a transistor instead of a triac to carry the load current.

Both kinds are available from Digikey. Be wary of parts from dubious sources with sketchy datasheets.

phoenixsilverbird
Posts: 10
Joined: Fri Jan 03, 2014 6:41 pm

Re: Solenoid Locking Project - HELP

Wed Mar 26, 2014 11:06 am

I am unable to find a solid state DC relay from Digikey or Farnell in the UK.

The seller isn't dubious, it is in fact a business account with many sales and great reviews.
I'm awaiting reply on the activation current though.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Solenoid Locking Project - HELP

Thu Mar 27, 2014 10:50 am

phoenixsilverbird wrote:After a lot more research, it turns out that some relays are simply configured for AC and some aren't.

I have no idea why the DC ones are only available from china and the USA though.


I'm awaiting a response concerning the ampere input for the relay.
Hi

All the relay coils will work on AC or DC, however there are issues with heat and the metal core.

AC types generate a 'reversing flux' which is great for cooking, DC types are normally solid and don't like AC keep switching them around.

If you have an operating voltage and a meter to measure ohms then Ohm's Law will help. Also the inrush current is about 8 times the running current.

Looking at your original choice of solenoid...

Driving it with DC seems to be best, for only a second or so. It says it is 1 amp.

You need a power supply to operate it that can deliver just over 1 amp, and even add a capacitor to help with the 'inrush' requirements.

The Pi can drive an optoisolator that will power a transistor etc etc.

Now with electric gates you sometimes get a CLOSE command to OPEN them first, WHY?

The locking bolt is mechanically restrained by the force of the gates, and a 0.5 second CLOSE command then an OPEN command "jerks" the gates to help the locking bolt retract cleanly.

Your locking bolt may require a few seconds of energy to overcome the mechanical force applied by the door. IE: what works smoothly on the test bed, may snag in situ.

dmswjt
Posts: 2
Joined: Wed Sep 28, 2016 1:25 pm

Re: Solenoid Locking Project - HELP

Wed Sep 28, 2016 5:15 pm

phoenixsilverbird wrote: My main question here is - will that relay fry or hurt my pi. The 'maximum up to' current is 25A, and the pi outputs much, much less than that.
I heard some suggestions of a transistor, but I really haven't a clue how they work or which ones to buy and how to work them.
what a coincidence, I recently read a tutorial from Tony DiCola, and I think will use the solenoid, unfortunately I have difficulty in modify the software, I use this relay ..
https://www.amazon.com/SainSmart-101-70 ... lay+module
Image
could you please share how to modify the software for using solenoid and relay..

thanks in advance

Return to “General discussion”