Pages: [1] 2 3   Go Down
Author Topic: Problem with amplifying a pressure sensor for measuring blood pressure  (Read 5582 times)
0 Members and 1 Guest are viewing this topic.
SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm building a system to measure the real-time pressure in a cuff of a blood pressure system.

I'm using the Omron SMPP-O2 sensor, amplified with an INA122 and sampling with a Teensy 3.0. I have it wired up but the datasheet is not very clear to me, and I'm not entirely sure how to provide it what I think it needs.
I'm getting what appears to be erratic ADC values and don't seem to change with pressure.

It appears I need to deliver a constant current (100 uA), and I'm not sure what I should use to do that.

I'm attaching my breadboard connections with Fritzing, and the relevant datasheets. If anyone would care to take a look. Thanks.

And this is the teensy 3.0 pinout
http://www.pjrc.com/teensy/pinout5a.png

* BloodPressureBreadboard_bb.pdf (682.05 KB - downloaded 75 times.)
* ICpics.pdf (47.74 KB - downloaded 62 times.)
* 2SMPP_1112.pdf (497.56 KB - downloaded 55 times.)
* ina122.pdf (745.29 KB - downloaded 46 times.)
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am not familiar with the Teensy boards, but looking at your breadboard picture makes me wonder: Are you shortcutting Pin12 + Vbat + 3.3V ? And also Reset + pin13 ?

Your sensor is this, http://www.omron.com/ecb/products/sensor/21/2smpp-02.html
For accurate pressure measurements, it should should be powered with a constant current of 100uA.
You use it with 5V and I think the connections in your breadboard drawing are okay. It should work, but you won't get the accuracy it is designed for.
The datasheet show how to use a opamp as current source.
Sensor seems to be 4x20k serial/parallel (I'm not sure), and with 100uA, the sensor needs about 2V (but I'm not sure).
With 2V, the outputs should be around 1V with a little offset.

In the datasheet the absolute maxium for the supply current is 130uA. With 5V you might have damaged the sensor already.

If you remove the INA122 and use a potmeter for the analog input, are the readings normal ?
Could you measure the sensor output with a multimeter to see if that is normal ?
« Last Edit: February 22, 2013, 02:29:42 pm by Erdin » Logged

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm only using 3.3V, not 5V. I don't know how much current would come from that so I may have destroyed the sensor. So, I should use an op-amp to get a constant current source? I'll look over the example again, as I didn't realize that. I'm pretty naive to the electronics but I'm slowly getting there. It was confusing on the datasheet, cause I think it wants 2.5V for power, but the mouser page had it listed as 5V. And then it mentions current, so I assume it's somewhere in that range but current needs to stay constant.

Good point, I should check output directly from the sensor.

You are suggesting that I put a potentiometer and take the power source and divide the voltage and read the inputs? I think I checked the analog inputs on another sensor, but I should double-check that cause I can't quite remember. I'm pretty sure I get 0 connected to A-REF, and a 65535 connecting to 3.3V power pin.

Currently my analog input is hovering around 20,000, which should be at about 1V ((65536/2000) / 3.3).

Thanks.
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps the sensor is damaged and not accurate anymore but not broken yet. Perhaps you can continue to use this one for testing.
If you are going to buy a new one, you could buy a sensor for a 3.3V supply and single linear voltage output. Many sensors have the opamp inside. Or a sensor with a digital output.

Some (or a lot) noise is normal with these sensors.
You could add 1nF or 10nF capacitors from the analog sensor outputs to ground.
After that, also take the average of about 5 readings.
The result should be good and stable after that.
Logged

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I bought several more sensors when I ordered (somewhat expecting something to go wrong) and my reluctance to pay more for shipping than items. I'll try and figure out as much as possible with the potentially broken one. It should be a good learning experience.
Logged

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, finally had some time to sit down and check this out again.

It was definitely good to measure each item separately and check with a voltmeter.

I was probably wiring a couple of things wrong, and luckily it didn't seem to hurt anything.

The sensor was outputting -4mv with a null signal. Then the signal turns '+' for most of the output range. The datasheet mentions -40mv at resting, but in other places I've seen -4mv.

I only then connected up the INA122 and got up to nearly the 3.3V output. I was worried about the -4mv being amplified, but it seems to start from zero and go '+' from there. So, it looks like this combo works pretty well. Signal seems stable with me just blowing pressure into the tube.

Now, I'll pneumatically connect up to a blood pressure cuff and I'll post a pic of the pressure signal when I do. Cool!

I'll also update with my breadboard, I think I had some things wrong.

Thanks for your help.
« Last Edit: February 25, 2013, 03:21:48 pm by oscarcar » Logged

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't calibrated the values yet so the values are approximate, but the output looks pretty good. I changed the resistor to 10Kohm.
Attached is a picture of the graphed output and the indications of what is occurring.

* bloodPressureReadings.pdf (27.46 KB - downloaded 62 times.)
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is very cool.
But you need to reduce the noice. Both in hardware and software.
Did you find a way to supply 100uA ? That is the only way to get accurate values for the pressure.
Logged

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't taken any measures to reduce noise except to use the internal teensy 3.0 feature to output the average of multiple samples (ie 16).

As it is, I think the noise is probably ok. The initial noise with the pump is the nature of the erratic piezo pump in getting to max pressure.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4781
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Google on constant current ic.

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thx. I didn't quite get find anything that was super clear if there was a single IC that I could get to do this for me.

It looks there's a typical op-amp setup to do this, but requires several resistors and an op-amp.
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=10&cad=rja&ved=0CHUQFjAJ&url=http%3A%2F%2Fwww.physics.byu.edu%2Ffaculty%2Fpetersonb%2Fphys240%2FConstantCurrentSource.pdf&ei=5EItUfvUB5HSiAKbooHIDQ&usg=AFQjCNEegrXZxq3JjrtV9dBqsFn3UaezcQ&sig2=o5itmazSvhixlP5Yr0JmiA&bvm=bv.42965579,d.cGE

http://michaelgellis.tripod.com/howland.html

I did find this:
http://www.reuk.co.uk/LM317-Current-Calculator.htm

Could I just use an LM317 with a single 33kOhm resistor?

Or what if I combined this with a voltage reference IC, or is that too demanding?
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That LM317 could do it. But I'm not sure that 5V is enough, I don't know for sure if the sensor needs 2V and I don't know for sure the 5-2 = 3V is enough for the LM317.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4781
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the same circuit with a different explanation:
http://users.telenet.be/davshomepage/current-source.htm

He mentions
Quote
When it's impossible to lower the voltage of the powersupply and the current is high maybe a switched current source will be better.<> I will explain this in the future.

Call me "the answer is out there somewhere" Mulder. Just trying to help!



Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's the updated breadboard in case anyone wants to wire it up.


https://docs.google.com/file/d/0B_XDOJc4fAYxWk9ON1pLVTFDdHM/edit?usp=sharing

edit: The 2SMPP-O2 ic is upside down, so it probably looks wrong. It only comes in a SMD and I had to drill a hole in a DIP adapter for the pressure port, and put it upside down. So it goes like this in pic:

1 2 3 -
6 5 4 -

Also, do you consider this very noisy now that I've zoomed in? Attached pdf.

BTW, it's also sampled at 100Hz in the picture.

* bloodPressureReadingsZoom.pdf (18.29 KB - downloaded 53 times.)
« Last Edit: February 27, 2013, 01:50:33 am by oscarcar » Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I still think it is somewhat noisy.
A hardware filter, like a capacitor over the opamp or at the sensor input or both should make a smooth line.
Logged

Pages: [1] 2 3   Go Up
Jump to: