Research & Development SPI-Interface Specifications for SPOT CDS500D & CDS550D OEM Capacitance Diaphragm Sensors V 1.0 January 17, 2014 SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 1 of 14 Created 1/17/2014 5:11:00 PM Research & Development 1 Table of Contents 1 Table of Contents ............................................................................................................. 2 2 Hardware Concept ............................................................................................................ 3 2.1 Hardware Block Diagram ............................................................................................................... 3 2.2 Interface Connector and Cable ...................................................................................................... 4 2.3 Grounding Concept ........................................................................................................................ 4 2.4 Timing Specifications ..................................................................................................................... 4 2.5 Interface Hardware Specifications ................................................................................................. 5 2.5.1 Power Supply .......................................................................................................................... 5 2.5.2 Recommended operating conditions....................................................................................... 5 2.5.3 SPI Interface............................................................................................................................ 6 3 Read Results..................................................................................................................... 7 3.1 Pressure ......................................................................................................................................... 7 3.2 Temperature .................................................................................................................................. 8 3.3 Status and Error ............................................................................................................................. 9 3.4 Power-up reset ............................................................................................................................... 9 4 History ............................................................................................................................... 9 5 Appendix ..........................................................................................................................10 5.1 Grounding Concepts .................................................................................................................... 10 5.2 SPI Timing ................................................................................................................................... 11 5.2.1 Introduction ............................................................................................................................ 11 5.2.2 Timing .................................................................................................................................... 11 5.2.3 Total Measurement Cycle ..................................................................................................... 12 5.2.4 Ready-signal ......................................................................................................................... 12 5.2.5 Single Measurement Cycle ................................................................................................... 13 5.2.6 Readout Time Window .......................................................................................................... 13 5.2.7 Conclusion ............................................................................................................................. 14 5.2.8 FAQ’s, Comments ................................................................................................................. 14 SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 2 of 14 Created 1/17/2014 5:11:00 PM Research & Development 2 Hardware Concept This section describes how two or more SPOT CDS5xxD slaves must be physically connected together with a master. When doing so, the master will be able to receive pressure and temperature data from each SPOT CDS5xxD slave. The data exchange link consists of a simple SPI-Interface; therefore only three lines and a chip select signal are necessary. The additional RDY/ lines signal the end of a measurement cycle. It must be used in noise critical applications. There it’s forbidden to read data from the chip during measurement cycles. (Crosstalk from the SPI-interface to the measurement data) 2.1 Hardware Block Diagram Figure 2.1-1: SPI Block Diagram SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 3 of 14 Created 1/17/2014 5:11:00 PM Research & Development 2.2 Interface Connector and Cable Connector Type: JST 1mm 10 pol. pin Signal Description 1 2 3 4 5 6 7 8 9 10 +5V GND Clk SS/ MISO MOSI RDY/ C1/C0 R0/Rref Vpp_OTP Power Supply Supply Common SPI Clock SPI Slave Select (low true) SPI Master Input Slave Output SPI Master Output Slave Input Ready Signal (new measurement value available) Internal use only, must be left open Internal use only, must be left open Internal use only, must be left open Direction (SPOT CDS5xxD-side) input input input input (low true) output (tristate) input output (low true) output output input Table 1: pin assignment SPI connector Cable length: max. 15 cm 2.3 Grounding Concept The metallic sensor housing (flange) acts as a shielding for the very sensitive electronic measurement frontend. In order to achieve the specified noise specifications, the sensor flange must be connected to GND (Supply Common). The impedance of such a connection should be as low as possible. Therefore it is realized directly on the PCB at the frontend of the electronics. This solution guarantees lowest noise and simultaneously maximizes EMC robustness. 2.4 Timing Specifications The SPI Timing is described in detail in chapter 5.2 (SPI Timing) in the Appendix. Signal T_tot_cycle T_sgl_cycle T_rd_out Description Total Measurement Cycle Time = Data Cycle Time Single Measurement Cycle Time Readout Time MIN 600 500 - TYP 700 600 - MAX 800 700 100 UNIT µs µs µs Table 2: SPI Readout Timing For a description of the above used expressions refer to chapter 5.2 (SPI Timing) in the Appendix. SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 4 of 14 Created 1/17/2014 5:11:00 PM Research & Development 2.5 Interface Hardware Specifications 2.5.1 Power Supply Signal Vcc Ripple Icc Description Supply voltage Supply voltage ripple and noise (BW = 20MHz) Supply current MIN 4.75 TYP 5.0 1 MAX 5.25 50 5 UNIT VDC mVpk-pk mA 2.5.2 Recommended operating conditions The input lines “Clk”, “SS/” and “MOSI” and the output line “MISO” are buffered with a SN74ABT125. The output line “RDY/” is driven by a SN74AHCT1G125 SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 5 of 14 Created 1/17/2014 5:11:00 PM Research & Development 2.5.3 SPI Interface 2.5.3.1 SPI Parameters: Parameter CPOL CPHA Mode DORD Description Clock Polarity Clock Phase SPI Mode Bit sequence order Setting 0, Clock Idle low 1, Transmit data on leading edge, read data on falling edge 1 (CPOL = 0, CPHA = 1) 0, MSB first 2.5.3.2 SPI Write 2.5.3.3 SPI Read 2.5.3.4 SPI Timing Name Clock frequency Clock pulse high-state Clock pulse low-state SS/ (SSN) to valid latch SS/ (SSN) minimal pulse length between write cycles Data setup time Data hold time Data valid after clock SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Symbol fSPI-bus tpwh tpwl tsussn tpwssn tsud thd tvd Value 17 30 30 8 30 6 4 26 Unit MHz ns ns ns ns ns ns ns Page 6 of 14 Created 1/17/2014 5:11:00 PM Research & Development 3 Read Results The sensor provides 3 values: • Pressure • Temperature • Status They can be read by a 4 byte SPI-Code as follows: 3.1 Pressure The SPI communication string for reading the pressure value consists of total 4 bytes as follows: 0x41 – 0x00 – 0x00 – 0x00, only the first byte is relevant, the other three must be sent but the content of them doesn’t matter. Read Pressure Op-Code: Byte_3 0 1 0 0 0 0 0 1 Byte_2 Byte_1 don’t care Byte_0 21 The result (u_press) is a fixed-point number in two’s complement format with a scaling factor of 2 as follows: 23 22 21 20 19 18 Byte_2 S Integer 17 16 15 14 13 12 11 10 9 8 7 6 Byte_1 Fractional (21Bits) 5 4 3 2 1 0 Byte_0 21 The result (u_press) is a fixed-point number in two’s complement format with a scaling factor of 2 , consisting of the sign-bit S, 2 integer and 21 fractional bits. The fourth byte (Byte_3), that’s also received, must be ignored. The resulting pressure is defined as Full_scale * u_press. p = F.S.R. * u_press (24 bit read result) 21 21 u_press is calculated by dividing the 24-bit result by 2 . 2 equals 2’097’152. Examples: • Fullscale (F.S.R.): • Half F.S.R.: • smallest pos. val: • Zero Pressure: • smallest neg. val: • neg. Half F.S.R.: • neg. F.S.R. 24-bit result = 2’097’152 (0x200000) 24-bit result = 1’048’576 (0x100000) 24-bit result = 1 (0x000001) equals to 0.00000047683 * F.S.R. 24-bit result = 0 (0x000000) 24-bit result = -1 (0xFFFFFF) equals to -0.00000047683 * F.S.R. 24-bit result = -1’048’576 (0xF00000) 24-bit result = -2’097’152 (0xE00000) SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 7 of 14 Created 1/17/2014 5:11:00 PM Research & Development 3.2 Temperature The SPI communication string for reading the temperature value consists of total 4 bytes as follows: 0x4D – 0x00 – 0x00 – 0x00, only the first byte is relevant, the other three must be sent but the content of them doesn’t matter. Read Temperature Op-Code: Byte_3 0 1 0 0 1 1 0 1 Byte_2 Byte_1 don’t’care Byte_0 21 The result (u_temp) is a fixed-point number in two’s complement format with a scaling factor of 2 as follows: 23 22 21 20 19 Byte_2 S Integer 18 17 16 15 14 13 12 11 10 9 8 7 Byte_1 Fractional (21Bits) 6 5 4 3 2 1 0 Byte_0 21 The result (u_temp) is a fixed-point number in two’s complement format with a scaling factor of 2 , consisting of the sign-bit S, 2 integer and 21 fractional bits. The fourth byte (Byte_3), that’s also received, must be ignored. The resulting temperature is defined as k * u_temp, where k is defined as a Calibration Constant. (Typically 25°C). T = k * u_temp (24 bit read result); k = 25°C 21 (Calibration Temperature) 21 u_temp is calculated by dividing the 24-bit result by 2 . 2 equal 2’097’152. Examples, assuming k = 25°C: • T ≥ 100°C: 24-bit result = 8’388’607 (0x7FFFFF) • T = 50°C: 24-bit result = 4’194’304 (0x400000) • T = 25°C: 24-bit result = 2’097’152 (0x200000) • T = 0°C: 24-bit result = 0 (0x000000) • T = -25°C: 24-bit result = -2’097’152 (0xE00000) SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 8 of 14 Created 1/17/2014 5:11:00 PM Research & Development 3.3 Status and Error The SPI communication string for reading the status value consists of total 4 bytes as follows: 0x48 – 0x00 – 0x00 – 0x00, only the first byte is relevant, the other three must be sent but the content of them doesn’t matter. Read Status Op-Code: Byte_3 0 1 0 0 1 0 0 Status result: Byte_3 don’t’ care Bit 23 13 8 7 6 5 3 Byte_2 Byte_1 don’t care Byte_0 Byte_2 Byte_1 24-Bit Status value (Bit 23..0) Byte_0 0 Description SPI communication took place during measurement Pressure error port 3 error port 2 error port 1 error port 0 error Temperature error All other bits not mentioned here must be ignored. 3.4 Power-up reset After powering up the device, it must be reset by sending the reset command to the device. The reset command consists of the single byte 0x88h. It is highly recommended to send the reset command (0x88h) to the sensor after every power up. 4 History Version Date 1.0 Jan 17, 2014 by Christian Berg Contents initial version SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 9 of 14 Created 1/17/2014 5:11:00 PM Research & Development 5 Appendix 5.1 Grounding Concepts Situation • • • • high impedance (> 100kOhm) between sensor electronics and – housing very sensitive measurement frontend (resolution is fF) shielding against noise necessary the metallic case of the sensor must be electrically connected to the power supply reference terminal (GND) of the driving electronics Concept #1 • • • “indirect” connection via earth lines easy to implement keep impedance of earth connections as low as possible Concept #2 • • • direct connection which may optionally be connected to earth more laborious to implement „direct“ connection better shielding possible SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 10 of 14 Created 1/17/2014 5:11:00 PM Research & Development 5.2 SPI Timing 5.2.1 Introduction This chapter describes the actual time behavior of the new SPOT CDS5xxD sensor. The purpose of this paper is to document the timing of the sensor. 5.2.2 Timing 5.2.2.1 Overview Total measurement cycle single measurement cycle readout time window Figure 2: Timing Overview Figure 2 shows the timing overview. • Ch 1 (yellow) depicts the signal directly at the sensor • Ch 2 (blue) equals the RDY (Ready) signal The SPOT CDS5xxD sensor is configured to run “free” meaning that it 1. starts a measurement cycle consisting of 16 single measurements 2. computes the average of this 16 measurements 3. activates the RDY-signal 4. waits until the total measurement cycle time has elapsed 5. jumps back to step 1. The corresponding timing is explained in more details in the following chapters. SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 11 of 14 Created 1/17/2014 5:11:00 PM Research & Development 5.2.3 Total Measurement Cycle Figure 3: Measurement Cycle • • Ch 1 (yellow) depicts the signal directly at the sensor Ch 2 (blue) equals the RDY (Ready) signal Figure 3 shows a measurement cycle. A measurement cycle is defined as the time between two consecutive negative edges of the Ready-signal. As can be seen from Figure 3, that time equals 682µs. The timing source for the measurement cycle is an on chip oscillator. Although it is very stable it shows a relatively large absolute frequency tolerance of about +/- 15% from chip to chip. Therefore the cycle time can also vary in the range of about +/-15% from sensor to sensor. 5.2.4 Ready-signal The Ready-signal is active low and it is set after the first measurement value is available. The Readysignal is reset by assigning the SS/-signal active. (SPI Slave Select) that means it is automatically reset by a consecutive read of the measurement value. SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 12 of 14 Created 1/17/2014 5:11:00 PM Research & Development 5.2.5 Single Measurement Cycle Figure 4: Single measurement cycle • • Ch 1 (yellow) depicts the signal directly at the sensor Ch 2 (blue) equals the RDY (Ready) signal As can be seen from Figure 4, a single measurement cycle needs about 300µs. Again, this figure can vary from sensor to sensor with up to +/-15%. During a single measurement cycle, the electronics takes 16 single measurements and computes the average of them. Then it signals “new measurement available” by asserting the Ready-signal low. 5.2.6 Readout Time Window The “Readout Time Window”-Time is the time span between the negative going edge of the Readysignal and the beginning of a new measurement. With • “Readout Time Window”-time = T_rd_out • “Total Measurement Cycle”-time = T_tot_cycle • “Single Measurement Cycle“-time = T_sgl_cycle we get T_rd_out = T_tot_cycle – T_sgl_cycle For the example above : T_rd_out = 682µs - 300µs = 382µs. SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 13 of 14 Created 1/17/2014 5:11:00 PM Research & Development 5.2.7 Conclusion The actual sensor configuration results in the following timing parameters: • “Total Measurement Cycle”-time (T_tot_cycle) 680µs (+/-15%) • “Single Measurement Cycle“-time (T_sgl_cycle) 300µs (+/-15%) • “Readout Time Window”-time (T_rd_out) 380µs (+/-15%) 5.2.8 FAQ’s, Comments Excerpt from an email: We need to RDY signal example sequence. According to RDY signal shown in the attachment, measuring time is not 500 micro second, some time 200 micro and so on. Could you give us additional information about RDY. (See attached file: RDY timing analysis.ppt) below • RDY signal is uneven timing Figure 5: Excerpt from “RDY timing analysis.ppt” As explained in the chapters above, the overall cycle time is the time between two consecutive negative going edges of the RDY signal. In the example above, this time equals 710µs and is very stable. th But there is one exception: The 4 low going edge of the RDY signal is missing because the readout of the actual value was too late, or in other words, the next measurement cycle has started before the Host was able to read the actual value. The reason for the observed timing behavior of the RDY signal is the ignoring of the timing specifications. SPOT CDS500D & CDS550D OEM Sensor SPI-Interface Specification_V1.0 Christian Berg, T based on Felix Mullis, TL Page 14 of 14 Created 1/17/2014 5:11:00 PM