Goal: Create a safety alarm jacket that plays an alarming sound and bright lights when someone gets too close. The alarm will be set off by a sensor that goes off when a person gets too close. In the worst case, the alarm sound will disarm potential intruders.
Context: Sometimes when you are walking home at night it can make you a bit anxious since it is dark and you can’t see behind you. With this jacket users can feel safer walking home at night and know that their back is being watches out for.
Components:
Arduino Uno
DF Mini player
Speaker
Ultra Sonic Distance Sensor
Strip of Neopixel
Phase 1: Testing each component
To begin this project, I individually tested each component so I understand how they work individually before using them in tandem.
DF Mini Player and Speaker
In order to test the DF Mini Player and speaker, I found that there were various tutorials on youtube which I followed. Once I built the circuit, I realized that I did not have a Micro SD Card on me and realized that my computer had no Micro SD Card slot which was very frustrating. Because of this I had to run to Staples and buy both items. However, using the DF mini player was fairly straight forward.
Ultrasonic Distance Sensor
Next, I decided to test the ultrasonic distance sensor by wiring it up and testing ifThe sensor worked well and I noticed it was fairly accurate when I was waving my hand in front of the sensor and away from it. Video of the serial monitor getting readings from my hand.
Neopixels
When beginning this project, I was tasked with creating another output for my jacket and I decided to add lights which would also throw off an intruder. In order to decide what lights to buy, I looked up the brightest lights that could be used with an arduino and I found out about Neopixels which are also easily programmable.
After ordering the Neopixels, I realized I had ordered ones that needed pins soldered. So I bought another strip of neopixels which already had the pins connected and could be easily cut.
Phase 2: Combining all the components
Wiring
In order to begin wiring my project, I began making the simple connections. So connecting ground and power from my arduino the negative and positive on the breadboard. From there, I wired the DF Mini player and speaker, like the tutorial I had followed. Then I set up the sensor and the Neopixels. To double check my work, I used Arduino GPT, to confirm my wiring and add any suggestions. Following the Arduino GPT, wiring diagram, I added a 300k.
Final Wiring Diagram (Provided by Arduino GPT)
Ultrasonic Sensor
VCC → 5V
GND → GND
TRIG → D9
ECHO → D10
DFPlayer Mini
VCC → 5V
GND → GND
TX → D5
RX → D6
SPK1 → speaker +
SPK2 → speaker -
NeoPixels
Arduino D3 → 330Ω resistor → DIN
5V → 5V
GND → GND
Code
For the code, I went through several versions. I initially had my code generated by Arduino GPT however the sound and lights was not operating based on how I wanted. I wanted the sound and lights to go off when a person is detected within 100 CM ≈ 3.5 ft away the when a person walks away then the alarms stop. This is so the jacket can always be “on” but not go off too often. I also changed the code so the lights would flash red, once the sensor detects someone.
Power
For power, I went with a 5V battery pack since that’s the max the arduino could take and it was enough to power the project except the whole strip of neopixels. For the final project I included the amount of pixels the arduino could power.
Circuit Demo
Phase 3 - Sewing everything together
Prepping the components
Before beginning to sew, I chatted with my professor who gave me the idea to out the arduino and bread board along a backing so all the wires could stay together so I found some scrap plywood and hot glued the bread board and arduino to the wood to give me a stable base that could slide into the pocket.
Sewing
Next I laid out all the pockets on the inside of the jacket, where my arduino/breadboard would go and my battery pack. I also marked out holes where the ultrasonic sensor, speaker would go so I could cut out slits to sew them through the front of the jacket.
When I first started sewing the electronic pockets, I initially used a running stitch so I could sew the pockets faster however after testing out the battery pack, I realized that a running stitch was not strong enough and switched to a back stitch which was more time consuming but made a much stronger pocket.
Once sewed, I left slits open in the pockets so I could run wires through them as well
Electronics being laid out Pockets cut out and pinned down Electronics in pockets
Phase 4 - Final Testing
From here I put the battery pack into the jacket and hung the jacket on the back of a chair to test it. From here, I was happy with the audio and the sensor worked great however the whole strip of neopixels was not lighting up. In order to actually throw off an intruder I wanted the whole strip along the bottom to light up. To fix this, I talked with my professor and found out the issue was with my code which declared the number of pixels as 12. I then recounted all of my LEDs which came to 35 and the whole strip was able to light up.
Final Product
Final Considerations
If I were to continue developing this project, I would make several changes to improve the reliability and wearability of the jacket.
Change the arduino: I would change the arduino nano to a lighter weight more descript arduino like a lilly pad or a micro
If I used a lillypad, I would use conductive thread instead of cables.
Machine sew the pockets with a heavier fabric: For this project. I used fabric remnants which ended up fraying.
Change out the speaker: By changing out the speaker for a bigger one it would make the sound more intimidating
Change jacket fabric: Although this jacket was easy to hand sew through it was stretchy and gave me issues when trying to cut snug holes along the speaker and sensor.