• Simplified Chinese
  • Japanese
  • Korean
   
Provide feedback on this website to help us improve:

How likely are you to recommend this website to a friend or colleague?

Not at all likely
0
1
2
3
4
5
6
7
8
9
10
Extremely likely

Additional comments:

Email:

Close

Home > Cypress Developer Community > Blogs > PSoC Insiders Blog


PSoC Insiders Blog
Dec 06, 2012

In this part, we ll see how to interface an amplified compensated pressure sensor with PSoC3 and evaluate the system performance. This type of pressure sensor is very expensive as it performs both amplification and temperature compensation. The Honeywell SSCDANN015PGAA5 will be used for interfacing with PSoC3. The important specifications of SSCDANN015PGAA5 are listed below

Important specifications:

Supply Voltage: 5V

Accuracy: +/-0.25%

Total error band: +/-2% FSS

Sensor Operation:

This sensor has an amplified and temperature compensated output and is driven by a voltage supply. The output curve and equation are shown below.

 

Design:

The design is very simple as both amplification and temperature compensation are done within PSoC.  Resolution should be 1/1000th of full scale, hence a 10-bit ADC is required. The sensor output voltage goes to 90% of the supply voltage, so the ADC range should be vssa vdda. The ADC should operate with the rail-rail buffer enabled. Sensor output is ratiometric and the ADC reference should be Vdda/4.

 

PSoC Top Design and ADC configuration:

 

List of all errors:

S.No

Parameter

Error at 10 psi (in psi)

Sensor

1

Total error

0.2

2

Non-linearity

0.022

Signal Chain

5

Offset

0

6

Gain error

0.02

7

Offset drift (at 50°C)

0

8

Gain drift (at 50°C)

negligible

9

INL

negligible

 

PSoC Value:

Although not as many analog resources are required when interfacing a pressure sensor with an amplified output, integrating a sensor with other PSoC features such as capsense, segment LCD drive and communication protocols, etc, will lower overall system costs.

Conclusion:

PSoC3 and PSoC 5LP can sense pressure accurately while reducing BOM cost and board space by integrating the analog front-end, ADC, reference and MCU. PSoC ADC inputs can be multiplexed with many inputs (limited only by the GPIO count) allowing interfacing to multiple pressure sensors or other analog sensors. The PSoC Creator design environment makes it easier for you to design and debug, reducing the design time and your time to market.

By Praveen Sekar

Rating: Be the first to rate
Tags: PSoC® 3
Comments (0)
Dec 03, 2012

In part 3, we ll see how to interface an unamplified compensated pressure sensor with PSoC3 and evaluate the system performance. Measurement Specialties MEAS 1210 standard is used for interfacing with PSoC3. The important specifications of MEAS 1210 standard are listed below.

Supply current = 1.5 mA

Pressure Range:  0 -15 psi (Gage)

Sensitivity (max): 10 mV / psi

Sensitivity (min): 5 mV / psi

Temp error - span (max): 0.5 % FSS

Offset (max): 2 mV

Temperature error - offset: 0.5% FSS

Specified temp range: -40 to 125 °C

Bridge resistance (max): 6.4 k (50°C)

Accuracy: +/-0.1 % FSS BFSL

 

Sensor Operation:

The sensor is a piezo-resistive sensor excited by a current and has an output voltage proportional to the pressure and the current. The output voltage has a 50% tolerance and the sensor provides a gain set resistor to calibrate it to 1%. When the sensor is excited by proper current excitation levels specified in the datasheet, the temperature coefficient of span and offset will cause only a very small error in the final measurement (temperature compensated).

 

Design:

The design requires an excitation current of 1.5mA and an ADC to measure the output voltage. With a bridge resistance of 6.4k (max) and excitation current of 1.5mA (current level prescribed in the datasheet for proper temperature compensation), the load voltage of the current source is 9.6V. This means PSoC IDAC cannot directly be used for supplying bridge current because of very high load voltage. To limit external components and get maximum value out of PSoC we can use circuit below.

 

By controlling the VGS of this circuit, the ID can be controlled. VGS is controlled by changing the current of the sinking IDAC. RB ensures the IDAC output voltage is within compliance and optimum. The current sense resistor (0.1%), RSENS,aids in setting the current to 1.5mA. The voltage across RSENS is read by PSoC ADC (0.2%) and the IDAC current is adjusted until ID becomes 1.5mA. With this circuit, we can ensure that the current is accurate to 0.3%. A current accuracy of 2% is the requirement so the temperature error due to offset and span are within datasheet limits.

 

Sensor Common mode output voltage:

With this design the sensor common mode output voltage is given by;

(1.5 * 6.4)/2 + 0.150 /2 + (1.5mA * 0.05)/2 = 4.8 + 0.075 + 0.0375 = 4.91 V

Here, 1.5mA is the sensor current, 6.4k is the max bridge resistance and 0.150 V is the maximum span, 0.05 is the sense resistance.

The sensor common mode voltage is very high to directly feed into PSoC. The ADC with input buffer can accommodate only to within 200 mV of Vdda. The ADC without buffer can t be used because it has low input impedance. The PGA can allow input voltage all the way to the voltage rail, but we ll be limiting the design to supplies with very strict tolerance levels. This is not desirable as various designers might want flexibility in their power supply design (at least support 5% supplies).

Hence to lower the common mode voltage we can use a charge pump that generates a negative voltage. The generated voltage is about -3V using a negative charge pump. The ripple voltage (of <10%) on the charge pump output doesn t have a major effect as long as we set the ADC input sampling frequency as an integral multiple of the ripple frequency (the charge pump clock frequency).

 

ADC input range:

The sensor span is 150mV (max). The ADC input range should be > +/- 0.256V.  

Resolution:

Resolution required in 1/1000th of full scale. At minimum span of 75mV, we require 75uV of voltage resolution. At 15-bit level, the ADC resolution is 64uV. With a gain of 4, the ADC resolution is < 16uV.

At +/-1.024V range, we require 15-bit resolution

At +/-0.256V range, we require 13-bit resolution

Reference:

This measurement requires an absolute reference. The final pressure accuracy depends on the reference accuracy, therefore the internal 1.024 V reference is a good choice.

 

The ADC has four channels:

0.  Sense resistance channel: This channel is used to set the current to 1.5mA

1.  Sensor Channel: Senses the sensor output

2, 3.  Calibration channels: Measures the gain set resistance for calibration

The IDAC has two channels:

1. Passes current through the calibration resistance

2. Passes current through the sensor

The ADC configuration for the pressure sensing channel is shown below.

 

 

 

Pressure Equation:

The pressure is computed from the measured voltage using the following equation.

P = A* (Vo / Si) * Pr

P Pressure (in psi)

V0 Bridge output voltage in mV

Si Span of pressure sensor output in mV

Pr Rated Pressure (in psi)

A I/1.5. I is the actual current flowing into the pressure sensor

 

Calibrations required:

Span Calibration:

The Span of the pressure sensor is calibrated using the gain set resistance provided in the sensor. Using the gain set resistance, r, the span can be calibrated. The gain set resistance is trimmed such that when it s used in conjunction with a differential amplifier, it ll give a 2V span. Working the equations back, you can find that the gain set resistance.

r = (2 * Rf * Si)/ (So Si)

Here, Rf is feedback resistor of the differential amplifier, Si is the span of the pressure sensor output (differential amplifier input) and So is the span at the differential amplifier output. By looking at the datasheet of the part, Rf and So can be found. For MEAS 1210, Rf = 100k and S0 = 2V.  By measuring r, we can find the span,

Si = 2/(1 + (200/r))

 

Performance measures:

Offset:

The sensor has a 2mV offset (max). This can be calibrated out to zero.

Span error:

The gain set resistor can provide an interchangeability accuracy of 1%. In addition, the gain set resistor can be found with 0.1% accuracy only (limited by calibration resistor accuracy. If the calibration resistor is very accurate (0.01%) or calibrated, then the span error will be 1%.

Temperature Error offset:

This has a maximum error of 0.5% FS. This is 0.075 psi.

Temperature Error span:

This has a maximum error of 0.5% FS. This is 0.075psi.

Pressure non-linearity + hysteresis:

Together they contribute 0.15% FS. This is 0.022 psi.

 

Signal Chain:

Offset error:

The offset error of PSoC ADC is <100uV, which can be cancelled by Correlated Double Sampling (CDS).

Offset drift:

Offset drift of PSoC is 0.55uV/°C. At 50°C, this is 11uV. It is 1/7th of minimum resolution (0.015psi). It can be cancelled by Correlated Double Sampling (CDS).

Gain error:

PSoC ADC s calibrated accuracy is 0.2%. There are 2 measurements, 1 voltage measurement and 1 current measurement (current set to 1.5mA). This can contribute to 0.4% error in total.

Gain drift:

Drift is 50 ppm/°C. For 25°C change, it ll be 0.125%.

List of all errors:

 

S.No

Parameter

Error at 10 psi (in psi)

Sensor

1

Offset

0.2 (Can be calibrated)

2

Span error

 0.1 (best case)

3

Temperature coefficient of offset (50 °C)

0.075

4

Temperature coefficient of span (50 °C)

0.075

5

Non-linearity

0.022

Signal Chain

5

Offset

0

6

Gain error

0.06

7

Offset drift (at 50°C)

0

8

Gain drift (at 50°C)

0.018

9

INL

<0.015

 

PSoC Value:

Apart from integrating the analog front end, ADC, 0.1% precision reference, Op-Amp, IDAC and the MCU and providing a separate channel for accurate temperature measurement, PSoC can integrate miscellaneous features suchascapsense, segment LCD drive and communications protocols. Designing with PSoC creator reduces the design time considerably. The BOM cost and board size can also be significantly reduced.

In the next part we ll see how to interface unamplified compensated pressure sensor with PSoC3.

By Praveen Sekar

Rating: Be the first to rate
Tags: PSoC® 3
Comments (0)
Nov 28, 2012

In part 2, we ll see how to interface an unamplified uncompensated pressure sensor with PSoC3 and the system performance. We ll use the Honeywell NBPMANS015PGUNV for interfacing with PSoC3. The important specifications of Honeywell NBPMANS015PGUNV are listed below.

Supply voltage = 5V

Pressure Range:  0 -15 psi (Gage)

Sensitivity (max): 6.9 mV / psi (25°C)

Sensitivity (min): 3.3 mV / psi (25°C)

Temp Coefficient of sensitivity (max): -3.8 %

Offset: 35.6 mV (50°C)

Temperature coefficient of offset: 1.5%

Specified temp range: -40 to 125 °C

Bridge resistance (max): 5.9 k (50°C)

Accuracy: +/-0.25 % FSS BFSL

Sensor operation:

This type of pressure sensor is a piezo-resistive sensor (Wheatstone s bridge) driven by a voltage supply. The bridge output voltage is directly proportional to the applied pressure and the supply voltage. The primary sources of error to be factored in while designing with this type of sensor is the sensor offset error, span error and temperature coefficient of span and offset (since the sensor is temperature uncompensated, temperature coefficient of span and offset play a major role in the final error).

Design:

The design parameters of concern are the ADC resolution, input range and reference.

ADC input range:

This parameter is dependent on the maximum voltage output, V0, from the pressure sensor. At 5V supply and using the maximum offset and sensitivity possible, we get;

V0 (max) = 6.9 * 15 + 35.6 = 139.1 mV

ADC input range should be greater than +/-0.256 V.

 

Resolution:

1/1000th of the full scale resolution is sufficient in pressure sensing applications.

Pressure resolution = 15 psi/1000 = 0.015 psi

Voltage resolution = 49.543 mV/1000 = 49.543uV

 

This requires a 16-bit ADC in +/-1.024V range or 14-bit ADC in +/-0.256V range.

Reference:

A ratiometric reference should be used in this case. Hence PSoC reference should be configured for internal vdda/4 , where vdda = 5 volts.

 

PSoC Creator Top Design:

 

The ADC has three channels, one for sensing pressure and the other two used for temperature measurement. The RTD temperature is measured as described in AN70698.  ADC configuration for the pressure sensing channel is shown below.

Note that +/-Vref/4 range can also be used for this configuration in 14-bit mode.

 

Pressure Equation:

From the measured ADC voltage, the pressure is calculated from the equation below;

P = (Vo / S) * Pr

P Pressure (in psi)

V0 Bridge output voltage in mV

S Span in mV

Pr Rated Pressure (in psi)

 

Calibrations required:

 

Room Temperature calibration:

Since span has a very high tolerance, we have to calibrate span before using it. Pressure sensor offset should also be calibrated before use.

 

Offset Calibration:

Offset of the pressure sensor has to be corrected by giving a zero pressure input and measuring the ADC output voltage, Voff.

Voff  = Voffp + Voffs

Voffp Pressure sensor offset

Voffs signal chain offset

 

Span/Gain Calibration:

The span of the pressure sensor is calibrated by applying a full scale pressure input to the pressure sensor and measuring the ADC output voltage, Vfs.

S = Vfs

(Where S is the Span)

By doing span calibration we are calibrating both the span error of the sensor and gain error of the ADC.

 

Temperature calibration:

Both the pressure sensor offset and span varies with temperature and they have to be calibrated. But the sensor datasheet doesn t provide information on the span or offset calibration. It provides only the limits of the error. If the characteristic curve is found by experiment, we can correct for both span and offset temperature coefficient accurately.

 

List of all errors:

S.No

Parameter

Error at 10 psi (in psi)

Sensor

1

Offset

0 *

2

Span error

0 *

3

Temperature coefficient of offset (50 °C)

1.5  (Can be calibrated)

4

Temperature coefficient of span (50 °C)

-0.6 (Can be calibrated)

5

Non-linearity

0.0375

Signal Chain

5

Offset

0

6

Gain error

0 *

7

Offset drift (at 50°C)

< 0.004

8

Gain drift (at 50°C)

0.01 (can be calibrated)

9

INL

0.02

 

*Note:  Assumes calibration source has zero error.

ADC INL and the sensor non-linearity are the only factors that can t be calibrated and will affect the final measurement.

PSoC Value:

Apart from integrating the analog front end, ADC and the MCU, providing a separate channel for accurate temperature measurement, PSoC can integrate miscellaneous features suchascapsense, segment LCD drive and communications protocols. Designing with PSoC creator can reduce the design time considerably. The BOM cost and board size can also be significantly reduced.

In the next part we ll see how to interface unamplified compensated pressure sensor with PSoC3.

By Praveen Sekar

Rating: Be the first to rate
Tags: PSoC® 3
Comments (0)
Nov 26, 2012

Pressure sensors can come in a variety of technologies, such as piezoresistive, capacitive, electromagnetic etc. Piezoresistive pressure sensors are the most commonly used of this group.

In this four part series, piezo-resistive pressure sensing basics and the PSoC circuits for three types of pressure sensors will be examined. The first part covers piezo-resistive pressure sensor basics and introduces three categories of pressure sensors

Piezo-resistive Pressure sensor basics

 A piezo resistive pressure sensor has a silicon diaphragm whose resistance depends on its tension. The diaphragm undergoes tension whenever there is a pressure. It can be modelled by a Wheatstone s bridge where all the resistors change with pressure. When pressure is applied to the diaphragm, resistance of the two arms (diametrically opposite to each other) increases and the resistance of the other two arms decreases.

 Pressure sensor equations

 The change in resistance can be converted to voltage by voltage or current excitation. The equations involved in voltage and current excitation are shown below.

Voltage Excitation Mode:

In this case, the Wheatstone s bridge is excited by a voltage. Span is defined as the bridge output voltage for rated pressure (full pressure). Span( S) is given by

S = V * R/R

R Change in resistance for rated pressure

R - Bridge resistance

V Excitation voltage

 

R = P * Ps

P Rated Pressure

Ps Pressure sensitivity (Change in resistance for unit change in pressure)

Ps = R * k

k - Normalized pressure sensitivity i.e. Pressure sensitivity for 1ohm resistor

S = V * P * k

Span is independent of bridge resistance. The temperature coefficient of span primarily results from the temperature coefficient of pressure sensitivity which is dependent on the diaphragm material.

 

Current excitation:

In this case, the bridge is excited by a current source. In this case span is given by,

S = I * R * P * k

Where I is the excitation current.

In this case, the span depends on the current source and bridge resistance.  

The temperature coefficient of span results from the temperature coefficient of resistance and the temperature coefficient of pressure sensitivity.  By proper design, the two can be made close to each other. Hence current excited pressure sensors have the design advantage of tweaking the process parameters so as to reduce the effect of temperature on span.

 

Pressure sensor types

The pressure sensor span is generally around 50-150mV. Depending on whether the pressure sensor output is amplified and on whether the pressure sensor is compensated for temperature variations of span and offset, we can have the following categories of pressure sensors

  1. Unamplified uncompensated pressure sensors
  2. Unamplified compensated pressure sensors
  3. Amplified pressure sensors/transmitters.

The next three parts explains interfacing each type of pressure sensor with PSoC and the system performance measures.

 

By Praveen Sekar

Rating: Be the first to rate
Tags: PSoC® 3
Comments (0)
Nov 15, 2012

If you have used PSoC 3, PSoC 5 or the up and coming super cool PSoC 5LP, you have probably heard or and most likely made use of the internal UDBs, whether you knew it or not.  UDBs are digital blocks that allow you to make custom digital gadgets. There are a couple of new application notes that were mentioned before in this Blog, that describe the UDBs in detail and teach you how to use them.  See Cypress application notes AN82250 and AN82156.  Many of the standard digital components in Creator s library are actually constructed with UDBs. Below is a list of some of the components that are constructed mainly of UDBs.

I2C, I2S, LIN, SM Bus, SPDIF, SPI, UART, Counters, CRC generator, Glitch filter, Quadrature Decoder, Shift register, Timer, Logic gates, Flops, Digital multiplexers and de-multiplexers, control and status registers, etc. 

You get the picture, but what is currently in the library is by no means the limit of what can be created.  Recently I sent an email to our application and field application engineers and asked what they had created with UDBs.  Here is a list of some of the components people have created with PSoC UDBs.

  • 60Hz Grid Lock PLL
  • Numerically Controlled Oscillator (Used for DDS)
  • Forward Error Correction (FEC) decoder
  • No clock stretch I2C slave
  • Simple components (8bit adder, PWM, digital compares etc )
  • Complex Counters 
  • ADC mux sequencers
  • Holiday Light controller
  • Square root calculator
  • First order IIR filter
  • Hardware state machines
  • Delta sigma modulator
  • UDB discrete Fourier transform
  • Byte packer (sticks two 12-bit values into 3 bytes for RF transmission)
  • 7-Segment Display controller
  • Remote control servo controller
  • Manchester Encoder/Decoder
  • 1-Wire communication interface
  • ClipDetect,  Monitors 16-bit audio and over rides output if value exceeds a certain limit.
  • Audioclkgen,  Creates a factional N reference for the on-chip PLL.  Used in digital audio designs.

Notice that this list contains some pretty weird stuff that you would never find standard in any microcontroller.  You won t even find most this stuff in the standard PSoC Creator library, yet!  The point is, that it doesn t matter.  You can create your own  custom interface or component, that makes your project unique without adding extra external glue logic or a CPLD.

Cypress does have a Community Components page where people can post any component they have created.  Unfortunately it has been a very well kept secret until now.  Do yourself a favor and check out the Community Components page.

Also, if you want to get more training on creating components, read the app notes I mentioned above or look at the community components guidelines on this this page.

If you have created a cool component (or even a weird one), don t be afraid to share it with the Cypress community for your 15 minutes of fame. 

By Mark Hastings

Rating: (5/5) by 1 user
Tags: PSoC® 3
Comments (0)

  1 to 5 of 22 Results  |   Next  >
ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

 
 
FB1.png Twitter1.png linkedin youtube