Help me, urgently (Timer)

Thread Starter

Awonke

Joined Jun 20, 2021
4
Hi there

I am currently designing a circuit that can detect the amount of moisture found in water. It must work on 4 LED's (1, 2, 3, 4). The 1st LED will light brighter when the soil is dry, the 2nd will light dimmer when the soil is almost dry but not dry, the 3rd will light dimmer when the soil is almost moist but not moist and the 4th will light when the soil is moist. I managed to do a circuit that uses the 1st and the 4th LED. I used 2 LEDS (1st & 4th), 2 2N222 Transistors, a switch and some resistors.

I have 2 CD4013 components and I do not know how to use them in order to connect the the 2nd and 3rd LED. May someone help with a circuit and brief explanation using the CD4013 chips to make the circuit, I am really struggling with this.

Thank you
 
Moisture in water doesn't make any sense. Soil moisture makes sense.

Unfortunately, it's a bit more complicated. You need to use an AC voltage source, because DC plates the stuff in the soil on the electrodes. An AC source will pate and remove etc.
 

Ian0

Joined Aug 7, 2020
9,667
Soil moisture content doesn't change rapidly. Sampling with DC is possible, provided that the current is only switched on briefly, say 0.1 second in every minute. That delays the plating and destruction of the electrodes by a factor of 600.
 

Sensacell

Joined Jun 19, 2012
3,432
Before trying to design a circuit, you must determine the actual resistance values you are trying to detect.
The moisture level thresholds you desire might be non-linear.
 

Thread Starter

Awonke

Joined Jun 20, 2021
4
Before trying to design a circuit, you must determine the actual resistance values you are trying to detect.
The moisture level thresholds you desire might be non-linear.
Let me show you a schematic representation of the schematic circuit that I have created. It is actually doing what I wanted it to do all I want to add is the other two LEDS to complete the thing.
 

Attachments

Dave Lowther

Joined Sep 8, 2016
224
Let me show you a schematic representation of the schematic circuit that I have created. It is actually doing what I wanted it to do all I want to add is the other two LEDS to complete the thing.
I assume the switch is intended to represent the soil moisture sensor. When the switch is open the soil is very dry and when it's closed the soil is very wet. However, when the soil is very wet the resistance of the soil won't be a short circuit like a closed switch. I don't understand why the title includes "timer". I also don't understand why you think CD4013 chips are going to help with this. Is your aim to make a soil moisture indicator, or to learn about using transistors and CD4013? Is this homework?
If you want to make a soil moisture indicator, and aren't particularly concerned with learning about transistors / CD4013, then something like this would be better https://www.electroschematics.com/soil-moisture-tester/
 

Alec_t

Joined Sep 17, 2013
14,280
Pure water is a pretty good insulator. Soil resistance will depend on the mineral content of the water as well as the amount of water. Have you taken that into account?
As Dave asked, is this Homework (i.e a school/college/workplace task that you have been set)?
 

Ramussons

Joined May 3, 2013
1,404
Hi there

I am currently designing a circuit that can detect the amount of moisture found in water. It must work on 4 LED's (1, 2, 3, 4). The 1st LED will light brighter when the soil is dry, the 2nd will light dimmer when the soil is almost dry but not dry, the 3rd will light dimmer when the soil is almost moist but not moist and the 4th will light when the soil is moist. I managed to do a circuit that uses the 1st and the 4th LED. I used 2 LEDS (1st & 4th), 2 2N222 Transistors, a switch and some resistors.

I have 2 CD4013 components and I do not know how to use them in order to connect the the 2nd and 3rd LED. May someone help with a circuit and brief explanation using the CD4013 chips to make the circuit, I am really struggling with this.

Thank you
Lighting 4 LED's is not the problem.
How are you sensing the moisture in the soil?
You will need 2 probes embedded in the soil and measure the resistance. More moisture, less resistance.
You will need to make a voltage divider with 1 "resistor" being the probes.
You will need 4 voltage comparators whose outputs will depend on the Probe Resistance, and hence the Moisture in the soil.

The LED(s) that light will depend on the output of the comparators. I have no idea what is the role of the IC CD4013 which are Flip Flops.
 

Thread Starter

Awonke

Joined Jun 20, 2021
4
I assume the switch is intended to represent the soil moisture sensor. When the switch is open the soil is very dry and when it's closed the soil is very wet. However, when the soil is very wet the resistance of the soil won't be a short circuit like a closed switch. I don't understand why the title includes "timer". I also don't understand why you think CD4013 chips are going to help with this. Is your aim to make a soil moisture indicator, or to learn about using transistors and CD4013? Is this homework?
If you want to make a soil moisture indicator, and aren't particularly concerned with learning about transistors / CD4013, then something like this would be better https://www.electroschematics.com/soil-moisture-tester/
I tried to make the circuit but I am not sure whether what behavior it will make...
The switch is a representation of the metal sticks that will be on the soil
 

Attachments

Thread Starter

Awonke

Joined Jun 20, 2021
4
Pure water is a pretty good insulator. Soil resistance will depend on the mineral content of the water as well as the amount of water. Have you taken that into account?
As Dave asked, is this Homework (i.e a school/college/workplace task that you have been set)?
Thank you for the explanation, I want to understand and be able to construct the timer using different chips and the LED representation.
 

Ramussons

Joined May 3, 2013
1,404
I think the TS has no idea what is being asked, and if yes, how to go about it.
Implementation is a later step.
I guess he has no idea about Flip Flops either.
 

AnalogKid

Joined Aug 1, 2013
10,986
I tried to make the circuit but I am not sure whether what behavior it will make...
The switch is a representation of the metal sticks that will be on the soil
This is a version of a 4-bit digital counter, and will not do what you want in any way.

And neither will your discrete transistor circuits. They are fine for one or two levels, but for four levels with a single sensor that basically is a variable resistor, you need some form of analog-to-digital (A/D) conversion. It can be very simple, but there is no getting away from the basic requirement. To be clear, you can do this with a bunch of individual transistor circuits, but a circuit with comparators will be much easier to design and maintain.

As above, a quad opamp or quad comparator and a few resistors is a good approach. On paper, it might look like a bar-graph control chip like an LM3914 is easier, but it doesn't give you individual control over the moisture content percentage for each indication level.

ak
 

Dave Lowther

Joined Sep 8, 2016
224
I want to understand and be able to construct the timer using different chips and the LED representation.
BTW: Your circuit isn't a timer. A timer circuit would have an output that varies based on some timing requirement.

Your circuit is basically just a resistance measurer with four outputs representing four different resistance (moisture) values. Having said that, can you work out how you could adapt this circuit to implement your project?

1624284810143.png

The above image is from the tutorial here http://www.learningaboutelectronics.com/Articles/LM339-quad-voltage-comparator-circuit.php
If you read that and then have questions associated with your ideas about adapting it then please ask any questions you have.

Edit: added afterthought below
If you do build it, I suggest using much higher values in place of the 1K potentiometers, particularly if you are powering your project from a battery.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,986
The circuit in #18 produces a bar graph type display. As the soil becomes more and more moist, more and more LEDs come on. With saturated soil you will see 4 LEDs. If what you want is a dot display, where only one LED is on at any time, then you either add some logic between the comparator outputs and the LED drivers, or change the four comparator circuits from a simple level indicator to what is called a window comparator. Each LED is on only when the input is within a window of two values. This takes two comparators per window. It is a bit more complex, but uses less battery power because only one LED is on at a time.

ak
 

anniel747

Joined Oct 18, 2020
16
Hi there

I am currently designing a circuit that can detect the amount of moisture found in water. It must work on 4 LED's (1, 2, 3, 4). The 1st LED will light brighter when the soil is dry, the 2nd will light dimmer when the soil is almost dry but not dry, the 3rd will light dimmer when the soil is almost moist but not moist and the 4th will light when the soil is moist. I managed to do a circuit that uses the 1st and the 4th LED. I used 2 LEDS (1st & 4th), 2 2N222 Transistors, a switch and some resistors.

I have 2 CD4013 components and I do not know how to use them in order to connect the the 2nd and 3rd LED. May someone help with a circuit and brief explanation using the CD4013 chips to make the circuit, I am really struggling with this.

Thank you
It is not really clear what you need help with exactly. Why use flip-flops? A timer for what purpose? Why is it so urgent?
 
Top