Maker Pro
Maker Pro

I grow tomatoes really well, now I'm trying my hand at automating the entire process

Zarak

Feb 11, 2024
7
Joined
Feb 11, 2024
Messages
7
Hello Forum!
Hope you're all well.

For the past decade or so, I've been growing vined tomatoes on a bit of land, and I've grown pretty well. I literally used to jerry-rig everything from tractor implements to fertilizer dosing systems.

My tinkering has helped me quite a lot and I was always curious about how can I take it to the next level!

I want to build my own hardware and components for my irrigation systems.

And lo and behold! I discovered 3d printing and ESP32. I've been obsessing over the videos I see on youtube and just love how creative everyone is.

So let me tell you about a project I'm working on.

I setup an acre of greenhouses recently and I really want to go ahead and automate my irrigation system, have it on a schedule so I can keep better track of my costs, maintenance etc...

I discovered Cadio and I'm using that (with an esp32) to irrigate and keep my tomato seedlings nice and happy.

So then I thought why not grab a couple of Solenoid Irrigation Valves (I use UNI-D 220v 3/4" ones) and build a system on the esp32.

My plan was that I'll have two irrigation lines deployed in each greenhouse (one for misting while the other for drip irrigation) and I'll use a single esp32 connected to a 2 channel relay to control both lines (through two solenoid valves)

So I burnt the coil on a couple and I'm searching the web for any information I can.

Essentially, I've wired my esp32 via jumper F2F Jumper Cables to a 2 channel relay. The 2 Channel relay is powered by the ESP32 (I'm using the 5v pins).

The solenoid valves do not have a designated live or neutral cable (apparently both are just red and are interchangeable). I connected wires from both the solenoids to the 2 channel relay's NO slot (yes, I had made the mistake of stuffing both cables in one slot). I joined the remaining two cables together and connected that to the AC Neutral Wire. I connected the AC Live wire to the first COM on the relay and then inserted a jumper to the second COM.

Would love to hear any thoughts or ideas.

Also, would love to learn more about electronics and designing proper circuits. If anyone can point me towards a resource, would love to learn.
 

Zarak

Feb 11, 2024
7
Joined
Feb 11, 2024
Messages
7
I setup an acre of greenhouses recently and I really want to go ahead and automate my irrigation system, have it on a schedule so I can keep better track of my costs, maintenance etc...


I discovered Cadio and I'm using that (with an esp32) to irrigate and keep my tomato seedlings nice and happy.


So then I thought why not grab a couple of Solenoid Irrigation Valves (I use UNI-D 220v 3/4" ones) and build a system on the esp32.


My plan was that I'll have two irrigation lines deployed in my greenhouse (one for misting while the other for drip irrigation) and I'll use a single esp32 connected to a 2 channel relay to control both lines (through two solenoid valves)

I thought how hard could that be? Its just wiring a couple of valves right?

So I burnt the coil on a couple and I'm searching the web for any information I can.


Essentially, I've wired my esp32 via jumper F2F Jumper Cables to a 2 channel relay. The 2 Channel relay is powered by the ESP32 (I'm using the 5v pins).


The solenoid valves do not have a designated live or neutral cable (apparently both are just red and are interchangeable). I connected wires from both the solenoids to the 2 channel relay's NO slot (yes, I had made the mistake of stuffing both cables in one slot initially). I joined the remaining two cables together and connected that to the AC Neutral Wire. I connected the AC Live wire to the first COM on the relay and then inserted a jumper to the second COM.

I essentially took inspiration from one of Cadio's Videos and thought maybe the same couple work for Solenoid Valves. I asked a friend and he said I should have a capacitor installed between the Solenoid and the relay. He said that when the Coil on the solenoid powers off, it causes a voltage spike that could damage your components. Said this would help ensure that the relay powers the solenoid while ensuring the back-emf doesn't short stuff.

Hoping for thoughts and some advice.
 

Attachments

  • Untitled.png
    Untitled.png
    335.5 KB · Views: 4
Last edited:

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
What are the specs of the relays and their contacts? Solenoid valves are very inductive therefore create large sparks across switch and relay contacts - some kind of spark suppression is usually used to alleviate this. The device (component) you require is called a SNUBBER.
 

Bluejets

Oct 5, 2014
7,094
Joined
Oct 5, 2014
Messages
7,094
These systems have been built many times over so there are literally hundreds out there , already proved and working.
So why re-invent the wheel.
A quick Google should get you going and then it's up to you to choose which suits you best, possibly modify to suit.

If you get stuck on the esp32 side, people over at Arduino can help.
 

Zarak

Feb 11, 2024
7
Joined
Feb 11, 2024
Messages
7
What are the specs of the relays and their contacts? Solenoid valves are very inductive therefore create large sparks across switch and relay contacts - some kind of spark suppression is usually used to alleviate this. The device (component) you require is called a SNUBBER.
Hello Kelly,

Here you go.

5V 2-Channel Relay interface board, and each one needs 15-20mA Driver Current
Equiped Equipped with high-current relay, AC250V 10A ; DC30V 10A
Standard interface that can be controlled directly by microcontroller (Arduino , 8051, AVR, PIC, DSP, ARM, ARM, MSP430, TTL logic active low)
Opto-isolated inputs
Indication LED’s for Relay output status

No data sheet is available for the solenoids. All that is mentioned on the Uni-D website is that they run on 220v
 
Last edited:

Zarak

Feb 11, 2024
7
Joined
Feb 11, 2024
Messages
7
These systems have been built many times over so there are literally hundreds out there , already proved and working.
So why re-invent the wheel.
A quick Google should get you going and then it's up to you to choose which suits you best, possibly modify to suit.

If you get stuck on the esp32 side, people over at Arduino can help.
ln hindsight, you are a 100% correct.

In my project, I'm deploying close to 18 solenoids and 9 relays. Each relay controls 2 solenoids in each greenhouse.

Keeping in mind the cost of running electrical wire to each greenhouse, I went with 220v solenoids. Where I am in the world, the 220v solenoids are essentially a quarter the price of a 12v or a 24v solenoid. I shouldn't have cheaped out but what's done is done.

Should have conducted a more thorough research when figuring this out.

ESP32 is working wonders, can't fault it. CADIO is helping me loads on the development side.
 

Delta Prime

Jul 29, 2020
2,206
Joined
Jul 29, 2020
Messages
2,206
For the past decade or so, I've been growing vined tomatoes on a bit of land, and I've grown pretty well
What kind of tomatoes?
I would put a rectifier diode across each solenoid.
No more back EMF . The the electromotive force in the opposite direction is shunted by the diode then energy is dissipated as heat.
Easy peasy lemon squeezy!
photo_1707794710128.png
 
Last edited:

Zarak

Feb 11, 2024
7
Joined
Feb 11, 2024
Messages
7
What kind of tomatoes?
I would put a rectifier diode across each solenoid.
Easy peasy lemon squeezy!
View attachment 62779
For open market, I grow Roma varieties.
For B2B (i.e tomato paste), I grow San Marzano.

For the family, grow cherry, beefsteak and literally hundreds of odd ball varieties.

I grow my plants hydroponically.

I really need to get my head around electrical components now

I'll be spending some time reading up as much as I can on this
 

Delta Prime

Jul 29, 2020
2,206
Joined
Jul 29, 2020
Messages
2,206
I really need to get my head around electrical components now

I'll be spending some time reading up as much as I can on this
So do you have a mixing tank for the nutrients going to your tomatoes?
How do you control your pH level?
Is your 1 acre greenhouse divided into irrigation zones?
Have you ever made ketchup?
That's a lot of tomatoes!
A belated... Welcome to Maker Pro. :)
 

Zarak

Feb 11, 2024
7
Joined
Feb 11, 2024
Messages
7
So do you have a mixing tank for the nutrients going to your tomatoes?
How do you control your pH level?
Is your 1 acre greenhouse divided into irrigation zones?
Have you ever made ketchup?
That's a lot of tomatoes!
A belated... Welcome to Maker Pro. :)

Not a fan of mixing tanks. I use dosing pumps. They can dose from 3ml/2 seconds to 150ml/2 seconds. The dose rate depends on how concentrated my nutrients are.

We filter the water to <2ppm and the pH monitor says it 7. (Which we then verify with a handheld monitor)

I use pretty acidic nutrients so the nutrient dose brings the source water pH down to 5.6

In my part of the world, an acre is composed of 8 kanals. So I build 8 greenhouses in an acre, ensures biological containment in case of a disease breakout.

So I have an irrigation zone for each greenhouse (which is then further divided into a drip irrigation line and misting line).

My mother keeps experimenting with the ketchup but I normally stick to making sauce for pasta

And thank you!
 

roughshawd

Jul 13, 2020
477
Joined
Jul 13, 2020
Messages
477
I don't want to "rain" on your parade, but in the USA, we tried to fire 2 devices with one solenoid for a long time. The problem is that solenoid is like a capacitor, it combines the input voltage to the trigger voltage which overloads any power control in the circuit. We tried voltage regulator, shunts, snubbers, and I. The end, all the headaches involved were just too much and we gave up. So grow tomatoes man, and quit trying to invent something new. Just fire one relay for each valve, or design the hardware so it switches with a secondary circuit and relay through a different set of sources. Sorry, can't put the whole world through the same hole at the same time!
 

danadak

Feb 19, 2021
824
Joined
Feb 19, 2021
Messages
824
A 1N4004 probably too small a diode to work as a snubber on 220 line.
Both in current and voltage.

Snubber design :





Regards, Dana.
 

bertus

Moderator
Nov 8, 2019
3,393
Joined
Nov 8, 2019
Messages
3,393
hello,

diodes are used on DC solenoids.
on AC a RC snubber network is used.

bertus
 

danadak

Feb 19, 2021
824
Joined
Feb 19, 2021
Messages
824
If one googles "snubber dc solenoid" lots of hits, essentially concerning
turn off of inductive circuits as underlying basis.

Quick summary of types




Regards, Dana.
 

danadak

Feb 19, 2021
824
Joined
Feb 19, 2021
Messages
824
Isnt RC choice a f() solenoid parameters, and he stated he has no datasheet,
translate he needs to measure them himself for properties.


Regards, Dana.
 
Top