Introduction: Portable 3-lead Electrocardiograph
I am not a medical professional. Construct and use this device at your own risk.
In this instructable I will demonstrate how to make an electrocardiograph (EKG) for monitoring your hear rate via leads taped to your skin. The output will be used to switch an LED on and off with each detected heartbeat.
All circuit components can be found at Radio Shack. The total cost of this project is around $30.
Estimated completion time: 5 hours
This project may be too difficult for anyone unfamiliar with the operation of a multimeter and its use in basic troubleshooting of electronic circuitry.
- Biofeedback: Learn to manipulate your heart rate at will and monitor its reaction to your
thoughts and behavior. Wikipedia: Biofeedback
- Relaxation: Focus on bringing your heart rate down when stressed. The rest of your
body will follow suit.
- Decoration: Can be integrated into a costume. Pulsing Iron Man arc reactor anyone?
How it works:
This circuit detects and amplifies the electrical impulses generated by your heart with each beat. Your skin acts like a giant antenna, picking up a lot of noise and interference so a differential amplifier is employed to effectively cancel any unwanted input.
The differential amplifier has two inputs relative to a common ground. Any voltage that is common to both inputs will be effectively ignored while any difference in voltage between the two (i.e. the polarization of your heart muscles) will be greatly amplified.
I will be using this device for biofeedback and ornamentation so I will not be exploring all the complexities of an EKG output. However should you wish to see an EKG in all its glory, the output of the differential amplifier portion of this circuit can be connected to an oscilloscope and should permit you to see (untested) all the features one would expect. However, as a commenter mentioned one should never connect an amateur circuit that is connected to your body (particularly your heart) to your household power lines. If you wish to employ an oscilloscope use a battery powered device or take steps to electronically isolate the circuit from the oscilloscope.
I just want a device that blinks every time my heart beats. To give clean pulse I have added a monostable timing circuit to the differential amplifier output that turns the signal into a square wave with an adjustable width.
More information that may be helpful in understanding the details of this circuit can be found below.
Wikipedia: Differential Amplifier
Scribd: Monostable Timing Circuit (p. 6)
Step 1: Tools and Materials
NOTE:This instructable is separated into two parts, the circuit and the enclosure. You should have no problem acquiring the parts to make an exact reproduction of the circuit. However, I used a number of items I had laying around or that I pulled from broken equipment to make the enclosure. The enclosure has no bearing on the function of this device and is used only for ease of transport and cosmetic purposes. The techniques used to make the enclosure should be applicable to similar items. Using a small amount of ingenuity and you should have no trouble making an enclosure similar to or superior to mine.
Required For the Circuit:
Soldering Iron (Craftsman)
Wire wrapping tool
Lighter or Torch
Small Flat-head screw driver
Solder Weld (optional)
Wire - 24AWG
Circuit Components (all found at Radio Shack):
Super Bright LED
555 Timer IC
LM324 Quad Op-amp IC
2N3904 Transistor (NPN)
9V Battery Connector
(2) Dual position terminal blocks
Circuit Board (with sufficient space for you to work comfortably)
(4) 10 uF Electrolytic
(1) 100 uF Electrolytic
(1) 1 uF Electrolytic
(1) 47 uF Electrolytic
(1) 470 uF Ceramic
(6) 0.1 uF Ceramic
(1) 0.01 uF Ceramic
(2) 100k Potentiometer
Required For the Housing (optional):
Casting Resin (Alumilite)
Phillips-head screw driver (Craftsman)
Hot Glue Stick
Lighter or Heat Gun
Assorted Camera Parts or Metal Pieces (be creative)
Cargo strap like those found on a laptop bag
(2 Pair) Small Nut & Bolt
(3) Machine screws
(2) D-rings with clips
(4) Phillips-head screws
(4) Threaded Standoffs that can mate with the above screws
Step 2: Assembling the Prototype
The first step in building any electronic circuit for the first time should be assembling the pieces on a solderless breadboard. This allows you to
- Become familiar with the circuit
- Identify any malfunctioning components before they are soldered in place
- Facilitate populating your circuit board by having your components organized in a logical
- Troubleshoot problems in a less infuriating environment
PART 1: Get a Copy of the Schematic
Print out a copy of the schematic FIG 2 (B&W is all you need, so save your color ink)
Big version of schematic: Link
PART 2: Populate the Breadboard
Use the schematic to mount your components on the breadboard FIG 1.
Click this link for a list of schematic symbols. Link
Click this link for an overview of breadboarding (.PDF). Link
As you assemble your components on your breadboard use your marker on the schematic printout to trace the paths and components as you mount them. This will help keep you on track and prevent you from skipping something.
PART 3: Make the leads
There are a number of places online that sell self-adhesive electrodes but they are not necessary unless you are going to be using this as part of a costume or be doing a lot of moving around. You can see in the video in the last step how sensitive it is to movement.
To make you own leads, get three copper pennies. Ideally they should be untarnished but you can make any penny serviceable with some light sanding.
Solder each penny to a length of wire one meter or longer FIG 3. Make one of these leads unique in some way (i.e. use a different color wire or note the date on the penny). You will later want to be able to easily identify this lead as your ground. The other two leads need not be distinct. I used some solder weld from Radio Shack to attach the wire to the pennies. Dab a little on the interface between each penny and its wire and hold it over a flame until it bonds to both surfaces. The result is not pretty but it just saved you about $10.
PART 4:Prep for Testing
Connect your battery and your leads to the circuit mounted on your breadboard. Don't connect them to your self yet.
Proceed to step three.
Step 3: Testing the Prototype
-Are your electrolytic capacitors oriented properly?
-Are both ICs mounted the right direction?
-Is the LED oriented properly?
PART 1: The Poof Test
If you are satisfied that everything is connected properly then switch on the power to the circuit. Watch your circuit for a minute to make sure nothing is cooking. Smell will probably be your first indicator that something in wrong. Also, feel the back of your ICs. If they are getting hot disconnect the power immediately; they are connected wrong.
You will probably observe some activity on your LED but don't be alarmed if you don't.
Turn the power off.
PART 2: Bypass Second Stage of Circuit
It is easier to tune your circuit for the first time in two stages.
-Disconnect the wire that couples the transistor and pin 2 (trigger) on the 555 IC.
-Disconnect the anode of the LED from pin 3 (output) of the 555 IC.
-Directly connect the anode of the LED to the transistor (at the connection you just broke)
What you just did was bypass the circuitry that shapes the signal to give a cleaner LED pulse. The LED will now reflect the actual pulse detected by the differential amplifier.
PART 3: Attach the Leads
Turn the circuit on.
Connect the leads to your body with some tape. I tried several types including medical tapes but found that duct tape is superior to all others by far. A 3" by 1" strip should suffice for each electrode.
There are an infinite number of ways to connect the electrodes with each giving a different "picture" of your heart. I find the arrangement pictured below ideal for when you are making adjustments. Tape the ground lead on the left side of your lower abdomen and tape the other two leads below your chest muscle on your left side FIG 1.
PART 3: Tune the First Stage
Tune potentiometer labeled R12 in the schematic until you get the cleanest signal on your LED.
NOTE: If you have the leads on the same muscle they will pickup the electrical pulses generated by the muscle contractions. Hold that muscle group still or move the leads.
Count the number of times the LED flashes in ten seconds and multiply by six to get your detected-hear-beats per minute than compare that to your pulse to make sure your are registering your heart and not something else.
PART 4: Tune the Second Stage
If your LED is pulsing correctly, turn you power off. Reconnect the second stage of the circuit by:
-Reconnect the wire that couples the transistor and pin 2 (trigger) on the 555 IC.
-Reconnect the anode of the LED to pin 3 (output) of the 555 IC.
Turn the power on. Rotate the potentiometer labeled in the schematic as R14 until the LED strobes to your satisfaction. If your LED is too dim reduce the value of the resistor labeled R15 in the schematic.
NOTE: In the video you will see the LED stay on for a few seconds. This is because I have the leads attached to the same muscle on my chest and I accidentally flexed while moving the camera, temporary lose of contact between my skin and an electrode may also be a factor .
Proceed to step four.
Step 4: Assembling the Circuit
If you wish to make a housing similar to mine, complete Part 1 of Step 5 before continuing.
PART 1: Populate the Circuit Board
Arrange the components on your circuit board and solder them in place FIG 1 & 2. Do not clip the leads of your components shorter than 1/2" or you will have difficulty making connections later. It may be helpful to print out another copy of the schematic and check off the components as you install them.
Soldering Tutorial: Link
NOTE: If you get a circuit board with bus bars and carefully plan where you place your components you can drastically cut down on the number of wire connections you will have to make later.
PART 2: Wire Connections
Make the remaining connection with your wire wrapping tool FIG 3.
PART 3: Function Test
Connect your battery and connect your leads to their appropriate terminals.
Turn your circuit on and connect the leads to your body. You may need to tweak the potentiometers a bit but you should be getting the same clean LED pulse you saw on the prototype.
You are now finished building the circuit.
If you get to Part 3 and your circuit is not working correctly, try the following:
- Print out a schematic and go from component to component checking that each is
- Double check that your ICs, electrolytic capacitors and LED are all oriented properly.
- Check for cold solder joints.
- Use a multimeter to check for breaks in the circuit.
-Check the voltage level across pins 4 and 11 on the LM324 and pins 1 and 8 on the
Step 5: Assembling the Housing
PART 1: Secure the Circuit Board to the Enclosure
Attach your threaded standoffs to the circuit board and position it in your project enclosure FIG 2 & 3.
Mix enough casting resin to pour a 1/8" thick layer on the floor of the enclosure and pour it in FIG 4. Once the casting resin is fully cured remove the screws and the circuit board FIG 5.
Not only does this secure your circuit board to your enclosure, the resin insulates the leads from the enclosure's conducting metal surface.
PART 2: Build a Mount for the LED
The simplest approach would be to use an inexpensive commercial LED mount. I have four types pictured in FIG 6. These can be found practically anywhere that sells electronic parts: Radio Shack, Fry's Electronics etc.
I choose a more difficult route. I wanted to give my project a steampunk aesthetic, as it was already steering in that direction with the penny electrodes. So I dug into one of my junk boxes and gathered some old camera parts.
I first built a housing for the LED from the parts displayed in FIG 7. I placed the LED in the top hat like piece and filled it 2/3 full of hot glue FIG 8. I then cut out a piece of a ping pong ball just small enough to fit in the top hat and cover the LED FIG 9. Next I inserted an appropriate sized lens and screwed on the cap. This gave me a really nice looking diffused glow from the LED FIG 10.
I then found a three sided star shaped piece of metal that I though would look good affixed to the piece I just made. I placed the star piece face down in some modeling clay and placed the top hat face down in the center FIG11. I poured some casting resin in between the two pieces, firmly bonding them together FIG 12.
I also found a round metal plate that fit over the mouth of the top hat and would conceal the casting resin. Using a Dremel tool I drilled three small holes in the casting resin to accept the screws that would hold the plate in place. A drop of gorilla glue in each screw hole ensured the screws would stay put. The end result is shown in FIG 13 (I switched to a white LED too).
PART 3: Attach the LED Mount
Mark where you want to cut the hole for the LED mount. If the hole needs to be bigger than what can be accomplished with a drill bit, drill a hole big enough to accept the head of a nibbler tool and bite out the hole one chuck at a time FIG 14. Deburr and smooth the cutout with a file or Dremel tool.
Attach the LED mount to your enclosure with some machine screws FIG 15.
PART 4: Make an Exit for the Leads
Drill a hole in the enclosure to feed the lead wire through. For cosmetic purposes I used the aluminum LED mount in FIG 6 as a feed-through bushing.
PART 5: Add a Cargo Strap
Drill a hole in each side of the enclosure and attach the D-rings with two pairs of small bolts. Clip the cargo strap to the D-rings FIG 1.
The enclosure is now complete. Proceed to step 6.
Step 6: The Finished Product
PART 1: Finishing up
Insert your completed circuit into the enclosure and screw it in place.
Feed your leads through the top of the enclosure and secure to their respective terminals.
Attach your LED leads to their appropriate terminals.
If you used a metal enclosure as I did you will need to connect it to the circuit ground or else you will get a large amount of interference FIG 2.
Cut some scrap Styrofoam to keep your 9V battery in place.
PART 2: Awesomeness
Finalist in the
What Can You Do with a Dremel Tool?
Runner Up in the
Humana Health Challenge
Participated in the
Participated in the
Duct Tape Tough Contest
Participated in the
Craftsman Tools Contest