Gas station without pumps

2013 July 4

Blinky EKG hard to debug

Filed under: Circuits course — gasstationwithoutpumps @ 11:46
Tags: , , , , , , , ,

I’ve been having a frustrating couple of days trying to debug the Blinky EKG.  It worked when I first built it, but every time I’ve tried to demo it, the demo has failed, and I couldn’t get it working even at home on Tuesday.  I have another, very similar EKG circuit that I built on my instrumentation amp protoboard, which has worked fine every time I’ve tried to use it.

There are a few differences between the circuits (the blinky EKG is battery powered, for example, has an LED load on the final output, and has a trimpot for adjusting the gain of the second stage), but none that explain to me the difference in performance.

On Tuesday my experiments were limited to hooking up one or the other of the EKG boards and using an oscilloscope or Arduino data logger to observe the outputs or various internal signals.  Using the EKG board that worked convinced me that the EKG electrodes were providing a good 1mV signal (that had been a problem in the circuits course, as many students got EKG circuits that worked with electrodes on me, but no electrodes on themselves—we never figured out exactly why).  But I could not get anything from the blinky EKG—even the output of the instrumentation amp seemed to be constant.  I suspected that I had fried the amplifier chip, and was considering unsoldering it and putting in a new one.

Yesterday, I tried a different test, making an artificial input source, using resistors and my Elenco FG-500 function generator.

Test fixture for the EKG blinky board.  Note that with a 10V peak-to-peak oscillator input, the output would be a differential signal of about 1.8mV peak-to-peak.  The diagram was drawn with Digikey's SchemeIt.

Test fixture for the EKG blinky board. Note that with a 10V peak-to-peak oscillator input, the output would be a differential signal of about 1.8mV peak-to-peak. The diagram was drawn with Digikey’s SchemeIt.

With this test fixture, I convinced myself that the Blinky EKG board was amplifying the differential input signal correctly, over a range of about 1Hz to 40Hz, as long as the resistor for setting the DC bias was under about 300kΩ. Even with a 3.3MΩ resistor, I could see the output signal, but there was a fair amount of 60Hz noise added to it.  The gain was adjustable with the trimpot, but was high enough at all settings that I should be able to see EKG signals at the output clearly with the Arduino data logger—the gain control is mainly to get the LED to blink appropriately.

One effect I should have anticipated, but did not, was that the bias voltage showed a large change every time the LED turned on. If I redo the EKG Blinky design, I’ll probably use a voltage reference (like the TL431ILP) rather than just a voltage divider for the input to the Vbias op amp, and the LED will not be powered from the Vbias line.

In any case, the Blinky EKG board seems to be working as intended as an amplifier, and I’m still a bit mystified why it is not working when connected to the EKG electrodes.  About the only thing I can think of is that there is too large a DC offset between the EKG electrodes, as the Blinky EKG uses a large gain on the first stage and a relatively small gain on the second stage.  The DC-blocking high-pass filter is after the first stage. The EKG built on the protoboard used a smaller first-stage gain and larger second stage gain, so wouldn’t saturate the first stage as easily.  (I’d learned more about EKG electrodes by the time I’d designed that circuit.) I could fix the gains by changing a few resistors on the EKG blinky board, which may be worth the pain of unsoldering and resoldering resistors.  That may be worth trying today.

Note: I’m starting to use DigiKey’s SchemeIt for schematic capture, rather than Circuit Lab. There are a lot more symbols available in SchemeIt, and the user interface is fairly similar.  SchemeIt does not have simulation capabilities, but CircuitLab’s never worked for me anyway. SchemeIt’s  drawing is a bit cruder—they’ve not taken care to make sure that wires and components line up perfectly in the PNG output, but is better than Eagle‘s.  Best of all, I know how DigiKey monetizes their schematic capture system: you can turn the Bill of Materials (BOM) into a DigiKey order with a couple of clicks, so I have no expectation that they will start charging for SchemeIt.  I may even use the ordering capability in the way they intend, since I order from DigiKey fairly frequently already.

About these ads

1 Comment »

  1. […] my earlier post today about the Blinky EKG, I […]

    Pingback by Blinky EKG fixed | Gas station without pumps — 2013 July 4 @ 18:26 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 274 other followers

%d bloggers like this: