SCD30 [Solved]

I sense I am out of my depth struggling to get the SCD30 to work using a Uno R3 and SparkFun's coding. I have been linking the SCD30's TX / SCL pin to the Uno's RX / Digital Pin 0 and the SCD's RX / SDA pin to the Uno's TX / Digital Pin 1. But you have been talking about I2C which has eventually dawned on me as presumably meaning I should be linking SCD30's TX / SCL pin to the Uno's SCL pin (being the unlabelled second pin beyond the labelled Digital Pin AREF) and the SCD's RX / SDA pin to the Uno's SDA pin (being the unlabelled pin next to the labelled Digital Pin AREF). I hesitate to just link them up given your reports on how fragile the sensor is. Could someone confirm this is what I should be doing?

@bobmehew, do not hijack. Thread split.

Hi bobmehew,

I'm a novice here too, but my understanding is that the SCD30 can communicate either through Modbus (Tx/Rx) or through I2C (SDA/SCL). The Sparkfun library uses the I2C mode and relies on the Wire library. So, yes you should be connecting to the SCL/SDA pins on the Arduino. You should also leave the SEL pin on the SCD30 floating.

As for static shock sensitivity, I took fairly drastic measures to ensure my sensor was not damaged since my first one didn't work. I don't know if they were necessary since I don't know the cause of the first one not working - could be static or just defective. I think if you ensure that the arduino, scd30, and you are well grounded it should be fine. You can use static gloves or electrical tape on your fingers if you want to be extra safe. You can also check out how to handle sensitive devices here: IBM Documentation

If it doesn't work with those pins, try A4 (SDA), A5 (SCL) (from: Wire - Arduino Reference).

Good luck!

Thanks for the information caplanda.

First I note the preliminary version of the data sheet (0.8 D1 Jan 2018) indicates on page 4 that both Modbus and PWM are not yet supported. So it looks as if one is left with just I2C SCL / SDA mode of information transfer for the time being.

So I coupled the sensor up to the SCL/SDA pins on my Uno R3 board but got no response. (By the way the reference to pins A4 & A5 are to Uno R1 boards which don't have the pin outs beyond AREF.)

I then had a brain wave and set up a separate power supply to the sensor. The data sheet claims it's peak draw is 75mA which I though a Uno could just about manage through one pin. That gave me an encouraging but transient orange glow from the sensor's light grey area when I switched the power on. But still no response.

I then spent several hours tracking through all sorts of things and eventually turned up in SparkFun_SCD30_Arduino_Library.h (well SparkFun_SCD30_Arduino_Library.cpp) a reference to the fact that this coding was created using Ardunio 1.8.5; my version was 1.8.2 of course. Still no response after I updated and recovered all my added libraries. (I am most grateful to whoever put the warning in the uninstall coding to check one's libraries.)

Then on rereading your posting I noted the comment about leaving the SEL pin floating. So I went back to the data sheet which says "Pull to VDD for selecting Modbus". So I thought what about pegging it at ground so it won't be confused. And lo and behold, it worked. I get an orange glow every couple of seconds and a read out of "co2(ppm):556 temp(C):28.2 humidity(%):50.1" on the Serial Monitor. It even reacts to breathing on it in both CO2 and humidity.


Just realised I was wrong in one bit of my last post. I said "By the way the reference to pins A4 & A5 are to Uno R1 boards which don't have the pin outs beyond AREF". That was wrong. I have found out that pins A4 as SDA and A5 as SCL do work on a Uno R3. :blush: