Competent grow room electrical advice needed

graying.geek

Well-Known Member
Looking for some best-practices electrical advice. I've been doodling with Mycodo on a Raspberry Pi for data collection and monitoring, but would like to transition to using the Pi to control some of the high power devices in the grow room; e.g. lights, heater, chiller, etc. My grow room is 6' x 4' x 8' with an 80 liter hydro reservoir, 1200W heater, 400W of LED, 39W UV light, dehumidifier and chiller. Everything is 120V.

I expect my electrical skill level is slightly above average; I install breakers, new circuits, outlets and switches without problems. I had a 100A subpanel installed in my grow room, so adding/changing single-phase breakers, circuits, etc, is a piece of cake. My weakness, which become obvious pretty quickly, is in the theory, so don't expect me to explain "inductive load" or how a SS relay works, because I don't know. I realize not understanding the "whys" can get me into trouble pretty quickly, hence I'm looking for some seasoned advice.

Everything is surface mount from the breaker box. My intent is to run 12-2 Romex through conduit from the breaker box to a "project box" containing the pi and relays (I expect to need a fan), then 12-2 through conduit to the respective outlets. I'll combine if it makes sense, but the default will be for each controlled outlet or outlet cluster to have it's own relay and its own 12-2 wire pull backed by a 15-A or 20-A fuse in the breaker box. I have plenty of slots in the box so I plan to use 1 circuit to back each relay, and run multiple circuits through the same conduit both to and from the project box.

Here's the questions that bubble up:

1) Do you see any safety issues?

2) Should I use GFCI outlets?

3) I understand that the SSR-40DA relays work well (?) for these applications, but may not trigger at the 3.3V signal from the Pi. Is it advisable to use one of the small 8-relay boards to use as a 5V trigger for the SSR-40DA?

4) I realize some of this is over done, but it's what I have on hand. Will it cause any issues now or ever?

5) What am I missing?
 

shimbob

Well-Known Member
I would suggest looking into Tasmota-enabled devices. I use Mycodo for our grow as well, and once attempted to interface a 4-relay board to the RPI to control things. One AC shock later and I reevaluated my desire to mess with AC.
Now I have 3 Tasmota-enabled devices for a total of 10 remotes controlled outlets and they work great.
 

bprestoner

Active Member
Looking for some best-practices electrical advice. I've been doodling with Mycodo on a Raspberry Pi for data collection and monitoring, but would like to transition to using the Pi to control some of the high power devices in the grow room; e.g. lights, heater, chiller, etc. My grow room is 6' x 4' x 8' with an 80 liter hydro reservoir, 1200W heater, 400W of LED, 39W UV light, dehumidifier and chiller. Everything is 120V.

I expect my electrical skill level is slightly above average; I install breakers, new circuits, outlets and switches without problems. I had a 100A subpanel installed in my grow room, so adding/changing single-phase breakers, circuits, etc, is a piece of cake. My weakness, which become obvious pretty quickly, is in the theory, so don't expect me to explain "inductive load" or how a SS relay works, because I don't know. I realize not understanding the "whys" can get me into trouble pretty quickly, hence I'm looking for some seasoned advice.

Everything is surface mount from the breaker box. My intent is to run 12-2 Romex through conduit from the breaker box to a "project box" containing the pi and relays (I expect to need a fan), then 12-2 through conduit to the respective outlets. I'll combine if it makes sense, but the default will be for each controlled outlet or outlet cluster to have it's own relay and its own 12-2 wire pull backed by a 15-A or 20-A fuse in the breaker box. I have plenty of slots in the box so I plan to use 1 circuit to back each relay, and run multiple circuits through the same conduit both to and from the project box.

Here's the questions that bubble up:

1) Do you see any safety issues?

2) Should I use GFCI outlets?

3) I understand that the SSR-40DA relays work well (?) for these applications, but may not trigger at the 3.3V signal from the Pi. Is it advisable to use one of the small 8-relay boards to use as a 5V trigger for the SSR-40DA?

4) I realize some of this is over done, but it's what I have on hand. Will it cause any issues now or ever?

5) What am I missing?
i have used dc to dc converters, off ebay or amazon for a couple bucks each, successfully on several projects. just use one of those to step up the Pi’s voltage to the 5v u need to trip the relay. found something w a quick search...
dc to dc step-up
 

shimbob

Well-Known Member
The rPi GPIO pin is 3.3V maximum 16mA, the SSR-40D requires 7.5mA at 12V, then the step-up will add more losses, I don't see that working.
An optoisolator would work.
 

JOO©E

Member
You can use a LL MOSFET to hold back 12VDC from a power brick until 3.3V is applied to the gate. If MC pin Vmax is 3.3V & pin Imax is 16mA, or a total of 52mW, then a requirement of 12V @ 7.5mA, or 90mW, is not possible to achieve with a boost converter. You can boost the V but at a loss of I. You can't boost finite power, only voltage.

You'd have to implement some sort of switching circuit to regulate (turn on and off) a seperate power supply capable of triggering the SSR. I'd use a cheapo AC/DC wall adapter (only need 1) with a few MOSFET's (as many as you had relays). Wire the SSR's in parallel with the 12VDC output of the AC/DC adapter, and then insert small n-channel FETs between the relays and ground. Google MOSFETs if you're not familiar. Your Pi would trigger the GPIO high, which turns on the FET, which turns on the SSR, which allows mains to device. If the SSR is controlling an inductive load then you'd want to use a varistor (MOV) and RC snubber to protect against switch off arcs and transients. You can put fly back diodes across your SSR input to protect the FET's from any sort of inductive spike as well. Motors can draw 5-10× more current at startup than normal operation (transformers 10-20× more than normal operation), so make sure the SSR you're using can handle the peak currents your devices will draw at startup.

I'd also run a ground to all the outlets too. Test the SSR (on off ect) with the intended devices to ensure functionality before installing. Certain circuitry can cause phase shifts between voltage and current and/or irregular waveforms which effect the ability of the SSR to operate as intended, so test first to ensure and save on headache later. There is recommended spacing for conductors given their proximity, total number, gauge, and current carried. I'd check your device currents and how many conductors compared to the size of conduit to verify you're working safe. You're probably fine, but just something I mention because I'm not sure how many circuits you plan in running.

*This is all assuming your SSR is DC input and not AC input.

 

graying.geek

Well-Known Member
I would suggest looking into Tasmota-enabled devices. I use Mycodo for our grow as well, and once attempted to interface a 4-relay board to the RPI to control things. One AC shock later and I reevaluated my desire to mess with AC.
Now I have 3 Tasmota-enabled devices for a total of 10 remotes controlled outlets and they work great.
You know, I've looked at these briefly as an alternative, but despite being a retired IT guy, I'm not familiar enough with these critters to understand how they work. Are they just wifi devices that connect to my wifi router via one of the 802.11 protocols and use SNMP or something similar, or do they require a hub or cloud service?
 

graying.geek

Well-Known Member
You can use a LL MOSFET to hold back 12VDC from a power brick until 3.3V is applied to the gate. If MC pin Vmax is 3.3V & pin Imax is 16mA, or a total of 52mW, then a requirement of 12V @ 7.5mA, or 90mW, is not possible to achieve with a boost converter. You can boost the V but at a loss of I. You can't boost finite power, only voltage.

You'd have to implement some sort of switching circuit to regulate (turn on and off) a seperate power supply capable of triggering the SSR. I'd use a cheapo AC/DC wall adapter (only need 1) with a few MOSFET's (as many as you had relays). Wire the SSR's in parallel with the 12VDC output of the AC/DC adapter, and then insert small n-channel FETs between the relays and ground. Google MOSFETs if you're not familiar. Your Pi would trigger the GPIO high, which turns on the FET, which turns on the SSR, which allows mains to device. If the SSR is controlling an inductive load then you'd want to use a varistor (MOV) and RC snubber to protect against switch off arcs and transients. You can put fly back diodes across your SSR input to protect the FET's from any sort of inductive spike as well. Motors can draw 5-10× more current at startup than normal operation (transformers 10-20× more than normal operation), so make sure the SSR you're using can handle the peak currents your devices will draw at startup.

I'd also run a ground to all the outlets too. Test the SSR (on off ect) with the intended devices to ensure functionality before installing. Certain circuitry can cause phase shifts between voltage and current and/or irregular waveforms which effect the ability of the SSR to operate as intended, so test first to ensure and save on headache later. There is recommended spacing for conductors given their proximity, total number, gauge, and current carried. I'd check your device currents and how many conductors compared to the size of conduit to verify you're working safe. You're probably fine, but just something I mention because I'm not sure how many circuits you plan in running.

*This is all assuming your SSR is DC input and not AC input.

Thanx, Dude. You are the guy I was hoping would show up, but you're in territory that is *way* over my head, and I think you've talked me into looking at Tasmota flashed device more closely. I'll keep your post for future reference, though. Thank you.
 
Last edited:

JOO©E

Member
You know, I've looked at these briefly as an alternative, but despite being a retired IT guy, I'm not familiar enough with these critters to understand how they work. Are they just wifi devices that connect to my wifi router via one of the 802.11 protocols and use SNMP or something similar, or do they require a hub or cloud service?
Tasmota is a webserver program/os/interface for controlling the GPIOs of the MC that its loaded onto. You flash/upload Tasmota to the MC/device of your choice (or buy preloaded devices) and after the device boots you will see it broadcasting (2.4ghz), and once you connect to this network you can open a web browser (from a device connected to the broadcasted network), type in the IP of the broadcasting device, and then manipulate GPIO through web interface. It's a pretty powerful program, and it's free. Ability to schedule, dim, ect. You can buy Sonoff devices for under 10$ which have 10A relays built in so that you can control AC appliances like you're describing. The sonoff comes pre loaded with manufacturer software, but you can flash tasmota to them as well.

A little background and example application


How to flash Tasmota to Sonoff
 

shimbob

Well-Known Member
You can think of the tasmota hardware as a simplified raspberry pi: an even smaller CPU, some RAM, some ROM, some GPIO, and WiFi.

Mycodo pairs well with these using the MQTT protocol, you can send commands and receive data.

A neat trick I intend to implement soon: my RPI is connected to my home network thru Ethernet, the WiFi is unused. I want to set up the rPi's WiFi as a local WAP exclusively for the tasmota devices so they don't litter my home WiFi.
 
Top