So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Dominic Jackson
#78214 Hi I am a totally beginner I wanted to control the fan speed on a little greenhouse I have to keep it at 24c-30c degrees. I am looking at the cheapest way to do this and I am going for a PI zero without wifi then I can simply add a wifi module. I can buy a ESP8266 ESP-12E from ebay for £1.70 or the USB dongle for about the same price. But I would like to have my usb port free and increase my learning and understanding so I would like to go for the module. Is it that hard to get it up and running so it is used in linux seamlessly like a normal usb wifi dongle?

Next I want to work out how to control the current going to a pair of fans, not only as a switch (on or off) but as a variable rpm depending on how hot or cold it is. Also to play some music to them to wake them up and then finally an auto watering system so I can leave them for a week to go on holiday. But one stage at a time! First just getting wifi onto a pi zero :)

Thanks.
User avatar
By QuickFix
#78248 What you describe can all be done with a single ESP (and a couple of auxiliary components) and a lot of elbow grease; there's no need for a Pi (of any sort).
Just get yourself an Arduino IDE, download the ESP8266 core, try out some examples and put together your own code by taking pieces of someone else's work. ;)

Someone else on this forum is playing with an ESP in his green house, maybe you can exchange ideas with him (sorry can't remember who it was atm)?
Other inspirations might be found in projects on sites like Instructables. :idea:

Oh... and please don't buy an ESP module, but get yourself a development board instead: they're equally cheap (see my signature below for links), but they'll save you a lot of trouble getting things to work the way you want. :idea:

If you do decide to take the Pi-way, you'd better just buy a normal USB WiFi dongle, since getting the ESP to work using AT commands is pretty cumbersome.
User avatar
By Bonzo
#78252 I am sensing temp, humidity and pressure in my greenhouse and transmitting the data back to my home network with a Nodemcu. To do what you want I would probably create a control board on a strip board. The fan speed can probably be controlled with PWM and a transistor - at work I used a motor shield on an Uno. You can then add a couple of relays to the stripboard to control the watering and the music.

EDIT: You do not need relays and can use transistors again to turn the power on and off. From memory there are transistors that cut the power when the digital signal is removed and others that do not; so you need to select the correct one! Again you will ned the correct one for the PWM signal.

The project has stalled as I was using a Pi to receive the data from the Nodemcu and do some work on the results and display them on a web page. I found the Pi was unreliable and kept freezing/hanging; so I have lost my enthusiasm. I am now reading the data - saving to Spiffs - transmitting to the wifi network once a day and doing the coding on my PC. I also have a RTC, checking the time on the web, and solar panel.

Although I have not touched the project for about two months; perhaps in the winter I will get back onto it. The RTC is just placed in position and not wired in yet. I should also have used a double row of headers to make testing easier but didn't think of that until after I assembled the board.

Image