2020-09-05 12:39 PM
I spend whole day traying establish communication between NUCLEO-F)42k6 and CO2 Sensor SCD30 https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/9.5_CO2/Sensirion_CO2_Sensors_SCD30_Interface_Description.pdf
I have connected SDA line from Sensor to D2(PA12) on Nucleo and SCL from Sensor to D8(PF1).
GND from sensor connected to GND on Nucleo and VCC from sensor conected to 3.3 on Nucleo.
I'm using STM32 Workspace and in STM32CubeMX perspective I have configured GPIO pins like described above. Additionally I set No pull up and No pull down for SCL and SDA as it look like its done on sensor board by manufacurer. GPIO Mode Alternate Function Open Drain.
I'm receiving in putty terminal following output:
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒-Buffer
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒-Buffer
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒-Buffer
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒-Buffer
I will be appriciate for help with getting CO2, Huminidity and Temperature readings from this sensor. This is my beggining with STM32 and after whole day I haven't idea how to proceed with that. My code which require correction is below.
2021-08-09 08:55 PM
Hi, can you give us an example of a code that reads CO2 measurment fron SCD30. Thanks
2021-08-09 08:56 PM
Hi, did you fine a solution ?
2022-11-15 05:14 AM
2022-11-17 02:29 AM
Hi, this code worked for me, maybe you can try it and send me back
https://github.com/Ons-zerai/Sending-SCD30-sensor-data-to-a-network-server-via-LoRaWAN-protocol-
Best regards
Ons
2022-11-17 03:12 AM
Hi,
Thanks for your reply...I am using CubeMx to generate the .c code..looks like there is some I2C communication issue..have been trying to do even bitbang code..but not finding any solution.
I have attached the code..have a look and let me know anything needs to be changed.
regards
Ravi
2022-11-17 03:16 AM
2022-11-17 07:08 AM
I think you have not used STM32 controller where it does I2C communication to achieve this..
Let me know if you get any pointers.
2022-11-17 07:17 AM
Hi Ozera,
It looks like you also have SCD30 connected to STM32...can I know which cubeMx version you used to generate the I2C HAL..because we have tried almost all but none is working..
Kindly let me know.
Thanks
Ravi
2022-11-17 07:36 AM
I used SGP30-2.5k sensor without issue with bitbang. Some other sensord from the vendor are not true I2C slaves and special pseudo I2C bit bang sourcs to fill is provided...
2022-11-18 05:58 AM