Arduino friends, any age, size or shape!! (Humour?)

Page 2 of 2 [ 25 posts ]  Go to page Previous  1, 2

MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 40
Gender: Male
Posts: 2,007

20 Jun 2013, 11:32 pm

So what you're saying is to use another pin so I can add a wire (with 100k ohms) in parallel to the sensing wire to limit current to my sensing pin? Is inrush current an issue with arduino? How did you get better at electronics? Did you go to school for it?



LupaLuna wrote:
AWOW: If you are making a moisture sensor using 2 electrodes and measuring the current flowing through them. You might want to pulse the current instead. ie. turn the electrodes on for a second to take your reading and then shut them off afterword. If you let the current run continuously. Electrolysis will destroy your electrodes and can contaminate your soil.


That's another reason I'd want to limit measurments. The plants normally get watered once every 2 days, so one reading every half-hour is more than enough. Not to mention getting several readings in quick succession would give the thing a chance to mess up.


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.


Arduino
Hummingbird
Hummingbird

User avatar

Joined: 19 Dec 2012
Age: 61
Gender: Male
Posts: 21

21 Jun 2013, 3:40 am

In order to measure voltage, there needs to be current flow. It is all based upon Ohms Law. The way I remember it, is like this: 'Voltage pushes Current Through Resistance' You can find the mathematical explanation and diagram everywhere. It is the first fundamental thing you need to know. So, with you straight forward circuit, to measure any change in soil resistance, a current needs to be flowing through it. So, in this instance, you would put +5v to a resistor, the other side of the resistor to one side of a potentiometer and the other side of the potentiometer to 0v. You will then have 5 volts pushing some arbitrary current through the resistances. Notice that there is nothing connected to the potentiometer wiper? If you put a voltmeter + wire to the centre tap of the pot and the negative (-) wire of the voltmeter to 0v and set the voltmeter to 2v, you will get a reading. As you adjust the pot, the reading will change. The current flowing through the resistances will remain constant, because they do not change, but the small current flowing through the voltmeter will change, because the voltage it is reading will be higher or lower, depending upon where its positive lead is to the voltage source. i.e. the more negative you take the positive lead, the less current that will flow, because you are closer to the 0v potential.

So, with all that bumph said; When you want to 'read' something, with the Arduino DAC, you must ensure that its input pin is connected as explained above and replace the voltmeter + lead with the analog pin of the Arduino. The point I am trying to make, is that the Arduino should sniff or sense the voltage to be read and not be part of the circuit, where the most current is flowing. You should not be trying to push current through an Arduino pin. As a point of physics, if there is no current flow, then you have nothing. You cannot read nothing or do anything with nothing. No current, no circuit, period. To prove the point, if you take the 0v pot connection away in the above circuit, then your voltmeter will read 5 volts, regardless of where the pot is turned to. So, with no current flow, you voltmeter will just show a representative value and not the real one you are trying to read.

If you ALSO connect the pot centre tap to the plant soil and bung a 0v lead in the soil as well, the soil resistance will work as a dry/wet pot, in parallel with the turnable pot and the Arduino will see the change in current flow, by the voltage being dropped by both 'pots', er not plant pots eh? The resistances you use are up for experimentation as indeed the distance is between the soil probes. Try a 100k resistor and a 5k pot and go from there.


I am lucky, in that, I am quite bright and pick things up very easily, but only if I am interested, otherwise I have no interest and then pay no attention at all. I have been 'into' electronics since about when I was 4 years old, yeah, honestly. I have made and invented so many things, I just could not list them all. My IQ is around 138 each time I can be arsed to check, but I do not think that means much, it's how you apply your intelligence that matters. I just like understanding anything technical. The more complex the better really. I modify lots of things and build interfaces to assist existing functionality in products. I like to help people, but I guess I am also quite difficult to get on with as well.

Best of luck!



Arran
Deinonychus
Deinonychus

User avatar

Joined: 20 Nov 2012
Gender: Male
Posts: 375

21 Jun 2013, 2:37 pm

MDD123 wrote:
I didn't realize the arduino had a 448 page datasheet.


448 pages is a small number for a microcontroller! If you also include the software manuals and instructions for the development system then you will be running to several thousand pages. It's quite commonplace for the datasheet for an op-amp or simple logic device to be in excess of 50 pages.



oceandrop
Deinonychus
Deinonychus

User avatar

Joined: 9 Jul 2011
Gender: Male
Posts: 398

03 Jul 2013, 5:03 am

Arduino fan here. I keep ordering sensors and other arduino controllable components from China via ebay and it takes some time for them to arrive but they're so inexpensive and a lot of fun.

Some of my favorite components include the mpu-6050 gyro/accelerometer, peltier/TECs, hc-sro4 ultrasonic distance sensors, stepper and servo motors, and relays to control AC devices.

PS - If you really want to measure soil moisture then go on ebay and search for an "arduino soil hygrometer" they cost about $3 shipped from China.

Image



MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 40
Gender: Male
Posts: 2,007

03 Jul 2013, 5:54 am

$3 is a very good deal, I'll check it out.


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.


oceandrop
Deinonychus
Deinonychus

User avatar

Joined: 9 Jul 2011
Gender: Male
Posts: 398

03 Jul 2013, 1:58 pm

Yep, good price. I'd be very interested to hear how you approach the watering side.

My initial thought would be to use an inexpensive submersible aquarium water pump (a simple 200 litre/hour pump shipped from china is less than $5) inside a water reservoir. That could be switched on and off by arduino via a relay depending on measurements from the hygrometer. The water pump would then need some plumbing (flexible tube or pvc pipe) to irrigate the plant/s.

I like this because it's very closely related to another special interest of mine (aquaponics) =)

PS - I just noticed you plan to water 10 plants. I'd either use the soil moisture of one plant as representative of them all, or just water all the plants on a timer and do away with the moisture readings altogether. Unless this is a big expensive project of some sort....



MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 40
Gender: Male
Posts: 2,007

04 Jul 2013, 1:09 am

I actually got the first moisture sensor set up. I soldered leads to a couple of nails and attached them to a nerf ball. The sensor pin is parallel with 10k ground. I get an analogRead of 17-45 with this set up.

I was planning on using a gravity feed system using various DC motors to operate the valves. I'm still not sure how I would mount the two together, but I'd power it using a wall wart two parallel mosfets for each armature lead, firing off two pins would allow the motor to turn CW, a different two pins CCW.

The plants differ in size and type, I'm pretty sure they'll have different watering needs. Although 10 might be overdoing it (10 wall warts is gonna be a tough fit).

I wasn't planning on making the output too fancy, just a simple turn the faucet on, delay, turn it off if the moisture level is below a certian value. I'll be spacing my readings out into hourly intervals and staggering them. My plan is for a plant to get a little water if it needs it, and if in an hour or two it still doesn't have enough, it'll get a little more and so on until the sensor reaches a certian value.

I bought the sensors from e-bay (thank you China!), I plan on setting up more watering containers. I just go to thrift stores and buy aquariums and drill some drainage and wire holes in them. I can actually see what I'm doing that way.


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.


oceandrop
Deinonychus
Deinonychus

User avatar

Joined: 9 Jul 2011
Gender: Male
Posts: 398

04 Jul 2013, 4:02 am

Nice, sounds like a neat project good luck with it. For the DC motor control of the gravity-fed water supply, it sounds like "electric solenoid valves" would do the job. The 12v ones on ebay seem quite reasonable. This one below will open with low pressure water (0-0.8mpa) which should work with low pressure gravity fed water.

Image

They usually default to the valve closed position so power cuts etc won't cause a flood.



MDD123
Veteran
Veteran

User avatar

Joined: 6 May 2009
Age: 40
Gender: Male
Posts: 2,007

04 Jul 2013, 7:55 pm

You'd make a really good salesman ^^


_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.