SWHarden.com

The personal website of Scott W Harden

ECG Success!

⚠️ Check out my newer ECG designs:

I kept working on my DIY ECG machine (I had to change the values of some of the resisters) and it looks like I’m getting some valid signals! By recording the potential using my sound card (the microphone port seems to be a nice analog to digital converter that every PC has) I was able record my ECG with sound recording software, smooth it, and this is what it looks like.

This was based on a circuit I made using a single op-amp (A LM324 from RadioShack $1.49). The op-amp amplifies micro-potential generated by my heart and outputs it in a way that I can connect it to a microphone jack. The signal is very noisy though. I’m thinking about making the more advanced circuit (with 6 op-amps) to aim for a better signal-to-noise ratio, but first I’ll try coding my way out of the noise…


DIY ECG Attempt 1: Failure

⚠️ Check out my newer ECG designs:

I followed-through on yesterday’s post and actually tried to build an ECG machine. I had a very small amount of time to work on it, so instead of building the fancy circuit (with 6 band-pass filtered op-amps and diodes posted in the previous entry) I built the most crude circuit that would theoretically work.

I used just one of the 4 available op-amps from a LM324. I built this, hooked it up to my sound card, and made electrodes by soldering wires to pennies. After a good lick, I attached the pennies to my chest with tape and tried recording. Every time the pennies made contact with my skin, I would see noise on the trace, but I couldn’t seem to isolate a strong heartbeat signal. This is what I saw and the circuit I build to see it:

Perhaps this project will be working soon. Many techno-savvy people have made these DIY ECG machines, but not many describe how to interpret the data. Since I’m planning on building it, testing it, recording ECG data, and processing/analyzing it, I’ll may have something unique on the internet.


DIY ECG?

⚠️ Check out my newer ECG designs:

Last night my wife put her head on my chest while we were watching a movie. A minute or two later I felt a light sinking feeling in my upper chest, and my wife looked up at me in horror. “Your heart stopped beating!” I assured her that everything was okay (it quickly resumed), and that it happens all the time. I feel the sinking feeling often, know it’s because my heart is briefly beating irregularly, and assume it’s normal. After all, your heart isn’t a robot, it’s a living organ doing the best it can. It’s never perfectly regular, and presumably everybody has momentary irregularities, they just don’t notice them. When I got in bed I began wondering how regular irregular heartbeats are. What would the chances be that I have some kind of arrhythmia? I’ve had a checkup not too long ago by a family practice physician who used a stethoscope on my back to listen to my heartbeat, and he didn’t notice anything. Then again, how often does a quick listen with a stethoscope detect subtle or occasional arrhythmias?

I know that whatever problem I have is likely too small to cause any serious troubles, but at the same time I’m becoming obsessed as to determining exactly what my problem is. How many times a day does my heart skip beats? What about nighttime? If only there were some way to record heartbeat data, then I could analyze it and determine the severity of my problem. But wait, data? That would be hours of heartbeat recordings… that means… YES! An idea for a DIY hardware that produces large amounts of data requiring the writing of data analysis software!

Naturally, my thoughts began to overwhelm my reality as soon as Python entered the scene. I wondered how I could use my PC to record my heartbeat, without spending much money on hardware, and only using software I write myself. I pondered this on the way to work this morning, and came up with two possible methods:

Method 1: acoustic recordings. This would be the easiest way to record my heartbeat. I could tape a stethoscope to my chest, insert a small microphone in the earpiece, connect the microphone to my PC, and record sound data for several hours. Theoretically it would work, but it would be highly prone to noise from breathing, and I would have to lay perfectly still to avoid noise caused by movements. The data (trace) would have to be smoothed, processed with a band-pass filter (to eliminate interference), and heartbeats could be calculated. However, this would only give me heart beat time information…

Method 2: electrical recordings. This would be a little more complicated, but generate much more information. I could record the electrical activity of my heart, and the charts would look like the cool electrocardiograms (ECGs) that you see on TV shows. I did a little Googling and found that similar things have been done before with common electrical components. I think I’m going to follow the guide on this page and build the circuit seen below:

Supposedly, the data I can obtain looks something like the image below. I’d attach 3 electrodes to my body (chest, arm, and leg), hook them up to my little circuit, then connect to circuit to my PCs sound card. I’d record the trace (maybe while I sleep?) and analyze it with Python/Numpy/Matplotlib. There are several websites which demonstrate how to build DIY ECG recording devices, but none of these seem to go into depth _analyzing _the data they obtain. Hopefully I could fill this little niche on the internet. We’ll see what happens. I have my thesis to work on, and a whole bunch of other stuff on my plate right now.

UPDATE: I found an much simpler ECG circuit I can make from parts I already have at my house. It has tons of noise, but maybe I can filter that out somehow?


RF Circuitry Links

PSK-31 receiver - sports a crystal filter front-end and active receiver

Neophyte Receiver - old article based around an NE602 / SA602 / SA612.

602 Primer - old document but very good about SA602, includes method to estimate capacitor values for Colpitts oscillator mode.

Hans’ 30m receiver where he used an inverting gate buffer oscillator to generate 5v square waves which he fed into a SA602

Making Friends with the SA602 - an attempt at a write-up of the circuitry behind the Ramsey receiver kits (which only do 1 band each), although the manuals (example for 40m) may be useful

3.5-10MHz receiver - around a few SA602s, uses IF transformers too

30m receiver design - “The Limerick Sudden 30m Receiver Kit” based around a SA602/LM386 very simple and pretty

Sudden Storm Receiver - tuna tun style, check out schem a few pages in… sa602 + LM386 + crystal

Etching PCBs with hydrogen peroxide, vinegar, and table salt (wow!)

Morse.exe - A good way to learn Morse code!

High Altitude Balloon

Oscillator page which has a section mentioning that the 7th overtone can be used in an oscillator. The 7th overtone of 18mhz (17m) is 144mhz (2m) smack dab in the CW region. Nice!

Path prediction - note that UF is 29.642276 latitude and -82.344949 longitude

Icarus - a HAB project run on advertising revenue that seems successful and has launched many balloons with some awesome photos. Robert Harrison knows his stuff!

Project Space Planes - launches paper airplanes from 30km above the earth which glide down and land all over the world!

HALO project - very well documented HAB with pictures/video

JBOT - An SSB linear amplifier made from Just a Bunch of Transistors. It’s pretty straightforward, cheap, and converts 1mW input to 5W output.

harmonic oscillator

tuned oscillator example

overtone oscillator

amplifier design walk-through

Lessons in Electric Circuits - A very good (free) textbook. Anyone starting to learn about electronics should start by skimming over relevant chapters of this text!

1W CW transmitter kit - Although I don’t own one, I appreciate the kit and love the schematic. This guy uses a buffer chip (a 74HC04n, similar to a 74HC240 often used in QRP too) to act as an oscillator and small amplifier. The output is then further amplified by a 2n3866 transistor.

30M Solar QRSS transmitter - such an inspiring project! This guy uses a buffer chip (74hc245) to amplify the output of CKOUT of a microcontroller clocked at the transmit frequency. The thing is solar powered, and has a unique temperature compensation mechanism which uses the chip’s built-in thermosensor to adjust its offset. I haven’t seen this technique used anywhere else in a QRP transmitter!

HansSummers.com - Everything this man does is impressive! His QRSS section is wonderful, and I won’t detract from it by trying to describe it here. He also has a simple QRSS receiver circuit based upon a SA602, something I replicated (tuned front-end not shown) to operate my W4DFU QRSS Grabber at the University of Florida.

MOSFET “Switched Mode” Amplifiers - a wonderful document, read it multiple times! Transistors are traditionally used in many QRP circuits as amplifiers, but MOSFETs have some unique qualities which in many ways makes them easier to work with in simple circuits. I found this guide EXTREMELY helpful!

Amplifier design - a cool walk-through of the design of an amplifier with the math described every step of the way

IRF-510 QRP transmitter design which looks pretty interesting… Note that increasing efficiency lets the MOSFET run cool!

Similar IRF-510 transmitter I like as well….

SA602 as an oscillator - clever, clock with tank, mix with nothing, output (mixed?) is clock only!

JFET Rainglasz/Colpitts Oscillator Design which looks interesting

Misc

Battery info - useful for calculating life of batteries under load

Battery tests - tests common batteries at different loads to determine real (not optimal) amp hour ratings!

Filter design software I use for low pass filter design

Mini ring and core calculator very convenient for designing inductors with toroids or calculating resonance of LC networks

Knights QRSS Compendium - Live image feeds of QRSS grabbers all around the world, often situated at the QRSS watering hole of 10.140MHz

Knights QRSS Mailing List - Sign up for this mailing list to see who’s transmitting what on which frequency. People also often post photos of their transmitters, and interesting captures from grabbers that you may have missed!

Experimental Methods in RF Design - Only $32 on Amazon.com right now, this book is an amazing resource for anyone interested in building RF circuits. It goes from extremely simple transmitters, receivers, and amplifiers all the way through advanced topics, modulation methods, etc. It even describes how to build your own test equipment, and even how to use an oscilloscope and assess various stages of your transmitter designs. Flipping through the pages of this book gives me new ideas every time! I requested it many times from my university library (interlibrary loan, often came from Vanderbilt University) before I broke down and got it. I highly recommend this book!


Don't Yell at Your PC Like I Do

Summary: Your computer's hard drive can cause increased latency, which can slow down your computer's performance.
This summary was generated in 34.69 seconds from an original post containing 196 words.