Need help getting pointed in the right direction please.

I am learning the Arduino as I develop a beer brewing system. The system will have 2 components, the Arduino which will control the machine and the operator interface. I need to start looking at the operator interface part of the project. My question is what should I be looking at to accomplish this?

I’ve done a lot of searching but the problem is that I’m such a newbie that I’m not even certain what to search for or what I’m looking at when I search.

I’m a PLC programmer by trade and I mostly do machine programming. With PLC’s we often use an HMI which refers to a touch screen that the operator uses to interact with the system. I’ve attached some screen shots of an HMI program. This is what I want to develop to control the system. I want to run the interface on a PC

Is there a programming language that’s more suited to this? I’m seeing Python a lot.
Is there a program I can download that has been designed for this? I found processing and Instrumentino. Processing seems more for graphical art and I don’t think I can design screens like the attached ones in Instrumentino.

What would you guys use for this?

Thanks for your time.
Shane

Active Alarms.JPG

Floc Sys Settings.JPG

Flocculant Screen.JPG

Meter Manual Ctrls.JPG

Images from Original Post so we don’t have to download them. See this Image Guide

13018317e3ed00c7804f5b262fd28e5c58638abf.jpg

3341eae1bfb5c328528422a73ba0611266c90c49.jpg

45d0209f9da95668a00779f1519b195a2acc8af9.jpg

14636172a34d49d12ba4e1fc597d2a3766706668.jpg

…R

For anything as complex as that I suggest you use a PC or a RaspberryPi in conjunction with an Arduino which acts as the interface with the hardware.

If it was my project I would build a browser based GUI using the Python Bottle web framework. I have used it to create a control interface for a small lathe and for model trains.

...R

Thanks Robin2 for embedding the pics and for the input.

I've been looking at bottle and it seems its geared to making web pages. If it's not too much trouble, can you elaborate on why you would use bottle? I need to learn more about all of this.

Thanks Shane

I use Bottle because it makes creating a web application very simple.

Having mucked about creating GUIs with Java’s Swing and Python’s TKinter I have come to the conclusion that it is very much easier to create the equivalent functionality with a web application. It does require learning a bit about HTML and CSS but to my mind that is well worth the trouble and there are hundreds and thousands of tutorials and answers on the web about web programming.

Of course if you are already familiar with another PC programming language there may be a Bottle equivalent for it. For example if you program with Ruby you could use Sinatra.

This is an example the the control screen for a model train system I am developing. It is very very crude but is the only thing I can lay my hands on quickly. Because I use CSS the colours and lots of other appearance features can be changed very easily without affecting the Python code.

TrainGUI.png

…R

I'm using a nice free open source Windows program named EventGhost for my GUIs. I like that it makes it very easy to get started via visual programming but the whole thing runs on Python so you can always write some code when you need to do something more advanced. There are a number of different plugins available that provide easy communication with your Arduino: TCP(TCPEvents or Network Event Sender/Receiver plugins) , UDP(Broadcaster plugin), Webserver, serial(Serial Port plugin). I'm mainly using the OS Menu and Desktop Remote plugins for my GUIs but you can also use web pages or standard Windows dialogs. It's a good option for me because I'm already using the program on my computers for the many other capabilities it offers.

Thanks for chiming in pert. I checked out EventGhost but it doesn't seem like it will be able to create the kinds of screens I want to create.

Robin2 I think I'm starting to understand. I can use bottle for the front end and python for the back end (not sure if I used those right, just picked them up while researching this stuff).

I'd use bottle just for the graphics and not actually build a web page. Hmmmm....well I guess it would be a web page but solely for interfacing with the Arduino. Python would be doing all the work in the background such as taking the values and commands from/to the operator and read/writing them to the Arduino.

Does that sound about right?

Thanks Shane

shane2799: I'd use bottle just for the graphics and not actually build a web page. Hmmmm....well I guess it would be a web page but solely for interfacing with the Arduino. Python would be doing all the work in the background such as taking the values and commands from/to the operator and read/writing them to the Arduino.

That's close enough.

The web pages that I produce with Bottle are viewed in a browser on the same laptop that Python/Bottle is running on.

The Bottle website has some simple examples to get you started.

In fact Bottle is entirely written in Python - it is just a "library" that makes it easier to do web related tasks.

Just to be clear, I am assuming you are NOT already familar with any other GUI programming system and will have to learn some system. In that case I reckon Bottle and web programming is less trouble.

...R

Your assumption is correct. I don't know any other languages. This will be my starting point.

Thanks for all your help. I really appreciate it. Shane

The attached ZIP file contains a cut-down version of my train control program.

There is an Arduino program which is very like the code in Serial Input Basics

And there is the Python code based on Bottle and some Javascript and CSS. Both the Bottle program and the JQuery library are included.

The program is designed to turn on or off leds connected to Pins 11, 12 and 13 and move a servo attached to Pin 8. It will work fine without any extra LEDs and without the servo.

You will probably need to browse through the various folders to see where everything is stored. There is a sort of logic :slight_smile:

The program was written to work on Linux but I think the only thing that would need to be changed if you use Windows or a Mac is the serial port reference in the file arduinoMain.py.

Have fun.

…R

PyBottleDemo.zip (124 KB)

Oh wow! Thanks a lot. This is going to make it much easier to learn the different concepts needed to get my project off the ground.

I owe you one. Shane

shane2799: I owe you one.

You're welcome.

In fact the day after I wrote Reply #9 I realized it would make a perfect starting point for another small project I want to do myself.

...R