• Simplified Chinese
  • Japanese
  • Korean
   
Home > Cypress Developer Community > Blogs > PSoC Insiders Blog


PSoC Insiders Blog
Feb 22, 2013

Sorry for the long gap between postings.  Seems like everyone has hit the ground running after the holiday break and those of us at Cypress are no exception. 

Many of you have probably used the Character LCD component or User Module in PSoC Creator and PSoC Designer.  It is a handy device that provides a simple and quick way to display information.  The only problem is that it has one little flaw, it must be connected to sequential pins on a single port.  Sometimes, depending on the design and package you are using, you may have the extra GPIOs but they are spread across multiple ports.  Well after today this is no longer a problem.  I posted a new component on our Community Components page.  I bet many of you didn t even know we had such a page.  This page is a place where users can download their own custom components for everyone to use.  There are already several components there worth taking a look at, even a couple by yours truly.  For Cypress employees, it is a way to get a cool prototype component out to customers without going through a very long internal process.

You can download this new CharLCDmp (Character LCD Multi-Port) component at this location.  This component is 100% software compatible with the original Character LCD.  Below is a picture of the new component (on the right) next to the original component.  The most noticeable thing you might notice is the pins are no longer hidden. 

Two other less noticeable features is that there are only 6 pins instead of 7, and the code size is a little smaller.  So what is the catch you might ask?  Well as you probably know nothing is for free in this world, but the downside isn t that bad.  The original component uses the R/W signal so it can poll the status through one of the data ports, for optimal speed.  The CharLCDmp, doesn t poll the status bit, but instead uses a standard command delay to make sure everything works OK.  Although this makes the LCD a little slower, you can still update the display much faster than the LCD or your eyes can respond.  Since none of the signals now had to be bidirectional, I was able to take advantage of one of the real cool features of the newer generation of PSoCs.  A Control Register from the UDBs is used to drive all the signals.  Since PSoC is able to route the signals from the Control Register to the pins, it really doesn t matter where you put the pins.  The internal software just has to deal with the Control Register where the signals are always aligned perfectly.  Below is an example circuit showing the connection between the CharLCDmp component and the real LCD module.  Notice the annotation LCD component that is included in this library.

 

 

I hope this simple component will come in handy, it already has on my workbench playing with a yet to be released PSoC and development board, more about that later.  I ll try to keep these posts a little more frequent from now on. 

 

By Mark Hastings

Rating: Be the first to rate
Tags: PSoC® 3
Comments (0)
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 30, 2012

Cypress works with a number of third party programming vendors around the world to ensure mass programming support for all PSoC devices. We provide a list of these programming vendors on our general programming landing page:

www.cypress.com/go/programming

Many customers choose to purchase PSoC devices through a Cypress partnered distributor. These distributors will often support programming services for customers. Customers will be able to purchase devices and have those devices programmed prior to delivery or manufacturing. Since our distributors provide these programming services we have ensured that we are working with mutual third party programming companies in order to ensure timely support for our customers. Distributors often support multiple programming vendors for their programming services. We work to ensure that we have qualified at least one programming vendor for each of the Cypress distributors.

www.cypress.com/?app=distiInventory&source=buy

If one has questions or requires additional device support please file a tech support case so that your request can be expedited.

www.cypress.com/go/support

Rating: Be the first to rate
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)

  1 to 5 of 88 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