Stay alert. Stay alive. Don't sleep in the subway...
Hopefully, you will never get into a situation when you need something like this, but if you do, use your foot to kick off the alarm unit and run away. It will activate and distract the perpetrator.
These small window and door alarm units are found at most dollar stores. They have a magnet in one part that when separated from the main unit, will cause the magnetic reed switch to trigger the alarm. The sound is actually quite loud...and enough to draw attention when you need help.
Step 1: The Little Bugger...
They do sell personal safety alarms where you pull a keychain pin to activate. In severe situations you may not be able to reach around to your backpack where you would probably keep the alarm so a more instinctive method would be to activate the alarm with your feet. Keep in mind all of the campus "Bluelight" emergency call kiosks. I must say some of the best schools are surrounded by "sketchy" neighborhoods but do your part to improve it instead of avoiding it.
I made this with a window and door alarm from the dollar store. I bought two since they were so cheap...but effective. Of course, I took them apart to see what was in them.
There is a magnetic reed switch mounted on the side of the alarm unit which is activated by the presence of a magnet in the plastic piece placed close by.
There is a loud piezo buzzer which sounds as the siren. I'm not sure what that transistor looking thing is which drives the piezo - inductor, switching transistor, transformer... or is it programmed in the chip to give that warbly siren sound.
But getting back to another reason I got two...always get one for backup when you are experimenting with stuff. I broke one maybe by flexing that magnetic reed switch too much. It seems like a normally closed switch and I was trying to see the microscopic gap when the magnet pulled it open.
Step 2: Getting Out of a Sticky Situation...
For the shoe mount you need just a small piece of sturdy fabric or leather. I actually pieced together some leather scraps big enough to form a loop to mount the alarm unit and magnet piece.
Use the foam mounting tape already on the magnet piece to position it on the mounting loop. I used an awl to punch holes through where the mounting holes are. Feed small tie-wraps through and secure.
For the alarm unit, I scraped off the mounting tape that was there and replaced it with some strips of the hook side of the velcro. Note that you will have to experiment with the amount of hook velcro to use to get the right feel of the alarm unit being secure without it getting kicked or snagged off too easily. I had that industrial strength velcro - so I only used one "row" of hooks. They were placed across the back instead of a long strip vertically - it wobbled that way and was easier to kick off going across.
Attach the loop/fabric side of the velcro next to the magnet piece on the mounting loop. That can be a big pad to cover the bare area which makes attaching the alarm unit in position easier.
Do a trial run of which shoe you will mount the alarm on and see where the magnet is placed so you can more easily kick off the alarm. You can now lace up your shoes with the laces weaving through the mounting loop.
Attach the alarm unit with the marks aligned for the magnet so it will work properly. There is some tolerance of the distance that the magnet has to be away from the switch to activate so you will see the flexible mounting loop and movement of the shoe will not impact operation of the alarm.
Step 3: Tamper Proof It...
To make it so that the unit cannot be turned off or disarmed easily when activated:
1. Drill a small hole in the end where the battery cover is. Put a small tight fitting/self tapping screw to secure the cover so batteries can only be taken out if you have a screwdriver and some time to fumble with it.
2. Cut off the knob/handle of the on/off switch. I was able to clip off the plastic knob with a pair of flush wire cutters. You would need to probe with a nail or pin to operate the switch when it is set way back in the recess.
1. Mod alarm unit to have a flashing light to attract more attention. I just did a quick voltmeter probe of what kind of voltage was driving the piezo disk and I don't think it was enough to just solder on a LED in parallel to make it work. You may have to go with a bare Attiny45 or Attiny85 to make a new alarm circuit with sound and lights.
2. Have a status LED for the battery level so you know it is good to go.
3. Use a long term 10 year lithum battery like they have on smoke alarms.
4. Create a more streamlined case and mount, maybe 3D print it. Make it more versatile by making it waterproof or weather resistant. Implement other break-away methods instead of using velcro hook and loop fastening. You would have to experiment with magnetic mounts to see if the alarm unit breaks away too easily causing false alarms.
5. Actually, buy a better magnetic window and door alarm unit for a more robust system.
6. This design works with laced up shoes. Make a clip on version to tuck into the heel or side of other types of footwear.
7. Make one for each foot for a dual alarm.
Don't do drugs. NO means NO. Stay safe.