-
Notifications
You must be signed in to change notification settings - Fork 152
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
Battery and soil sensor invalid readings (0mV) #206
Comments
I would triple-check the soldering from the ESP to the main board. I had a similar situation with a few of mine and after resoldering (one of them took a few tries) it was successful. |
Thanks, I did a triple check on one of the boards. All pads apparently connected (by measuring). Tried resoldering one side, but as I dont have suitable equipment for SMD I'm afraid I'll do more damage than good. The reason I ordered pre-assembled on JLCPCB was to ensure proper soldering. My expectations were that all pads are actually soldered, but as I do not have any prior experience ordering custom PCBs I might have expected too much? |
Hi @seime, tks for the kind words. Glad to hear you managed to order and flash the boards. From the logs, it looks like all ADC functionality is acting weird -- battery, soil moisture and illuminance are all reading 0 V. The battery measurement is internal to the nRF52 chip, so I would first rule out other issues than soldering -- although this issue has happened to me as well. If the module is powered up and running (which it is), I would expect it to read a valid batt voltage. We support both Let us know how it goes, and I can try thinking of other possible issues. |
Thanks for your prompt reply @rbaron . I'm using the nRF52840 in the E73-2G4M08S1C module. I tried to change the overlay file to the bparasite specific one, and then at least battery voltage came alive: This is the config I tried:
Output is now
Ie the battery voltage is now also working. The light sensor was working before as well - that is the lux value is updating but the voltage is always reported at 0... Soil sensor still reading 0mV. Newbie question to nrf programming: The device overlays, is it supposed to be just 1 in our case - or more? |
It looks like it's a good step in the right direction. I have a feeling it could be actually working now, but something is off in the logging of values (compare the 100% soil moisture before to 0% now; and also the 1.43 V for the illuminance vs. 0.02 V before). You can quickly check by resetting the board while squeezing the sensor in your hand -- the soil moisture should say 50%+. In VSCode, I've never had to manually specify the overlay file -- it should be automatically loaded by west from the |
Good morning, Apparently I have done something wrong when I opened the project and built the firmware. After reopening the workspace file it works "better". This is what I get when I press a finger on the board;
The debug log always logs Edit: Photo logging is using soil adc reading; fixed here: #207 Still the soil reading seems to not get converted to millivolts. I can see the raw value changed based on finger pressure: Still something wrong with the overlay? |
Hey @seime, thanks for the PR! Nice catch. For the Then we call adc_raw_to_millivolts_dt that converts the raw value into a millivolt value, taking into account how the ADC channel is configured. For the battery and the phototransistor, this works fine, because they use the 0.6 internal reference in their channels (example). For the soil moisture sampling, I configured it to use the But it looks like then So for now I will suggest that we remove the Tks! |
Thanks @rbaron, I've updated the PR removing the soil voltage reading. Thanks again for your awesome support in resolving my issue! |
Tks! |
Hi,
thank you for your great project!
I ordered a handful of these
v2.0.0
boards pre-soldered from JLCPCB (all components except the battery clip), and I've flashed them with the BLE example. However, the readings from the battery and soil sensor is always 0mV.Here is an excerpt from the log:
Debug steps taken so far:
Reading of battery seen from the debugger:
Any suggestions on how to proceed debugging?
Thanks again for this cool project!
The text was updated successfully, but these errors were encountered: