WyldRogue
Posts: 2
Joined: Wed May 05, 2021 5:36 pm

Hydroponics Temperature Controlled Fan

Wed May 05, 2021 5:41 pm

Hey guys,

I'm trying to set up fans for a hydroponics systems
and was wondering would it be possible to use a raspberry pi and connect about 2 to 3, 12V Fans with a thermocouple to sense the environmental temperature of a closed system if it gets too hot then it turns On and Off when reaching the minimum temp of environment.

I dont need it to ramp just basic on or off when it reaches the desired temperature. If someone could guide / show me how I would be able to accomplish this? Im not an engineer or coder so im a bit stuck on how to approach it.

Thank you!

terribleted
Posts: 254
Joined: Tue Oct 06, 2020 8:07 pm

Re: Hydroponics Temperature Controlled Fan

Thu May 06, 2021 8:05 pm

to control the fans, you will need external circuitry to switch the (high current) fan loads.
there are many relays and such designed to be controlled by the PI.

As for the thermocouple, the PI has no analog inputs. you might think of a temperature switch (adjustable).
that could be brought in to a digital (on/off) input.
OR you can get a daughterboard specifically for thermocouples... reading a Thermocouple in not trivial... very low voltages, and you need a reference junction, etc,etc.

(my career was in instrumentation and controls).
i had a Trash-80 model 1 (circa 1980). upgrading from 4k to 16k of RAM, i thought "i'll never use this much RAM".
Now i have a computer with a million times that much memory. And i keep running out of it.
Not the computer....ME.

WyldRogue
Posts: 2
Joined: Wed May 05, 2021 5:36 pm

Re: Hydroponics Temperature Controlled Fan

Fri May 07, 2021 1:32 am

terribleted wrote: to control the fans, you will need external circuitry to switch the (high current) fan loads.
there are many relays and such designed to be controlled by the PI.

As for the thermocouple, the PI has no analog inputs. you might think of a temperature switch (adjustable).
that could be brought in to a digital (on/off) input.
OR you can get a daughterboard specifically for thermocouples... reading a Thermocouple in not trivial... very low voltages, and you need a reference junction, etc,etc.

(my career was in instrumentation and controls).
Im sorry I didnt quite understand many of the words you used lol any chance you would know a guide or video I could look into

User avatar
neilgl
Posts: 3252
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Hydroponics Temperature Controlled Fan

Fri May 07, 2021 8:00 am

Use a DS18B20 temperature sensor rather than a thermocouple. This post shows how to connect three of them https://www.raspberrypi.org/forums/vie ... p?t=257753 but works with one. Use some (python) code on the pi to read the temperature via the pi’s built in “1 wire” interface.

pcmanbob
Posts: 11153
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Hydroponics Temperature Controlled Fan

Fri May 07, 2021 8:44 am

If you give use more details of the 12V fans you intend to use then we can help you with connecting and controlling them with a pi.

You might also tell use if you want the control ready made or do you want to build the control circuit yourself from components.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

terribleted
Posts: 254
Joined: Tue Oct 06, 2020 8:07 pm

Re: Hydroponics Temperature Controlled Fan

Fri May 07, 2021 2:52 pm

ok. The PI has only "digital i/o"
DIGITAL means on/off . The I/O (input/output) of the PI can only read "high" or "low". for a pin set up as INPUT, that means High being close to 3.3V, Low being close to 0V
to MEASURE voltages, you need an Analog to Digital Converter (ADC)
for example, a 12 bit, 5V ADC will measure the voltage, and return a number between 0 and 4095 representing 0 to 5V
the PI has NO ADCs

or you can use "one-wire" or other protocols as others have suggested above.

When a PI pin is set up as an output, it can output "low" (near 0 volts) or "high" (near 3.3 volts).
outputs on the PI are limited in current output. 16mA (16/1000 of an amp) i think.
So, normally, one uses the output of the PI to "switch" a transistor or other "high current capable" output if you need to switch more than a few mA. (usually the case)
using a PI output pin and (outputting) drawing more current than that will damage the PI !!!

You COULD use a PICO. It includes 3 each ADC.

if you don't need the capabilities of a PI (Full OS, basically a full-blown computer) you can use a PICO

I normally use a TMP36 sensor to measure temperatures, but others have suggested other sensors no matter, check them all out. Pick what you like.
i had a Trash-80 model 1 (circa 1980). upgrading from 4k to 16k of RAM, i thought "i'll never use this much RAM".
Now i have a computer with a million times that much memory. And i keep running out of it.
Not the computer....ME.

twostage
Posts: 111
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: Hydroponics Temperature Controlled Fan

Sat May 08, 2021 12:47 pm

You could just build a temperature controlled fan. It would consist of the fan, power supply, thermocouple, op amp and variable resistor. You'd set the temperature the fan comes on at manually using the variable resistor.

Not as hard as it sounds if you can use a soldering iron.

You can probably buy them made.

(Apologies that it doesn't use a pi).

twostage
Posts: 111
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: Hydroponics Temperature Controlled Fan

Sat May 08, 2021 12:51 pm


User avatar
neilgl
Posts: 3252
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Hydroponics Temperature Controlled Fan

Sat May 08, 2021 12:59 pm

Part of the pi fun is to make it yourself rather than buy ready made. And you can use the pi to log the temperatures, show a graph and get it to speak via Alexa if you want.

twostage
Posts: 111
Joined: Sun May 07, 2017 6:31 pm
Location: Northumberland

Re: Hydroponics Temperature Controlled Fan

Sun May 09, 2021 10:45 am

neilgl wrote:
Sat May 08, 2021 12:59 pm
Part of the pi fun is to make it yourself rather than buy ready made. And you can use the pi to log the temperatures, show a graph and get it to speak via Alexa if you want.
Yep, i did apologise for the non-pi-ness :D . I've taken all three routes in the past - bought it, built it, pi'd it.

Depends what your goal is.

Return to “Beginners”