Intro: Hidden Digital Audio Recorder: Hands Up, Don't Shoot
This project was developed to fulfill the requirements of the Products of Design MFA program at the School of Visual Arts in New York City.
It was conceived in the context of Becky Stern’s Making Studio class.
It seems impossible to turn on the TV, log onto Facebook, or check Twitter without hearing news of another person - usually a minority - being harassed or gunned down by the police for suspicious reasons. Making matters worse, police officers seem to enjoy impunity and tend not to be indicted - even in the face of reliable video evidence.
Despite this, additional evidence around dubious encounters with the police couldn't hurt. This project is an attempt to discretely give people the ability to record their interactions with the police, especially in instances when the situation escalates into violence.
EDIT: Because I've received a number of negative comments about this instructable, I wanted to clarify my position on the question of police brutality. My intention is not to cast each and every police officer in a negative light. There are many officers who go to work everyday and risk their lives in the line of duty - this instructable isn't meant to denounce their actions. At the same time, there are enough officers who abuse their power that it isn't just a statistical anomaly - there are systemic forces at work that unduly favor those in positions of power. I would also argue that because police officers are given more power to wield, they must be held to a higher standard. If one police officer out of every hundred abuses his power, as a society we must be extremely concerned about that one officer. Regardless of the circumstances around a single case, there exists a mountain of evidence that suggests that all is not well with policing in America, despite the hundreds and thousands of good people who are also good police officers. That is the reason this Instructable exists, and it is not intended as a wholesale dismissal of the good that good police officers can do.
Disclaimer: This project is not intended for breaking the law, make and use it at your own risk. This project involves working with electricity and soldering irons, and care must be taken.
Step 1: Materials and Tools
Materials Cost: ~ $70
1 MicroSD Card
1 10k Ohm Resistor
2 560 Ohm Resistor
1 Green LED
1 Red LED
1 Pair of Mitten/Gloves
Step 2: Gather Materials
Including the Adafruit Arduino IDE and SdFat Arduino Library. You'll need the IDE in order to upload your code into the Pro Trinkets.
Step 3: Download the Code
This project builds off of the work by Darren Yates for APC Magazine. The original project description and technical explanation can be found here. I modded Darren's code to be activated by a reading from an accelerometer instead of a push button.
You will need to load each code file into separate trinkets. The 1Ard_Accel code goes into the 3V Pro Trinket; the 2Ard_Accel code goes into the 5V Pro Trinket. This is important because the 3V Pro runs at 12 mHz, and the 5V Pro runs at 16 mHz. Darren's original code was written for the Arduino Uno, which runs at 16 mHz, and utilizes interrupt timers to sample audio accurately. Therefore we need to use the 5V Pro to sample all audio, otherwise the sample rate is messed up and voices sound tinny and high-pitched.
The code in 1Ard_Accel takes readings from the accelerometer, and in one specific orientation, directs the 3V Pro to digitalWrite HIGH to pin 4, which is connected to pin 4 of the 5V Pro. This is where the 5V Pro takes over. If pin 4 on the 5V Pro receives a HIGH signal for 5 seconds, the audio recording mechanisms are activated [this involves using timer interrupts in the microcontroller's logic chip, an in depth explanation of which can be found in the original APC article linked above]. The 5 second requirement is needed for debouncing purposes - to prevent the recording from being randomly triggered [on both a digital and a physical, human level].
Step 4: Prototype the Circuit
Because of the complexity of this circuit, it's an extremely good idea to prototype the circuit on a solderless breadboard prior to soldering anything. The accelerometer, when it is held in the portrait position and tilted back, should trigger the green LED to light and start a recording [a dim red LED will flash on the SD card shield during recording]. If no SD card is inserted in the shield, the green LED should flash. Try a recording, and check the quality. You can adjust the gain on the MAX4466 by turning a screw on the back of the amp.
A fair warning though - in later steps, I assemble the circuit in as small a way as I can manage, in order to make it easily concealable. If you use the headerpins that come with all of the components, and solder them to the components, it'll be harder to make your final circuit compact. I personally prototyped the project on an Arduino Uno and an Arduino Micro.
Step 5: It's Solder-time!
Because the final circuit needs to be as small as possible, and involves a lot of overlapping parts, it's important to solder in the right order. I personally started with the 3V Pro.
To start soldering with the 3V Pro, orient your accelerometer so that it lies on the top left corner of the 3V Pro, if the USB Port is facing to the right, almost touching the board. Take one piece of wire, strip the insulation, and tin it with solder. Solder this end to pin A5 on the board. Trim/Tin the other end of the wire to the length necessary to reach the accelerometer [and to the length that you're comfortable with]. Solder to the SCL pin on the Accelerometer. Do the same to connect pin A4 to the SDA pin. Connect the 3V pin to the VIN pin on the accelerometer. Connect the G pin to GND on the accelerometer. I soldered the 3V wire above the board, and the G wire below the board, but this could be up to personal preference [the picture shows both soldered below].
Trim/Tin wire and solder to pin 4, underneath the board [this time it's important]. Also tin/trim wire and solder to the BAT+ pin and the G pin.
Lay the 5V Pro immediately below the 3V Pro, in the same orientation [see picture for reference but please note that the bottom board is a 3V Pro in the picture, but it should be a 5V Pro in real life [I went through a lot of trial and error to get this working, so some of the process pictures are old]. Trim/Tin the other end of the wire that connects to p in 4 on the 3V Pro. Run this wire underneath the 5V Pro and solder to pin 4.
Solder the OUT pin on the MAX4466 to A5 on the 5V Pro, taking care to place the MAX4466 to the upper left of the 5V Pro, over the accelerometer. Solder wire to the GND pin, leaving the other end of the wire unsoldered for now. Solder VCC to the 3V pin on the 3V Pro. I snaked this wire underneath the board.
Place the SD card shield on top of the 3V Pro. Solder the CLK pin to pin 13 on the 5V Pro, the DO pin to pin 12, the DI pin to pin 11 and the CS pin to pin 10 so that the natural rigidity of the wires holds the shield slightly elevated above the 3V Pro [to avoid shorts]. Solder the GND pin from MAX4466 to the GND pin on the SD card shield. Tin/Trim another wire and solder it to connect GND on the SD card shield and G on the 5v Pro. Solder the 5V pin on the shield to the 5V pin on the 5V Pro. Solder the wire from BAT+ on the 3V Pro to the 5V pin on the 5V Pro, after running it underneath the 5V Pro. Solder the wire from G on the 3V Pro to the G pin on the 5V Pro.
Solder the BAT+, G and 5V pins on the LiPoly Backpack to the BAT+ G and BUS pins, respectively on the 5V Pro. I placed the backpack below the 5V board, and bent it up over the board after soldering to reduce space.
I soldered the LEDS and pushbutton onto a small rectangle of a soldering board. After doing so, I soldered the 560 Ohm resistors to the negative legs of the leds, and the 10k Ohm resistor to one leg of the pushbutton. I soldered the resistors together, soldered them to a wire that I ran to G on the 5V Pro. The positive leg of the green LED goes to pin 6 on the 5V; the positive leg of the red LED goes to pin 3. Solder a wire between the same leg of the pushbutton that got soldered to the resistor and pin 5 on the 5V Pro. The other leg of the pushbutton [I know pushbuttons have four legs; I'm referring to the other leg on the same side of the pushbutton] gets connected to 3V on the 3V Pro.
Attach your battery to the LiPoly Backpack and make sure everything is working.
Step 6: It's Sewing Time!
Remove any branding from the mitten pocket [to make it less flashy - this is optional].
Sew the mitten pocket onto the glove as pictured below. This isn't strictly required, but I didn't like how the mitten pocket was bouncing around on my gloves, and felt like this would disturb the circuit. I stitched it in three places for extra security.
It's up to you if you want to remove the interior lining of the pocket. I tried this out for one glove and found that it was a roomier fit, but that light was able to show through the pocket to the outside. This might not be a bad thing, but if you want to be discreet, the circuit is small enough to be concealed in a mitten pocket without removing the lining.
Sew velcro onto the upper lip of the mitten pocket so that you can shut it.
The circuit is placed into the mitten pocket so that the accelerometer is in the upper left corner. You might want to place it in a static-free bag before putting it in the glove.
Step 7: Further Development
When I developed this project, I really wanted to fit everything onto one board. It turns out, though, that the combination of the audio sampling/writing buffers and the libraries needed for the SD card shield and accelerometer used up more RAM than the Arduino Uno, or any variants thereof, could supply. I tried to use an Arduino Micro, which has more RAM, but the chip that the Micro uses lacks the timer that the audio sampling relies on in the Uno. Using C to alter a different timer on the Micro was beyond me, so I had to use two boards. I'd love to hear more about how to configure this code for the Micro! I'd also love to be able to add a video camera to the project, some element of waterproofing, and the ability to save multiple files and add metadata [like the date that the recording was recorded]. I'm totally open to hearing more ideas about how to house the circuit once it's complete.