Proximity-Sensing Pocket Squares

My friends and I like to coordinate for our mutual friends' weddings.  Our friends L & E got married recently and we wanted to do something special to mark the occasion.  We settled on something elegant and simple -- pocket squares that could visualize the number of people within a certain proximity.  For each pocket square I sewed 4 LEDs to a LilyPad Arduino and programmed it to display the number of other pocket-square-wearers present, using the XBee's RSSI data for coarse grain distance approximation.

In this Instructable, I will show you how to make your own set of proximity-sensing pocket squares.

I used the following materials per person:
• 1 pocket square (doesn't have to be silk--in fact, a more sturdy material works a little bit better to help retain the shape)
• 4 lights (I used white lilypad LEDs)
• 1 LilyPad Simple Board)
• 1 LiPo Battery
• 1 XBee (Series 1)
• 1 XBee Breakout board (I designed my own XBee Breakout for the LilyPad)

Step 1: Construction

To make the pocket square patch, cut out a small piece of fabric (I cut 4.5"x3.5"  to give myself some extra room).  Next, sew the plus side of each of the 4 LilyPad LEDs to an individual petal (PIN) on the LilyPad.  I used pins 5, 6, 9, and 10.  Lastly, using conductive thread, sew all the minus sides of the LilyPad LEDs together and connect to pin 11 (we will declare pin 11 ground using the Arduino software).

Good work!  Now you're done with the construction!

I designed my own XBee Breakout Boards that easily plug into the male header on the LilyPad.  You could use the Lilypad XBee Breakout and sew the boards back to back.
SeanY18 months ago

i dont understand what this does can somebody please explain to me?

quasiben (author)  SeanY18 months ago

Sure, a light is illuminated when it detects a neighbor within some proximity. For each neighbor, an additional light is illuminated up to 4

8 months ago

thanks, so 1 light is how many people? how many people does it take to illuminate 1 light? and how many to illuminate 4?

nerd74731 year ago

Cool!!!

napok3 years ago
I tried to build a similar project on the basis of jewellery but when I tried to put your code into the Arduino IDE there were lots of errors.
Can you help me?
#include <XBee.h>
#include <NewSoftSerial.h>
#include "FilteringScheme.h"
It doesn't find either of the above.
I know there is now the Softwareserial instead of the newsoftserial, but that didn't help.
Do I have to paste the other files (except the .pde) also in somewhere?
wakojako4 years ago
This is really loveley but what would be cooler is if you used binary to display how many people were there. mind I think only a select few would understand.
4 years ago
Well, you know what they say;
-There's only 10 kinds of people, those who understand binary and those who don't.
quasiben (author)  omnibot4 years ago
Exactly!
3 years ago
Could it be said that there are even 11 kinds of people? Those who don't know binary, those who do, and those who forget how to convert it in their heads?
4 years ago
Lol, you made an old programmer smile today.
4 years ago
This comment made my day.
4 years ago
You sound like Rat from "The Core"
4 years ago
hey hey whoo hoo I actually understood that joke. (epic for me guys)
ModMischief4 years ago
This is awesome.

My first thought: high-tech hanky code!
4 years ago
I've seen it before. Didn't have a CLUE that it meant anything. Thanks for the edu-ma-cation! :-)
Chakazuluu4 years ago
Hmm..possibly this can be used to attach to my keys & set of a buzzer when I get to far from them. I am always searching for my keys.
4 years ago
Triple-Like. This is genius! Maybe if I could use a Nano, cuz I hate big keyrings.
Rayney4 years ago
These would be great for a Con or some other crowded event! Depending on the range it would be helpful to find your friends.
quasiben (author)  Rayney4 years ago
The 1mW version of the XBee has a range of 300ft outdoors. The Pro line (60mW) can go up to a mile! I wanted the pocket square to only light when neighbors were close. If I didn't do this the lights would always be on.
4 years ago
Wow, I wouldn't need something with that kind of range unless I was going somewhere like DragonCon that ranges over several hotels in Atlanta.
quasiben (author)  Rayney4 years ago
Remember, that's 300ft outdoors where nothing blocks your signal. In doors, the range will be reduced; especially, with thick cos play costumes and humans inside of them
quasiben (author)  Rayney4 years ago
That's a great idea! You could have an LED array tied to distance for each of your friends!
4 years ago
Oooo, that would be great. It would be very helpful for someone like me, I am in a wheelchair and can't see over the crowds. Now I just wish I was savvy enough to actually make some lol
Sulaiman894 years ago
Wow that was a lot more complicated than it looks, impressive! What's the total price for each set and the individual prices for each part? Thanks
quasiben (author)  Sulaiman894 years ago
LilyPad Simple Board: \$20 Lilypad LED x4: \$4 XBee: \$19 Custom XBee Board: \$12 Pocket Square: \$5-65 (depending on material) Total: \$65 per Pocket Square (Assuming a \$10 pocket square)
4 years ago
So it would be cheaper if you sew your own pocket squares. Actually, you don't even have to sew them, my dad made some using an iron on binder stuff (like StitchWitch) and some fabric that was on sale. In that case you could make many of them for less than \$1 a piece. (Just the squares, not all the other stuff)
quasiben (author)  Rayney4 years ago
Yeah. You could possibly save on expense if you used a different wireless module, but that might introduce a whole new set of problems :)
brazell4 years ago
That rocks!!!
NaturalCrafter4 years ago
I really need to do a tech project. I love these ideas..Thanks.
imakethings4 years ago
good ...may be useful for security purposes!
maxiaxie4 years ago
whats the proximity on these bad boys? 5 metres? can you increase that?
porcupinemamma4 years ago
Totally out of my intellectual league. You must be so much fun as a guest at parties. Way to go!