Sweat monitor using electrodes.

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I've much to say too but just got home from the annual engineering department picnic and I'm toasted!

Chris
 

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

I have spent the whole weekend on this project. I have taken some of your advice and adapted the audio heart rate monitor. I have instead replaced the Miniature Piezo Transducer with two copper electrodes. ie two copper coins soldered to wires. I have upped the gain on the OP amp by using a 1M and a 1K resistor in the first amp. (1+1000/1)=1001. This is then multipled by 101 in the second amp. The electrodes aren't the best! but they do work. I placed one on my chest just below and towards the left of my heart and the other 6 inches to the right and 4 inches higher on the right side of my chest...(why? because this is where I saw them placed on ER!)

The result.....it works. The LED dims and lights in time with my heart beat. There is also a second slightly smaller pulse after the first large pulse. It did take some time to get a result as at first I didn`t have a resistor from the top electrode to ground. (R8 89K) It did take a lot of trial and error. The battery voltage is also significant and has to be 5V.

I do believe that now I have an electric pulse significant enough for the picaxe to work with. However,,,there is room for improvement in the pulse as although the light dims and brightens with a heart beat it doesn't go completely out between beats. Do you have any suggestions or maybe, do you think the scope will help here and how?

Regards

Justin
 

Attachments

  • ECG  HEART RATE MONITOR.JPG
    ECG HEART RATE MONITOR.JPG
    27.1 KB · Views: 199

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
OK, it took me a bit of time to figure out what's going on in your schematic because you said the LED is lit but dims with the beat of your heart. The way your amp is wired the LED should be off and turn on with each beat. I believe the reason it's lit is do to noise.

The human body is like an antenna. It picks up the Mains radiation in your home and will feed through your amps as an 50Hz AC signal. When you get your scope you'll see this phenomenon quite clearly. In fact, your scope will be so sensitive that you will see this 50Hz hum just by touching the probe.

Justin, I want you to Google "Differential Amplifier". OpAmps are naturally Differential Amplifiers but most circuits that you'll encounter are not configured as such, including your amp. The theory of DA's is very important when dealing with minute signals and ambient noise.

Also, you'll get much better conductivity if you spit on the coins prior to applying to the body. They make conductive medical gel for this and you can buy electrode pickup pads too.

By the way, I think I'm as excited about your new scope as you are! Let me know if you get a woody when you open the box. :D

Chris
 

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

Thanks. I will let you know all about the scope when it arrives.;)

I have had a read about differential amps and I can see (I think) how it could be use to improve the signal. IF I feed the op amp with energy picked up from the electrodes, will this improve things,,,is this how you think I should use the amp.

At this stage, I think I am going to wait for the scope to arrive, maybe I will be able to tweak the signal with some more capacitors. What do you think?

I also think that only you and I are subscribed to this thread so I am going to start a new one later and maybe that will help to draw in some input from other forum users. So please have a look out for the new thread.

Regards

Justin
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
When you get your scope you will clearly see the noise. I'll then show you how you can reduce the noise with a length of wire connected to the inverting input of the OpAmp. BTW, the 318 is not a single ended OpAmp.

Chris
 

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

Tension is building here and even my daughter who is only 2, knows something exciting is on its way in the post!!

I feel I should know what you mean, but what do you mean when you say "not singal ended"?

I had a look on the net and found out about signal supply but couldn't find signal ended.


Justin
 

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

Disregard the above. I found the information about singal ended op Amps.

So,,should I redesign the circuit to use the 318 op amp as a differential op amp? Or should I purchase a singal ended op amp and continue to develop the existing design?

I think you are going to say "differential op amp" but can you explain to me why?

Justin.

Edit: I've just read some more!! And I'm not sure if the above makes sense now?
 
Last edited:

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

I owe you a thousand apologies. The circuit I have made is using a LM358 and not a LM318. This might (or may not) make a big difference in your understanding of the circuit.

Justin

NOTE: when dealing with Nubes! always expect the unexpected!:eek:
 

Attachments

  • ECG  HEART RATE MONITOR.JPG
    ECG HEART RATE MONITOR.JPG
    27 KB · Views: 423

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
(1) When we say "single ended OpAmp" we're referring to supply voltage. Some OpAmps, like the LM358, are specifically designed to operate well on a single positive supply. They will also operate on a bipolarity supply. Many OpAmps that are not spec'd for single ended usage can be used with a single supply but they don't perform as well as models that are single ended specific.

(2) When any OpAmp is operated on a single positive supply it can only produce an output between zero and some voltage approaching the positive rail voltage. A dual supply will produce an output that swings pos & neg from a zero baseline.

(3) All OpAmps can be operated as Differential Amplifiers. It is not related to the supply voltages but rather how the non-inverting and inverting inputs are utilized.

(4) There are classes of OpAmps that are Differential specific. Most Instrument amplifiers fall into this category. You will see this in your Tina library.

(5) The LM358 may not be the best choice for your application. It's an old design and considered noisy by todays standards. The OPA134 would be a far better choice.

(6) Are you using Tina to merely draw schematics or are you running simulations with it? You will get a far better feel for all your circuitry if you run Sim's. Replace your input pad with a voltage gen, add a "Voltage Pin" to the output and run "Transit Analysis" to produce an output plot.

(7) You should be spending more time in Tina playing with basic OpAmp circuits and not your project. This is the only way you're going to become familiar with all their idiosyncrasies. With Tina, you posses a powerful learning tool that was not available to us old dogs . Use it. ;)

Chris
 
Last edited:

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Justin, build this circuit in Tina. We'll talk about it afterward.

Chris
 

Attachments

  • DifferentialAmpDemo.jpg
    DifferentialAmpDemo.jpg
    95.3 KB · Views: 202

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

Thanks for your detailed answer. To be honest, I had an idea you could do those things with Tina and I have tried, but I gave up and Yes, I was just using Tina to produce schematics..

I will have a play with it...

My scope has arrived, and its a thing of great beauty!! There are lots of buttons and knobs and it looks great on the desk... but what the hell does it do!!:confused:

I have had a play and I thought I had the gist, but my first experiment has failed miserably? The scope has come with no instruction book, just a PDF file. (my pet hate!):mad:

My first experiment was to connect the ground of my scope to the ground of my circuit and the probe to the output of the circuit. ie the positive of the LED. Well I didnt even get that far as after connecting the ground of the scope to the ground of the circuit the led simply lit continuously.:confused: I realised at this point I do not know what I am doing :p so I thought I would video the circuit, working for you to see.

I would like to attach the scope to the circuit to measure changes of output depending on different caps and resistors used within the circuit.:rolleyes: (I assume this is the basic idea behind a scope but I am sure you will have a more educated answer for me!)

Anyway. would you please take a look at the video, what do you think, can I use the scope to improve the output. At the moment the led is erratic. It looks ok in the video, but that`s me staying very still and pressing the electrodes into my chest. I have now bought "skintact" professional ECG electrodes.

I tried to buy some opa134 today but they do not stock them. I will order them from RS later. I did buy LF347n as I felt sorry for the guy! I'm not sure if they will be any good but I am sure I will use them some day. for something!

I am now going to create your Tina circuit and Ill have a fiddle.

Cheers

Just.

Video:
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hi Justin.

I'm very excited that you're new scope arrived. I'm not feeling to well right now and need to take a break from the PC. This could change in a matter of hours though. ;)

Before I take this break I wanted to warn you to never connect the scope's ground clip to anything but ground. Use the 10x probe when ever possible and always set the vertical input attenuator to the highest setting and work your way down until you have a signal display. Yes, PDF's suck but read it carefully. It's a precision instrument and needs to be treated as such.

I watched your video but I really can't tell much from it.

RE Tina, You have no idea what a powerful tool you have. I'll try my best to help you through it. If you lived near me I'd be helping you 'hands on'.

I'm going to relax now and take in a good movie on the satellite.

Chris
 

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

The only reason I put the video up was to show you how well it was detecting a signal. However, as I said it doesn't show how much noise it is also detecting. Thanks for the tips on the scope, Ill continue to have a play. God damm PDFs:mad:

I am sorry that you are not feeling to well. Take a break and relax. If you were closer I would definitely be knocking on your door, armed with scopes, breadboards, pics and of course a 6 pack of tinnies!;)

Take it easy and chat soon.

Just;)
 
Last edited:

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
My first experiment was to connect the ground of my scope to the ground of my circuit and the probe to the output of the circuit. ie the positive of the LED. Well I didnt even get that far as after connecting the ground of the scope to the ground of the circuit the led simply lit continuously.:confused: I realised at this point I do not know what I am doing :p so I thought I would video the circuit, working for you to see.

Is your circuit floating above ground?

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Is your circuit floating above ground?

Chris

Hi Chris

How are you feeling,,,,,firstly?

Then ,,,,what do you mean "Is your circuit floating above ground". I don't understand the question?

Also, take a look at this ......

I have made a few tweaks and as you can see,,,its looks good!

Hope your better

Justin (Just in from the well!,,,,well it is Friday!!)
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hi Chris

How are you feeling,,,,,firstly?

Then ,,,,what do you mean "Is your circuit floating above ground". I don't understand the question?

Your scope's ground lead is connected to Earth Ground via the ground pin on the power cord. Your circuit's ground (- common) is probably not connected to earth until you connect the scope's ground lead to it. Hence it "floats above ground".

Also, take a look at this ......

I have made a few tweaks and as you can see,,,its looks good!

Hope your better

Justin (Just in from the well!,,,,well it is Friday!!)

If feeling like I have an African Elephant on my shoulders is normal than I guess I should feel good. On the upside the Oxicodone is kicking in.

Watched your video and I see you've managed to generate a trace. It's as good as sex, isn't it! :D

Chris
 

JPU

May 19, 2012
282
Joined
May 19, 2012
Messages
282
Hi Chris

Well I hope the poppy juice is kicking in and you are feeling better!

I have started a new thread as I feel this thread title is a misleader!

I think you will love the other thread and I know you will have the answer. I have probably jumped ahead when the analogue side needs more adjustment but I am anxious to get a prototype out there to test this heart/pulse counter in the field(pardon the pun!) on a horse.

Here is the new thread

https://www.electronicspoint.com/can-count-analogue-pulses-over-10secs-t252444.html#post1494191

Regards

Justin
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I have probably jumped ahead when the analogue side needs more adjustment but I am anxious to get a prototype out there to test this heart/pulse counter in the field(pardon the pun!) on a horse.
Justin

Justin, you're like a runaway freight train. I remember a guy with that much p!ss and vinegar but all his get up and go, go, go has long since got up and went, went, went. :)

There's websites that are devoted to 'Derivation Of Terms', colloquialisms and such. I suspect they have a picture of you above the heading "Put The Cart Before The Horse". Attributed to JPU of Wales. :rolleyes:

Chris
 
Top