Forum Replies Created
-
AuthorPosts
-
entaro
KeymasterHello Peter,
uRADMonitor has gathered an impressive amount of data since the project started. Public access is granted to the last 2 months of data only. For each data call, you should request not more than 30 days of data. What this means is that for any active unit on the map, you can look at radiation data for December or January.
Access to full database is possible.
entaro
KeymasterThat robot looks awesome! Yes, for O2, the return is the percentage. As for ppm, I will get back to you on email.
entaro
KeymasterAwesome,
Let me know if there is anything I can do to help.
entaro
KeymasterHi, I just sent it via email. Please make sure your usbAsp is set to 3.3V! This is important, or you risk damaging the model A board.
entaro
KeymasterThanks for the “hands-on” data . I can confirm CO2 is bad, especially when you need to do sensitive work as it’s getting harder to concentrate.
Flag changed to the right one.
entaro
KeymasterHi Jeff,
It’s no bug, but the server does additional compensation over the measured data. Here, the internal heating of the electronics produces a drift. Therefore, the correct info is displayed on the server. The best way to get the data is via the server API, presented ni the Dashboard.
In later firmware versions, the local data is set to match the server data. Would you like to update your unit’s firmware? It’s easy, see: https://www.uradmonitor.com/uradmonitor-model-a3-firmware-upgrade/
entaro
KeymasterYes, that would work too. Something similar was added in firmware v130 as a fix:
// an uint16_t stores 16 bits, we use first bit for sign, and following 15 bits for number (0..32767) // result is divided by 100 for a real with 2 decimals, max is 327.00 uint16_t di(double val) { uint16_t res = 0; uint16_t mask = 1<<15; if (val > 327 || val < -327) return res; if (val < 0) { val *= -1000; res = val / 10; // fix double approximation issue res |= mask; } else { val *= 1000; res = val / 10; // fix double approximation issue } return res; }
and
// an uint16_t stores 16 bits, we use first bit for sign, and following 15 bits for number (0..32767) // result is divided by 100 for a real with 2 decimals, max is 327.00 double id(uint16_t val) { double res = 0; uint16_t mask = 1<<15; // check negative number if (val & mask) { val &= ~mask; // remove sign bit res = val; res = -res; } else { res = val; } res /= 100.0; // restore the 2 decimals return res; }
It’s pretty much the same thing.
entaro
KeymasterGreat to see this working! You can use http://uradmonitor.com/?open=8200009C or the new beta dashboard https://uradmonitor.com/tools/dashboard-04/?open=8200009C
entaro
KeymasterSwitching the autocalibration off and automatic calibration every month at a quit moment ?
That’s a very good idea!
entaro
KeymasterI’ve provided more details on email, please check it. But for the continuity of the topic, the bug becomes apparent when you decode the “converted” values. Please add the decoding function:
double int2double(uint16_t val) { int8_t d = (val >> 8) & 0xFF; int8_t i = (val & 0xFF) - 127; if (i < 0) d *= -1; return i + d / 100.0; }
The if (i < 0) d *= -1; won't trigger when i is 0. The problem with this algorithm is that we have no way of knowing the sign, when the integer byte is 0. Exactly the bug you have spotted. Try this code to the "converted" values, and check the more details I sent on your email. I tried to see if this is fixable on the server side, but apparently information is lost on the conversion. A new encoding scheme has been added to the firmware. We will need to install this new firmware on all affected units.
entaro
KeymasterThanks to your findings, I was able to identify a bug in the temperature encoding scheme:
uint16_t double2int(double val) { int8_t sintp = (int8_t)val; //signed integer part int8_t sdecp = (val - sintp ) * 100; //signed decimal part uint8_t udecp = sdecp>0?sdecp:-1*sdecp; //removed decimal sign uint8_t uintp = sintp + 127; //convert to unsigned uint16_t res = (udecp << 8) | (uint16_t)uintp; //pack it together return res; }
The sign is lost when the integer part is 0, exactly all values between 0 and -1. The fix is added to the firmware as we speak, unless it can be solved on the server side.
For CO2, let’s continue herE: https://www.uradmonitor.com/topic/co2-sensor/
entaro
KeymasterThe readings across December. I was able to identify a single “jump”. Please confirm. We can have the auto-calibration disabled, but I don’t think it’s a good idea. All tests on these sensors have shown good correspondence to the reference unit. I’m concerned that disabling auto-calibration will induce a building offset over time.
Attachments:
entaro
KeymasterThe PM2.5 data is originally generated by the A3, which is then used to extrapolate the PM1.0 / PM10.0 via a linear model, which you probably saw already due to the common chart shapes. There’s a lot of literature covering this topic, and more transformation models. So we might see changes to these calculations in the future.
entaro
KeymasterDone! Happy New year!
entaro
KeymasterSounds good, let me know when you get the usbAsp , I will assist you further.
-
AuthorPosts