Arduino build in progress, webpage based automation

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

burnthesheep

Member
Joined
Jul 29, 2015
Messages
17
Reaction score
4
I posted a reply in another thread, but wanted to start a placeholder once I take some pictures and get screenshots of the code and webpage.

I have an Arduino Uno that I put on a subpanel with din rail and some wire ducting a while ago to mess around with wireless X10 home automation crap. I put it inside an old desktop case and am using its power supply to run it. It worked but didn't have the money to buy a bunch of X10 equipment for the house.

I have about 90% of the coding done for my automated batch system for BIAB.

The route I took was writing a very basic HTML webpage hosted on the Arduino to run the batch. I didn't have cash for a true HMI or any PLC stuff. And a webpage is a free HMI if you already have an Arduino.

The page is set to update every 15 seconds. It has 3 tables: batch status, batch contol, batch setup.

Batch status shows the current step, current temperature and time SP's and PV's and a step description.

The batch control table gives you options to hold a step, skip a step, abort batch, start batch, etc.....

The batch setup table allows me to edit up to 5 different batch steps and enable/disable them. Each step has setpoints for temperature, time, etc...

All I have left is the actual logic to run the batch. That's easy, the hard part was getting the webpage to work properly.

The idea is that instead of standing at a stove and manually regulating temperature and stirring a pot I can just let the batch go while I watch TV. I plan to setup a little "alarm" buzzer for temperature excursions and also if I have a "prompt" to do something before the next step happens, such as a hops addition.

Pics to come.......
 
Subscribed. I am also in the design phase of an automated brewery using a Spark Core I had lying around. I'm debating between an HTML web page for the control system or a Windows 10 Universal app. I look forward to seeing what you come up with.
 
Interesting. Sub'd.

Forgive me as I'm still learning the Arduino, how do you upload a webpage onto it, and how is it accessed? Are you using an Arduion with an Ethernet port? I really need to join the Arduino forums. This sounds like a pretty good way to go, especially since I'm actually decent at web design. Is there a way to make use of javascript or php with the web interface?
 
You can add "libraries" to the code for the Arduino of things like ethernet, html, etc...

I have an ethernet shield for it.

Here is the subpanel: there are two thermocouple drivers there, the Arduno Uno, a relay breakout board, and a screw terminal shield on top of it. All wire labeled, has a schematic I made for it. The odd thing on the side is an RF transmitter for the wireless home automation junk I never used.

IMG_2278_zps2v8g6cne.jpg


Webpage needs some more "pretty" to it, bunch of dummy values in the integer/real fields to see how the page comes up in a browser.

batch%20control_zpsjgccd2zz.jpg


Let me clean up the Arduino code some more before posting it, it's really hairy and has leftovers of home automation in it I haven't gutted yet. I had a webpage for that I hacked apart to use for this so the code would look confusing seeing a bunch of "turn countertop lights on" or "turn fireplace on" stuff in there.
 
So why did you choose thermocouples for your system?

Also, what's the size of your compiled sketch?
 
So why did you choose thermocouples for your system?

Also, what's the size of your compiled sketch?

Because they were free. Two jobs ago they were deconstructing a machine to salvage parts to be used for training or fun stuff at work. None of it could be used again on a customer machine.

So, the thermocouples had already had a bung crimped on in the past and couldn't be re-used and the signal conditioners were out of calibration date and they didn't want to re-cal them.

I know thermocouples are typically pretty cost prohibitive for the average build due to the signal conditioners.

The sketch right now is 24,080 bytes of 32,256 available.

I keep adding more code and it isn't getting much bigger. The libraries add a lot of size and heft to the code. I still am including the RF transmitter library and home automation libraries, and those are massive.
 
Because they were free. Two jobs ago they were deconstructing a machine to salvage parts to be used for training or fun stuff at work. None of it could be used again on a customer machine.

So, the thermocouples had already had a bung crimped on in the past and couldn't be re-used and the signal conditioners were out of calibration date and they didn't want to re-cal them.

I know thermocouples are typically pretty cost prohibitive for the average build due to the signal conditioners.

The sketch right now is 24,080 bytes of 32,256 available.

I keep adding more code and it isn't getting much bigger. The libraries add a lot of size and heft to the code. I still am including the RF transmitter library and home automation libraries, and those are massive.

Cool, can't do better than free!

You might look into the hc-05, hc-06 Bluetooth, or the esp8266 wifi for cheap wireless connection that doesn't require any code on the arduino. I currently use the hc-05 on my arduino controller, but I might just be moving my whole project over to the esp8266 and ditching the arduino all together.
 
Interesting. Sub'd.

Forgive me as I'm still learning the Arduino, how do you upload a webpage onto it, and how is it accessed? Are you using an Arduion with an Ethernet port? I really need to join the Arduino forums. This sounds like a pretty good way to go, especially since I'm actually decent at web design. Is there a way to make use of javascript or php with the web interface?

If you are looking for an easy way to create a web interface take a look at the Particle Photon and see if it fits your criteria. It has a very easy to use REST API and they have a javascript library called SparkJS. It uses Wiring, the same code framework as Arduino and is fairly easy to learn. I'm starting a build with one now and everything I've needed on Arduino has already been ported to Particle. I also built an app controlled Terra Cotta pot smoker with one and it's been bulletproof. I've had no issues with the Particle Photon at all.
 
If you are looking for an easy way to create a web interface take a look at the Particle Photon and see if it fits your criteria. It has a very easy to use REST API and they have a javascript library called SparkJS. It uses Wiring, the same code framework as Arduino and is fairly easy to learn. I'm starting a build with one now and everything I've needed on Arduino has already been ported to Particle. I also built an app controlled Terra Cotta pot smoker with one and it's been bulletproof. I've had no issues with the Particle Photon at all.

How easy/difficult is it to develop off the cloud? The whole cloud thing is a deal breaker for me.
 
How easy/difficult is it to develop off the cloud? The whole cloud thing is a deal breaker for me.

It's actually really easy. However, the cloud IDE is not the best but you don't have to use it to develop. They have a Windows and Mac IDE (Linux coming soon apparently) that you can use. You can update the board over USB if you use that IDE as well.

Also, your code will still be running on the board even if you lose connectivity to the internet, you just won't be able to access the REST API. But as soon as the internet comes back up you can access your board again. This has happened from time to time on my smoker project and it doesn't effect keeping the smoker at the right temperature, I just can't see what the temperature is on my app. All in all, it's been great for the application I've used it for and I believe it will work well for my brewery too.
 
It's actually really easy. However, the cloud IDE is not the best but you don't have to use it to develop. They have a Windows and Mac IDE (Linux coming soon apparently) that you can use. You can update the board over USB if you use that IDE as well.

Also, your code will still be running on the board even if you lose connectivity to the internet, you just won't be able to access the REST API. But as soon as the internet comes back up you can access your board again. This has happened from time to time on my smoker project and it doesn't effect keeping the smoker at the right temperature, I just can't see what the temperature is on my app. All in all, it's been great for the application I've used it for and I believe it will work well for my brewery too.

Thank you for the info. I'll look into the windows ide, hopefully they linux version comes out soon. I do have a proton that's been sitting around collecting dust because I couldn't get it to connect to the stupid cloud. I had plenty of esps to keep me busy anyway.
 
You can add "libraries" to the code for the Arduino of things like ethernet, html, etc...

I have an ethernet shield for it.

Here is the subpanel: there are two thermocouple drivers there, the Arduno Uno, a relay breakout board, and a screw terminal shield on top of it. All wire labeled, has a schematic I made for it. The odd thing on the side is an RF transmitter for the wireless home automation junk I never used.

IMG_2278_zps2v8g6cne.jpg


Webpage needs some more "pretty" to it, bunch of dummy values in the integer/real fields to see how the page comes up in a browser.

batch%20control_zpsjgccd2zz.jpg


Let me clean up the Arduino code some more before posting it, it's really hairy and has leftovers of home automation in it I haven't gutted yet. I had a webpage for that I hacked apart to use for this so the code would look confusing seeing a bunch of "turn countertop lights on" or "turn fireplace on" stuff in there.

Ok thanks for the answers, I should have known there was a library for HTML.

The PC case is pretty smart, heck a person could add the 240/120 volt stuff to it as well and have everything in one panel, assuming you had a large enough computer case.

Your web interface looks good.
 
If you are looking for an easy way to create a web interface take a look at the Particle Photon and see if it fits your criteria. It has a very easy to use REST API and they have a javascript library called SparkJS. It uses Wiring, the same code framework as Arduino and is fairly easy to learn. I'm starting a build with one now and everything I've needed on Arduino has already been ported to Particle. I also built an app controlled Terra Cotta pot smoker with one and it's been bulletproof. I've had no issues with the Particle Photon at all.

I will check it out, I'm just getting into electronics as a hobby, still have a LOT to learn but I'm having so much fun with it. I'm mostly interested in the web based interface with maybe some javascript features, because I have a lot more experience with web design. I would rather do that then try to create a custom desktop based application. I wonder if it would be possible to use incorporate some kind of database to store information from past brews, something like mySQL.
 
How do you get the webpage from the arduino? USB to the computer?
 
How easy/difficult is it to develop off the cloud? The whole cloud thing is a deal breaker for me.

It is possible to run the Spark/Particle cloud server yourself thereby freeing yourself from their 'cloud'.

https://www.gitbook.com/book/kennethlimcp/spark-local-cloud-on-raspberry-pi/details

You can also disable all cloud functionality to save space on the Photon as well if you don't need any of that functionality.

Utilizing their cloud allows you to do OTA firmware flashing with or without their IDE.
I use the particle-cli to flash OTA builds with my personal server as the intermediary.
 
No, it basically listens for incoming text, which is an http request from a remote TCP report over Ethernet or wifi. The code then responds, depending on the request, which is a webpage.

Is be interested in seeing the webpage code when you have a few things working. I'm trying a similar idea, but have done any active webpage work before
 
Back
Top