Shop OBEX P1 Docs P2 Docs Learn Events
Datasheet quiz — Parallax Forums

Datasheet quiz

ErlendErlend Posts: 612
edited 2014-01-05 06:05 in General Discussion
To measure water pressure in an espresso-bot I am building, I got hold of a TO-05 packaged pressure sensor some time ago. Now, finally, the time has come to connect it up. Not so easy. The signal is voltage level from a Wheatstone bridge, and I simply cannot understand how mV translates into PSI or BAR. Maybe it is stated clearly in the datasheet, maybe my brain is not equally clear, - or maybe it is a quiz for the forum to solve?

Erlend
SPD300ABT05.pdf

Comments

  • FranklinFranklin Posts: 4,747
    edited 2014-01-02 00:17
    Not much info on the datasheet. Looks like the exc+ and exc- go to 5v and ground the out+ would go to an ADC but it's not clear where the out- would go. The device you linked to is a 300psi device, if that is what you have you need to consider the pressure range of your water.
  • davejamesdavejames Posts: 4,047
    edited 2014-01-02 00:27
    ...I'm gonna guess the +/- outputs of the device would be connected to the +/- inputs (respectively) of an op-amp, so's to do a difference operation. The output of the op-amp would then go to an ADC for reading by the uC or uP.

    And I agree w/Franklin - the datasheet is quite lacking.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-01-02 00:38
    I believe what's needed here is an instrumentation amplifier ahead of any ADC. Also, the tolerance on the full-scale reading is quite loose, so you will have to calibrate the unit post-installation. Tracy Allen is your man for this kind of question. Hopefully, he'll see this thread and can weigh in with more specifics. I would recommend retitling the thread, "Need help with wheatstone bridge sensor output" so he will be sure to take notice.

    -Phil
  • ErlendErlend Posts: 612
    edited 2014-01-02 01:02
    Originally I thought the output would be a reasonable variation in resistance of the weatstone Rs so that I could just voltage-divide and ADC with reasonable accuracy (5%), but yes, as you suggest I suspect I have to both build an opamp and do a calibration too. Lots of hassle. Maybe I should instead try to find a more suitable sensor - one with some sort of digital interface. It helps on my ego though, that you guys confirm the datasheet is lacking.
    Resolution 2014: read and think before clicking add-to-basket.

    Erlend
  • JordanCClarkJordanCClark Posts: 198
    edited 2014-01-02 05:43
    Instrumentation amps already exist in an IC form (like this one). As for Calibration, to be honest, I don't think I've ever seen a setup that didn't require it, at least initially.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-01-02 12:52
    For bridge sensors like this SPD300ABto05, I'd like to go directly into a high resolution ADC such as the ADS1100. It has a built in PGA (programmable gain amplifier) The full scale range of your sensor is typically 220 mV for 0 to 300psi. That matches well with the ADS1100 full scale range of 256mV at 16 bits. Easy to read into the Prop using i2c. The ADS1100 is ratiometric, which is another good thing when reading a bridge sensor. Here is a snippet of a schematic:

    Screen shot 2014-01-02 at 12.43.47 PM.png


    Sensor power connects to 5V and to ground, in parallel with the ADC U1 power, and the (+) and (-) outputs of the sensor bridge connect directly to the ADC differential inputs. The resistors R6 and R7 are pullups for the i2c interface.

    Yes, SPD300ABto05 will require calibration, but you might be able to do that with a staff gage. Calibration constants can be handled digitally. The sensor may require temperature compensation. Is 300psi reasonable for what you want to measure? If you use only a small part of the range, the accuracy specs become more important.
  • ErlendErlend Posts: 612
    edited 2014-01-02 13:29
    Thanks, this explains all I need to know!
    I will measure around 20-60% FS, so accuracy shouldn't suffer for that reason. There is already an MCP3208 fitted, so maybe I will run through a diff opamp and use one MCP channel instead of getting a new ADC just for this purpose - but then there is the problem with +/- supply to the opamp, at present there is only single sided 3.3, 5, and 12V available. It's a long time since I did opamp, but I seem to remember the +/- supply was hard to avoid. Have to brush up on this.

    Erlend
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-01-02 13:35
    Erlend wrote:
    ... so maybe I will run through a diff opamp ...
    There's a difference between a differential opamp and an instrumentation amplifier. In the latter, both inputs have equal high impedances. This is important when used with a bridge, since you don't want to load the resistors in the bridge, leading to skewed readings.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-01-02 16:07
    You can do it with a single supply op-amp, e.g. the following classic circuit uses a dual op-amp such as the LM358 or LT1490. Differential input to single ended output. This has gain=16, so a 200mV full scale change at the input should be 3.2 change at the output.

    2-op-diffAmp.png


    The adjustment for offset at the input is a hack and may or may not be necessary depending on your individual sensor. The sensor itself has an intrinsic offset that may fall anywhere within the range of ±30mV. The offset adjustment can zero the input, so that the single supply circuit can handle it, positive differential inputs only. The circuit could have more headroom by using a rail to rail op-amp such as the LT1490. The jellybean LM358 can only output up to 3.5V on a 5V supply.

    For comparison, here is the circuit required with the ADS1100, a better drawing. This ADC can handle both polarities of input voltage, so there is no need for hardware offset adjustment. Both offset and scaling can be done in the digital domain.

    Bridge_ADS1100.png
    781 x 262 - 22K
    496 x 350 - 13K
  • ErlendErlend Posts: 612
    edited 2014-01-02 23:01
    Brilliant - thanks for the circuit diagrams!
    So, now's the decision; do it by the book (then have to order one ADS1100) or do it quick-and-dirty (then have to do more pcb and soldering) based on chips I have. Hmm. Accuracy isn't really an issue, but the principle of doing things by the book is.

    Erlend
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2014-01-03 07:42
    Hi Erland;

    Here is another basic type of circuit to amplify low level signals such as Bridges, Strain Gages, and Thermocouples.
    Bridge Chopper Amplifier 1.png

    This amplifies the signals using AC coupled amplifiers then rectify the output.
    AC signals are generated with a Chopper circuit. In this case a MOSFET transistor that shorts out and releases the bridge outputs.

    Duane J
    994 x 610 - 23K
  • ErlendErlend Posts: 612
    edited 2014-01-04 02:04
    I am learning new things so often in this forum. Thanks, Duane, why indeed must it always be DC? I wouldn't need a chopper either , there is always some AC available around. Now I've got too many choices.

    Erlend
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2014-01-04 09:05
    Hi Erlend ;
    Erlend wrote: »
    I am learning new things so often in this forum. Thanks, Duane, why indeed must it always be DC?
    This is true! While there are now many wonderful Op-Amps, Diff-Amps, and Instrumentation-Amps available they can be a bit tricky to use, especially when working with mV signals and high gains.

    AC coupled amplifiers tend to be much easier to make with high gains.

    In your our application where you are using a 300psi sensor to read pressures in the under 1psi range, I presume, the signal range for the SPD300ABto05 would be only about 700uV/psi. A pretty small signal in the presence of a relatively large offset of up to 30mV.
    I wouldn't need a chopper either, there is always some AC available around.
    I think you don't understand the purpose of the chopper. It's used to convert the DC signal input into an AC signal to be amplified and then rectified back to a relatively hi DC signal which is easy to read with a meter or AtoD converter.

    In my example I showed 1 method to implement the chopper. This one "shorts out" and "releases" the bridge signal output.

    Another method is to use a small DPDT relay connected so it rapidly reverses the signal polarity. The advantage is the output is double that of the simpler shorting chopper.

    One thing I forgot to add to my circuit snippet was a way to zero out the offset.
    Bridge Chopper Amplifier 1.png
    Now I've got too many choices.
    Things are not always easy.

    Duane J
    994 x 610 - 23K
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-01-04 09:29
    What's inside an onion?


    Each layer is a possible solution to your problem, and at the end, cry tears, so many possibilities!
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-01-04 09:42
    @Duane, I think Erlend is talking about pressure in an espresso maker, so that could indeed be a good fraction of the range, 20 bar even, 290 psi.

    @Erlend: Here is an instrumentation amp using the LTC1043 "switched capacitor building block". The LTC1043 contains the DPDT switches like Duane was talking about. The flying capacitor charges up to voltage from the differential input when the switches are to the left and transfers it to the single-ended input when the switches are to the right. The LTC1043 was a pet project of analog guru Jim Williams, RIP. The data sheet and app notes are full of clever things he did with it.

    LTC1043_instAmp.png
    604 x 458 - 48K
  • kwinnkwinn Posts: 8,697
    edited 2014-01-04 20:11
    Using an AC signal to excite the Wheatstone bridge will provide an AC output signal that can be amplified more easily. The AC signal could be generated by switching 2 pins between gnd and Vcc. The ADC would sample both half cycles and use the difference between the two to calculate the pressure. Stable, accurate, and eliminates offsets.
  • ErlendErlend Posts: 612
    edited 2014-01-05 03:32

    Each layer is a possible solution to your problem, and at the end, cry tears, so many possibilities!
    -so true about life in general.
  • ErlendErlend Posts: 612
    edited 2014-01-05 03:37
    @Duane
    Looking at the diagrams you have posted I don't see how you could use a semiconductor for this - at these low voltage levels?
    As to my no-chopper-required comment, my idea was to simply change the DC supply to the bridge to AC - which I have lying around so don't need an oscillator. Similar idea as kwinn's, but less sofisticated.

    Erlend
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2014-01-05 06:05
    Hi Erlend ;
    Erlend wrote: »
    @Duane
    Looking at the diagrams you have posted I don't see how you could use a semiconductor for this - at these low voltage levels?
    MOSFETs are essentially variable resistors. And when digitally switched the values are close to 0Ω or completely open. This property works the same switching both larger voltages and mV or uV signals. Similar to what a relay can do. This schematic may help in understanding the concepts.
    Bridge Chopper Amplifier 1a.png

    In this single MOSFET design the AC coupled output is about ¾th the maximum possible signal level. Without the capacitor you get about ½ the maximum possible signal level.

    The 4 MOSFET H-Bridge and DPDT relay configurations can have an AC output level double the maximum possible signal level. Of course this is more complicated to do.
    As to my no-chopper-required comment, my idea was to simply change the DC supply to the bridge to AC - which I have lying around so don't need an oscillator. Similar idea as kwinn's, but less sophisticated.
    Yes, that can be done.
    One caution though, make sure the AC driving voltage is accurate and stable. This may not be so easy if you use a 60Hz sinewave derived from mains power. This will require a transformer to supply power to the sensor with one of the bridge outputs grounded. Also, the output must be synchronously detected instead of a simpler rectifier.
    Erlend

    Duane J
Sign In or Register to comment.