Moteino R6 + SCD30 Temp/CO2/Humidity sensor - I2C issue [solved:soldering fix]

Started by AlexWans, April 22, 2021, 08:33:00 AM

AlexWans

Hello to all,

I am implementing the SCD30 temperature, humidity and CO2 sensor. I already did it with the Moteino-Mega R4 by I²C communication and everything went well.
I just bought a Moteino R6 because I need a smaller board than the MEGA to fit in a box. I wired the SCD30 to the A5 (SCL) and A4 (SDA) ports as well as to the power ports (GRD and 3.3V). I loaded my program and the sensor is not recognized anymore...

I then did an I²C scan (https://github.com/RobTillaart/Arduino/blob/master/sketches/MultiSpeedI2CScanner/MultiSpeedI2CScanner.ino), first on the Moteino R4 MEGA => the sensor is found
Then on the Moteino R6 => the sensor is not detected.

I did not put a pull-up resistor because the SCD30 sensor already has one (see picture). Should I still put one on the Moteino side?
I also know that the SCD30 accepts a maximum transmission speed of 100kHz, can the problem come from there?
I just use the Wire.h library for the I2C connection with a Wire.begin in the Arduino IDE.

Does anyone have an idea where my error could come from?
What is the difference in I2C communication between the MEGA moteino and the classic one?

Thanks in advance for your help!!!

Felix

The MoteinoMEGA and Moteino are very similar in many ways. Generally the same AVR code should compile and run on both.
It could be weak i2c pullups and difference in wiring length.
I believe the standard I2c speed is 100khz so no need to fiddle with that. There is no difference in i2c communication between the 2 MCUs AFAIK, I have never observed issues like this.
Try another MoteinoR6 just to see if it behaves identically, although there should be no reason to suspect a faulty R6.
Let me know how this goes.

Kylix

I'm using it with a normal Moteino R4 and this library - https://github.com/paulvha/scd30, without issues.

AlexWans

Hi guys and thanks a lot for your quick answers. I tried with an other moteino R6 and it works perfectly. Then I resolder the pin of the first one and it works also... Certainly a soldering issue...

sorry for the inconvenience.

Have a nice day!