Springo
Posts: 3
Joined: Mon Apr 02, 2018 3:22 pm

NFC lockers

Mon Apr 02, 2018 3:27 pm

Hello,
Im a beginner and i have some questions before i buy a raspberry pi, and i hope you guys can help.

I own a gym, and i need to build a smart lockers using raspberry pi and NFC readers on each locker.
The idea is the clients are going to use their phones to lock and unlock the locker.

My question is “is possible to make every phone control the locker for only one use?”
What i mean is it possible to make to phone lock the locker and when the client use his phone again to unlock the locker the raspberry pi delete all the data to make the locker able to be used by another client?

Thanks in advance

drgeoff
Posts: 10829
Joined: Wed Jan 25, 2012 6:39 pm

Re: NFC lockers

Mon Apr 02, 2018 4:55 pm

I expect it is possible in principle but:

1. How many lockers are there and how do you propose to interface the NFC reader(s) and locks to the RPi?

2. Have you considered the ramifications of the system crashing/not working? Client unable to get items out of the locker in a timely manner or items being stolen because the system was hacked.

3. That you are asking if it can be done suggests to me that you won't be able to figure all this out for yourself. Do not expect to get bullet proof, ready to run code from volunteer contributors here.

I think this is not a project for a self-confessed beginner. :(
Quis custodiet ipsos custodes?

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: NFC lockers

Mon Apr 02, 2018 5:04 pm

There are commercial solutions available.
e.g. https://www.vecos.com/locker-system/

What is your objective? Something cheap?
Most of the cost will be in electromechanical bit's NFC reader hardware etc.
You will have to work out how to power the door locks, how to connect all those NFC readers and so on.
Then there will be a non-0trivial task of mounting an electrical lock on every locker door.
How many lockers? It could be a lot of work.
How do you finih the installation so that it is secure and looks good? Injection moulded covers would give a nice finish but are not feasible fo a small installation.

Springo
Posts: 3
Joined: Mon Apr 02, 2018 3:22 pm

Re: NFC lockers

Tue Apr 03, 2018 1:53 pm

drgeoff wrote:
Mon Apr 02, 2018 4:55 pm
I expect it is possible in principle but:

1. How many lockers are there and how do you propose to interface the NFC reader(s) and locks to the RPi?

2. Have you considered the ramifications of the system crashing/not working? Client unable to get items out of the locker in a timely manner or items being stolen because the system was hacked.

3. That you are asking if it can be done suggests to me that you won't be able to figure all this out for yourself. Do not expect to get bullet proof, ready to run code from volunteer contributors here.

I think this is not a project for a self-confessed beginner. :(
1- maybe 10 lockers for each room (2 rooms), i don't mind connect 2 NFC readers to each RPi..

2- yeah, i was thinking about this issue and i think i can use a normal key to open the lockers.

3- ofcourse i don't expect anyone to do it for me, i just need the head marks/lines that gonna help me do this project.

thanks

Springo
Posts: 3
Joined: Mon Apr 02, 2018 3:22 pm

Re: NFC lockers

Tue Apr 03, 2018 1:58 pm

PiGraham wrote:
Mon Apr 02, 2018 5:04 pm
There are commercial solutions available.
e.g. https://www.vecos.com/locker-system/

What is your objective? Something cheap?
Most of the cost will be in electromechanical bit's NFC reader hardware etc.
You will have to work out how to power the door locks, how to connect all those NFC readers and so on.
Then there will be a non-0trivial task of mounting an electrical lock on every locker door.
How many lockers? It could be a lot of work.
How do you finih the installation so that it is secure and looks good? Injection moulded covers would give a nice finish but are not feasible fo a small installation.
yeah im looking for something cheap, and also looking forward for the expansion of my business so i prefer do it myself.
i need references to do it myself since im a begginer. (but im a good learner :) )

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: NFC lockers

Tue Apr 03, 2018 2:14 pm

Are you a beginner in all aspects o his task or do you have some expertise in some of it? It seems like a tall order to do something like this starting from scratch. You really could end up making a mess of your lockers.
At minimum I would you say you need professionally designed locking mechanism that is secure and reliable.
Maybe you should work that out, with mechanical fitment, door modifications, electrical wiring, finish etc then ask again for help connecting an NFC reader to that lock. Once the basics are known it gets easier to join the bits. What does the Pi (or other processor) have to control?

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: NFC lockers

Tue Apr 03, 2018 2:16 pm

Get a spare locker to experiment on so you can work out all the details without messing up your working lockers.

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NFC lockers

Tue Apr 03, 2018 5:56 pm

To add to drgeoff's list, you also need to consider power failure:
  • If power gets cut do the locks stay locked or do they unlock (or stay in their current state)?
  • How are you going to handle the potential for SD card corruption on an unsafe shutdown?
  • Will your locks remeber which phone unlocks them across a power outage?
Outside of this, there are probably issues for liability and insurance with a home brewed system.

I'd also consider the locker room in a gym to be a hostile environment for electronics. I'm guessing it has showers so your hardware will have to cope with the high humidity and with water splashes. Which also means compliance with electrical safety regs.

All in all, as others have said, while this is probably doable a comercial system will be easier.
Arguing with strangers on the internet since 1993.

User avatar
thagrol
Posts: 3178
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NFC lockers

Tue Apr 03, 2018 6:25 pm

A furthe though occurs: not every phone is NFC capable, and not everyone will want to take their phone into the gym with them.
Arguing with strangers on the internet since 1993.

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: NFC lockers

Tue Apr 03, 2018 8:39 pm

thagrol wrote:
Tue Apr 03, 2018 6:25 pm
A furthe though occurs: not every phone is NFC capable, and not everyone will want to take their phone into the gym with them.

That one is easily deatl with. NFC cards, tags and stickers are reasily available and cheap. Include NFC in a membership card and also allow a phone to be enrolled into the system as well.

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: NFC lockers

Tue Apr 03, 2018 8:58 pm

If you need to make your own lock mechanisms you could try using car central locking actuators. They would be fairly straightforward to interface, just as 12V dc motors on an h-bridge (but take a few amps)
and just give you push pull motion with quite a bit of force.
Cheap too.

Return to “Beginners”