Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reference:pmod:pmodaqs:reference-manual [2019/01/13 19:44]
jon peyron [Functional Description]
reference:pmod:pmodaqs:reference-manual [2019/01/15 21:02] (current)
jon peyron [Pinout Table Diagram]
Line 1: Line 1:
-<WRAP center round todo 60%> 
-This page is under construction 
-</​WRAP>​ 
- 
 ====== Pmod AQS Reference Manual ====== ====== Pmod AQS Reference Manual ======
 The Digilent Pmod AQS (Revision A) is a digital gas sensor for monitoring indoor air quality at low power. With the {{https://​www.mouser.com/​ds/​2/​588/​CCS811_DS000459_3-00-1098798.pdf| AMS CCS811}}, you can detect a The Digilent Pmod AQS (Revision A) is a digital gas sensor for monitoring indoor air quality at low power. With the {{https://​www.mouser.com/​ds/​2/​588/​CCS811_DS000459_3-00-1098798.pdf| AMS CCS811}}, you can detect a
Line 14: Line 10:
 }}  }} 
  
-== Download This Reference Manual ==  +
-  * +
 ---- ----
  
Line 43: Line 38:
 ---- ----
 ===== Interfacing with the Pmod===== ===== Interfacing with the Pmod=====
-The Pmod AQS communicates with the host board via the [[pmod:​communication_protocols:​I2C|I²C protocol]]. By first sending the 7-bit I²C address of 1011011 (0x5B) and then a read/write bit (high/low logic level, respectively),​ followed by the register address of interest at a maximum clock frequency of 400 kHz, users can both configure and read from the Pmod AQS. [[:​reference:​pmod:​pmodaqs:​reference-manual#pinout_table|Header J2]] on the Pmod AQS passes through all of the signals present on the main [[:​reference:​pmod:​pmodhygro:reference-manual#pinout_table|Header J1]] to allow for the daisy chaining of multiple I²C compatible modules.+The Pmod AQS communicates with the host board via the [[pmod:​communication_protocols:​I2C|I²C protocol]]. By first sending the 7-bit I²C address of 1011011 (0x5B) and then a read/write bit (high/low logic level, respectively),​ followed by the register address of interest at a maximum clock frequency of 400 kHz, users can both configure and read from the Pmod AQS. [[:​reference:​pmod:​pmodaqs:#​J2 Pinout|Header J2]] on the Pmod AQS passes through all of the signals present on the main [[:​reference:​pmod:​pmodaqs:#J1 Pinout|Header J1]] to allow for the daisy chaining of multiple I²C compatible modules. ​
  
-==== Configuration ​Register ====+==== Application ​Register ​Map ==== 
 +//​Application registers for the Pmod AQS//
  
-The Configuration register (address 0x02) allows users to control the resolution of the temperature and humidity measurements,​ change the acquisition mode, enable the heater, and more. A table of the 16-bit register, recreated from Table 4 in the [[http://​www.ti.com/​lit/​ds/​symlink/​hdc1080.pdf|HDC1080 datasheet]],​ is provided below.+{{:reference:​pmod:​pmodaqs:​application_register_map.jpg?800}}
  
-^  Configuration Register Description (Address 0x02)  ||||| 
-^Bit Name  ^Bit Number ​ ^Bit Description ​ ^Bit Values ​ ^Functional Description ​ | 
-|RST  |[15]  |Software reset bit  |0¹  |Normal Operation, this bit self clears | 
-|:::  |:::   ​|::: ​  ​|1 ​ |Software Reset  | 
-|Reserved ​ |[14]  |Reserved ​ |0  |Reserved, must be 0  | 
-|HEAT  |[13]  |Heater ​ |0¹  |Heater Disabled ​ | 
-|:::  |:::   ​|::: ​  ​|1 ​ |Heater Enabled ​ | 
-|MODE  |[12]  |Acquisition Mode  |0  |Temperature or Humidity is acquired depending on which register you choose to read  | 
-|:::  |:::   ​|::: ​  ​|1¹ ​ |Temperature and Humidity are acquired in sequence, with the Temperature first  | 
-|BTST  |[11]  |Battery Status ​ |0¹  |Battery voltage (Vdd) > 2.8V (read only)   | 
-|:::  |:::   ​|::: ​  ​|1 ​ |Battery voltage (Vdd) < 2.8V (read only)  | 
-|TRES  |[10]  |Temperature Measurement Resolution ​ |0¹  |14 bit  | 
-|:::  |:::   ​|::: ​  ​|1 ​ |11 bit  | 
-|HRES  |[9:​8] ​ |Humidity Measurement Resolution ​ |00¹  |14 bit  | 
-|:::  |:::   ​|::: ​  ​|01 ​ |11 bit  | 
-|:::  |:::   ​|::: ​  ​|10 ​ |8 bit  | 
-|Reserved ​ |[7:​0] ​ |Reserved ​ |0  |Reserved, must be 0  | 
- 
-¹ -- This is the default value on power-up or reset 
-==== Temperature and Humidity Registers ==== 
- 
-The temperature register (address 0x00) and the humidity register (address 0x01) are both 16-bit read only registers with the 14 MSBs corresponding to the 14-bit maximum resolution for both sensors. The two LSBs (bits D1 and D0) are always 0 for both registers. As the measurement resolution increases, the corresponding conversion time for each sensor also increases. A table of typical conversion times from Section 7.5 (Electrical Characteristics) of the [[http://​www.ti.com/​lit/​ds/​symlink/​hdc1080.pdf|HDC1080 datasheet]],​ is provided below. 
- 
-^  Relative Humidity Sensor ​ |^  Temperature Sensor ​ || 
-|  8-bit resolution ​  ​| ​ 2.50 ms  |  11-bit resolution ​ |  3.65 ms  | 
-|  11-bit resolution ​ |  3.85 ms  |  14-bit resolution ​ |  6.35 ms  | 
-|  14-bit resolution ​ |  6.50 ms  | || 
- 
-Upon device power-up, the Pmod HYGRO requires at least 15 ms prior to being able to perform a measurement. To perform a measurement,​ users need to configure (or accept) the measurement settings in the Configuration Register, and then trigger the measurement(s) by sending an I²C write transaction along with the address pointer set to the appropriate register. After waiting the [[:​reference:​pmod:​pmodhygro:​reference-manual#​temperature_and_humidity_registers|appropriate conversion times]], users may then perform a read transaction,​ taking advantage of the auto-incrementing pointer address for reading both the temperature and humidity registers. After the data has been read, users need to wait at least one full second before performing another read transaction to avoid internal heating of the sensor and the distortion of the measured temperature and humidity levels. 
- 
-Note that if a write transaction is performed on either the temperature (address 0x00) or humidity (address 0x01) registers during a conversion, the current conversion will be aborted and a new one started. If a read is performed during a conversion, the Pmod HYGRO will respond back with a [[learn/​fundamentals/​communication-protocols/​i2c/​start|NACK]] indicating the measurement result is not yet available. The typical time that it takes the output of the humidity sensor to show 63% of a step change in humidity is 15 seconds. 
  
 ==== Quick data acquisition ==== ==== Quick data acquisition ====
-Here is the series of commands to acquire relative humidity and temperature data from the Pmod HYGRO in pseudo I²C code.+Here is the series of commands to acquire relative humidity and temperature data from the Pmod AQs in pseudo I²C code.
  
-  - Power on the Pmod HYGRO and wait at least 15 ms. +  - Power on the Pmod AQS and wait at least 15 ms. 
-  - Call the device ID with a write bit<​code>​I2CBegin(0x80); //device ID 0x40 with a write (0) bit</​code>​+  - Call the device ID with a write bit<​code>​I2CBegin(0x5B); //device ID 0x81 with a write (0) bit</​code>​
   - Wait to receive an ACK from the Slave Device   - Wait to receive an ACK from the Slave Device
-  - Write the device address that you want to talk to<​code>​I2CWrite(0x00); //​address ​0x00 corresponds to the Temperature Register, the Humidity register will be auto-incremented to next</​code>​+  - Write the device address that you want to talk to<​code>​I2CWrite(0x01); //​address ​0x01 corresponds to the Meas_mode</​code>​
   - Wait to receive an ACK from the Slave Device   - Wait to receive an ACK from the Slave Device
   - Delay at least 12.85 ms (6.35 ms for the Temperature Sensor and 6.50 ms for the Humidity Sensor)   - Delay at least 12.85 ms (6.35 ms for the Temperature Sensor and 6.50 ms for the Humidity Sensor)
   - Read 4 bytes from the temperature and humidity registers (two 8 byte samples from each, MSB then LSB)<​code>​I2CReadMultiple(4);​ //read four bytes, sending an ACK to the slave after each byte received and a NACK after the last byte</​code>​   - Read 4 bytes from the temperature and humidity registers (two 8 byte samples from each, MSB then LSB)<​code>​I2CReadMultiple(4);​ //read four bytes, sending an ACK to the slave after each byte received and a NACK after the last byte</​code>​
-  - Convert the readings into usable data. Note that the two LSBs (D1 and D0) will always be set to a value of ''​0''​. Only the upper 14-bits in each register ​contains the relevant data.\\ $Temperature(°C= \dfrac{Temperature\ [15:​00]}{2^{16}} * 165°C - 40°C$\\ \\ $Relative\ Humidity\ ​(\% RH= \dfrac{Humidity\ Register[15:​0]}{2^{16}} * 100\%RH$ +  - Read up to 8 bytes from the Alg_result_data ​register (two 8 byte samples MSB then LSB for eCO2 and two 8 byte samples MSB then LSB for VOC)<​code>​I2CReadMultiple(8)); //read up to 8 bytes, sending an ACK to the slave after each byte received and a NACK after the last byte</​code>​
-  - Wait at least one full second before initiating another reading ​to avoid internal heating of the humidity sensor.+
  
 +==== Pinout Table Diagram ====
  
 +^  Header J1                                      ||^  Header J2                                      ||^  Jumper Blocks ​                                                                      |||
 +^  Pin        ^  Signal ​  ​^ ​ Description ​           ^  Pin        ^  Signal ​  ​^ ​ Description ​           ^  Jumper ​        ​^ ​ State         ​^ ​ Description ​                                       ^
 +|  1          | IO/​INT ​   | IO or Interrupt ​        | 1           | IO/​INT ​   | IO or INterrupt ​        | JP1             | Enable Left    | Set to RST                                          |
 +|  2          | WAKE/​RST ​ | WAKE or RESET           | 2           | WAKE/​RST ​ | WAKE or RESET           | JP1             | Enable Right   | Set to WAKE                                         |
 +| 3           | SCL       | Serial Clock            | 3           | SCL       | Serial Clock            | JP2             | Both Enabled ​  | 2.2 kΩ resistors enabled on the SDA and SCL lines   |
 +| 4           | SDA       | Serial Data             | 4           | SDA       | Serial Data             | JP2             | Both Disabled ​ | 2.2 kΩ resistors disabled on the SDA and SCL lines  |
 +| 5           | GND       | Power Supply Ground ​    | 5           | GND       | Power Supply Ground ​    | JP3             | Enabled ​       | IO/INT enabled ​                                     |
 +| 6           | VCC       | Power Supply (3.3V/​5V) ​ | 6           | VCC       | Power Supply (3.3V/​5V) ​ |                 ​| ​               |                                                     |
  
 +The PmodAQS Jumper setting when using the Demo's are JP1: //WAKE Enabled//, JP2: //Both Enabled//, JP3: //​Enabled//​.
  
-==== Pinout Table Diagram ====+The %%Pmod AQS%% is an ideal Pmod to use in long term Air quality application. As a very low power Pmod between measurements,​ long term data to measure VOC changes in an environment can easily be collected.
  
-^  Header J1                                  ^^^  Header J2                                  ^^^  Jumper Blocks ​                         ^^^ +Any external power applied to the Pmod AQS must be within ​1.8 V and 3.3 V to ensure that the on-board chips operate correctly; however, it is recommended that Pmod is operated at 3.3 V.
-^  Pin   ​^ ​ Signal ​  ​^ ​ Description ​            ​^ ​ Pin   ​^ ​ Signal ​  ​^ ​ Description ​            ​^ ​ Jumper ​  ​^ ​ State      ^  Description ​   ^ +
-|  ​    |  NC       ​| ​ Not Connected ​          ​| ​ 1     ​| ​ NC       ​| ​ Not Connected ​          ​| ​ JP1  |  Both Enabled ​  ​| ​ 2.2 kΩ resistors enabled on the SDA and SCL lines  | +
-|  2     ​| ​ NC       ​| ​ Not Connected ​          ​| ​ 2     ​| ​ NC       ​| ​ Not Connected ​          ​| ​ JP1  |  Both Disabled ​ |  2.2 kΩ resistors disabled ​on the SDA and SCL lines  | +
-|  3     ​| ​ SCL      |  Serial Clock            |  3     ​| ​ SCL      |  Serial Clock            | ||| +
-|  4     ​| ​ SDA      |  Serial Data             ​| ​ 4     ​| ​ SDA      |  Serial Data             ​|:::​||| +
-|  5     ​| ​ GND      |  Power Supply Ground ​    ​| ​ 5     ​| ​ GND      |  Power Supply Ground ​    ​|:::​||| +
-|  6     ​| ​ VCC      |  Power Supply (3.3V/​5V) ​ |  6     ​| ​ VCC      |  Power Supply (3.3V/​5V) ​ |:::|||+
  
-The %%Pmod HYGRO%% is an ideal Pmod to use in long term humidity test application. As a very low power Pmod between measurements,​ long term data to measure humidity changes in an environment can easily be collected.+==== Timing Diagram ====
  
-Any external power applied ​to the Pmod HYGRO must be within 2.7 V and 5.5 V to ensure that the on-board chips operate correctly; however, it is recommended that Pmod is operated at 3.3 V.+A sample diagram for writing ​to and reading from the Pmod AQS taken from the CCS811 datasheet are provided below:
  
-==== Timing Diagram ==== +//​Example ​writing to the Pmod AQS//
-A sample timing diagram for writing to and reading from the Pmod HYGRO taken from the HDC1080 datasheet are provided below:+
  
-//Example write to the Pmod HYGRO//+{{:​reference:​pmod:​pmodaqs:​write_register_pmodaqs.jpg?​600}}
  
-{{  :​reference:​pmod:​pmodhygro:PmodHYGRO_writeTimingDiagram.png |Pmod HYGRO Write Timing Diagram}}+//Example reading from the Pmod AQS// 
 + 
 +{{:​reference:​pmod:​pmodaqs:read_register_pmodaqs.jpg?600}}
  
-//Example reading from the Pmod HYGRO// 
  
-{{  :​reference:​pmod:​pmodhygro:​PmodHYGRO_readTimingDiagram.png |Pmod HYGRO Read Timing Diagram}} 
----- 
  
 ===== Physical Dimensions ===== ===== Physical Dimensions =====
 The pins on the pin header are spaced 100 mil apart. The PCB is 1.25 inches long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header. The pins on the pin header are spaced 100 mil apart. The PCB is 1.25 inches long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header.
-----+
 ===== Additional Information ===== ===== Additional Information =====
-The schematics of the %%Pmod ​HYGRO%% are available {{reference:​pmod:​pmodhygro:pmodHYGRO_sch.pdf|here}}. Additional information about the humidity ​sensor including communication modes and specific timings of the chip can be found by checking out its datasheet [[http://​www.ti.com/lit/ds/symlink/hdc1080.pdf|here]].+The schematics of the %%Pmod ​AQS%% are available {{:reference:​pmod:​pmodaqs:pmodaqs_sch.pdf |here}}. Additional information about the VOCs Gas sensor including communication modes and specific timings of the chip can be found by checking out its datasheet [[http://https://www.mouser.com/ds/2/588/CCS811_DS000459_3-00-1098798.pdf|here]].
  
-More specific information ​about how to use the %%Pmod HYGRO%% ​can be found by checking out the additional resources ​on the Pmod HYGRO [[reference:​pmod:​pmodhygro:​start#​additional_resources|Resource Center]]. ​Example code demonstrating how to get information from the %%Pmod HYGRO%% can be found on its Resource Center [[reference:​pmod:​pmodhygro:​start#​example_projects|here]]. ​+Example code and more specific information ​on how to use the Pmod AQS can be found on its [[reference:​pmod:​pmodaqs:​start#​additional_resources|Resource Center]]. ​ 
  
-If you have any questions or comments about the %%Pmod ​HYGRO%%, feel free to post them under the appropriate section ("​Add-on Boards"​) of the [[https://​forum.digilentinc.com/​|Digilent Forum]].+If you have any questions or comments about the %%Pmod ​AQS%%, feel free to post them under the appropriate section ("​Add-on Boards"​) of the [[https://​forum.digilentinc.com/​|Digilent Forum]].
  
-{{tag>​pmod ​pmodhygro ​humidity reference-manual}}+{{tag>​pmod ​pmodaqs ​humidity reference-manual ​doc }}