3

I'm trying to build a smart thermostat for a particular application. I have the following design criteria and goals for the system:

  • Must be able to set up and monitor the device from either a mobile phone or local network device.
  • No go on Ethernet or other hardwired connection, except for initial setup. This must be a wireless solution. I'm presuming WiFi is best.
  • Needs a clock, an on time and an off time setting.
  • The system does a system time verification check once daily.
  • Needs a temperature input.
  • Needs to run an existing heater system (24v) thru a relay.
  • 120v AC power (battery backup not required.)
  • Needs to be "hidden" in existing wall as much as possible. (i.e. small & compact) My intent is to hide the unit behind a double wide electrical duplex dead panel. (i.e. 4" x 4" nominal access thru drywall)

Here's a visual of my design intent package:Thermostat Design Package

As I review a number of different hardware controller devices, I can see some issues. I am very familiar with the Intel Edison, and I know exactly how to do this project there, including using the controller as a stand alone web host. (The Edison uses Yocto Linux to create a node.js server using http module.) I was hoping to save a few $$ on hardware using an alternative controller but not sure that will work. I've been wading thru the code for both the Photon and generic Arduino devices, and I'm getting the impression that I may need a custom server / api tool for a web page interface. Its not clear that those hardware choices will support an interactive web page, particularly for easy user data update via browser Submit button. That's not a big problem, I'm a freelance software developer, handy in C/C++/Java, PHP and JavaScript. And as for the Raspberry Pi, I have no experience but the pricing on some of their boards is below $15.

Here are my questions:

  • Has anybody used an Arduino board to host an interactive web page, including user input via Submit / Form ? (Can I declare a local network static IP address for an Arduino?)
  • Has anybody used an Particle Photon board to host an interactive web page, including user input via Submit / Form? (It looks like declaring a local network static IP address on a Photon is anything but easy...)
  • Has anybody written an API Restful server for their Arduino, with both get and put functionality? (I'm thinking PHP, or node.js makes the most sense for me.) I know if I have to use Dynamic IP addressing to the controller, that I can always make an API system work for the system.
  • Other comments?
8
  • 2
    Why not ESP8266? Jan 18, 2016 at 3:25
  • @ignaciovazquezabrams That board appears to be awesome as a WiFi interface, but doesn't appear to have the processing power to read analog input and function as a server and overall stand alone controller. Its very well priced to provide WiFi service to another device.
    – zipzit
    Jan 18, 2016 at 3:32
  • 3
    Then you haven't really looked at it. Jan 18, 2016 at 3:34
  • @IgnacioVazquez-Abrams Very right you are. I'm looking at the documentation at a number of places and its not at all clear this board will be fully functional for this application. 1- instructables 2 - nurdspace 3 - Sparkfun Can you recommend better documentation that makes your suggestion and the device capabilities really clear. I'm really liking the pricing of this thing! Thx.
    – zipzit
    Jan 18, 2016 at 3:45
  • @IgnacioVazquez-Abrams ha... here is a better reference at Makezine In fact, make this recommendation an answer, will you?
    – zipzit
    Jan 18, 2016 at 3:48

2 Answers 2

2

Has anybody used an Arduino board to host an interactive web page, including user input via Submit / Form ?

I have a Tiny Web Server for the Arduino. It is designed to be light-weight on RAM. It supports GET/POST/Cookies for interacting with web forms.

Arduino web form

Example code and more information on the linked page above.


(Can I declare a local network static IP address for an Arduino?)

Yes.


Other comments?

You could use NRF24L01 modules for short-range communication of wireless information. I have example code and schematics. My tests seemed to indicate 20m range was achievable.

2

Have you looked at the Adafruit Huzzah boards? It's small, inexpensive ($10), comes with wireless capability and a 10-bit ADC for a temperature sensor. If you'll have access to the Internet, then you could use NTP to get time.

3
  • 1
    I've been looking at it. That is exactly the same suggestion as was made by @IgnacioVazquez-Abrams to look at the ESP8266. In fact I've been studying up on those for the past two hours. The Adafruit Huzzah and the NodeMCU are two implementations that have got my interest. Both of those boards expand the pinouts, as well as add 5v -> 3.3v regulation. I've been reading up the awesome E-book on the ESP8266 from Neil Kolban Clearly this chip makes a lot of sense for me, if I can get the desired I/O to fit and function in existing memory.
    – zipzit
    Jan 18, 2016 at 7:04
  • 1
    From the looks of your specs for the project a '328 Arduino would have more than enough flash (32K) and RAM (2K) to run your application – based on having built similar projects using an Uno. You've got the ADC as well as several GPIO pins. What I can't tell from Adafruit's page and the data sheet is if you get any flash, but it is capable of addressing up to 16 MB and that's way more than you need.
    – dlu
    Jan 18, 2016 at 8:15
  • Sounds great. I just ordered a few boards and supporting supplies from Ebay. I ordered a few xtra sets, thought this would make a good meetup project for the folks locally. The board was $5.36 / ea, Wow. Not sure what you mean about the 328 Arduino. I'm hoping to use a virgin ESP8266 board. From what I can see that board has 512KB flash memory. I only need one analog input and one general I/O output. Not sure about the web stuff yet.. For as little as this cost I'm going to try and see what happens. I know I can always fall back and use the Intel Edison.
    – zipzit
    Jan 18, 2016 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.