Author Topic: SoilWatch 10 with particle boards  (Read 12483 times)

mannydeleon99

  • Newbie
  • *
  • Posts: 2
SoilWatch 10 with particle boards
« on: January 27, 2019, 01:19:34 AM »
Hello,

Just go a soilwatch and uploaded the code provided from you website.  I had to remove

//if(is1V1Output == true)
    //analogReference(INTERNAL); //set ADC reference to internal 1.1V

for the code to work.

When I have the sensor submerged in water it ready


ADC = 3729, Moisture value = 656
ADC = 3690, Moisture value = 649
ADC = 3709, Moisture value = 652
ADC = 3733, Moisture value = 656
ADC = 3695, Moisture value = 650
ADC = 3703, Moisture value = 651
ADC = 3711, Moisture value = 652
ADC = 3711, Moisture value = 652
ADC = 3700, Moisture value = 650
ADC = 3708, Moisture value = 652



When in air it

ADC = 231, Moisture value = 31
ADC = 238, Moisture value = 32
ADC = 231, Moisture value = 31
ADC = 236, Moisture value = 32
ADC = 244, Moisture value = 33
ADC = 235, Moisture value = 32
ADC = 232, Moisture value = 31
ADC = 231, Moisture value = 31
ADC = 231, Moisture value = 31
ADC = 230, Moisture value = 31
ADC = 234, Moisture value = 31


This is wrong correct?   Has anyone used these sensor with a particle argon or particle boron yet.  Can someone provide any helpful code.  Thank you

pinolec

  • Administrator
  • Jr. Member
  • *****
  • Posts: 99
Re: SoilWatch 10 with particle boards
« Reply #1 on: January 28, 2019, 10:20:21 AM »
Hi,

It looks perfectly good. It seems that the default ADC mode for this board is 12-bits instead of 10-bits for Arduino UNO. This is why your ADC readings will span from 0 to 4096. To get 0 - 100% readout just modify enter correct minADC and maxADC you have read:

int minADC = 230;                     
int maxADC = 3733;

This should give you Moisture values in 0-100% range. If you like to calibrate the sensor with VWC scale then read the https://pino-tech.eu/forum/soilwatch-10/soil-specific-calibration/

The code was written for Arduino Uno so it may not be 100% compatible with all Arduino IDE compatible boards. You have managed it well.
I have no experience with Particle boards but if you have any issues then just ask. I will try to help the best I can.

Kind regards,
Piotr

mannydeleon99

  • Newbie
  • *
  • Posts: 2
Re: SoilWatch 10 with particle boards
« Reply #2 on: February 26, 2019, 05:44:27 PM »
Thanks for the info,

I have another quick question.  Can you tell me the sphere of influence for these sensors (new sensors).  How much area will one sensor cover.

Another question is about powering the sensor.  Im using a transistor to control power.  In your calibration sheet you say, "It is recommended to use a constant reference voltage either internal or powering ADC with constant voltage (regulated).   

I delete this part of the code

  analogReference(INTERNAL); //set ADC reference to internal 1.1V


If not I get errors. 

Im new to all this and just making sure im understanding the quote above.  Should I be doing something for a reference voltage while using 3.3V

Or
Do I need to add the following code

  analogReference(DEFAULT); //set ADC reference to internal 1.1V
« Last Edit: February 26, 2019, 05:54:00 PM by mannydeleon99 »

pinolec

  • Administrator
  • Jr. Member
  • *****
  • Posts: 99
Re: SoilWatch 10 with particle boards
« Reply #3 on: February 28, 2019, 12:57:07 AM »
Hi,

The measured volume is low with the most significant portion being soil right next to the sensor.

Particle boards have an onboard regulator so the microcontroller is powered with a constant voltage regardless of the voltage you supply to the board.
I think Particleboard doesn't have the internal reference at least not 1.1V. Sorry I am not familiar with the Particleboard.
You will be good with default ADC reference which is 3.3V for your board. You don't have to state you gonna use default ADC because is set as default. You would have to state it if you use different analogReference elsewhere in the code.

Hope this makes sense.

Best,
Piotr