Project to control fans/check temperatures, from an Android app over wifi/web

Hi all,

Just looking at the above project and was looking for some general advice please.

This will be my first time using an arduino (I have basic/good electronics knowledge I'd say) and my first time android programming.

What I'm stuck with is that if I need to experiment, I need an arduino, but don't want to buy one that will not do the job for the project.

I'm thinking of maybe an Arduino Yun for the following reasons:

  • I like the idea of Linux being built in
  • It has wifi (a 'must' for the project) and seems good teamed with the Linux, hopefully allowing the temperatures from the IO pins to be easily sent over the web/network. And commands from the Android app to be relayed to the arduino?
  • Seems to have a reasonable amount of IO pins, including some with PWM which may be useful for the fan speed control, depending if speed will be factored into the design or not, I might just go for simple on/off with a relay

What the project will need to do is to read temperatures from a maximum of 3 or 4 different temperature sensors, and display that in an app on the Android. And then I was thinking of a relay connected to the arduino, switching power for 3 or 4 12v/5v fans to turn them on and off using the click of a button in the app (and maybe automatically based on a temperature threshold)

For the temperature sensors I was thinking of the ds18b20 maybe as it seems like it will do the job and is nice and cheap

What do you all think? Does this sound like a suitable / feasible project?

Any general advice please, maybe on the suitability of the Arduino Yun as that is what I'm unsure about

Hope you can help

Thanks! :slight_smile:

EDIT: From reading, there seems to be mixed opinions on connecting 12v fans to an Arduino and whether or not it will have the power to run them. That's why I am leaning towards the idea of a relay as that will be suitable to send a 5v signal to switch the relay instead, with the fans powered from their own 12v source (possibly a computer power supply)

Anyone able to give any advice or comments please?

Thanks! :slight_smile:

I haven't used a yún, so little to say on that topic other than to note that it seems like a pricey solution. Having said that, wifi shields are expensive, so perhaps you're getting a bargain.

Before you add the complexity of an Android app, I'd suggest you start with serving up a simple web page - easy to test and of course you can hit it from your phone's browser.

The DS18b20 is a popular choice & easy to use, especially since there's a library for it. Avoid parasitic mode though, at least to start with - I've never been able to get it to work.

I don't think there's any doubt about running your fans directly from the arduino - you can't - they will draw way too much current. You will need to power them from a separate source and have the arduino switch them via relay or transistor.

It's certainly a feasible project; if I were doing it though, I'd avoid Linux and run it off a more basic arduino.

Thanks for the response wildbill

With regards to the yún being expensive... I think like you say it might be an okay deal. As something like an Uno plus the price of a wifi shield ends up bringing it close to / over the price of a yún anyway. Also then I have a nice arduino with a good spec and features (like the wifi and linux) for future projects

Thank you for the tip on the parasitic mode, will give it a go and if it doesn't work first time then I won't bother wasting anymore time with it

With the DS18B20 am I correct in saying it will be fine for room temperature (for example)? As in it doesn't need direct contact with something to check the temp of it?

Any chance you could possibly take a look here for my question about a relay please?:
Link to relay question

I think I may go for the yún and just not use the linux side of things to begin with then? At least it will be there if I need it?

Would the web page not need a small web server, can that be run just using the arduino? EDIT: Just googled and there seems to be some tutorials for it

Thanks for all the advice :slight_smile:

To add to my above post

Just thought of a slightly better idea maybe (from your comment about the web page)... It seems you can interact with the pins through the web page... So I could make a mobile friendly, nice looking web page instead of an app

Then to control the fans and check temps you're not limited to an Android phone, you could use any phone or laptop etc