Bar Owner Builds an Alarm That Stops You From Forgetting Your Credit Card
Released on 06/03/2021
This is the bar I've owned for the last two years.
While serving drinks and socializing is a pretty great job
do you know what the most frustrating part about it is?
When customers leave
but forget their credit card at the bar.
It's pretty much a lose lose situation
for everyone involved.
Wired has given me one week to figure out
how to stop people from leaving the bar
without taking their credit card.
[electronic music]
We're locked on and, it's gone.
By the way, I'm Mark Kleeb,
I'm a creative technologist based in Brooklyn, New York.
I've been building custom arcade machines
for local independent game developers.
In 2019 my wife and I opened Wonderville
a Bushwick based barn arcade
that's filled to the brim with those games.
There are three main goals I have for this project;
1, figure out the best locations tracking technology
to install at the exit of the bar,
2, to be able to determine
when someone is leaving without their credit card,
and 3, figure out how to somehow get their attention
and prevent them from leaving without it.
[electronic beeping]
So, here's the plan.
Once I determine the best technology to use
I'm going to install a locations sensor by the door.
Whenever someone opens a tab
I'll trade them some kind of locations tracker
then I'll program the sensor to only go off
when someone tries to leave the bar with the tracker.
I know some of you might be thinking
well, what if someone wants to go outside
to have a cigarette?
Well, we have a backyard, they can go out there instead.
Finally, when the sensor goes off
I want to build some kind of display
that does whatever it needs to do
to stop them dead in their tracks.
The first thing I'm gonna need to do
is figure out which locations tracking technology
is best for this project.
[mellow music]
I've narrowed it down
to three different types of technology;
GPS, Bluetooth, and RFID.
Let's start by taking a look at GPS.
So, this is an Adafruit Feather Microcontroller
with a GPS add-on and what this allows me to do
is use a computer to write code to basically use this GPS
to communicate with a satellite.
If I receive a transmission back,
I can determine my latitude and longitude
anywhere on the globe.
So, I plugged in the GPS module
and I brought up some example code from Adafruit
on parsing serial data.
So, I get the time, I get the date and it's accurate, right?
However, I'm not seeing latitude and longitude
because I have fix zero.
I'm not getting a fix
and that's probably because I'm in this windowless box
where I don't have any access to a satellite
so the next step is to go outside
and see if it works outdoors.
All right, I've got a fix 40.41 North, 73.55 West,
we're locked on.
We'll see if this works when I bring it inside.
Still got a fix and, it's gone.
I think the GPS is only gonna work outside
with a clear path to the sky
as soon as we come inside, we lose the connection.
I think we can safely rule out GPS
as a tracker for this project.
Now onto Bluetooth.
This is another Adafruit board.
This has a Bluetooth module built in
so what we're gonna do is program this
to be a Bluetooth beacon,
a device that emits a Bluetooth signal.
So, I can use a Raspberry Pi computer,
with a Bluetooth module built in,
to sense if there are any Bluetooth beacons in the vicinity.
I think this can work really well
because we can install the Raspberry Pi near the door
and, if the beacon gets close, it can trigger the sensor.
I've found some example code
to transform my Bluefruit Sense into a beacon.
This is a valid beacon packet,
so this is what's gonna be transmitted.
I'm gonna get the ID, the major and minor, and the vRSSI.
This is my received signal strength indicator.
So, I'm gonna need to set up a Bluetooth receiver
and take a look at the RSSI value
to determine how far away it is from the receiver.
Theoretically, I should be able to find a threshold number
where this is right under the doorway
and trigger the display when it hits that decibel level.
I've got my beacon already plugged in and working,
I've got my Raspberry Pi here,
let's run this code and see what happens.
[mellow music]
So, I've already got a beacon working, right?
And if I zoom in here you can see the RSSI is around -45
and so it's roughly, I don't know, 12 inches away.
The next thing I want to do is plug this into a battery
and see if I can get a wider range of signal strength
just so I can determine if this is a viable solution.
All right, I'm down here in the arcade
with my mannequin friend, Manny,
he's gonna act as my customer
with a Bluetooth beacon tracker.
Got him attached to a chair with a dolly,
I've got a rope that goes all the way up to my work bench
and we're gonna monitor the signal strength
as I pull him closer.
So, I'm just gonna tape this beacon
and I'm gonna pop upstairs
and we're gonna check out the RSSI.
Okay, so we got Manny as far away as he could possibly go
and we're getting an RSSI of about -90,
far more than we could get in the booth.
So, let's pull him closer
and I'm just gonna monitor this value
and just see how it changes.
80, -80, -78, -75, -77
and we're at about -75 so, we're getting about a change,
from right up to the Raspberry Pi we were seeing -40,
all the way across the room, -90.
So, I can kind of calibrate distance now
using this signal strength value.
So, Bluetooth works.
This beacon, I can detect when it's close,
I can detect when it's far away using the signal strength.
What I don't like about it is that it needs power
so I need to make sure the batteries are fully charged
and whoever's carrying this around, if this dies,
I lose track of them so, it isn't great for that reason.
If it came down to it, Bluetooth would work,
I could make this work, but I want to see how RFID goes.
RFID, radio frequency identification.
This is pretty ubiquitous.
If you've ever used the E-Zpass,
those things that are on clothes,
if you try to walk out with them.
So, what I've got here
is a SparkFun Simultaneous RFID Tag Reader
and it's attached to an Arduino Uno microcontroller.
The RFID reader will transmit on a certain wavelength
and when a tag is within range
it will receive a small amount of energy
from that wave length and transmit back,
and if it's within the range of the RFID reader
it can trigger the sensor.
This tracker isn't powered, this is just an antenna
and how it works is the RFID reader
transmits radio waves that travel through the air
and can magnetize and power this
to send a small signal back to the reader.
That's how we can identify where this tracker is.
So, I've got some example code here
that came from the SparkFun website,
and then I'm gonna pop open my serial port
and it says, Press a key to begin scanning.
All right, so there's no RFID tags in the vicinity
and, because it's five decibels,
I probably won't see anything from more than a few inches.
Let's see if I can get these both in the shot at once.
I have my tag up here, I'm gonna slowly bring it down,
closer, closer, closer, closer, and there it is.
So, I could see my tag data
when I'm within, maybe, about two inches of the antenna.
So, unlike Bluetooth, I don't get a range,
I only see the tag or I don't.
So, we know that this works from a few inches away,
if I want to extend the distance,
I'm gonna have to install an external antenna.
And we're done.
So, I've rerouted the antenna
to go out through this external antenna, which is gigantic
but hopefully will give me the range that I need.
Let's do a range test.
I'm going to go back to my same example
that I just used before and let's take this five decibels
and you know what, let's just double it.
We'll see what we get at 10?
So, I'm gonna upload this code.
If five decibels reads from two inches away
10 decibels should theoretically work at four inches.
Let's see how far away this will work?
I'm already getting values
right about here
and this is like 18 inches.
This must be reading on a logarithmic curve,
which means that the higher the power
the distance will increase logarithmically
rather than linear.
Let's go back to Manny
and we'll see if we can get this to trigger
only when he gets close to the antenna.
Same thing we did with Bluetooth, I've got an RFID tag here,
we're gonna stick it on Manny.
I've installed the antenna on the ceiling
and we're gonna pull Manny in and hopefully,
when he's under the antenna, I can track the tag.
Okay, we're gonna start scanning
and I'm gonna reel Manny in.
Right now we're not seeing anything
but hopefully, when he passes under the antenna,
we can see the tag.
And we got a tag.
As soon as Manny passed directly under the antenna
I got a tag to show up so this is still pretty far away,
but it will work.
We'll just have to recalibrate it when it's above the exit.
Out of the three,
I think RFID is the most promising for this project.
The tags are just a piece of paper, I could afix them
to something that the person can wear or carry with them
and it seems to work from many different distances.
So, I'm gonna go with RFID now I just have to refine it.
Next up, I'm gonna start working on the display.
So, here's my plan
on how I'm going to get people's attention
when they leave the bar.
This is the door to the bar, I'm gonna install a sign,
gonna kind of look like a stop sign
that's gonna attach to the door
and it's gonna say, Close your tab.
And I'm gonna line this with LED strips
so if they try to leave, the RFID will go off,
it'll a light up this sign
and they'll see it before they leave.
I also want to have a sound component
so I'm gonna install speakers on either side of the door
and we're gonna play some sort of alarm
so that they know something is wrong if they try to leave.
Okay, so I designed this file
and my intention is to cut this out of plywood
on a CNC machine.
So, I made it in the shape of a stop sign.
Because it's being cut out of wood
I needed to use a font where everything would be attached
so that none of the letters would fall out.
I'm here with my CNC machine.
So, a CNC machine is a computer controlled cutter.
I've got a wood router attached to these motors
and I can take the file that I designed
and it will cut it out of a sheet of plywood.
So the router, I'm gonna turn it on
and it's gonna move on the X and the Y and the Z axis.
It'll look at my letters, it'll cut them out
and then it'll lift off and move to the next letter
and it'll do this in a couple passes
so it's not too heavy on the router bit.
Once the CNC machine finished, I sanded the sign down,
cut out some wood strips and glued them to the back.
My plan is to attach LED strips to the back of the sign
so the wood strips are there as a place to afix them.
It also creates some distance between the door and the sign,
so the lights can illuminate
and, finally, I added some diffusion on the front.
I don't want people to be able to read the sign
until it lights up,
so the diffusion will help to hide the letters.
So, after some testing, the LED strips
weren't really shining as brightly as I would have hoped
and you can't really read the letters so instead,
I'm gonna go with this super bright LED panel.
Yep, so this is gonna look a lot better
when it's mounted over the exit and it's a little bit darker
but here's the final display.
Now onto the speakers.
So, I wanted to play a really jarring sound
when someone tries to leave the bar
so I did a little bit of searching online
and I think I found the perfect one on.
[electronic siren beeping]
So, I put the siren sound on this MP3 player
which is plugged into this amplifier
which is then plugged into this speaker.
So, I have the siren playing on a constant loop
but you can't hear it because the amp is turned off.
This means that when someone walks under the sensor
with the RFID tag,
all I have to do is program it to turn on the power and.
[electronic siren beeping]
All right, got the display finished, got the speaker set up,
so now all I have to do is get everything working together.
[mellow music]
So, I found some code that plays a sound on a buzzer
when an RFID tag is near.
So what I did was I added an LED
because I figured if I can play a sound on a buzzer
I can also turn an LED on.
I commented these lines out
because I don't need the buzzers anymore
but I added this line of code that just turns an LED on
when it searches and finds a new tab.
So, if I start scanning
and I bring an RFID tag close to the antenna,
I can turn on the LED.
Now that I know that it works
I'm gonna replace the LED with a power relay.
So, a power relay is essentially a power strip
but it has an input for a five volt on-off switch
that I can control from the Arduino.
So, similar to how I can turn the led on and off,
I can turn on and off this power strip.
So I've plugged my display and the amp and the speaker
all into the power relay.
When the RFID tag gets close to the antenna
let's see what happens.
[electronic siren beeping]
So, I've programmed everything to turn off after 10 seconds,
so we don't have a constant siren going off,
this also will reset the code back to its original state
so we can keep scanning for more tags.
Next, I need to work on
how I'm gonna actually hand the RFID tag to a customer
when they open a tab.
So, I've got these cool snap bracelets from the '90s
and I was thinking I could attach the RFID tags to these.
So I put one on and check this out.
The sensor is no longer recognizing the tag.
Next I got these paper wristbands,
but these didn't work either.
I did a little bit of research
and I think I discovered the problem,
we're using ultra high frequencies for RFID transmission.
Inside the snap bracelet is a piece of metal,
metal interferes a lot with wireless transmission
so if you attach the RFID tag to this
it's not gonna read very well.
Similarly, on the paper bracelet,
the human body is mostly made up of water
and watery objects also cause a lot of interference.
So unfortunately,
neither of these is gonna be a great option.
So, ultimately, the solution that worked
was taking a little bit of foam
and creating some distance between the RFID tag
and the paper bracelet.
This foam is about an eighth of an inch thick,
it's adhesive, so it was really easy to attach,
and it works perfectly.
If I was gonna actually implement this in the bar
I'd probably have to come up with a more elegant solution
but since tomorrow's my last day working on this project
this will have to do.
[deep electronic music]
Okay, so the installation is pretty much done,
all that I needed to put in the exit are the speakers,
which I mounted here,
the antenna, which is right over the doorway,
and the display, which is hanging on the door.
I had to find a pathway to outside of the exit
so I could run all the speaker wires, the antenna cable,
and everything to this wall
where I've got the actual RFID reader, the power relay,
the amplifier, the ipods, and the power for everything.
So, now that we're installed
all I need to do is fine tune the range of the antenna
so that when someone walks toward the door
everything goes off at exactly the right time.
After testing it out, I think 15 decibels
is what we're gonna go with as far as the range.
The sweet spot to trigger the sensor is right about here,
just before they walk out the door.
Range is set, everything's installed, I got my wrist band,
I think it's finally time to give this a shot.
Let's go.
[dramatic music]
[electronic siren beeping]
[dramatic music]
[electronic siren beeping]
So, I think it's working pretty well.
It's going off at exactly the right time
just before they exit the door, the lights are going on,
the sound's going on and, you know,
it works exactly as I would have hoped.
So the true test is gonna be to try this out on someone
who doesn't know what's coming.
[intense music]
[plastic rattling] [electronic siren beeping]
So there we go, I think we can safely say
no one's going to leave the bar
and forget their credit card.
Overall, I'm pretty happy
with the amount I was able to accomplish in just a week.
In terms of practicality, I'm not sure this is something
I'm gonna install longterm.
The alarms are a little jarring
and I don't want it to seem like someone's shoplifting
but I think it's a cool experiment and I think the customers
are gonna have some fun with it.
I had a great time building this project,
it was really fun to work with the different technologies.
Maybe everything didn't go exactly as planned
but that's part of the process and part of the fun.
[synthesized dinging]
Bar Owner Builds an Alarm That Stops You From Forgetting Your Credit Card
Building a Compass That Finds Pizza
Video Game Microwave That Only Cooks While I Play
Wow! Haha! Angry! Facebook Finally Has Emoji Reactions
App Pack | Meditation Apps to Help You Stay Sane
Unlocking Alzheimer’s: Transforming Diagnosis Through Biomarkers | WIRED Brand Lab
Beauty and Tech Blend at CES | WIRED Brand Lab
How Vinyl Records Are Made (with Third Man Records)
A.I. Expert Answers A.I. Questions From Twitter
Inflection Point: Building Trust in Emerging Technologies | WIRED Brand Lab