Designing a lock mechanism for a fingerprint-activated wallet

Ask questions about projects relating to: aerodynamics or hydrodynamics, astronomy, chemistry, electricity, electronics, physics, or engineering

Moderators: kgudger, bfinio, MadelineB, Moderators

Post Reply
Papillio
Posts: 3
Joined: Sat Feb 25, 2023 6:40 pm
Occupation: Student

Designing a lock mechanism for a fingerprint-activated wallet

Post by Papillio »

Hello, I'm a Grade 12 student and for our project we are making a fingerprint wallet. Currently, our plan is to buy a separate fingerprint sensor which will be hooked up to some sort of mechanism that locks the wallet, but we are having trouble coming up with a way to make that mechanism in the first place. Ideally, it would be lightweight which limits our options quite a bit. Our group doesn't really have prior experience in engineering, so I'm asking here for some insights and ideas. Many thanks!
bfinio
Expert
Posts: 748
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Designing a lock mechanism for a fingerprint-activated wallet

Post by bfinio »

Hi - I would try searching for terms like "mini electronic lock," "miniature electromagnetic lock," "tiny solenoid lock" etc (try mixes/different combinations of those keywords). I searched briefly and for example I found this, which is only a little bigger than a quarter: https://www.adafruit.com/product/5065

Many of the results that come up will be intended for use with doors, which of course would be too big for a wallet - so be careful to check the actual size: https://www.sparkfun.com/products/15324

Is your group familiar with Arduino? If not, the very short story is that it's a programmable device that you can use to interface various sensors (like a fingerprint scanner) with outputs like motors, lights, speakers, locks, etc. If you search for "Arduino fingerprint scanner," "arduino fingerprint sensor," etc, you will find things like this: https://www.adafruit.com/product/4750

We have our own How to Use an Arduino page here: https://www.sciencebuddies.org/science- ... an-arduino

That will tell you how to get started and use basic inputs and outputs (like buttons and LEDs) with an Arduino. It would be up to your group to write a program to interface the fingerprint sensor with the lock.

Finally, the "normal" Arduino boards are pretty big and would be clunky on a wallet, but there are tons of tinier versions designed for smaller devices and wearable electronics. SparkFun and Adafruit both have various options.

Hope all that helps, please write back if you have more questions!

Ben
Papillio
Posts: 3
Joined: Sat Feb 25, 2023 6:40 pm
Occupation: Student

Re: Designing a lock mechanism for a fingerprint-activated wallet

Post by Papillio »

Hi Ben,

Thanks for the write-up! Sorry for not being able to reply immediately, was burdened by some real life stuff. Anyway, I looked into it, and our group decided to take your advice and go with a small solenoid lock. We still need to create some sort of hoop or whatnot for the solenoid to go inside in, and it's a little troublesome since we don't have a 3D printer, but we should be able to figure something out easily.

I also was able to procure an Arduino Nano, and it seems to be just the perfect size for a project like this.

That being said, it has come to my attention that one big flaw with our design is the lack of a failsafe mechanism which would be used in case one of the electronics were to fail. Since it's a wallet, it seems like a really big deal. I've contemplated some ideas, like adding a second lock that uses a physical key to open up the wallet, but none have seemed secure nor simple enough to implement. Was wondering if you had any ideas? We might be able to negotiate with our teacher if it's too complicated, and just state that it's outside the scope of our project as a last resort, but of course I'd rather make the device as perfect as possible.

Many thanks, again.
Papillio
bfinio
Expert
Posts: 748
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Designing a lock mechanism for a fingerprint-activated wallet

Post by bfinio »

Hi - I think you could solve this problem with the type of solenoid you select. There are different types of solenoids - "push" and "pull." This page provides an overview: https://www.newark.com/wcsstore/Extende ... enoids.pdf

If you select a "pull" solenoid, then by default it will be extended (i.e. your wallet will be locked) when the coil is not energized. That is much better for battery life, as you do not want to constantly power the solenoid to keep the wallet locked. You need to energize it to retract the solenoid and unlock the wallet. If the battery dies or the connection with the Arduino fails somehow, then the solenoid will automatically return to its extended (locked) state.

Of course, then you will be stuck with a wallet that's locked shut until you replace the battery or fix the circuit, but that's arguably better than the reverse case of a wallet that won't lock at all and is easier to steal from.

Hope that helps! Please write back if you have more questions.

-Ben
Papillio
Posts: 3
Joined: Sat Feb 25, 2023 6:40 pm
Occupation: Student

Re: Designing a lock mechanism for a fingerprint-activated wallet

Post by Papillio »

Hi! Thanks for the quick response again. I've looked into those types of solenoids, and we have managed to order one.

The complexity of the project is starting to really show itself to me. I've just recently learned about logic level converters which we will apparently need, the different libraries to download and code to study, etc. One thing I'd like to ask about is regarding the batteries.

So, firstly, the fingerprint sensor already occupies the 5V and Ground pins, which leads me to believe that the battery would need to be connected through the USB, unless if it's possible to connect multiple objects to a single pin?

Even more, the voltage needed to power an Arduino nano is apparently 7-12 Volts. The battery options we were considering were coin batteries and double A's. But, with further inspection, these only seem to provide 3 Volts and 1.5 Volts respectively. If we were to use a battery box, for instance, that houses 4 double A's, does that imply that the output voltage for that entire box is 6 Volts?

I'm also unsure about the coin batteries since the holders I've seen seem to house only one, and none of them have a USB port neither. As much as possible we'd like to avoid 9 volts or large batteries in general since the wallet should be as lightweight as possible.

Apologies for the rampant amount of questions! Hope it hasn't been annoying, but it's been fun learning more about electronics. I wish we had a better curriculum that actually taught us this stuff, but oh well.

Many thanks,
Papillio
bfinio
Expert
Posts: 748
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Designing a lock mechanism for a fingerprint-activated wallet

Post by bfinio »

Hi,

So, powering mobile Arduino projects is an interesting topic on its own. Unfortunately we don't have our own video on it yet, but I can try to explain here.

Most Arduino boards can be powered several different ways. Using the Arduino UNO (the most common/basic board, and what most of our tutorials are for) as an example https://store.arduino.cc/products/arduino-uno-rev3, there are three ways to power it:

1. Through the USB port from a computer or USB wall charger. USB ports are already at 5 volts, so this provides 5V directly to the Arduino.
2. Through the "barrel jack" connector (the cylindrical plug). This plug will accept an "unregulated" voltage between 7-12V. This lets it work with a range of different wall adapters, or a 9V battery with a barrel jack adapter like this: https://www.sparkfun.com/products/9518. This voltage then goes through a "voltage regulator" to produce exactly 5V on the Arduino's 5V pin.
3. Through the "Vin" and GND pins directly. Again this will accept a voltage in the range of 7-12V, so for example you could use a 9V battery with this type of adapter: https://www.amazon.com/Battery-Connecto ... 08SL9X2YC/ to plug it directly into the Arduino pins instead of using a bulkier barrel jack.

Now moving on to the Arduino Nano: https://store-usa.arduino.cc/products/a ... edStore=us

It does not have a barrel jack connector. So your options to power it are either the mini-USB port (which would already be 5V assuming it's coming from a USB source) or the Vin/GND pins, which would need to be 7-12V. You are correct that a 4xAA battery pack would give you 6V, so that's not enough for the Vin pin. You would need at least 5 or 6 AA batteries which would get pretty bulky. That leaves some other options, two of which you've already mentioned:

1. Coin cell batteries. I did a quick search and have also not had any luck finding a triple coin cell holder for 3x3V = 9V. However, I see a bunch of double holders like this: https://www.amazon.com/LAMPVPATH-cr2032 ... 07BXDHT4B/. You could wire two of those in series to get 4x3V = 12V total, then power the Nano through the Vin pin. One thing to be careful about here is that coin cell batteries are generally not designed to provide a lot of *current*. When picking a battery, you have to think about both the voltage, and the current required by the electrical load (in this case, the solenoid). In general, things like motors or solenoids use a lot of current. Coin cell batteries are more intended for providing a low amount of current over a longer period of time, for something like a watch or hearing aid. So they might work as a proof of concept here, but might not last as long as other battery options. That leads us to option #2.

2. Lithium batteries. These are generally pretty flat and compact so they are used a lot in wearable electronics projects. They can also provide a lot of power for their size, so they are used in things like drones where weight matters a lot. They are available in many different sizes: https://www.sparkfun.com/search/results ... um+battery. In general they only produce about 3.7V, so you would need to combine two or three of them in series, then again you could power the Nano through the Vin pin. If you search online you can find packs where the batteries are already combined for you to produce a higher voltage. Note that these batteries are rechargeable, so you need to purchase a compatible charger.

3. 9V battery and the Vin pins. This may be the simplest route to at least get things working initially. Depending on their size, if you have to combine two lithium batteries they could wind up being larger than the 9V battery anyway. But since they're flatter, you could put them side by side instead of on top each other, and then maybe they would fit into the wallet better.

4. Alternatively, you could use a USB power bank: https://www.amazon.com/s?k=USB+power+bank, also called a portable USB battery etc: https://www.amazon.com/s?k=portable+USB+battery. These are usually intended for use with phones and vary in size, but you could look for a small one that would fit in a wallet. The only problem here is that most newer phones have USB-C ports, so you'd need to find one that lets you connect a mini-USB cable for the Nano, or get an adapter. This would allow you to power it via the USB port instead of the Vin pins.

Ultimately - you should be able to get the rest of the project working as a proof of concept with any of these options. Evaluating which option is *best* for the final product would be a great addition to the project as part of the engineering design process.

Hope that helps!
Post Reply

Return to “Grades 9-12: Physical Science”