Arduino Forum

Using Arduino => General Electronics => Topic started by: Oliverhowden on Jun 23, 2020, 04:55 pm

Title: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 23, 2020, 04:55 pm
Hello,
I was just looking for some advice on reading data from a sensor.
Generally I have worked with I2C sensors, though for this specific application this sensor is required. Here is the Datasheet (https://amphenol-sensors.com/en/component/edocman/154-novasensor-npc-100-disposable-medical-pressure-sensors-datasheet/download?Itemid=8453%20%27).

Am I under thinking this by assuming I can connect this directly to the Arduino 5v power supply? Do I need a differential supply or is 0-5v okay?
I'm reading lots of mixed things about whether I need op amps or whether I am able to power and read this directly.

Thank you very much for you help.

Oliver
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jun 24, 2020, 02:29 am
The datasheet only shows the Wheatstone bridge, without electronics.
To use this sensor, you must add a stable excitation voltage for the bridge, a differential amplifier, and a high-resolution A/D.
Fortunately this is all available on a common/cheap HX711 breakout board.
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 24, 2020, 03:41 am
Awesome, exactly what I was after.
Thank you very much for your help Leo.

Cheers,
Oliver
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 29, 2020, 12:16 pm
Hi Leo,
I purchased the HX711 breakout (Bought it from a local supplier and turns out its actually a Keyes 234 140C0A) - but appears to be almost identical.

I've tried using the Bogde library and having some issues with the readings.
No matter which gain I set (Channel A 128, Channel A 64, Channel B 32), my readings are returned as:
HX711 reading: 8388607

I can't see many spots I could mess up in the wiring:

Arduino 5V -> VCC
Arduino GND -> GND
D4 -> DT
D5 -> SCK

My sensor is then connected directly to E+, E-, A+, A- (Tried B also).

Any suggestions on where I may be going wrong?

Cheers
Oliver
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jun 29, 2020, 12:32 pm
Please read the "how to post" guide of the forum.
We need all the details to help you.
Code, pictures, which Arduino, etc.

Start by measuring the voltages on the sensor.
There should be about 4.25volt on E+
The two A inputs should be about half of that, with very little voltage (<20mV) between them.
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 30, 2020, 11:56 am
A-: 2.85V
A+: 2.57V
Voltage across A+/A-: 0.280v
E+: 5v
E-: 0.715V

Arduino using the Bodge HX711 Library
Code: [Select]
#include "HX711.h"

// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;
const int GAIN = 64; // channel A, gain factor 64
HX711 scale;

void setup() {
 Serial.begin(57600);
 scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN, GAIN);

}

void loop() {
 if (scale.is_ready()) {
   long reading = scale.read();
   Serial.print("HX711 reading: ");
   Serial.println(reading);
 } else {
   Serial.println("HX711 not found.");
 }

 delay(100);
 
}


I have tried both A/B channels with different gain to the same effect.

Thank you for your help
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jun 30, 2020, 12:05 pm
280mV between A+ and A- is way to much.

E+ should be 4.25volt.
E- should be 0volt (Arduino ground).

Need to see the setup (as previously requested).
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 30, 2020, 12:40 pm
Photos of the setup are attached to the previous post.
Is that enough?
Should I using arduino GND instead of E-?

Cheers
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jun 30, 2020, 12:51 pm
Connections seem right. Are you sure the sensor is connected right? (can't see).

Did you measure with the black lead of the DMM touching the metal part of the USB socket (Arduino ground).

E+ must be ~4.25volt, and E- must be 0volt (no sensor connected).

They must stay the same with the sensor connected.
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 30, 2020, 01:06 pm
I was gathering the voltages with the black lead on the GND pin, not the metal part of the USB port.

When measuring with the black lead on the metal casing, the voltage appears around 4V briefly on E+, then drops to zero.

My understanding was GND was okay to use instead of the metal casing.

Does this suggest a faulty Arduino?
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 30, 2020, 01:30 pm
I have just swapped to a MEGA instead, new readings with black lead on metal casing:

E+: -5v
E-: -0.7V

A-: -2.56V
A+: -2.9V
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jun 30, 2020, 01:41 pm
E+ must be ~4.25volt, and E_ must be 0volt (ground), otherwise there could be a wiring/connection problem.
Did you properly solder the pins to the HX711 module?
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 30, 2020, 01:47 pm
I have checked all connections and reflowed the joints.
Excuse my ignorance, though is it not the same result that the voltage across E+/- is 4.25v?
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jun 30, 2020, 01:52 pm
Not sure what you mean.
There must be ~4.25volt across E+ and E-
But E- is directly connected via the HX711 module to Arduino ground.
There should be 0volt on E-
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jun 30, 2020, 02:06 pm
When I check the continuity between E- and GND, there is a connection. When I check the voltage between E- (GND, on the HX711, or the metal casing), it remains around 0.7v.
There is 4.25V across E+/E-, though E- is not 0V.
Any suggestions on the next step I should take?

Thank you very much
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Ron_Blain on Jun 30, 2020, 06:18 pm
A few things you may wish to try and or consider. Your HX 711 module should look like this (https://cdn.sparkfun.com/assets/f/5/5/b/c/SparkFun_HX711_Load_Cell.pdf). Also this is the data sheet for your sensor (https://www.alliedelec.com/m/d/5e16dc5137850c92026a461e587030e3.pdf). Using an Arduino rather than mess with the Excitation Voltage of the HX 711 module If I measure the 5 Volt pin of my Uno or Mega boards I get a very stable 4.97 volts when the boards are externally powered using a 9.0 volt supply. Obviously if you are relying on USB to power your board your mileage will vary.

Your sensot relies on an excitation voltage of 1 to 10 VDC (Calibrated at 6.0 VDC). Your sensor sensitivity is uV/V/mmHg and your range is -30 to 300 mm Hg (-0.58 to 5.8 PSIG). That tells you pretty much what your output should be for a given excitation voltage at a given pressure. Likely here, the most important thing is your excitation voltage must be stable. I would use your Arduino board 5.0 volt out to supply your HX 711 and your sensor excitation.

While this example code and samples (https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide?_ga=2.46206951.1525162234.1593476194-542388958.1567987739) applies to load cells you may want to at least look at the code with a focus on the Calibration code and the Scale Output code. The main difference between what you are looking to do and the linked code is the units of measure.

Anyway this is just an optioon if you continue to have problems. Also Your board ground pins should be tied to your HX 711 ground and your excitation negative of your bridge. All a common bond.

Ron
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jun 30, 2020, 11:06 pm
The HX711 ground><Nano ground wire needs investigation.
My Nano definitely has the USB socket grounded to the Nano ground pin.
Check all continuity with a DMM.

@Ron.
Powering the sensor from 5volt is unwise.
You loose ratiometric relationship between the A/D of the HX711 if you do, leading to instability.
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Oliverhowden on Jul 01, 2020, 12:46 am
The HX711 ground><Nano ground wire needs investigation.
My Nano definitely has the USB socket grounded to the Nano ground pin.
Check all continuity with a DMM.
I swapped to using a different MEGA2560, so the issue above is fixed.
I have ordered a new HX711 (The proper SparkFun breakout).
I'll post back with any changes - the 0.7v E- just doesn't seem right, and nothing I can determine the source of so far.
Cheers,
Oliver
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Ron_Blain on Jul 01, 2020, 01:23 am
The HX711 ground><Nano ground wire needs investigation.
My Nano definitely has the USB socket grounded to the Nano ground pin.
Check all continuity with a DMM.

@Ron.
Powering the sensor from 5volt is unwise.
You loose ratiometric relationship between the A/D of the HX711 if you do, leading to instability.
Leo..
Thanks Leo, so your saying use the HX711 module excitation correct?

Ron
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Wawa on Jul 01, 2020, 01:51 am
Yes, E+ excitation is regulated (powered from the potentially dirty 5volt supply),
and the HX711 uses the same E+ excitation voltage for it's internal 24-bit A/D.
Ratiometric, so it the 4.25volt increases, sensor output increases, and A/D sensitivity decrease with the same amount. Keeping A/D result the same.
Leo..
Title: Re: Reading values from a NPC-100 Wheatstone bridge pressure sensor
Post by: Ron_Blain on Jul 01, 2020, 05:11 pm
Yes, E+ excitation is regulated (powered from the potentially dirty 5volt supply),
and the HX711 uses the same E+ excitation voltage for it's internal 24-bit A/D.
Ratiometric, so it the 4.25volt increases, sensor output increases, and A/D sensitivity decrease with the same amount. Keeping A/D result the same.
Leo..
OK, makes good sense. Never gave it a thought from that angle.

Thanks
Ron