The Code

To write the code, we first required the code which is needed to use the mpr121 breakout board. We got the code from this website:

We then changed the code around so that it can incorporate our use of LEDs, the button and the shocker that we made. To see the changes to the code, visit this gitlab link:

The changes we made were done in the mpr121.ino file given to us through the bildr website. The red rows were our deletions and the green rows were what we added to the code to make it work how we wanted.



The Finished Physical Design

When the vest is finished you should have the following outputs:

  • 8 LEDs
  • 2 Shock wires (Need both to be connected to one hand to be shocked)

The inputs on the vest are:

  • The targets (4 in our case)
  • The reset button

You can connect a power-bank to your Arduino Uno to power the circuit.

The Schematic Design

This is the schematic design to follow when trying to connect the Arduino Uno, the MPR121 breakout board and the modified shock gum toy.


There is also a push button included which is used to reset the LEDs when you have run out of lives. Pins 3 – 10 are used connected to the cathode of the LED and the anode is connected to a 220 Ohm resistor which is then connected to Ground. Pin 11 is used for the push button which is used as an INPUT so the function digitalRead will be used with it.

Also, as you can see the shocker has 3 ouput wires, two of the wires have to be connected to each other so that essentially you have two wires which will generate the shock. In the image below, the blue wire (OUTPUT A0, A1, A2) is connected to the pink wire. The brown wire is the standalone output wire. If both sets of output wires are touching each other, the shock will not work. Finally, the green wire is the Ground wire.


Shock Gum – Rewired

Changes to the Shocker

As we require a high current for a person to get shocked, we have to use three arduino pins as output pins as 1 or 2 pins do not provide enough current for a person to feel a shock. This is why we used the pins A0, A1 and A2 on the Arduino Uno as output pins for the shocker, so when the target gets hit, we use digitalWrite HIGH on all three of these pins.

Making and Linking Targets

To make the target we did these following procedures:

  1. Draw out the targets
  2. Wire up the targets connecting the target to the MPR121 board
  3. Tape over the visible wire using copper tape
  4. Place cardboard over the copper tape
  5. Tape over the cardboard with copper tape again

This allows the targets to be quite rigid so that the targets do not accept a crease in the vest as a hit.

The Shocker

The shocker was one of the hardest outputs to get running. At the beginning we decided to follow an instructables web link which showed instructions on how to make the ‘worlds smallest shocker’.

When buying a disposable camera, after opening it up, we found that our camera contained a 6 pin transformer when we required a 5 pin transformer, this left us stunted on what to do next. We then decided to find out other items that can give a shock.

This led us to buying a Shock Gum toy, we opened it up, rewired it so that instead of connecting to a battery, we can connect to it to our arduino kit, we then got rid of the pull function of the toy to make it work on touch.


After got the hits to work, we started with the first input are the LEDs. These LEDs are for the players lives, every time a player gets hit, each LED will switch off. Umar chose a design of a heart shape and have it placed on the chest. He came up with the idea as the player will understand what it is also it is visible to the players.

Each vest has 8 LEDs = 8 lives. Yellow vest has 2 green LEDs because we didn’t have enough red LEDs.

Solder it to the PCB board and added the resistors to the negative leg to each LED.

Targets with MPR

Started of by drawing the targets on the Hi vest. Thought about how many targets and the size. This is going to be connected to the MPR board so the maximum will be 12. We screen-shot-2016-12-07-at-14-59-34picked 4 targets and different sizes so that the player won’t get shocked easily.

Aftwhatsapp-image-2016-12-07-at-13-01-03er we drew out the targets, we connected the MPR board to the male legs and solder each leg together. By doing this we checked out if each component is working. Using the website which was provided by the lectures. Using this image we connected each on the breadboard and check through the 0-11 ports if works or not. Link:

WhatsApp Image 2016-12-07 at 13.01.03 (1).jpeg

The MPR board “is a capacitive touch sensor controller driven by an I2C interface. The chip can control up to twelve individual electrodes…” so with this when the missile hits the target, the board will read it as a hit. It works by touching it however we want it to touch with copper tape. It works!



  • 2 x Arduino Uno/ Nano
  • 2 x MPR121 Capacitive Touch Sensor Breakout
  • 2 x Disposable Cameras — Used but not what we wanted
  • 2 x Nerf Guns
  • 16 x RED LED’s
  • 2 x Buttons
  • 2 x Hi-Vis Vests
  • 2 x Power Banks
  • 2 x USB Cables
  • Copper Tape
  • Wires
  • Soldering Station
  • Hot – Glue Gun
  • Resistors

If you get use a disposable camera, please follow this link to make the shocker:

Changes we have made include a change from the LCD screens to LED’s, when opening the disposable camera, we got a 6 pin transformer instead of a 5 pin transformer therefore making us unable to make the shocker that was shown in the instructable. We are therefore looking for better alternatives to make the shocker.

At the moment, the only bit of the of the shock vests we have completed is connecting the mpr121 breakout boards, the LED’s and the targets so that when a target is shot, one of the LED’s turn off signifying that one ‘life’ has been taken away.

We have:

  • 2 x Arduino Uno/ Nano ✓
  • 2 x MPR121 Capacitive Touch Sensor Breakout ✓
  • 2 x Disposable Cameras ✓
  • 2 x Nerf Guns ✓
  • 2 x LCD Screens ✓
  • 2 x Buttons ✓
  • 2 x Optocoupler (Maybe)
  • 2 x Hi-Vis Vests ✓
  • 2 x Power Banks ✓
  • 2 x USB Cables ✓
  • Copper Tape ✓
  • Wires ✓
  • Soldering Station ✓
  • Hot – Glue Gun ✓
  • Resistors ✓

Bought the nerf guns from Argos and and hi-vest from Screw fit. We chose hi-vest is that it is cheap for a prototype and it is easily to take off and put on. With the guns we are going to modified it by putting copper tape on the bullets as when it touches the vest you will get shocked. Next step is to draw out the circuit online and on the bread board and see how we going to connect everything together.