Not joined yet? Register for free and enjoy features such as alerts, private messaging and viewing latest posts and topics.

Relay question for Raspberry pi

General off-topic chat.
User avatar
pvr
Lifer
Lifer
Posts: 5254
Joined: Fri Jul 30, 2010 5:13 pm
Location: West Sussex

Relay question for Raspberry pi

Post by pvr » Mon Dec 08, 2014 9:11 pm

Planning a bit of a project over Christmas to use a Raspberry pi with an ANPR camera to switch my gates when my plates are recognised.

Would this work to switch the two cables that are used for the intercom system now?

The wires are described as: "they require a pulse of a normally open, volt free contact to open the gates"

For the cost of the Pi and the connection to my LAN, it opens a lot of features of remotely opening the gates from my PC or iPhone, just some Christmas fun for the price of a single remote  :)
X5M F85,  Golf Clipper, Abarth 595 Competizioni, Jeep

911 50th anniversary -
Site & Forum Admin Team Member.

User avatar
X5Sport
Global Moderator
Global Moderator
Posts: 18776
Joined: Fri Sep 03, 2010 4:09 pm
Location: Planet X6......

Re: Relay question for Raspberry pi

Post by X5Sport » Tue Dec 09, 2014 10:25 am

If I'm reading this correctly, your gates use a 0v signal to open and a constant voltage on to remain closed yes?

Probably worth checking this with a meter to ensure you know how long the 0v 'pulse' lasts.

If all it needs is a momentary 'drop' then it should work.  If it needs a longer pulse then the Pi can no doubt be programmed to extend the 0v pulse length before returning the system to volts on again.

Richard
:ant: Never anthropomorphise computers. They hate that.

User avatar
pvr
Lifer
Lifer
Posts: 5254
Joined: Fri Jul 30, 2010 5:13 pm
Location: West Sussex

Re: Relay question for Raspberry pi

Post by pvr » Tue Dec 09, 2014 10:48 am

Not sure yet Richard, when I emailed the company that is what they emailed back.

There are two wires that used to be connected to the intercom system that failed after a couple of years. The replacement was quoted at about £2k so passed on that rather quickly.

Holding the two wires together is supposed to open the gate. Keep holding them together that is the time they will remain open.

So I am planning to have a pulse check first of say half a second to just open the gates after which they close after the normal time has passed. Then I want to test to open the gates for say 10 minutes (some people take forever to leave and I keep having to press the remote to keep the gates open as they try to close after 30 seconds or so normally).
X5M F85,  Golf Clipper, Abarth 595 Competizioni, Jeep

911 50th anniversary -
Site & Forum Admin Team Member.

User avatar
Steamyrotter
Snr Member
Snr Member
Posts: 1304
Joined: Sat Jul 31, 2010 11:06 pm

Re: Relay question for Raspberry pi

Post by Steamyrotter » Tue Dec 09, 2014 1:11 pm

Volt free meaning that the relay does not supply the voltage..

ie acts just like a normal switch between the 2 wires the gate control supplies....
If things were meant to be easy, then I will soon complicate them....
Please note...
Anything I say is only from my personal experience and knowledge..
I don't assume to know everything, and know there is a lot I don't know..
But then I could be talking bollox.. O:-)

User avatar
pvr
Lifer
Lifer
Posts: 5254
Joined: Fri Jul 30, 2010 5:13 pm
Location: West Sussex

Re: Relay question for Raspberry pi

Post by pvr » Tue Dec 09, 2014 1:13 pm

Ok, so I only need to have sufficient power to make the relay switch and once the contact has been made, the connection will be done and the gates will function without putting stress on the Pi.

Never worked with one before, but it is unbelievable what can be done with these things and for really no money what so ever.
X5M F85,  Golf Clipper, Abarth 595 Competizioni, Jeep

911 50th anniversary -
Site & Forum Admin Team Member.

User avatar
Steamyrotter
Snr Member
Snr Member
Posts: 1304
Joined: Sat Jul 31, 2010 11:06 pm

Re: Relay question for Raspberry pi

Post by Steamyrotter » Tue Dec 09, 2014 1:28 pm

Basically yes.
The PI will switch the relay coil (Via whatever circuitry to protect the pi GPIO circuits) which changes the state of the relay contacts.

These then provide the connection to the gate (ie simulates you holding the two wires together.)

My concern is that it may close on you when you dont want it...
Has your system got vehicle detection?  ie break beam sensor at the gates, or proximity detectors??
If not then i would propose you add them into the PI program.

PI s are great.
Been playing with one for a while, but nothing too indepth at the mo.
If things were meant to be easy, then I will soon complicate them....
Please note...
Anything I say is only from my personal experience and knowledge..
I don't assume to know everything, and know there is a lot I don't know..
But then I could be talking bollox.. O:-)

User avatar
pvr
Lifer
Lifer
Posts: 5254
Joined: Fri Jul 30, 2010 5:13 pm
Location: West Sussex

Re: Relay question for Raspberry pi

Post by pvr » Tue Dec 09, 2014 1:39 pm

The gates have all the security in place with 3 sets of beams that keep them open when you break them, so nothing changes.

It just adds to the existing normal remote controls, and as I had a stupid quote for the intercom replacement (£2k), I thought I would go for an alternative approach and have an excuse for some play time over Christmas which does not resemble my normal day job.

If I get it all up and running, the gate automation company is interested in looking at it so might be able to flog some of them.
X5M F85,  Golf Clipper, Abarth 595 Competizioni, Jeep

911 50th anniversary -
Site & Forum Admin Team Member.

User avatar
X5Sport
Global Moderator
Global Moderator
Posts: 18776
Joined: Fri Sep 03, 2010 4:09 pm
Location: Planet X6......

Re: Relay question for Raspberry pi

Post by X5Sport » Tue Dec 09, 2014 4:29 pm

[quote="Steamyrotter"]
PI s are great.
Been playing with one for a while, but nothing too indepth at the mo.
[/quote]

Let me guess, you're building your own DME/DDE and gearbox controller...... O:-)

Richard
:ant: Never anthropomorphise computers. They hate that.

User avatar
kjb1
Member
Member
Posts: 919
Joined: Sat Feb 01, 2014 12:30 pm

Re: Relay question for Raspberry pi

Post by kjb1 » Tue Dec 09, 2014 4:59 pm

bit of a security issue with anpr in that anyone who is aware of the system could easily knock a set of plates up etc?


Sent from my iPhone

User avatar
pvr
Lifer
Lifer
Posts: 5254
Joined: Fri Jul 30, 2010 5:13 pm
Location: West Sussex

Re: Relay question for Raspberry pi

Post by pvr » Tue Dec 09, 2014 5:36 pm

That sounds like a lot of work whilst they can just rip out the gates with a 4x4 if they so desired anyway ….
X5M F85,  Golf Clipper, Abarth 595 Competizioni, Jeep

911 50th anniversary -
Site & Forum Admin Team Member.

User avatar
X5Sport
Global Moderator
Global Moderator
Posts: 18776
Joined: Fri Sep 03, 2010 4:09 pm
Location: Planet X6......

Re: Relay question for Raspberry pi

Post by X5Sport » Tue Dec 09, 2014 5:55 pm

And you'll need extra locks if the system recognises 535dboy....... :P
:ant: Never anthropomorphise computers. They hate that.

User avatar
X5Sport
Global Moderator
Global Moderator
Posts: 18776
Joined: Fri Sep 03, 2010 4:09 pm
Location: Planet X6......

Re: Relay question for Raspberry pi

Post by X5Sport » Tue Dec 09, 2014 5:57 pm

[quote="pvr"]
That sounds like a lot of work whilst they can just rip out the gates with a 4x4 if they so desired anyway ….
[/quote]

Simple with a laser/inkjet printer.  Any word processor could get the text right.

A 'smart' tag would be better.
:ant: Never anthropomorphise computers. They hate that.

User avatar
535dboy
Lifer
Lifer
Posts: 5491
Joined: Sat Jul 31, 2010 11:38 am
Location: East Sussex

Re: Relay question for Raspberry pi

Post by 535dboy » Wed Dec 10, 2014 6:23 am

[quote="X5Sport"]
And you'll need extra locks if the system recognises 535dboy....... :P
[/quote]

I have a fob to get in anyway for those times he is away so i can service Mrs PVR.
Currently :
2012 Audi RS4 (B8)
2012 Porsche Boxster S (981)
2008 Lotus Exige S (a bit modified!)
2015 Nissan Leaf twin turbo with Nitros

Previously :
2008 BMW X5 3.0sd MSport
2005 BMW 535d MSport

User avatar
X5Sport
Global Moderator
Global Moderator
Posts: 18776
Joined: Fri Sep 03, 2010 4:09 pm
Location: Planet X6......

Re: Relay question for Raspberry pi

Post by X5Sport » Wed Dec 10, 2014 3:56 pm

[quote="535dboy"]
[quote="X5Sport"]
And you'll need extra locks if the system recognises 535dboy....... :P
[/quote]

I have a fob to get in anyway for those times he is away so i can service Mrs PVR.
[/quote]

Now you just need to hold up a print of his number plates...... :))
:ant: Never anthropomorphise computers. They hate that.

User avatar
pvr
Lifer
Lifer
Posts: 5254
Joined: Fri Jul 30, 2010 5:13 pm
Location: West Sussex

Re: Relay question for Raspberry pi

Post by pvr » Wed Dec 10, 2014 4:20 pm

Nah, he will be out of there again before the gates have even closed yet.  :))
X5M F85,  Golf Clipper, Abarth 595 Competizioni, Jeep

911 50th anniversary -
Site & Forum Admin Team Member.

Post Reply