For related documents and software, please visit:
Download our free GreenPAK Designer software  to open the .gp file  and use the GreenPAK development tools  to freeze the design into your own customized IC in a matter of minutes.
Dialog Semiconductor provides a complete library of application notes  featuring design examples as well as explanations of features and blocks within the Dialog IC.
- GreenPAK Designer Software, Software Download, and User Guide, Dialog Semiconductor
- AN-1146 A GreenPAK Carbon Monoxide Detector.gp, GreenPAK Design File, Dialog Semiconductor
- GreenPAK Development Tools, GreenPAK Development Tools Webpage, Dialog Semiconductor
- GreenPAK Application Notes, GreenPAK Application Notes Webpage, Dialog Semiconductor
- SLG46140 Datasheet, Dialog Semiconductor
In this project, the GreenPAK4 is used in the design of a carbon monoxide detector. Carbon monoxide (CO) gas is odorless, colorless, and tasteless, and can lead to carbon monoxide poisoning and ultimately death, depending on the amount of exposure. CO gas is a common product of combustion, and can be produced from cigarette smoke, wood-burning stoves, faulty furnaces and heaters, and many other household sources. Since it’s easily produced and undetectable by human senses, many homes and businesses use CO detectors to sound an alarm when the gas is present above its normal concentration of 0.5 to 5 ppm (parts per million). At 35 ppm, constant exposure will lead to headaches and dizziness within 6-8 hours.
The external CO sensor used in this project is the SPEC CO sensor 100-102. This is a 15x15 mm, low power sensor that can detect CO at up to 1000 ppm, well above the danger threshold of 35 ppm.
The SPEC CO sensor produces a current that is directly proportional to the concentration of ambient CO, per the following formula:
Using this formula, at 35 ppm we can expect Isensor to be, on average, 166.25 nA.
To use this output with GreenPAK4, it’s necessary to convert Isensor into a voltage. This is accomplished with a conditioning circuit called a potentiostat. Figure 1 shows the schematic for the potentiostat circuit.
In Figure 1, Isensor is the output current from the Working Electrode (WE). The transimpedance amplifier of the potentiostat circuit, configured with op-amp U2, converts Isensor to Vout per the equation
Using a value of 1.2 MΩ for R7 (in Figure 1), we can calculate that at 35 ppm of CO, Vout will be (on average) 200 mV. This will be the reference voltage for the CO danger threshold.
For easy prototyping, both the potentiostat and LED/Alarm circuit were built on a breadboard (photo in Figure 3).
A high-level overview of the complete CO detector system is illustrated in Figure 4.
To configure the GreenPAK4, you must first download and install GreenPAK Designer. Open the GreenPAK Designer Launcher, and select the appropriate GreenPAK model. This application uses the GreenPAK4 SLG46140V .
If you’re unfamiliar with GreenPAK Designer, you can find video tutorials here.
Using GreenPAK Designer, we configure the GreenPAK4 to control the potentiostat and LED/Alarm circuits.
The potentiostat circuit measures the ambient CO levels, which linearly correspond to the output voltage (labelled Vout in Figure 4). The GreenPAK4 will be configured to compare Vout to a reference of 200 mV, and then to turn on the LED/Alarm circuit if Vout>200 mV.
To configure the GreenPAK, we’ll start by using PIN 10 to read the value of Vout.
For the purposes of this application, we’re only concerned with whether or not the amount of ambient CO exceeds the threshold value of 35 ppm. To determine this, we’ll make use of one of the GreenPAK4’s two analog comparators (ACMPs). Again, since we know 35 ppm of CO results in an output voltage of 200 mV, we’ll set 200 mV as the reference value of one of the comparator inputs. We’ll configure ACMP0 as:
In order to save power, we can use GreenPAK to implement on/off cycles of the potentiostat circuit. We configure PIN 4 to output the power for the potentiostat circuit:
The longer the potentiostat circuit is powered on, the more stable the output. For this application, we’ll create a cycle of 20 seconds on/20 seconds off for the potentiostat and comparator, using a combination of a counter and D Flip Flop (DFF). This will require 3 blocks: the WS Ctrl/14-bit CNT0/DLY0 block, the DFF/LATCH4 block, and the OSC block.
We’ll use a latch, DFF/LATCH5, to save the comparator output between power cycles. Finally, we’ll use PIN 11 to take the output from the latch to drive the LED/Alarm circuit.
Altogether, Figure 13 shows the internal connections of the GreenPAK.
To ensure the system works, we used a CO test kit having a small glass vial of CO and a plastic bag enclosure.
To test the system, we simply put the tube and potentiostat circuit inside the bag, seal it, and break the tube containing CO.
This should create conditions of approximately 400 ppm of CO.
By powering the potentiostat with a constant voltage of 5 V from the GreenPAK Universal Development Board, we can test the operation of the CO sensor itself.
Once the vial of CO was broken, the output of the potentiostat climbed from 0 V to a maximum value of approximately 2.89 V, then steadily decreasing from this value as more and more CO escaped the bag.
Using the formulas provided in the External Components section, we can conclude that at its highest output, the sensor detected a CO concentration of approximately 500 ppm. This is consistent with the concentration of the test kit, suggesting correct operation of the sensor. [Note: for commercial applications, the sensor may require more precise calibration.
With the sensor providing the expected output, we can turn to testing the configuration of the GreenPAK.
This involves switching the constant 5 V power supply to the 20 second power cycle taken from PIN 4, as well as connecting the output of the potentiostat to PIN 10 and the LED/Alarm circuit to PIN 11. This involves switching the constant 5 V power supply to the 20 second power cycle taken from PIN 4, as well as connecting the output of the potentiostat to PIN 10 and the LED/Alarm circuit to PIN 11.
Figure 15 shows the GreenPAK Designer emulation window for this system.
Testing of the full system was successful. Outside of the plastic bag, the LED and alarm remain off. Inside the bag, with CO present, the LED lights up and the alarm sounds continuously, during both the on and off segments of the power cycle.
When the bag is opened and the CO is allowed to escape, the LED and alarm turn off as the CO concentration returns to below the threshold value.
By using an external power source, we can measure the operating current of the entire detector system. Table 1 summarizes these measurements.
State of 20 Second On/Off Power Cycle
Operating Current (µA)
There are multiple features one could add to this application to extend its functionality. For example, other sensors could be added to create a more versatile detector. Many commercial CO detectors also combine smoke detectors to alert occupants in case of fire.
Another possible extension is to make use of the functional relationship between the concentration of CO and output voltage of the potentiostat circuit. By routing the potentiostat output to the GreenPAK4’s analog-to-digital converter (ADC), you can determine the exact concentration of CO detected and display this information to a user. For example, you could add an external display to show the CO concentration in ppm, or send the data to a computer or smartphone.
A more qualitative effect could be achieved without the use of the ADC. Instead, one could use multiple analog comparators to light up multiple LEDs; the more LEDs lit, the higher the CO concentration.
In this application, we used GreenPAK4 to construct a carbon monoxide detector system. Although the design example shown was fairly basic, the GreenPAK can easily be used to customize a detector design for a variety of purposes. The development hardware and simple GUI interface of GreenPAK Designer allows users to quickly implement their designs.