gabrielcsapo / gabrielcsapo.com

📕 code samples and content on my blog https://www.gabrielcsapo.com
https://www.gabrielcsapo.com
0 stars 0 forks source link

arduino-capacitive-soil-moisture-sensor/ #9

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Arduino - Capacitive Soil Moisture Sensor

https://www.gabrielcsapo.com/arduino-capacitive-soil-moisture-sensor/

severin-bruhat commented 2 years ago

Hi, thanks for this article, the calibration sounds really straightforward. However when I do that with a couple of v2.0 moisture sensors, I get random inconsistent wet and dry numbers, so it's impossible for me to calibrate. For instance I would get dry = 61 and wet = 43, but after a few second, my sensor, in the water would indicate 63. I have no idea what's going on. Any idea? Thank you

gabrielcsapo commented 2 years ago

hey @severin-bruhat, sadly it is one of those things that sometimes you might get a bad sensor.

Can you post the sensor you are using?

severin-bruhat commented 2 years ago

Hey, thanks for replying to me.

I bought those ones: https://www.amazon.co.uk/gp/product/B09C616HQH/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1 it says v1.2, but I received v2.0 version. I've got 6 of them, and they all return the same values. See an example: Plant 1 - Moisture Level: 65.00 -> dry Plant 1 - Moisture Level: 65.00 -> dry Plant 1 - Moisture Level: 66.00 -> dry Plant 1 - Moisture Level: 67.00 -> dry Plant 1 - Moisture Level: 73.00 -> dry Plant 1 - Moisture Level: 74.00 -> dry Plant 1 - Moisture Level: 74.00 -> wet Plant 1 - Moisture Level: 72.00 -> wet Plant 1 - Moisture Level: 73.00 -> wet Plant 1 - Moisture Level: 64.00 -> wet Plant 1 - Moisture Level: 61.00 -> wet Plant 1 - Moisture Level: 61.00 -> wet Plant 1 - Moisture Level: 60.00 -> wet Plant 1 - Moisture Level: 75.00 -> wet Plant 1 - Moisture Level: 66.00 -> wet Plant 1 - Moisture Level: 65.00 -> wet

The code I use: void loop() { Serial.print("Plant 1 - Moisture Level: "); sensor1Value = analogRead(Pin1);

Serial.println(sensor1Value); delay(5000); }

This makes no sense to me.

On Wed, May 25, 2022 at 12:44 AM Gabriel Csapo @.***> wrote:

hey @severin-bruhat https://github.com/severin-bruhat, sadly it is one of those things that sometimes you might get a bad sensor.

Can you post the sensor you are using?

— Reply to this email directly, view it on GitHub https://github.com/gabrielcsapo/gabrielcsapo.com/issues/9#issuecomment-1136537171, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJFF6TG3CJWYMVIUP67JP3VLVSW3ANCNFSM5W22J54Q . You are receiving this because you were mentioned.Message ID: @.***>

-- Séverin BRUHAT