RuizE
Posts: 1
Joined: Fri Nov 30, 2018 12:47 am

Temp sensor activating fan

Fri Nov 30, 2018 12:59 am

Hi everyone, its good to see so many friendly enthusiasts out here. I am having a real first world issue that I could use some immediate help with. I am currently working on a final project for an IoT class and have hit a hurdle. I've built a soda can solar heater and would like the fan to be activated once the temperature sensor (TMP36) reaches say 75 degrees. After the fan is activated and the temperature sensor is no longer reading at AT LEAST 75 degrees I would like the fan to shut off, until of course the temp sensor reaches 75 degrees again.

Now I've spent hours looking up code and copy and pasting things to no avail. I am very new to this so a lot of the jargon is lost on me and python may as well be Latin. I am super lost and looking for any help that anyone with a lot of patience can help me with. I am using a relay that doesn't seem to be performing its intended purpose. My fan ( a laptop, 2 wire, 5v fan) is receiving power constantly. I can copy and paste the code I'm using but I'm sure someone out there has the code I need. If there is anything that is unclear about my post here please let me know and I'll do my best to explain it better.

Andyroo

Re: Temp sensor activating fan

Fri Nov 30, 2018 2:51 pm

What type of Pi and operating system are you using? Simplest set-up to get support I guess is Raspbian and Python...

What type of temp sensor do you have and how is it connect to the Pi?

How is the fan connected to the Pi?

Do you have access to any local electronics storeroom via your class, local shop or if you need more bits is it eBay etc?

ghp
Posts: 1517
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Temp sensor activating fan

Fri Nov 30, 2018 6:50 pm

There are a lot of tutorials around , one example is https://mydevices.com/article/connect-t ... readboard/
And https://www.digikey.com/en/maker/projec ... 25bee8d8f2

Or go for an electronics only solution and use a simple comparator http://www.learningaboutelectronics.com ... arator.php, which will not challenge your programming skills.

Return to “Python”