persianharry
Posts: 6
Joined: Mon Oct 14, 2013 8:08 pm

Electric gate open by ANPR

Mon Oct 14, 2013 8:28 pm

Sorry to post this as new to the forum, but I just wondered if someone could offer some advice?

My project is thus: I have electric gates at the end of my drive (off the shelf) and I intend to install a RPi at the gates with camera. The camera will be used for motion detection, and then when motion is detected a higher quality image is taken and passed to ANPR software. If a valid number plate is found in the picture it will be looked up in a list of plates and if it exists then the gates will be opened.

I'm a seasoned software developer, so most of the above is simple for me, all except the very last bit. I haven't done much with electronics since my childhood (and that's a while ago!) so I don't know where to start.

The electric gates' circuit board has two connectors that you can put a button on for physical opening, so all I need to do, presumably, is close this circuit momentarily from the Pi, but I'm guessing that I'll need some circuit protection in there? If anyone could give me some pointers on how to do this bit I would be very grateful. I haven't got anything in the way of breadboards or expansion boards so I really can start from scratch.

Thanks in advance...

pcmanbob
Posts: 2176
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Electric gate open by ANPR

Tue Oct 15, 2013 8:50 am

Hi.
if all you need to do is make a connection between the 2 contacts the simplest option would be a relay, it would also give you some isolation between the gate controller and the pi gpio pins.

some thing like this would be suitable
http://www.ebay.co.uk/itm/200712189000? ... 1439.l2649

you then have the option to drive the relay on for how ever long you need to and these relays will switch mains voltages if needed.
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information.......................no information no help

User avatar
simonmcc
Posts: 172
Joined: Mon Aug 19, 2013 10:07 pm

Re: Electric gate open by ANPR

Tue Oct 15, 2013 9:02 am

Yes, I'd also recommend one of those relay modules, then all the electronics are done for you, all you have to do is connect it to the correct GPIO pins, and write the software.

What ANPR software you intend to use?
simonmcc.blogspot.com/search/label/pi

persianharry
Posts: 6
Joined: Mon Oct 14, 2013 8:08 pm

Re: Electric gate open by ANPR

Tue Oct 15, 2013 9:24 am

Thanks to both of you, that's exactly the info I needed. Cheap too!

I'm using the javaanpr library to look at the number plates, once configuration is changed from Slovakian to GB plates it works pretty well, sometimes it confuses E and F if there's a bit of glare in the picture but I can allow for that in my list of allowable plates.

When I've got all this working I'll post some project details.

Thanks again.

User avatar
simonmcc
Posts: 172
Joined: Mon Aug 19, 2013 10:07 pm

Re: Electric gate open by ANPR

Tue Oct 15, 2013 9:35 am

Excellent, keep us updated.

Can I also recommend you buy some of these: http://www.ebay.co.uk/itm/251231182706 (or similar - I have no connection with the seller) For my first project I made my own cables from old motherboard wires, but for my second project I bought jumpers like these, and they make the wiring very tidy inside the box.

Also, be aware that the mounting holes in the relay modules are typically too small to get any sort of normal screw through, so you'll need to come up with some other way of mounting them in a box
simonmcc.blogspot.com/search/label/pi

persianharry
Posts: 6
Joined: Mon Oct 14, 2013 8:08 pm

Re: Electric gate open by ANPR

Tue Oct 15, 2013 9:54 am

That's an excellent tip, cheers, just bought some. Now I've just got to wait for these bits to come from Hong Kong!

Mekai
Posts: 19
Joined: Tue Jan 22, 2013 10:52 am

Re: Electric gate open by ANPR

Mon Jan 06, 2014 11:52 am

Hi Persianharry,

I am trying to do the same but with a garage door opener.
Can you unveil some of the software, my coding skills are rubbish :(

persianharry
Posts: 6
Joined: Mon Oct 14, 2013 8:08 pm

Re: Electric gate open by ANPR

Mon Jan 06, 2014 12:14 pm

Hi Mekai

to be honest I haven't finished this, I had to wait so long for the components to come from HK and then we were close to Christmas and I was very busy so haven't been back to it yet.

However, I did get the number plate recognition bit working. I used the JavaANPR library (http://javaanpr.sourceforge.net/) which has a bit of documentation and compiled first time for me. It worked fine with all of their test images, but not with my test images of our cars at home and I realised that the font on the UK number plates was quite different to the European ones in the supplied test images. I set to work and created a set of reference images of UK number plate characters and loaded this into the JavaANPR with some tweaked settings and that seems to work well now.

If you were interested in using the JavaANPR and you are in the UK I would be happy to send you over my UK number plate reference images and what settings I used etc. Just let me have an email address.

davisstew
Posts: 1
Joined: Wed Jan 08, 2014 2:16 pm

Re: Electric gate open by ANPR

Wed Jan 08, 2014 2:23 pm

Hi persianharry

I would love to get any information on your system when you have it. I have also been looking at doing a similar system but I am a total novice to RPI. Any diagrams pics you have would be great.

Thanks

gotojt
Posts: 1
Joined: Tue Jan 14, 2014 9:23 pm

Re: Electric gate open by ANPR

Tue Jan 14, 2014 9:29 pm

Hi PersianHarry

Would be awesome to get a copy of the UK plate images if possible? Can you post here or would you prefer an email?

Cheers!

dgallimore
Posts: 1
Joined: Tue Feb 04, 2014 3:50 pm

Re: Electric gate open by ANPR

Tue Feb 04, 2014 3:54 pm

I would also love those images - I want to do exactly the same. What OS are you using on the Pi? Does it boot straight into an app?

Thanks, Duncan

persianharry
Posts: 6
Joined: Mon Oct 14, 2013 8:08 pm

Re: Electric gate open by ANPR

Tue Feb 04, 2014 7:52 pm

Hi All

sorry I'm not very responsive to this, just having a bit of mare health wise at the moment.

I've attached a zip with the number plate images and the configuration files that I changed for javaanpr, you should be able to work out easy enough where each one goes. You probably need to get javaanpr to rebuild its neural network using the new alphabet, but that's all in the documentation.

Have fun!

Scrub that, seems I can't attach a file this big (even though it is tiny), so I've put it on RapidShare, here's the link:
https://rapidshare.com/share/09210DCBA2 ... 2A8B?bin=1

parham bahramsari
Posts: 16
Joined: Sat Apr 26, 2014 11:49 am

Re: Electric gate open by ANPR

Tue Apr 29, 2014 2:23 am

hi
im making one anpr right now you should use opencv library

sharpstuff
Posts: 1
Joined: Sun Jun 22, 2014 5:16 pm

Re: Electric gate open by ANPR

Sun Jun 22, 2014 5:22 pm

@persianharry Hi, if you are still happy to share your tweaked javaanpr for UK plates would greatly appreciate it, planning a similar project myself

Thanks in advance

lavinpj1
Posts: 12
Joined: Wed Jul 11, 2012 7:48 pm

Re: Electric gate open by ANPR

Sun Jul 06, 2014 5:22 pm

@persianharry - rapidshare link doesn't seem to work. Can you reshare your work on this?

persianharry
Posts: 6
Joined: Mon Oct 14, 2013 8:08 pm

Re: Electric gate open by ANPR

Tue Jul 08, 2014 8:58 am

Hi

sorry, I don't know what has happened to rapidshare, they now deny all knowledge of me!

Try this link instead:
http://jmp.sh/Us7zWR6

lavinpj1
Posts: 12
Joined: Wed Jul 11, 2012 7:48 pm

Re: Electric gate open by ANPR

Tue Jul 08, 2014 9:04 am

@persianharry - great! Thanks!

I've also uploaded it at http://phil.lavin.me.uk/downloads/javaa ... plates.zip for people of the future just in case the above link were to vanish.

Thanks for your help on this - just waiting for the ANPR camera to arrive and I'll let you know how it goes.

User avatar
Mortimer
Posts: 808
Joined: Sun Jun 10, 2012 3:57 pm

Re: Electric gate open by ANPR

Tue Jul 08, 2014 9:16 am

one question:
How are you going to protect yourself from some miscreant holding up a piece of paper with your VRN on it, and opening your gate/garage and gaining access?

lavinpj1
Posts: 12
Joined: Wed Jul 11, 2012 7:48 pm

Re: Electric gate open by ANPR

Tue Jul 08, 2014 9:25 am

It can never be considered as impenetrable security. We have a number of door entry keypad systems at work - most of them can be bypassed with a basic security screwdriver bit set and a 12v battery.

There's also little to protect against someone cutting the power to the electromagnetic lock that holds the gate shut or, indeed, taking the gate off its hinges.

Personally, I'd not protect something valuable with anything less than a good padlock.


Phil

User avatar
Mortimer
Posts: 808
Joined: Sun Jun 10, 2012 3:57 pm

Re: Electric gate open by ANPR

Tue Jul 08, 2014 10:59 am

lavinpj1 wrote:There's also little to protect against someone cutting the power to the electromagnetic lock that holds the gate shut
Depends if it is fail-safe or fail-secure.

User avatar
Cancelor
Posts: 743
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: Electric gate open by ANPR

Tue Jul 08, 2014 3:36 pm

Can the Raspberry Pi's own camera be used for APNR in the UK?
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

OSEIAS FERNANDES
Posts: 1
Joined: Sun Sep 14, 2014 2:31 am

Re: Electric gate open by ANPR

Sun Sep 14, 2014 3:40 am

persianharry wrote:Thanks to both of you, that's exactly the info I needed. Cheap too!

I'm using the javaanpr library to look at the number plates, once configuration is changed from Slovakian to GB plates it works pretty well, sometimes it confuses E and F if there's a bit of glare in the picture but I can allow for that in my list of allowable plates.

When I've got all this working I'll post some project details.

Thanks again.
I am working in a project using java anpr and I read the files that you changed !! I need some informations about the procedures to change the files Slovakian plates to brasilian plates. This files were manually changed? how do you trained the neural network for the new alphabet?

Ramases
Posts: 1
Joined: Fri Oct 24, 2014 6:36 pm

Re: Electric gate open by ANPR

Fri Oct 24, 2014 7:31 pm

Hi
I'm trying to get Javaanpr to recognise GB number plates without success
I've downloaded the zip file provided by PersianHarry, but I cannot figure out the next steps to install this.
Could someone help me
thanks

venkatkrish
Posts: 1
Joined: Tue Oct 28, 2014 11:57 am

Re: Electric gate open by ANPR

Tue Oct 28, 2014 12:13 pm

Hi Persianharry,

I am working with java anpr for android project. i got the source for android app from this site http://javaanpr.sourceforge.net/ and some resource files too . But i dont know how to use this code for a new android project. Can you please help me for this?

hari318
Posts: 1
Joined: Wed Oct 29, 2014 12:26 am

Re: Electric gate open by ANPR

Wed Oct 29, 2014 12:34 am

hi guys im new to the forum, and im really interested to build a electric gate opener by ANPR. Im very confidant with the electronic side with it, but im useless when it comes to te coding side of this project. Can some help me how to program the java code u guys uploaded in the forum into the raspberry pi and which connection to use from to raspberry pi to the relay, and also which camera you guys would recommend for this project.

And also i had an idea that every time the gate opens and closes it can log the date time and number plate into a spreadsheet form. Do you guys think that is possible?
I would really appreciate if you guys could help me

Reagrads Hari

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: hunty1980 and 19 guests