Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with new firmware. #3

Closed
cracrama opened this issue Oct 12, 2022 · 11 comments
Closed

Issue with new firmware. #3

cracrama opened this issue Oct 12, 2022 · 11 comments

Comments

@cracrama
Copy link

Hi. Many thanks for you work
Unfortunately i have issues with new firmware.
After installation of new firmware (_CG_RadSens.h) for ESP home. I getting sudden spikes in RAD readings from time to time always 819 251 microrad . With previous firmware version (that with 3 files) I had only big spike when i was starting device and later measurements were stabilized.
Is it something related with added CPM counter? (too many info on I2C?)
Can you please advise?

@maaad
Copy link
Owner

maaad commented Oct 12, 2022

Hi,
What version of radsens board do you have? I've got 1v2 and that code mayn't work correctly with 1v5.

  1. Try to check soldering or wires from esp to radsens, bad connection, low voltage or voltage interference problems can affect sensor readings.
  2. Try to remove CPM-related parts from the code: https://gist.github.com/maaad/7135ded40c08b3e9e45755b6fa771a1b and check readings

@cracrama
Copy link
Author

Hi maaad
Thanks for quick response. And you are right - I have just checked my board version and it's 1v5. So that is probably the problem.
I have tried to remove CPM section but with no success - same outcome like before.
Soldering seems fine since it's working with older firmware version but I will try to investigate further.

However, for you information with previous firmware (3 files in Radsense 1v2 folder) I had similar spikes but opposite - spike drops to 0 microrads from time to time, but that wasn't the problem because it wasn't ruining graph. I have just switched to old firmware and so far i will stick with it since it was much more reliable for long term statistics.
Anyway - many thanks for your help
I will wait until some solution wile come up.

@cracrama
Copy link
Author

Hi
I have been experimenting with shielding but I'm getting same effect. - Gap in graph illustrates shielding installation.
I will do some more experiments but seems like it indicates that firmware is for RadSens 1v2 and has issues with 1v5.

Geiger

Many thanks for response anyway. Will wait and search for another solution.
Best regards.

@cracrama cracrama reopened this Oct 15, 2022
@maaad
Copy link
Owner

maaad commented Oct 18, 2022

Please try

switch on very_verbose level

logger:
  level: very_verbose

and catch output when problem appears

@cracrama
Copy link
Author

cracrama commented Oct 18, 2022

Hi
I have managed to record spike as you requested. Please see attached log. - Spike happened at [21:31:43]
Additionally I have removed any other devices from configuration and I have left only RadSense. "old" configuration (with 3files) but that had no effect. I have also changed default I2C rate to 100KHz but with no result.

logs_1s_logs.txt

Many thanks and best regards.

@maaad
Copy link
Owner

maaad commented Oct 19, 2022

@cracrama
Copy link
Author

cracrama commented Oct 19, 2022

Hi
I have tried this firmware with new config and there is similar effect. Same spikes but in opposite direction (up)
I'm rather not experienced but it seems like all data are same like original _CG_RadSens.h except there is no PCM section'
Is this ok?
Please see below.

Geiger

Config with new _CG_RadSens.h file:

esphome:
...
libraries:

  • Wire
  • "climateguard/ClimateGuard RadSens"
    includes:
  • RadSens1v2/_CG_RadSens.h

i2c:

...

sensor:

  • platform: custom
    lambda: |-
    auto rad_sens = new MyRadSens();
    App.register_component(rad_sens);
    return {rad_sens->IntensityDynamic_Sensor, rad_sens->IntensityStatic_Sensor, rad_sens->CurrentCPM_Sensor, rad_sens->MaxCPM_Sensor};
    sensors:
    • name: "Dynamic intensity"
      id: dynamic_intensity
      accuracy_decimals: 1
      unit_of_measurement: μR/h
    • name: "Static intensity"
      accuracy_decimals: 1
      unit_of_measurement: μR/h

Best Regards.

@maaad
Copy link
Owner

maaad commented Oct 20, 2022

'I'm rather not experienced but it seems like all data are same like original _CG_RadSens.h except there is no PCM section'
Is this ok?'
Yep, but all data from radsens collected in loop() and published in update() thats might be more correct. CPM section removed for a test.
Correct esphome config:
'''return {rad_sens->IntensityDynamic_Sensor, rad_sens->IntensityStatic_Sensor};'''
Try to experiment with SECONDS_PER_INTERVAL value, e.g. 1 or 2 or 3 etc
Looks like esp doesn't have time to get i2c data from radsens in 1v5.

@cracrama
Copy link
Author

cracrama commented Oct 24, 2022

Hi Max.
Hope you ok
I have made a few atempts but with similiar outcome. When I'm trying to switch values they becoming more rare, but it's imposible to remove this spikes completely. However I have find solution - hopefully that will not deform readings significantly.
So my solution which works is to add to config:

  filters:
      - median

So config looks like:

- platform: custom
  lambda: |-
  auto rad_sens = new MyRadSens();
  App.register_component(rad_sens);
  return {rad_sens->IntensityDynamic_Sensor, rad_sens->IntensityStatic_Sensor};
  sensors:
    - name: "Dynamic intensity"
      id: dynamic_intensity
      accuracy_decimals: 1
      unit_of_measurement: μR/h
      state_class: measurement
      filters:
      - median
    - name: "Static intensity"
      accuracy_decimals: 1
      unit_of_measurement: μR/h
      state_class: measurement
      filters:
      - median

So far it works
Really appriciate help.
Best regards.

@maaad
Copy link
Owner

maaad commented Oct 24, 2022

Cool!
I'll add this workaround to the README file.

@cracrama
Copy link
Author

Ok I will close this issue.
Many thanks Max for your work
All the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants