HELP PLEASE GreenHouse /automated environment system

Thread Starter

rawlings.mat

Joined May 17, 2016
23
Hello, I am new to the world of building circuits and I came here with high hopes to find someone that could help me bridge the gap between the crystal clear image/idea I have in my mind, and the lack of technical knowledge and vocabulary that I actually hold.

So I guess, ideally, what I'm looking for, is someone that I can explain all the parts I plan on using. Then they will be able to take that list and you can "fritz" or build a schematic (what ever it is called) for me. I have this 40 pin t adapter for the breadboard to my RaspberryPi3 and i cant find a tutorial, it is confusing me. The choosing the correct resistors and capacitors and all that good stuff is just out of my current league and I would be eternally grateful if someone could have grace with me and help a begging man who is just trying to do a good deed for his father.

1x Raspberry Pi3
1x BreadBoard Large
1x 8 channel relay
5x cpu fans
3x DHT22 sensors
2x Soil Moisture meter
2 x Pumps
1x LED
 

ronv

Joined Nov 12, 2008
3,770
Hello, I am new to the world of building circuits and I came here with high hopes to find someone that could help me bridge the gap between the crystal clear image/idea I have in my mind, and the lack of technical knowledge and vocabulary that I actually hold.

So I guess, ideally, what I'm looking for, is someone that I can explain all the parts I plan on using. Then they will be able to take that list and you can "fritz" or build a schematic (what ever it is called) for me. I have this 40 pin t adapter for the breadboard to my RaspberryPi3 and i cant find a tutorial, it is confusing me. The choosing the correct resistors and capacitors and all that good stuff is just out of my current league and I would be eternally grateful if someone could have grace with me and help a begging man who is just trying to do a good deed for his father.

1x Raspberry Pi3
1x BreadBoard Large
1x 8 channel relay
5x cpu fans
3x DHT22 sensors
2x Soil Moisture meter
2 x Pumps
1x LED
The place to start is with a specification.
Break it into blocks, like air water etc. then spell out what you want to have happen with each.
Then post the data sheets for all your parts so we can see what they are and how they work.
 

Thread Starter

rawlings.mat

Joined May 17, 2016
23
Forgive me for being dense. what do you mean by specifcation? like model numers? or specific specs like amps, volts, HZ and alike? I googled "data sheet" for dht22 and got a 10 page pdf with specs, most of it seemed irrelevant, if thats not what you wanted thank you anyways for that vocabulary word that alone already helped me.

i have a CRUDE first draft hand drawing of how it would be wired ( without any breadboard wire placement). I also know how I want the equipment to work together. are you asking me to give the general idea of how my above given list would interact with each other?
Example; dht22 reads RH--- if Rh not ="xx" on fans---RH is "xx" fans=off
 

ronv

Joined Nov 12, 2008
3,770
Forgive me for being dense. what do you mean by specifcation? like model numers? or specific specs like amps, volts, HZ and alike? I googled "data sheet" for dht22 and got a 10 page pdf with specs, most of it seemed irrelevant, if thats not what you wanted thank you anyways for that vocabulary word that alone already helped me.
When it gets down to the fine points - yes the data sheet like that will be needed. If you just post the links people will be more inclined to help than if they have to search for them.

i have a CRUDE first draft hand drawing of how it would be wired ( without any breadboard wire placement). I also know how I want the equipment to work together. are you asking me to give the general idea of how my above given list would interact with each other?
Example; dht22 reads RH--- if Rh not ="xx" on fans---RH is "xx" fans=off
Crude is okay. Just a place to start so everyone is on the same page.

Have you ever worked with a micro processor?
 

Thread Starter

rawlings.mat

Joined May 17, 2016
23
When it gets down to the fine points - yes the data sheet like that will be needed. If you just post the links people will be more inclined to help than if they have to search for them.

Crude is okay. Just a place to start so everyone is on the same page.

Have you ever worked with a micro processor?
This will be my first micro processor project. i would really like help figuring how to wire the parts and also the details that go with the wiring (resistors and all that fun stuff). I know what i am doing is possible, and most likely very easy for someone who does this sort of thing, i am just really afraid to burn up my equipment because i wired it wrong or forgot some small chip/part i didn't not existed that i needed or something!! Is it obtuse of me to ask for someone smarter than me to draw me a "how to wire your set up for dummies" map? because that is kinda what i was hoping for :-D

the relay will have 2 power sources,
1. MAIN power source from a plug into the wall surge protector
2. the breadboard to control the relay
the relay will be wired to 4 different receptacles giving me control over each outlet by toggling relay

dht22 sensors will be wired to breadboard giving constant RH feedback to Pi3
soil moisture meters will be wired to breadboard giving constant feedback
3 cpu fans wired to breadboard on/off based of dht22 sensor readings
2 cpu fans wired to breadboard on/off on timer


1x Raspberry Pi3 got the "Ultimate Starter Kit" to be exact
1x CanaKit GPIO to Breadboard Interface Board
1x BreadBoard Large
1x 8 channel relay
5x cpu fans
3x DHT22 sensors
2x Soil Moisture meter

I hope that answered your question.
Thank you so much for anyone who is taking your time to help me i really appreciate this!!
 
It looks like you have to make your own drive for the relay board. This http://www.nskelectronics.in/index.php?route=product/product&product_id=143 part will implement the required circuit for you to drive the board. Vcc does not have to be 12 V as the silk screen says.

I did not look at the .rar doc file for the relay board. You could use another one connected to the same port to drive LED's for a state indicator if the relay board doesn't have them. The LED's would need a current limiting resistor. eg. R <= (5-Vd-Vled)/10e-3
5 is 5V, Vd is probably around 0.6 V (The 2803 datasheet will tell you), V led is around 2.1 V for a red LED (depends on LED color), 10e-3 is 10 mA, a typical operating current for a LED.

These driver chips are designed, so that their inputs can float. This helps you, because if you provide a disconnection point there, you can wire your relay board up, but be able to disconnect at the driver level.
 

Thread Starter

rawlings.mat

Joined May 17, 2016
23
Not to be argumentative, but I don't understand the ULN2803 Drive. Is that not redundant? It almost seems to me like that is just adding an additional piece with out adding additional function, the relay is already being controlled by the Pi3 and it gets its power from the wall so i don't understand what this would add to my project that it isn't already doing itself.

i have no idea what your talking about with the LED thing. In my first post i did say LED, but that will be plugged into a receptacle and not wired to breadboard so i don't need wiring help with that.
 

ronv

Joined Nov 12, 2008
3,770
Not to be argumentative, but I don't understand the ULN2803 Drive. Is that not redundant? It almost seems to me like that is just adding an additional piece with out adding additional function, the relay is already being controlled by the Pi3 and it gets its power from the wall so i don't understand what this would add to my project that it isn't already doing itself.

i have no idea what your talking about with the LED thing. In my first post i did say LED, but that will be plugged into a receptacle and not wired to breadboard so i don't need wiring help with that.
The original spec on the relay board indicates the voltage needs to be shifted from 3.3 volts to 5 volts.. But. The relay board already has the circuit. Ir was a mistake by the author.
https://github.com/fixedd/RPi_Relay_Interface#readme
 
Thanks ronv. Looks like it has LED's.

Comment for post#8:

I'm thinking ahead an thinking with industrial control (my background) in mind.

There's this construction technique that uses an enclosure with say a particular IP (ingress protection) rating that would usually be mounted on the "wall" in the greenhouse. Conduit MIGHT be used to route the wiring to the fans, but it looks like your using 12 V. I was thinking AC fans. AC power is the same deal. It comes in "protected".


These enclosures typically have a baseplate inside where stuff is mounted too. It can be screws into tapped holes or DIN rail is used.
DIN rail and terminal strips sort of an electrical erecter set.

From a logistics point of view, the standard technique, (or at least the one I used) was a set of blocks that connected to the outside world. I would then internally connect these blocks to your relay board. So, wires from outside go directly to the terminal blocks, NOT the breakout board.

So, using another set of "design specs" I might do the following:
1) The R Pi can easily be removed from the enclosure for development.
2) During development, a LED breakout will be used to show the state of the digital outputs.
3) The relay module will stay in the enclosure during R Pi removal and development.

The diagram I looked at suggested that you had to build a circuit consisting of a transistor and few resistors or each channel. ronv says otherwise.
 

Thread Starter

rawlings.mat

Joined May 17, 2016
23
Here's a picture of the relay and the 40 pin t adapter for visual. You would think having the reference guide and adapter would help make it all easier but its just confusing me.
 

Attachments

Thread Starter

rawlings.mat

Joined May 17, 2016
23
my question remains the same i suppose, is there someone who can fritz or draw out a schematic of how to wire my equipment in common tongue or pictures for me. I don't want to wire my relay to this breadboard wrong and burn up my equipment. I understand the idea of the drawing in #10 but i need a dumbed down version of how to wire the breadboard.

is this correct?
(black) GND on relay--to pin 9 (GND)
(white) 1n1 on relay--to pin 11 (gpio17)
(grey) 1n2 on relay--to pin 13 (gpio27)
(purple) 1n3 on relay--to pin 15 (gpio22)
(blue) 1n4 on relay-- to pin 16 (gpio23)
(green) 1n5 on relay--to pin 18 (gpio24)
(yellow) 1n6 on relay--to pin 22 (gpio25)
(orange) 1n7 on relay--to pin 29 (gpio5)
(red) 1n8 on relay--to pin 31 (gpio6)
(brown) vcc on relay--to pin 2 (5v)
 
Generally, it looks OK. The only thing that matters is ground and +5.

GPIO would get assigned based on a couple of things:

1) Ease of routing (your not making a board, so it minimally matters)
2) Certain gpio pins have other functions such as serial port, timers and SPI. You can't use stuff that conflicts.
3) Sometimes you might want ports to be able to be binary compatible.
e.g 001 and 010 are 1 and 2, or 0100 and 1000 are 1 and two when shifted, so the software is easier.

There is a couple of ways that the breadboard can be arranged. The outer long red/blue strips can sometimes be broken in the center. Because there are jumpers there, that may be what you have.
 

Thread Starter

rawlings.mat

Joined May 17, 2016
23
upload_2016-5-20_19-47-2.png

Besides the fact that i used MS Paint to draw this, can anyone see any mistakes or anything i missed? double check my work please?

i realize i didn't ground the receptacles, and also sorry for not using universal symbols but i do not know them, hopfully you understand what i was trying to say here.
 

Attachments

Thread Starter

rawlings.mat

Joined May 17, 2016
23
well, if anyone cares, this is what i went with so far. pretty sure i did it right.

Red line is live/hot wire that is daisy chained to all four.
Green line is ground wire daisy chained to all four
White line is neutral that goes from wall split into 8 going to "Slot A" in Relay
Yellow Line is going from silver screw of all 8 receptacles to "Slot B" in Relay (broke break out fin on all neutral sides)

what do you guys think? i wire it correctly?

View attachment 106605
 

Attachments

ronv

Joined Nov 12, 2008
3,770
well, if anyone cares, this is what i went with so far. pretty sure i did it right.

Red line is live/hot wire that is daisy chained to all four.
Green line is ground wire daisy chained to all four
White line is neutral that goes from wall split into 8 going to "Slot A" in Relay
Yellow Line is going from silver screw of all 8 receptacles to "Slot B" in Relay (broke break out fin on all neutral sides)

what do you guys think? i wire it correctly?

View attachment 106605


The green wire is correct.
The red wire is also correct, but as it comes from the wall it should be a white wire (Neutral)
It should only go to the silver screw - not both sides of the plug.
The white wire is correct, but from the wall it should be the black wire (Hot)
On most plugs the two screws have a little plate they screw into that make the two screws the same point so you only need 1 wire to each plug.
The wire from the relay should go to the brass colored screw while the white wire from the wall goes to the silver colored screw.
 

Thread Starter

rawlings.mat

Joined May 17, 2016
23
do you have to have the hot wire (black from the wall, or in my picture the red line) go into the relay?
i put the neutral directly into the relay because i thought it would put less stress on the relay making it last longer and maybe be safer?
i have 2 yellow lines ( neutral wires, white from wall) because i broke the breakout fin that connect the neutral side so i could have individual control over each outlet making 4 into 8.

if you have to have the hot wire only into relay can you maybe try to explain to me so i can understand why?
 

ronv

Joined Nov 12, 2008
3,770
do you have to have the hot wire (black from the wall, or in my picture the red line) go into the relay?
i put the neutral directly into the relay because i thought it would put less stress on the relay making it last longer and maybe be safer?
i have 2 yellow lines ( neutral wires, white from wall) because i broke the breakout fin that connect the neutral side so i could have individual control over each outlet making 4 into 8.

if you have to have the hot wire only into relay can you maybe try to explain to me so i can understand why?
Electrically it doesn't make any difference. It is just the "standard" for AC wiring. For example if the hot wire is always switched you can touch the metal of a light bulb when the switch is off and not be in danger of getting a shock. The same with the sockets. Notice the slot in one is larger than the other. This ensures that if you always wire things the same way they will be safer.
The standard is that the black wire is hot and the white neutral.
 
Top