- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I am trying to run PAS CO2 mini board on raspberry pi 3 using the python SMBus library for the i2c protocol.
I have a couple of questions regarding how to implement it.
1. My hardware setup is to connect four wires between the pi3 and CO2 mini board: 3.3v, GND, SCL, SDA.
Is this correct?
2. Referring to the Arduino application in the application note, I am setting the instructions step by step in python:
After reading ID, I wrote a code to read the sensor status (0x01). The return value is supposed to be 0xC0, but it appears to be 0xD0 (0b11010000.) In the register map description sheet provided, 4th bit means:
So, I decided to clear this bit by setting 1 to the first bit in the same register address, which is:
After that, I initially set it to idle mode. Then, I set the measurement rate to 10s just like what is shown above in the Arduino application and configured continuous mode by writing 0x02 to the 0x04 register address.
Then, I wrote a code to read the return value of the 0x07 register address, which is supposed to return 0x10 (0b00010000), which means data is ready to be read as written in the registermap description. However, for me, the return value is shown to be 0x02. This bit 2 indicates in the registermap description:
Finally, when I tried to read the CO2 value, the combined ppm was 62454 something like this in decimal.
What did I do wrong?
I can share my python code tomorrow in the morning, but it is pretty much the same as the Arduino application shown above.
Any help would be appreciated.
Thank you,
Nakseung Choi.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SSOLCHOI ,
Can you please try providing filtered 12V supply either using the Sensor2Go kit 12V supply or capacitors as shown in Figure 6 on Page 12 of the datasheet : https://www.infineon.com/dgdl/Infineon-PASCO2V01-DataSheet-v01_01-EN.pdf?fileId=8ac78c8c80027ecd0180... .
You can also refer this thread for further details: https://community.infineon.com/t5/CO-sensor/CO2-value-read-by-Sensor2Go-Kit-is-different-than-CO2-va... .
Hope this helps !
Best regards,
Deepa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SSOLCHOI ,
Please confirm if you are powering the mini board with 12V as well, as you happen to have missed it in the listed connections. In case you missed, do try after providing the 12V supply in addition to the other mentioned connections and let us know if you still face issues !
Best regards,
Deepa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response.
I am supplying 12V (battery) to the VDD pin, but I still have the same issue.
After setting the measurement time and continuous mode, reading 0x07 still gives me 0x02 as a return value instead of 0x10. I wonder why.
Also, there is another big issue I found is that the sensor device disconnects i2c communication from the master every 10s.
when the time that my code tries to read data from 0x05 register address is the same as the time the device disconnects, it throws an error. Is this because I set the measurement period as every 10 seconds?
Thank you,
Choi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SSOLCHOI ,
Can you please try providing filtered 12V supply either using the Sensor2Go kit 12V supply or capacitors as shown in Figure 6 on Page 12 of the datasheet : https://www.infineon.com/dgdl/Infineon-PASCO2V01-DataSheet-v01_01-EN.pdf?fileId=8ac78c8c80027ecd0180... .
You can also refer this thread for further details: https://community.infineon.com/t5/CO-sensor/CO2-value-read-by-Sensor2Go-Kit-is-different-than-CO2-va... .
Hope this helps !
Best regards,
Deepa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the feedback Deepa_V.
I was able to get it running yesterday.
Thank you,
Justin Choi