You are on page 1of 63

V 1.

4
Revised 8/13/19

EZO-CO2
Embedded NDIR CO2 Sensor

Reads Gaseous CO2


Range 0 − 10,000 ppm
Calibration Factory calibrated
Response time 1 reading per second
Resolution 1 ppm
Accuracy +/- 3% +/- 30 ppm
Connector 5 lead data cable
Warmup time 10 seconds
Cable length 1 meter

Data protocol UART & I2C


Default I2C address 105 (0x69)
Data format ASCII
Operating voltage 3.3V − 5V
Life expectancy ~5.5 years
Written by Jordan Press
Designed by Noah Press This is an evolving document, check back for updates.
Table of contents
Operating principle 6 Sensor warm-up 9
Physical properties 7 Calibration theory 10
Sensor properties 7 Custom calibration 10
Pin out 8 Default state 11
Available data protocol 12

UART I2C
UART mode 14 I2C mode 39
Receiving data from device 15 Sending commands 40
Sending commands to device 16 Requesting data 41
LED color definition 17 Response codes 42
UART quick command page 18 Processing delay 42
LED control 19 LED color definition 43
Find 20 I2C quick command page 44
Continuous mode 21 LED control 45
Single reading mode 22 Find 46
Alarm 23 Taking reading 47
Custom calibration 24 Alarm 48
Export calibration 25 Custom calibration 49
Import calibration 26 Export calibration 50
Enable/disable internal temp 27 Import calibration 51
Naming device 28 Enable/disable internal temp 52
Device information 29 Device information 53
Response codes 30 Reading device status 54
Reading device status 31 Sleep mode/low power 55
Sleep mode/low power 32 Protocol lock 56
Change baud rate 33 I2C address change 57
Protocol lock 34 Factory reset 58
Factory reset 35 Change to UART mode 59
Change to I2C mode 36 Manual switching to UART 60
Manual switching to I2C 37

Datasheet change log 61


Firmware updates 61
Warranty 62

2 Copyright © Atlas Scientific LLC


Attention
The EZO-CO2™ is 100% operational out of the box.
CALIBRATION IS UNNECESSARY

This sensor detects


GASEOUS CO2

This sensor does not


read dissolved CO2.
DO NOT SUBMERGE!
3 Copyright © Atlas Scientific LLC
Attention
Do not point the sensor directly at bright lights

This CO2 sensor uses


IR light to detect CO2.
Pointing the sensor directly at a
bright light will give false readings.
(it will not damage the sensor.)

If the CO2 sensor is returning false readings


when in a bright environment, try attaching
a PVC Tee to the sensor, to block the direct light.

(or just don’t point the sensor at bright lights.)

4 Copyright © Atlas Scientific LLC


Attention
This CO2 sensor is sensitive to ground loops.
Put simply, a ground loop is when the ground line is not actually 0 volts.
(It’s the buzzing you hear in audio equipment)
If your system has a ground loop you will see readings that are between
100 and 250 ppm higher than expected. Atlas Scientific has detected
ground loops on many different Raspberry Pi’s. If this sensor is connected
to a Raspberry Pi you should expect to have a ground loop.

There are two ways to fix this problem


1. Connect a ground pin from the Raspberry Pi (or other device) to an earth ground.
2. Connect the body of the CO2 sensor to a metal object that is connected to
an earth ground.

5 Copyright © Atlas Scientific LLC


Operating principle
The Atlas Scientific EZO-CO2™ Embedded CO2 Sensor uses a non-dispersive infra-red
(NDIR) gas detection cell to derive CO2 content in a gaseous matrix. The NDIR detection
cell is a single wavelength spectrophotometer that has been specifically designed to
detect 4.2μm infrared radiation.

Inlet
Active
detector
CO 2

CO2
CO 2
CO
CO 2
2
CO2 CO2

CO
CO2 2
CO2
CO 2
CO 2 CO2 CO
CO 2
2
CO
2
CO2
CO
2

IR light source Reference


detector

Outlet
Gaseous CO2 has a prominent absorption band centered at 4.2μm. CO2 content is
derived by quantifying how much light energy has been lost when it travels through
a gaseous matrix over a fixed distance.

Active and reference Mirrors


detectors

IR blub
source
Optical
Parabloic path
reflector
Outside Inside

6 Copyright © Atlas Scientific LLC


Physical properties
The EZO-CO2™ sensor only detects gaseous CO2 concentrations. This device
cannot read dissolved CO2 concentrations. DO NOT SUBMERGE IN LIQUID.

66.2mm (2.6”)

10.9mm
(0.4”) 19.3mm 27
15.8mm mm
(0.7”) (1”
19.8mm (0.6”) )
(0.7”)

1/2”
NPT
20mm
(0.7”)

Cable Length
1m (3.2’)

50.4mm (1.9”)

Weight 133g

Sensor properties
Mirror Filters Detector
PCB

Bulb

Gas permeable lid Parabolic Parabolic


reflector reflector

Mirror Filters Detector


PCB
7 Copyright © Atlas Scientific LLC
Pin out
White – RX/SCL
Green – TX/SDA
Data and power cable pinout Black – GND
Red – VCC
Blue – ALM

The interrupt pin will go high when a set CO2 level has been crossed.

800ppm

*Alarm set to 800ppm

If unused leave ALM floating. Do not connect ALM to VCC or GND.


See page 22 to enable CO2 level alarm.

Power consumption Absolute max ratings


LED MAX SLEEP Parameter MIN TYP MAX

5V ON 45 mA Storage temperature -65 °C 75 °C


3.4 mA
OFF 44 mA Operational temperature -20 °C 25 °C 50 °C

3.3V ON 42 mA VCC 3.3V 3.3V 5.5V


3.0 mA
OFF 41 mA
Humidity Range 0 to 95% rh non-condensing

8 Copyright © Atlas Scientific LLC


Sensor warm-up
When the Atlas Scientific EZO-CO2™ Embedded CO2 Sensor is first powered on (or wakes
up from sleep mode) the sensor must warm-up before it can output readings. The warm-up
process takes 10 seconds to complete.

10 sec
During the first 10 seconds of operation the output will be: *warm

Once warming is finished, CO2 readings will be output. The device will continue to warm-up
over several minutes. As the internal temperature stabilizes, so will the CO2 readings.

Thermal equilibrium

Temp
CO2
*Equilibrium time may vary
depending on envirmonent.

0 min 5 min 10 min

To see the internal temperature of the sensor and watch as it stabilizes, use the ‘O’
command found on page 24.

9 Copyright © Atlas Scientific LLC


Copyright © Atlas Scientific LLC 10
See page 21 for custom calibration commands.
the custom calibration.
factory calibration will be ignored. To revert back to the factory calibration simply clear
One or two-point calibration can be done at any time. When custom calibration is used,
Custom calibration
The factory calibration data is permanently stored in the sensor and cannot be erased.
High point calibration = 4,000 ppm
Low point calibration = 0 ppm
Meter
CO2
NDIR
ded Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter
2™
-CO Embed
EZO EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™
r
Mete
CO2 O2
NDIR # EZO-C d
Part Part # EZO-CO2 Part # EZO-CO2 Part # EZO-CO2 Part # EZO-CO2 Part # EZO-CO2
edde
2™
-CO Emb Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter
EZO EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™
EZO
Embed
ded
-CO ™
Reads
Range
NDIR2 CO2
Calibra
Gaseo
Meter
Respon tion us
0−
Resolu se time 10,000CO2
Factor
Accura tion ppm
1 readiny Calibr

EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™ EZO-CO2 ™


Warmu cy Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter Embedded NDIR CO2 Meter
1 ppm g per ated
Data p time second
protoc +/-
Data 5%
format ol ~15 +/-
Opera second 50 ppm Reads Gaseous CO2 Reads Gaseous CO2 Reads Gaseous CO2 Reads Gaseous CO2 Reads Gaseous CO2
ting UART s
voltage ASCII & I 2C Range 0 − 10,000 ppm Range 0 − 10,000 ppm Range 0 − 10,000 ppm Range 0 − 10,000 ppm Range 0 − 10,000 ppm
3.3V Calibration Factory Calibrated Calibration Factory Calibrated Calibration Factory Calibrated Calibration Factory Calibrated Calibration Factory Calibrated
− 5V Response time 1 reading per second Response time 1 reading per second Response time 1 reading per second Response time 1 reading per second Response time 1 reading per second
Resolution 1 ppm Resolution 1 ppm Resolution 1 ppm Resolution 1 ppm Resolution 1 ppm
Accuracy +/- 5% +/- 50 ppm Accuracy +/- 5% +/- 50 ppm Accuracy +/- 5% +/- 50 ppm Accuracy +/- 5% +/- 50 ppm Accuracy +/- 5% +/- 50 ppm
Warmup time ~15 seconds Warmup time ~15 seconds Warmup time ~15 seconds Warmup time ~15 seconds Warmup time ~15 seconds
Data protocol UART & I 2C Data protocol UART & I 2C Data protocol UART & I 2C Data protocol UART & I 2C Data protocol UART & I 2C
Data format ASCII Data format ASCII Data format ASCII Data format ASCII Data format ASCII
Operating voltage 3.3V − 5V Operating voltage 3.3V − 5V Operating voltage 3.3V − 5V Operating voltage 3.3V − 5V Operating voltage 3.3V − 5V
8 57026 00717 5 8 57026 00717 5 8 57026 00717 5 8 57026 00717 5 8 57026 00717 5
COMPLETE
CALIBRATION
part of the manufacturing process.
not need to be recalibrated. Atlas Scientific performs a two-point factory calibration as
The Atlas Scientific EZO-CO2™ Embedded CO2 Sensor comes pre-calibrated, and does
Calibration theory
Default state

UART mode
Baud 9,600
Readings continuous
Speed 1 second
LED on

1 second

Green Cyan
Standby Taking reading Transmitting

11 Copyright © Atlas Scientific LLC


Available data protocols

default

Unavailable data protocols


SPI
Analog
RS-485
Mod Bus
4–20mA
12 Copyright © Atlas Scientific LLC
UART mode
Settings that are retained if power is cut Settings that are NOT retained if power is cut
Baud rate Sleep mode
Calibration
Continuous mode
Device name
Enable/disable response codes
Hardware switch to I2C mode
LED control
Protocol lock
Software switch to I2C mode

r 0.2
UART mode
8 data bits no parity
1 stop bit no flow control

Baud 300
1,200
2,400
9,600 default
19,200
38,400

RX
TX
57,600
115,200

RX
Data in
TX RX RX TX

TX
Data out

RX TX

Vcc 3.3V – 5V

VCC
CPU
0V 0V

Data format
Units PPM Data type unsigned int
Encoding ASCII Decimal places 0
Format string Smallest string 2 characters
Terminator carriage return Largest string 12 characters

14 Copyright © Atlas Scientific LLC


Receiving data from device
2 parts

ASCII data string Carriage return <cr>


Command Terminator

9,600 baud
(default)

RX TX
TX
RX
TX

TX RX
CPU
RX

Sender

Receiver

6500 <cr>

Advanced
ASCII: 6 5 0 0 <cr>

Hex: 36 35 30 30 0D
Dec: 54 53 48 48 13

15 Copyright © Atlas Scientific LLC


r 0.1
Sending commands to device
2 parts

Command (not case sensitive) Carriage return <cr>


ASCII data string Terminator

RX TX
TX

CPU
RX
TX

TX RX
RX

Receiver

Sender

Sleep <cr>

Advanced
ASCII: S l e e p <cr>

Hex: 53 6C 65 65 70 0D
Dec: 83 108 101 101 112 13

16 Copyright © Atlas Scientific LLC


r 0.1
LED color definition

Green Cyan Purple Red White


UART standby Taking reading Changing Command Find
baud rate not understood

LED ON
5V +2.5 mA

3.3V +1 mA

Blue Green Purple Red White


I C standby
2
Taking reading Changing Command Find
I C address
2
not understood

17 Copyright © Atlas Scientific LLC


UART mode
command quick reference
All commands are ASCII strings or single ASCII characters.

Command Function Default state

Alarm enable/disable alarm pg. 23 n/a

Baud change baud rate pg. 32 9,600

C enable/disable continuous mode pg. 21 enabled

Cal performs custom calibration pg. 24 n/a

Export export calibration pg. 25 n/a

Factory enable factory reset pg. 35 n/a

Find finds device with blinking white LED pg. 20 n/a

i device information pg. 29 n/a

I2C change to I2C mode pg. 36 not set

Import import calibration pg. 26 n/a

L enable/disable LED pg. 19 enabled

Name set/show name of device pg. 28 not set

O enable/disable internal temperature pg. 27 disabled

Plock enable/disable protocol lock pg. 34 n/a

R returns a single reading pg. 22 n/a

Sleep enter sleep mode/low power pg. 32 n/a

Status retrieve Status Information pg. 31 n/a

*OK enable/disable response codes pg. 30 n/a

18 Copyright © Atlas Scientific LLC


r 0.1
LED control
Command syntax
L,1 <cr> LED on default
L,0 <cr> LED off
L,? <cr> LED state on/off?

Example Response
L,1 <cr> *OK <cr>

L,0 <cr> *OK <cr>

L,? <cr> ?L,1 <cr> or ?L,0 <cr>


*OK <cr>

L,1 L,0

19 Copyright © Atlas Scientific LLC


r 0.1
Find
Command syntax This command will disable continuous mode
Send any character or command to terminate find.

Find <cr> LED rapidly blinks white, used to help find device

Example Response
Find <cr> *OK <cr>

20 Copyright © Atlas Scientific LLC


r 0.1
Continuous mode
Command syntax
C,1 <cr> enable continuous readings once per second default
C,n <cr> continuous readings every n seconds (n = 2 to 99 sec)
C,0 <cr> disable continuous readings
C,? <cr> continuous reading mode on/off?

Example Response
C,1 <cr> *OK <cr>
CO2 (1 sec) <cr>
CO2 (2 sec) <cr>
CO2 (n sec) <cr>

C,30 <cr> *OK <cr>


CO2 (30 sec) <cr>
CO2 (60 sec) <cr>
CO2 (90 sec) <cr>

C,0 <cr> *OK <cr>

C,? <cr> ?C,1 <cr> or ?C,0 <cr> or ?C,30 <cr>


*OK <cr>

21 Copyright © Atlas Scientific LLC


r 0.1
1 second

Single reading mode


Command syntax
R <cr> takes single reading

Example
Green ResponseCyan
R <cr> Standby 6500 <cr>
Taking reading Transmitting
*OK <cr>

Green Cyan
Standby Taking reading Transmitting

1 second

22 Copyright © Atlas Scientific LLC


r 0.1
Alarm
The alarm pin will = 1 when CO2 levels are > alarm set point.
Command syntax Alarm tolerance sets how far below the set point CO2 levels
need to drop before the pin will = 0 again.

Alarm,en,[1,0] <cr> enable / disable alarm


Alarm,n <cr> sets alarm
Alarm,tol,n <cr> sets alarm tolerance (0 - 500 ppm)
Alarm,? <cr> alarm set?

Example Response
Alarm,en,1 <cr> *OK <cr> Enable alarm

Alarm,1200 <cr> *OK <cr>

CO2 level must fall 100 ppm below


Alarm,tol,100 <cr> *OK <cr> set point for alarm to reset.

Alarm,? <cr> ?,alarm,1200,100 <cr> if all are enabled

Alarm
(1200) Tolerence
(100)
1100

CO2

(Alarm set point - tolerance)


Alarm (1200 - 100)

Alarm on Alarm off

23 Copyright © Atlas Scientific LLC


r 0.1
Custom calibration
High point calibration can be from 3,000
Command syntax ppm to 5,000 ppm. Calibration outside of
that range my lead to accuracy issues.

Cal,n <cr> calibrates the high point


Cal,0 <cr> calibrates the zero point
Cal,clear <cr> restores calibration to factory settings
Cal,? <cr> device calibrated?

Example Response
Cal,3900 <cr> *OK <cr>

Cal,0 <cr> *OK <cr>

Cal,clear <cr> *OK <cr>

Cal,? <cr> ?Cal,0 <cr> or ?Cal,1 <cr> or ?Cal,2 <cr> or


no calibration only zero point calibration only high point calibration

?Cal,3 <cr> *OK <cr>


zero and high point calibration

This device comes pre-calibrated.


Custom calibration should not be performed
without scientific grade calibration gasses.

24 Copyright © Atlas Scientific LLC


r 0.1
Export calibration
Command syntax Export: Use this command to download calibration settings

Export,? <cr> calibration string info


Export <cr> export calibration string from calibrated device

Example Response
Export,? <cr> 10,120 <cr> Response breakdown
10, 120
# of strings to export # of bytes to export

Export strings can be up to 12 characters long,


and is always followed by <cr>

Export <cr> 59 6F 75 20 61 72 <cr> (1 of 10)


Export <cr> 65 20 61 20 63 6F <cr> (2 of 10)
(7 more)
Export <cr> 6F 6C 20 67 75 79 <cr> (10 of 10)
Export <cr> *DONE Disabling *OK simplifies this process

Export <cr> 1
2 TX RX
3
4
RX

MCU
5
TX
6
7
8
9
10

[10,120]
*DONE

25 Copyright © Atlas Scientific LLC


1 r 0.2
TX RX 2
Import calibration
Command syntax Import: Use this command to upload calibration
settings to one or more devices.

Import,n <cr> import calibration string to new device

Example Response
Import, 59 6F 75 20 61 72 <cr> (1 of 10) *OK <cr>
1

Import, 65 20 61 20 63 6F <cr> (2 of 10)


2
3
*OK <cr> TX RX

4
RX

MCU
5
TX
6
7
8

Import, 6F 6C 20 67 75 79 <cr> (10 of 10)


9
10
*OK <cr>
[10,120]

Import,n <cr>
1
2 TX RX
3

RX
4 1
TX RX MCU
5
TX 2
6
7
8
3
9
4
RX

MCU
10

[10,120] 5
TX
6
7
8
9
1
TX RX 2 10
3

[10,120]
*OK <cr>
4
RX

MCU
5
TX
6
7

system will reboot


8
9
10

[10,120]

TX RX
1
2
3
TX RX 2
3
* If one of the imported strings is not
RX
RX
correctly entered, the
TX device will not
4
TX 4
MCU
5

MCU
6
5
7
8
9
10
6
7
accept the import, respond with *ER
[10,120]
*ER
8 <cr>
and reboot.
9
10

[10,120]

26 Copyright © Atlas Scientific LLC


r 0.2
Enable/disable internal temperature
from output string
Command syntax
O,t,[1,0] <cr> enable or disable internal temperature

Example Response
O,t,1 <cr> *OK <cr> enable temperature

O,t,0 <cr> *OK <cr> disable temperature

O,? <cr> ?O,ppm,t <cr> if internal temp is enabled

Enabling the internal temperature should


only be used to confirm that the device is
at thermal equilibrium. Refer to page 6

27 Copyright © Atlas Scientific LLC


r 0.1
Naming device
Command syntax
Name,n <cr> set name n= ________________
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Name,? <cr> show name Up to 16 ASCII characters

Example Response
Name,zzt <cr> *OK <cr>

Name,? <cr> ?Name,zzt <cr>


*OK <cr>

Name,zzt <cr> Name,? <cr>

*OK <cr> Name,zzt <cr>


*OK <cr>

28 Copyright © Atlas Scientific LLC


Device information
Command syntax
i <cr> device information

Example Response
i <cr> ?i,CO2,1.0 <cr>
*OK <cr>

Response breakdown
?i, CO2, 1.0
Device Firmware

29 Copyright © Atlas Scientific LLC


Response codes
Command syntax
*OK,1 <cr> enable response default
*OK,0 <cr> disable response
*OK,? <cr> response on/off?

Example Response
R <cr> 6,500 <cr>
*OK <cr>

*OK,0 <cr> no response, *OK disabled

R <cr> 6,500 <cr> *OK disabled

*OK,? <cr> ?*OK,1 <cr> or ?*OK,0 <cr>

Other response codes


*ER unknown command
*OV over volt (VCC>=5.5V)
*UV under volt (VCC<=3.1V) These response codes
*RS reset cannot be disabled
*RE boot up complete, ready
*SL entering sleep mode
*WA wake up

30 Copyright © Atlas Scientific LLC


r 0.1
Reading device status
Command syntax
Status <cr> voltage at Vcc pin and reason for last restart

Example Response
Status <cr> ?Status,P,5.038 <cr>
*OK <cr>

Response breakdown
?Status, P, 5.038
Reason for restart Voltage at Vcc

Restart codes
P powered off
S software reset
B brown out
W watchdog
U unknown

31 Copyright © Atlas Scientific LLC


Sleep mode/low power
Command syntax Send any character or
command to awaken device.

Sleep <cr> enter sleep mode/low power

Example Response
Sleep <cr> *OK <cr>
*SL <cr>

Any command *WA <cr> wakes up device

MAX SLEEP
5V 45 mA 3.4 mA

3.3V 42 mA 3.0 mA

Sleep <cr>

32 Copyright © Atlas Scientific LLC


Change baud rate
Command syntax
Baud,n <cr> change baud rate

Example Response
Baud,38400 <cr> *OK <cr>

Baud,? <cr> ?Baud,38400 <cr>


*OK <cr>

300
1200
2400
n= 9600 default
19200
38400
57600
115200

Baud,38400 <cr> (reboot)

Green
Green
Standby Cyan
Cyan Purple
Purple
Changing Red
Red Green
White
White
Standby
UART
UARTstandby
standby Taking
Takingreading
reading baud rate
Changing
Changing Command
Command UART Find
standby
Find T
baud
baud
*OK rate
rate
<cr> not
notunderstood
understood

33 Copyright © Atlas Scientific LLC


Protocol lock
Command syntax Locks device to UART mode.

Plock,1 <cr> enable Plock


Plock,0 <cr> disable Plock default
Plock,? <cr> Plock on/off?

Example Response
Plock,1 <cr> *OK <cr>

Plock,0 <cr> *OK <cr>

Plock,? <cr> ?Plock,1 <cr> or ?Plock,0 <cr>

Plock,1 I2C,100

ALM

TX

an Green
Purple
*OK <cr>
Cyan Red
cannot change to I2C
PurpleWhite
cannot change to I2C
Red
UART standby
reading ChangingTaking reading
Command Changing Find
*ER <cr>
Command
baud rate not understood baud rate not understood

34 Copyright © Atlas Scientific LLC


r 0.1
Factory reset
Command syntax Clears custom calibration
"*OK" enabled

Factory <cr> enable factory reset

Example Response
Factory <cr> *OK <cr>

Factory <cr>

(reboot)

Green Cyan Green Purple Cyan R


*OK <cr> *RS <cr>
UART standby UART standby
Taking reading Changing
Taking reading
Com
*RE <cr>
baud rate not un
Baud rate will not change

35 Copyright © Atlas Scientific LLC


Change to I2C mode
Command syntax Default I2C address 105 (0x69)

I2C,n <cr> sets I2C address and reboots into I2C mode
1 second
1 second
n = any number 1 – 127

Example Response
I2C,100 <cr> *OK (reboot in I2C mode)

Wrong example Response


I2C,139 <cr> Green
n > 127 Green*ER Cyan
<cr> Cyan
Standby Standby Taking reading
Taking readingTransmitting
Transm

I2C,100

(reboot)
Green Green Cyan Cyan
Green TakingBlue
Standby Standby Taking reading readingTransmitting
Transm
*OK <cr> now in I2C mode

36 Copyright © Atlas Scientific LLC


r 0.2
Manual switching to I2C
• Make sure Plock is set to 0
• Disconnect ground (power off)
• Disconnect TX and RX
• Connect TX to ALM
• Confirm RX is disconnected
• Connect ground (power on)
• Wait for LED to change from Green to Blue
• Disconnect ground (power off)
• Reconnect all data and power

Manually switching to I2C will set the I2C address to 105 (0x69)

Example
Short
ALM
TX

Wrong Example Disconnect RX line


Short
RX

37 Copyright © Atlas Scientific LLC


r 0.1
I C mode
Settings that
2
TheareI2C
retained if power
protocol is cut Settings
is considerably that are NOT
more complex thanretained
the UARTif power is cut
Baud rate (RS–232) protocol. Atlas Scientific assumes the embedded
Sleep mode
Calibration systems engineer understands this protocol.
Continuous mode
Device name To set your EZOTM device into I2C mode click here
Enable/disable response codes
Hardware switch to I2C mode
LED control
Protocol lock
Software switch to I2C mode

Settings that are retained if power is cut Settings that are NOT retained if power is cut
Calibration Sleep mode
Change I2C address
Hardware switch to UART mode
LED control
Protocol lock
Software switch to UART mode
r 0.1
I2C mode
I2C address (0x01 – 0x7F)
105 (0x69) default

Vcc 3.3V – 5.5V

Clock speed 100 – 400 kHz

SDA
SCL
SDA

SCL SCL SDA SDA


SCL

VCC SCL SDA

0V 0V

CPU

Data format
Reading CO2 Data type unsigned int
Units PPM Decimal places 0
Encoding ASCII Smallest string 2 characters
Format string Largest string 12 characters

39 Copyright © Atlas Scientific LLC


Sending commands to device
5 parts

Start I2C address Write Command (not case sensitive) Stop


105 (0x69) ASCII command string

Example
Start 105 (0x69) Write Sleep Stop
I C address
2
Command

SDA SDA

SDA
SCL
SDA
CPU
SCL

SCL SCL

Advanced
Address bits The entire command as ASCII with all arguments

SDA
A6 A5 A4 A3 A2 A1 A0 W ACK First letter of command ACK Last letter of command ACK
SCL

Start W = low Stop

40 Copyright © Atlas Scientific LLC


r 0.1
Requesting data from device
7 parts

Start I2C address Read Response code Data string Null Stop
105 (0x69) 1 byte "413" Terminator
(Dec 0)

413 SDA SDA

SDA
SCL
SDA
CPU
SCL

SCL SCL

Advanced
All bytes
Address bits N bytes of data after data are Null R = High

SDA
A6 − A0 R ACK Response code ACK Data ACK Data N ACK Null ACK Null
SCL

Start NACK Stop

1 52 49 51 0 = 413
Dec Dec
ASCII

41 Copyright © Atlas Scientific LLC


r 0.1
Response codes
& processing delay
After a command has been issued, a 1 byte response
code can be read in order to confirm that the command
was processed successfully.

Reading back the response code is completely optional,


and is not required for normal operation.

Send
command

CPU
Processing delay

Receiving
data

Example If there is no processing delay or the


processing delay is too short, the response
I2C_start;
code will always be 254.
I2C_address;
I2C_write(EZO_command);
I2C_stop; Response codes
Single byte, not string
delay(300); Processing delay
255 no data to send
I2C_start; 254 still processing, not ready
I2C_address; 2 syntax error
Char[ ] = I2C_read;
1 successful request
I2C_stop;

42 Copyright © Atlas Scientific LLC


r 0.2
LED color definition

Blue Green Purple Red White


I2C standby Taking reading Changing Command Find
I C address
2
not understood

LED ON
5V +2.5 mA

3.3V +1 mA

43 Copyright © Atlas Scientific LLC


I2C mode
command quick reference
All commands are ASCII strings or single ASCII characters.

Command Function

Alarm enable/disable alarm pg. 48

Baud switch back to UART mode pg. 59

Cal performs custom calibration pg. 49

Export export calibration pg. 50

Factory enable factory reset pg. 58

Find finds device with blinking white LED pg. 46

i device information pg. 53

I2C change I2C address pg. 57

Import import calibration pg. 51

L enable/disable LED pg. 45

O enable/disable internal temp pg. 52

Plock enable/disable protocol lock pg. 56

R returns a single reading pg. 47

Sleep enter sleep mode/low power pg. 55

Status retrieve status information pg. 54

44 Copyright © Atlas Scientific LLC


LED control
Command syntax 300ms processing delay

L,1 LED on default


L,0 LED off
L,? LED state on/off?

Example Response
L,1 1 0
Wait 300ms Dec Null

L,0 1 0
Wait 300ms Dec Null

L,? 1 ?L,1 0 or 1 ?L,0 0


Wait 300ms Dec ASCII Null Wait 300ms Dec ASCII Null

L,1 L,0

45 Copyright © Atlas Scientific LLC


r 0.1
Find 300ms processing delay

Command syntax
Find LED rapidly blinks white, used to help find device

Example Response
Find 1 0
Wait 300ms Dec Null

46 Copyright © Atlas Scientific LLC


Taking reading
Command syntax 900ms processing delay

R return 1 reading

Example Response
R 1 800 0
Wait 900ms Dec ASCII Null

Wait 900ms
GreenGreenGreen Cyan Cyan Cyan
Taking reading
Taking Taking
readingreading
Transmitting
Transmitting StandbyStandby
Transmitting Standby

47 Copyright © Atlas Scientific LLC


Alarm 300ms processing delay

The alarm pin will = 1 when CO2 levels are > alarm set point.
Command syntax Alarm tolerance sets how far below the set point CO2 levels
need to drop before the pin will = 0 again.

Alarm,en,[1,0] enable / disable alarm


Alarm,n sets alarm
Alarm,tol,n sets alarm tolerance (0 - 500 ppm)
Alarm,? alarm set?

Example Response
Alarm,en,1 1 0 Enable alarm
Wait 300ms Dec Null

Alarm,1200 1 0
Wait 300ms Dec Null

CO2 level must fall 100 ppm below


Alarm,tol,100 1 0 set point for alarm to reset.
Wait 300ms Dec Null

1 ?,alarm,1200,100 0 if all are


Alarm,? enabled
Wait 300ms Dec ASCII Null

Alarm
(1200) Tolerence
(100)
1100

CO2

(Alarm set point - tolerance)


Alarm (1200 - 100)

Alarm on Alarm off

48 Copyright © Atlas Scientific LLC


Custom calibration 900ms processing delay

High point calibration can be from 3,000


Command syntax ppm to 5,000 ppm. Calibration outside of
that range my lead to accuracy issues.

Cal,n calibrates the high point


Cal,0 calibrates the zero point
Cal,clear restores calibration to factory settings
Cal,? device calibrated?

Example Response

Cal,3900 1 0
Wait 900ms Dec Null

Cal,0 1 0
Wait 900ms Dec Null

Cal,clear 1 0
Wait 300ms Dec Null

Cal,? 1 ?Cal,0 0 or 1 ?Cal,1 0


Wait 300ms Dec ASCII Null Dec ASCII Null
no calibration only zero point calibration

or 1 ?Cal,2 0 or 1 ?Cal,3 0
Dec ASCII Null Dec ASCII Null
only high point calibration zero and high point calibration

This device comes pre-calibrated.


Custom calibration should not be performed
without scientific grade calibration gasses.

49 Copyright © Atlas Scientific LLC


Export calibration
300ms processing delay
Command syntax Export: Use this command to download calibration settings

Export,? calibration string info


Export export calibration string from calibrated device

Example Response

Export,? 1 10,120 0 Response breakdown


Wait 300ms Dec ASCII Null 10, 120
# of strings to export # of bytes to export

Export strings can be up to 12 characters long

Export 1 59 6F 75 20 61 72 0 (1 of 10)
Wait 300ms Dec ASCII Null

Export 1 65 20 61 20 63 6F 0 (2 of 10)
Wait 300ms Dec ASCII Null

(7 more)

Export 1 6F 6C 20 67 75 79 0 (10 of 10)


Wait 300ms Dec ASCII Null

Export
1 *DONE 0
Wait 300ms Dec ASCII Null

50 Copyright © Atlas Scientific LLC


r 0.2
Import calibration
300ms processing delay
Command syntax Import: Use this command to upload calibration
settings to one or more devices.

Import,n import calibration string to new device

Example Response
Import, 59 6F 75 20 61 72 (1 of 10) 1 0
Wait 300ms Dec Null

Import, 65 20 61 20 63 6F (2 of 10)
1
2
1 0 TX RX
3 Wait 300ms Dec Null
4
RX

MCU
5
TX
6
7

Import, 6F 6C 20 67 75 79 0
8

(10 of 10)
9
10 Wait 300ms Dec
1
Null
[10,120]

Import,n
1
2 TX RX
3

RX
4 1
SCL SDA MCU
5
TX 2
6
7
8
3
9
4
SCL

MCU
10

[10,120] 5
SDA
6
7
8
9
1
SCL SDA 2 10
3
4
SCL [10,120]
MCU
5

0
SDA
6
7 1 *Pending
8
9
10
Dec ASCII Null

system will reboot


[10,120]

1
1 SCL SDA 2

* If one of the imported strings is not


SCL SDA 2
3 3
4
SCL
SDA4
SCL
MCU
5

correctly entered, the device will not


MCU
6
5 SDA
7
8 6

accept the import and reboot.


9
10 7
[10,120] 8
reboot
9
10

[10,120]

51 Copyright © Atlas Scientific LLC


r 0.2
Enable/disable internal temperature
from output string
Command syntax 300ms processing delay

O,t,[1,0] enable or disable internal temperature

Example Response

O,t,1 1 0 enable temperature


Wait 300ms Dec Null

O,t,0 1 0 disable temperature


Wait 300ms Dec Null

O,? 1 ?O,ppm,t 0 if internal temp


Wait 300ms Dec ASCII Null is enabled

Enabling the internal temperature should


only be used to confirm that the device is
at thermal equilibrium. Refer to page 6

52 Copyright © Atlas Scientific LLC


r 0.1
Device information
Command syntax 300ms processing delay

i device information

Example Response
i 1 ?i,CO2,1.00 0
Wait 300ms Dec ASCII Null

Response breakdown
?i, CO2, 1.00
Device Firmware

53 Copyright © Atlas Scientific LLC


r 0.1
Reading device status
Command syntax 300ms processing delay

Status voltage at Vcc pin and reason for last restart

Example Response
Status 1 ?Status,P,5.038 0
Wait 300ms Dec ASCII Null

Response breakdown
?Status, P, 5.038
Reason for restart Voltage at Vcc

Restart codes
P powered off
S software reset
B brown out
W watchdog
U unknown

54 Copyright © Atlas Scientific LLC


Sleep mode/low power
Command syntax
Send any character or
Sleep enter sleep mode/low power command to awaken device.

Example Response
Do not read status byte after
Sleep no response issuing sleep command.

Any command wakes up device

STANDBY SLEEP
5V 45 mA 3.4 mA

3.3V 42 mA 3.0 mA

Sleep

Standby Sleep

55 Copyright © Atlas Scientific LLC


r 0.1
Protocol lock
Command syntax 300ms processing delay

Plock,1 enable Plock Locks device to I2C mode.

Plock,0 disable Plock default


Plock,? Plock on/off?

Example Response
Plock,1 1 0
Wait 300ms Dec Null

Plock,0 1 0
Wait 300ms Dec Null

Green
Green Cyan
Cyan
Plock,?
Taking
Takingreading
reading ?Plock,1 0
Transmitting
Transmitting
1 Standby
Standby
Wait 300ms Dec ASCII Null

Plock,1 Baud, 9600


ALM

TX

cannot change to UART cannot change to UART

56 Copyright © Atlas Scientific LLC


r 0.1
I2C address change
Command syntax 300ms processing delay

I2C,n sets I2C address and reboots into I2C mode

Example Response
I2C,101 device reboot

Warning! n = any number 1 – 127


Green
Changing the I2C address will prevent
communication between the circuit and
Green
Taking reading
the CPU until the CPU is updated with
the new I2C address. Taking reading
Transmitting
Default I2C address is 105 (0x69).

I2C,101

(reboot)

57 Copyright © Atlas Scientific LLC


r 0.2
Factory reset
Command syntax Factory reset will not take the device out of I2C mode.

Factory enable factory reset I2C address will not change

Example Response
Factory device reboot
Green Green
Taking reading
Clears custom calibration Taking reading
Transmitting
LED on
Response codes enabled

Factory

(reboot)

58 Copyright © Atlas Scientific LLC


r 0.1
Change to UART mode
Command syntax
Baud,n switch from I2C to UART

Example Response
Baud,9600 reboot in UART mode

GreenGreen Cyan Cyan Purple Green Red Red


Purple Cyan Whit
300
RT standby
UART standby
Taking Taking
1200
readingreadingChangingUART standby
Changing CommandCommand
Taking reading
Find
2400 baud rate
baud ratenot understood
not understood
n= 9600
19200
38400
57600
115200

Baud,9600 (reboot)

Changing to
Blue Blue GreenGreen Purple
Purple
UART mode GreenWhit
Blue Red Red
C standby
I2C standby readingreadingChanging
Taking Taking Changing
I2C standby
CommandCommand Find
Taking reading
I2C address
I2C addressnot understood
not understood

59 Copyright © Atlas Scientific LLC


r 0.1
Manual switching to UART
• Make sure Plock is set to 0
• Disconnect ground (power off)
• Disconnect TX and RX
• Connect TX to ALM
• Confirm RX is disconnected
• Connect ground (power on)
• Wait for LED to change from Blue to Green
• Disconnect ground (power off)
• Reconnect all data and power

Example
Short
ALM
RX

Wrong Example Disconnect RX line


Short
RX

60 Copyright © Atlas Scientific LLC


r 0.1
Datasheet change log
Datasheet V 1.4
Added life expectancy to the cover page, and moved Default state to pg 11.

Datasheet V 1.3
Added page about pointing the CO2 sensor at bright lights on pg 4.

Datasheet V 1.2
Revised response for the sleep command in UART mode on pg 29.

Datasheet V 1.1
Added more information on the Export calibration and Import calibration commands.

Datasheet V 1.0
New datasheet

Firmware updates
V1.0 – Initial release (Sept 12, 2018)

61 Copyright © Atlas Scientific LLC


Warranty
Atlas Scientific™ Warranties the EZO-CO2™ Embedded NDIR CO2 Sensor to be free of defect
during the debugging phase of device implementation, or 30 days after receiving the
EZO-CO2™ Embedded NDIR CO2 Sensor (which ever comes first).

The debugging phase


The debugging phase as defined by Atlas Scientific™ is the time period when the
EZO-CO2™ Embedded NDIR CO2 Sensor is connected into a bread board, or shield. If the
EZO-CO2™ Embedded NDIR CO2 Sensor is being debugged in a bread board, the bread
board must be devoid of other components. If the EZO-CO2™ Embedded NDIR CO2
Sensor is being connected to a microcontroller, the microcontroller must be running code
that has been designed to drive the EZO-CO2™ Embedded NDIR CO2 Sensor exclusively
and output the EZO-CO2™ Embedded NDIR CO2 Sensor data as a serial string.

It is important for the embedded systems engineer to keep in mind that the following
activities will void the EZO-CO2™ Embedded NDIR CO2 Sensor warranty:

• Soldering any part to the EZO-CO2™ Embedded NDIR CO2 Sensor.

• Running any code, that does not exclusively drive the EZO-CO2™ Embedded
NDIR CO2 Sensor and output its data in a serial string.

• Embedding the EZO-CO2™ Embedded NDIR CO2 Sensor into a custom made
device.

• Removing any potting compound.

62 Copyright © Atlas Scientific LLC


Reasoning behind this warranty
Because Atlas Scientific™ does not sell consumer electronics; once the device has been
embedded into a custom made system, Atlas Scientific™ cannot possibly warranty the
EZO-CO2™ Embedded NDIR CO2 Sensor, against the thousands of possible variables that
may cause the EZO-CO2™ Embedded NDIR CO2 Sensor to no longer function properly.

Please keep this in mind:


1. All Atlas Scientific™ devices have been designed to be embedded into a custom
made system by you, the embedded systems engineer.

2. All Atlas Scientific™ devices have been designed to run indefinitely without
failure in the field.

3. All Atlas Scientific™ devices can be soldered into place, however you do so at your
own risk.

Atlas Scientific™ is simply stating that once the device is being used in your application,
Atlas Scientific™ can no longer take responsibility for the EZO-CO2™ Embedded NDIR CO2
Sensor continued operation. This is because that would be equivalent to Atlas Scientific™
taking responsibility over the correct operation of your entire device.

63 Copyright © Atlas Scientific LLC

You might also like