We all have a heart. It beats to the tune of our lives, slow one minute and fast the next. When we are excited or stressed it runs fast and when we are relaxing it runs slow. It reacts to emotion and we tend to take it for granted, despite the life it pumps through us every day.
We affect our heart by what we see, what we consume and what we do. Listening to music has an effect on our pulse. The rhythms can transport us to imaginary worlds, calm a troubled mind and cheer us out of melancholy. Music makes our heart beat to its tune. The Pulse of the City plays with this idea. Instead of music affecting the heart rate; the heart rate creates the music. By holding the handles of the heart you can hear your own heartbeat and make music with it.
The handles pick up the electrical signals from your body. Once the heart rate has been measured it uses it to create a unique musical composition that plays to the rhythm of your heart.
This interactive heart has been built for the Bristol UK "BIG Green Week" festival that is taking place in June 2013. This is a fun project and it has turned out as hoped - an engaging interactive experience for the public!
The heart has two handles, these are grasped by a person to activate it. Electronics within the Heart then detect the small electrical signals generated by the human body to determine the individuals heart rate. The heart rate is then analysed by a computer (Arduino) which controls a MIDI synthesizer to generate rhythmic music and flashing LEDs in time with the persons heart beat.
Starting a design like this from the basic electronic component level would be rather challenging, it is far better to make use of existing boards that are readily available from internet sources. Not only does this save time but it also minimizes the number of problems encountered during the system development.
The complete Heart comprises:
1. ECG (EKG) amplifier as used in exercise machines
2. Arduino micro-controller
3. MIDI synthesizer board
4. LED drivers and 54 LEDs
5. Audio amplifier and speakers (PC speakers)
6. Power Supply
7. Heart shaped fibreglass case
The original San Francisco Heart was built by George Zisiadis and Matt Ligon for the Urban Prototyping (UP) festivals, these festivals are designed to connect cities and people together to help build good relationships.
The software for the Bristol BIG green Week heart has been rewritten and new features added whilst retaining the musical foundations of the original, the electronics has been substantially changed too, this is mainly increase the heart ECG detection reliability. The case has been built from fibreglass using a Helium balloon as the starting point!
Step 2: ECG (EKG) Amplifier
The SF UP Heart used the Olimex MOD-EKG board to pick up, amplify and filter the tiny electrical signals produced by the human heart. This board is ideal for the project as it uses 2 electrodes which can be connected to the UP Heart handles.
The design of this element is key to the project so buying a readily available board will save a lot of angst in getting a working design up and running.
An alternative to the Olimex MOD-EKG that has been tried is the Olimex SHIELD-EKG-EMG, this has the advantage that it is an Arduino shield and thus can be fitted directly on top of an Arduino board. Using the example software from Olimex it will output the ECG trace on the serial port.
I experimented a lot with the ECG signal pickup hardware and found a good product here that was used in the final system:
I simply connect the grab handles to the chest contact electrodes on the strap and it works fine. The radio receiver works off 5V and gives out a nice logic pulse that can be used to generate an interrupt.
The Grove strap (essentially the same as the Polar heart rate monitor products) picks out lower level ECG signals more reliably than the Olimex boards, it does take a few seconds seconds to lock on to the heartbeat though.
A key advantage of this setup is that the electrodes are just connected to the chest strap which is powered by a 3V coin cell, this isolates the operator from the rest of the electronics and thus enhances safety should the Arduino be powered from a mains connected power supply during software development.
Step 3: Arduino Board
This project does not need a particularly powerful processor so a Arduino board is fine. The software is quite greedy on RAM due to the way the music sequences are stored so an Arduino Mega 1280 or 2560 is needed. The software could be rewritten to use EEPROM for the fixed arrays then a standard Arduino Atmega 328P would be OK, but there was not enough time for me to try this!
There are plenty of online suppliers however I purchased boards from Cool Components in the UK.
Here is the software as a text file. Make sure you have all the libraries that are called up in the code already loaded in your Arduino compiler.
Step 4: Music Generation
The music is generated by the Fluxamasynth shield, this stacks on top of the Arduino Mega 1280 board to create a nice sub assembly with minimal wiring.
The Arduino software was initially lifted straight from the SF UP Heart project but needed extensive modification and debugging to work with the Grove chest strap receiver and Olimex LED driver board.
Step 5: LEDs and Driver
The LEDs need to be bright to be clearly visible under the Art studio lighting or sunlight if used outside. The Arduino output pins can only supply about 20mA and since there will be around 50 LEDs we need to use a buffer board than can switch a higher current.
Whilst browsing the Olimex website I came across this rather nice MOD-RGB board, it will easily drive the LEDs and has 3 outputs offering the capability to produce a more dramatic light display with RGB LEDs which contain Red Green and Blue LEDs, potentially permitting any colour to be generated.
A 1m LED strip was purchased from Seeed:
This strip was cut up into 18 sections of 3 LEDs each, then wired so that a radial pattern of LEDs could be created. The LED strips were then tacked into the case with small blobs of hot melt glue at the ends of each strip.
Step 6: Audio Amplifer and Speakers
It is hardly worth buying a separate audio amplifier board and speakers when there are so many Personal Computer speaker and iPod speakers sets available at such low cost. For example these speakers are a very reasonable £9.99 from Maplins.
This project used a redundant Dell PC speaker that runs from 12V and has a built in amplifier with volume control. This is one of the larger system components so the Heart casing will need to be sized accordingly or a smaller amplifier/speaker combination purchased.
Step 7: Power Supply
The heart will need to be battery powered for safety reasons and must operate for the whole day. The current consumption of the electronics has been measured as 0.2A when waiting for an individual to grab the handles and around 0.5A when playing music and flashing LEDs.
To operate for 8 hours we need a battery with a capacity of at least 0.5 x 8 = 4 Amp hours (4 Ah) for the case where it is used continuously, in practice the heart will be used intermittently during the day by passers by. It should last around about 20 hours if no one activates it. At random intervals the electronics generates a single heartbeat sound and flashes the LEDs red to attract attention - so it looks "alive".
Rechargeable batteries offer cost savings in the long term and permit the Heart to be charged up overnight so it is ready for the next day.
In the end I used 2 Sealed Lead Acid batteries, each being 6V and 4.2Ah, these were wired in series to produce 12V. Having two batteries made installation easier either side of the speaker.
A 2A slow blow fuse was put in the +12V line near the battery +ve terminal to protect against accidental shorts, and a 5A switch was mounted at the back of the case for easy on/off control.
A charge lead was also brought out of the back of the case to simplify connection to a charger, the positive lead was connected downstream of the fuse so that the charge socket is also protected against accidental short circuits.
An AccuMate charger is used during the night and ensures the battery is fully charged, but not over charged.
Step 8: UP Heart Case
The original SF Up Heart was build from a stack of heart shapes made from cardboard and then covered with car body filler. Though this worked well for a while, it did break when a child swung on the handles! Clearly if my Heart was going to survive for a week at the hands of the public it was going to have to be much more robust.
I looked on the internet for heart shaped cases that I could adapt but found none, so I came back to the idea of making the heart in glass fibre. If more than one UP Heart was to be made then it would be worth making a glass fibre mold first, but as this was expected to be a one-off I decided to make the heart in two halves over a former and join them together. Well the was the first idea, unfortunately the foam I decided to make the former from was dissolved by the resin so I ended up with a mess! Well you live and learn!
Whilst browsing for a birthday card in a local shop I noticed an array of Helium party balloons, one of them was heart shaped and just the right size! So for £1.99 I had a heart shape that could be used as a former to mold over with the glass fibre. This technique is similar to one I learnt in junior school, only back then we applied papier-mâché using glue and little squares of newspaper to an ordinary latex balloon, this was to create the basis for face masks for a school play.
I have used glass reinforced plastic (GRP) to make repairs to the bodywork of an old car, it is a very robust material and can be built up in layers to increase the strength as desired and so is ideal for making the heart case. The heart case needed to be reasonably strong, so in the end I opted for 2 layers of glass matting as I found 1 layer still flexed quite a lot.
The materials required for making the case of the heart are:
1 heart shaped balloon
1 square metre of glass fibre mat (enough for 2 layers both sides)
1 litre of resin (about 200 to 250ml per side per layer)
20 to 50 mils of catalyst
10ml syringe to measure out catalyst
mixing pot with 100ml marks
The resin and catalyst must be mixed together in the ratio 100:2 so for a given volume of resin 2% to 5% of catalyst is added. The higher the concentration of catalyst the fast the resin will cure. I used 1% catalyst initially for the first layers as this gave me about 30 minutes to apply the resin to the matting. Each layer needed about 200ml of resin.
The resin softens the red coloured paint on the balloons surface, but it does not attack the metalised plastic underneath so the balloon stays inflated. Clearly care must be taken not to puncture it until one layer of matting has been applied to each side, it is quite robust though!
I supported the balloon on polyethylene scrap packing material which is not attacked by the resin.
Splashes of resin become permanent so put down a thick dust sheet and newspaper to catch drips!
Glass fibres get everywhere and will cause irritation and itching if they get on your skin, always follow the manufacturers handling instructions for the resins and matting.