paulvha / scd30

arduino esp8266 ESP8266 SCD30 SCD-30 ESP32 UNOR4
Other
41 stars 11 forks source link

TemperatureOffset #8

Closed DirkScheumann closed 3 years ago

DirkScheumann commented 3 years ago

Hi Paul, I never see any changes if I put the airSensor.setTemperatureOffset((float) 6); line in my programm for the arduino. Is it possible there is a similar problem with the format of the numbers like there was with the readings I never got in my last post? The numbers change like crazy if I put numbers like 200 in the program but these numbers are not right either. Do I have to put 10 in the program to change te reading by one degree?

-Dirk Scheumann

paulvha commented 3 years ago

HI Dirk

Happen to be behind my computer.. and checked the source code:

If it does not impact Temperature and/or Humidity, try to set with a uint16 instead of float

setTemperatureOffset(uint16_t tempOffset)

But now each tick is 0.01C so for 6 degrees adjustment sent 6 x 100 = 600.

regards, Paul


Van: DirkScheumann notifications@github.com Verzonden: donderdag 15 oktober 2020 18:54 Aan: paulvha/scd30 scd30@noreply.github.com CC: Subscribed subscribed@noreply.github.com Onderwerp: [paulvha/scd30] TemperatureOffset (#8)

Hi Paul, I never see any changes if I put the airSensor.setTemperatureOffset((float) 6); line in my programm for the arduino. Is it possible there is a similar problem with the format of the numbers like there was with the readings I never got in my last post? The numbers change like crazy if I put numbers like 200 in the program but these numbers are not right either. Do I have to put 10 in the program to change te reading by one degree?

-Dirk Scheumann

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulvha%2Fscd30%2Fissues%2F8&data=04%7C01%7C%7C90acab5e9c3c4a81120808d8712b0922%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637383776928273452%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=noOIFOjJJDlF9erYXDIjIX%2BJcwGKBcaP78f03SS8zg8%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2GBPAFXBX2ODPG4VV4YHLSK4SNZANCNFSM4SSH3TPQ&data=04%7C01%7C%7C90acab5e9c3c4a81120808d8712b0922%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637383776928283446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hHwgYDsDwGQE5SQSJnGbgmq1Eh3sD0N2lyn3c2irYjg%3D&reserved=0.

DirkScheumann commented 3 years ago

Hi, the float changed the temperature, but the humidity went tru the roof. Value always around 90. The uint16_t doesn't change anything compared to no temperature offset. The sensor shows 29C and I would like to get it to 23C. I have to write it like this: airSensor.setTemperatureOffset((uint16_t) 600); or am I doing something wrong?

-Dirk

paulvha commented 3 years ago

I have just checked. No issues here. I have added an example4 to test. you can manually add the wanted degree change to the measured value ( e.g. 6 for 6 degrees). It will loop to display the SCD30 results and thus you can see the impact.

DirkScheumann commented 3 years ago

Hi Paul, thanks for the program. I pt it on the Arduino and checked the reading of the sensor. It startet with 26C. I put in 3 and the behavior of the sensor changed the temperature went up. After 5 min the temperature was 29C. The problem is I didn't want to have 29C, I wanted to have 23C. I put in -3 ant the it changed the number to something wired and the temperature went down to -xxx degrees, very fast. Do you have another idea? Maybe I substract just 3 from the value I get from the sensor and show this number on the display on my Co2-, Temp-, Humidity-meter.

-Dirk

paulvha commented 3 years ago

HI Dirk

You can NOT provide a negative value. The value is UNSIGNED as the SCD30 handle SIGNED. The compensation already negative to compensate for the measurement impact of components on the board that produce heat.

Have the SCD30 run for a while (say an hour) without compensation (set to zero). If the reading output is more or less stable then check what compensation is you want to apply.

As with many sensors you get a better result with having an airmovement along the sensor. A small fan as it does not need to be windforce 11. (I often use an old cooling fan of a processor)

regards, Paul


Van: DirkScheumann notifications@github.com Verzonden: zaterdag 17 oktober 2020 17:45 Aan: paulvha/scd30 scd30@noreply.github.com CC: paulvha paulvha@outlook.com; Comment comment@noreply.github.com Onderwerp: Re: [paulvha/scd30] TemperatureOffset (#8)

Hi Paul, thanks for the program. I pt it on the Arduino and checked the reading of the sensor. It startet with 26C. I put in 3 and the behavior of the sensor changed the temperature went up. After 5 min the temperature was 29C. The problem is I didn't want to have 29C, I wanted to have 23C. I put in -3 ant the it changed the number to something wired and the temperature went down to -xxx degrees, very fast. Do you have another idea? Maybe I substract just 3 from the value I get from the sensor and show this number on the display on my Co2-, Temp-, Humidity-meter.

-Dirk

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulvha%2Fscd30%2Fissues%2F8%23issuecomment-711032630&data=04%7C01%7C%7C7c7a0b58261c4f3d350308d872b3b3aa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637385463417859840%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sTvXt2WjBMjCxikMlK%2BDfiS4P2ruK7XduJXLBTXA8ys%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2GBPB2QFAJSMT6OXEZP33SLG32JANCNFSM4SSH3TPQ&data=04%7C01%7C%7C7c7a0b58261c4f3d350308d872b3b3aa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637385463417859840%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2K9x3KZMeQWZ3FyRLoQS1hXrccwQnBOjyEj0nzRFx8A%3D&reserved=0.

DirkScheumann commented 3 years ago

Hi, I tried several differnt things, but no success. It shows still 6 degrees more than all the other thermometers in the house on the balcony, wherever. As soon as I enter a number in the program example 4, the value goes very fast up, it never goes down. If enter 0 it still goes up and stays at whatever it was going to oustside. Very strange but it doesn't affect the CO2 reading. I put it outside it measures the CO2 somwhere around 450, 480, all good. Any other ideas?

-Dirk

paulvha commented 3 years ago

Hi Dirk

Co2 reading is NOT impacted by this change. That does not mean CO2 is not impacted by temperature, because it is, but that is NOT impacted by setting the offset. Only Temperature and humidity output results are only impacted.

The offset values are stored in NVRAM and thus available after power-up. After power-up first set to 0 and let it go up and stabilize for some time.

I have connected mine to the UNO, started example 4. The temperature around the sensor is 21.8 (external temperature meter), the SCD30 tells 22.98. I have entered 0 and after about 370 seconds the SCD30 shows more or less stable on 25.4. The external temperature meter is showing 22.1. So I enter 3 on 370 seconds and around 970 seconds (that is about 10 min) it shows 22.43. The external temperature meter is still showing 21.8.

regards, Paul


Van: DirkScheumann notifications@github.com Verzonden: zondag 18 oktober 2020 22:33 Aan: paulvha/scd30 scd30@noreply.github.com CC: paulvha paulvha@outlook.com; Comment comment@noreply.github.com Onderwerp: Re: [paulvha/scd30] TemperatureOffset (#8)

Hi, I tried several differnt things, but no success. It shows still 6 degrees more than all the other thermometers in the house on the balcony, wherever. As soon as I enter a number in the program example 4, the value goes very fast up, it never goes down. If enter 0 it still goes up and stays at whatever it was going to oustside. Very strange but it doesn't affect the CO2 reading. I put it outside it measures the CO2 somwhere around 450, 480, all good. Any other ideas?

-Dirk

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulvha%2Fscd30%2Fissues%2F8%23issuecomment-711418371&data=04%7C01%7C%7C5ba69c3fc5ff4fd6eae808d873a51c53%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637386500258133835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Hgtr2IcEyNd6hmJEdsyIi5lYTbHezlxdnTRs5jSqCIs%3D&reserved=0, or unsubscribehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2GBPGHQSVJSA6HGDUZ6LLSLNGKRANCNFSM4SSH3TPQ&data=04%7C01%7C%7C5ba69c3fc5ff4fd6eae808d873a51c53%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637386500258143831%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fGH7cC%2FHK9d0RA7GjtQsPFOyKXQA4Rx8LH7h%2Bg5hKCo%3D&reserved=0.

DirkScheumann commented 3 years ago

Hi Paul,

I tried it yesterday again an it worked without any problems. I did it the same way like you described in you post. I have set it to zero, and just waited until the reading was really stable. Then I set it to 6, because it was 6 degrees off. Until 10-15 minutes it was stable and now it works exactly the way I want.

Thanks for your help. Stay healthy. Covid numbers in the Netherlands are rising.

-Dirk Scheumann

paulvha commented 3 years ago

Thanks Dirk for the update.

I have uploaded yesterday a new version of example4 . You can now adjust with a number behind the decimal poiint eg. 6.2 instead of 6. I have also included a procedure in the top of the sketch to perform the calibration. Turned out I needed 3.1 offset.

I have also added an example5, where the data is displayed on an LCD 16 x2 (Sparkfun). You can set CO2 limit to trigger the display to turn red if above, or only show when it is above, even combine with button to only show normal for 10 seconds after pushing.

As for Covid.. we try to avoid it as much as possible, but I expect we will all going to get it. Many, if not most, without serious health issue, some with. But we are very careful ..

Regards, Paul Verzonden vanuit Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 voor Windows 10

Van: DirkScheumannmailto:notifications@github.com Verzonden: zondag 25 oktober 2020 07:50 Aan: paulvha/scd30mailto:scd30@noreply.github.com CC: paulvhamailto:paulvha@outlook.com; Commentmailto:comment@noreply.github.com Onderwerp: Re: [paulvha/scd30] TemperatureOffset (#8)

Hi Paul,

I tried it yesterday again an it worked without any problems. I did it the same way like you described in you post. I have set it to zero, and just waited until the reading was really stable. Then I set it to 6, because it was 6 degrees off. Until 10-15 minutes it was stable and now it work exactly the way I want.

Thanks for your help. Stay healthy. Covid numbers in the Netherlands are rising.

-Dirk Scheumann

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulvha%2Fscd30%2Fissues%2F8%23issuecomment-716102879&data=04%7C01%7C%7Ca2da4116f30b4e681aee08d878b24830%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637392054387363989%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lkTlwa4IVop5oovRBKn%2BTqqmxPFfgziSFgAAJdSMSLw%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2GBPE46EBIBKYGTHTXFTTSMPDD3ANCNFSM4SSH3TPQ&data=04%7C01%7C%7Ca2da4116f30b4e681aee08d878b24830%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637392054387373983%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=YI8JWjpj4SbdrWcOsKGlPJ27SDfOxcs3pkFCNv%2FAt0I%3D&reserved=0.

DirkScheumann commented 3 years ago

Hi, I used the sensor to build a CO2 meter. I used a 1,8" TFT screen that shows CO2, temperature and the humidity. It also changes the colors of the CO2 value from green to yellow to red. My wife works as a teacher and it helps her to determine if they have to open the windows or not. It gives her an idea how much used air is in the room. I hope it helps her not to get Corona, soon. I also think we get it all, but I hope I can get it if some kind of medication is developped.

-Dirk

paulvha commented 3 years ago

Interesting to see we had the same thought.

Regards,Paul

Verzonden vanuit Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 voor Windows 10

Van: DirkScheumannmailto:notifications@github.com Verzonden: zondag 25 oktober 2020 22:46 Aan: paulvha/scd30mailto:scd30@noreply.github.com CC: paulvhamailto:paulvha@outlook.com; Commentmailto:comment@noreply.github.com Onderwerp: Re: [paulvha/scd30] TemperatureOffset (#8)

Hi, I used the sensor to build a CO2 meter. I used a 1,8" TFT screen that shows CO2, temperature and the humidity. It also changes the colors of the CO2 value from green to yellow to red. My wife works as a teacher and it helps her to determine if they have to open the windows or not. It gives her an idea how much used air is in the room. I hope it helps her not to get Corona, soon. I also think we get it all, but I hope I can get it if some kind of medication is developped.

-Dirk

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulvha%2Fscd30%2Fissues%2F8%23issuecomment-716217270&data=04%7C01%7C%7C60ef1af8efd047754fa908d8792f7ab3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637392592106615723%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MvFNgWjm5uYamFIv3rZ%2Bnftm5pfqUNAstXz%2F1dYpcY4%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2GBPGZX4G646YJTDDTXE3SMSMETANCNFSM4SSH3TPQ&data=04%7C01%7C%7C60ef1af8efd047754fa908d8792f7ab3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637392592106615723%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vP9fke1chWFMfIyfzHorb9chICwh3QcTdZ26p7FsGhY%3D&reserved=0.

paulvha commented 3 years ago

issue has been solved