NEW StrangeBrew Elsinore Thread

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.

DougEdey

Well-Known Member
Joined
Dec 29, 2011
Messages
770
Reaction score
181
Location
Ottawa
So after the last thread got a bit too long for me, and after reconfiguring the entire setup procedure, I have decided to start a new thread.




StrangeBrew Elsinore An Opensource Brewery Controller


Strangebrew Elsinore Server


Java Server for Strangebrew Elsinore

The purpose of this project is to create a Java application that can run on small systems such as the RaspberryPi and the Beaglebone series

Since these systems run on Linux, that is a requirement to using this.

The system is based off the Dallas One Wire protocol for the temperature probes (expanding to analogue inputs too), and Straightforward GPIO outputs for SSR control
Setup Instructions


Beaglebone Black

RaspberryPi

The above instructions will tell you how to setup your systems for Elsinore
Startup Instructions


Clone this repository:

Code:
git clone [url]https://github.com/DougEdey/SB_Elsinore_Server[/url]

Move to the checked out Directory:

Code:
cd SB_Elsinore_Server

Run:

Code:
./launch.sh

Wait, what happened to the old instructions? Well I found that people weren't following them well. So I rewrote the UI, you can now setup everything (almost) from the UI.

If you have a DS2450 (or don't want to use Analogue inputs for reading the volume, BBB is 1.7V so not very good for reading the analogue inputs. You will see a request for OWFS, please use OWFS if you can, it's better in general.

Code:
./launch.sh
Starting Elsinore as elsinore
[sudo] password for elsinore:
May 17, 2014 8:29:23 PM com.sb.elsinore.LaunchControl main
INFO: Running Brewery Controller.CFG IS NULL
DOC IS NULL
Detected a non temp probe.20-00000008dc9e
Do you want to switch to OWFS? [y/N]
y
Creating the OWFS configuration.
What is the OWFS server host? (Defaults to localhost)

What is the OWFS server port? (Defaults to 4304)

Then you can use the web UI.

The standard view you'll see at the start is an un-named display, such as:

61lm1VI.png


The probe 'names' are their addresses, double clicking them allows you to set them up* You can set just the name (which will leave it as a temperature probe)* A GPIO pin (which will set it up as a PID controller)* And if you use a GPIO Pin you can set an Aux pin at the same time, allowing you to use an auxilliary ouput.

FSAxuYB.png


You can also setup the volume reading from the web UI, double clicking on the volume box will show you the input.

* You can set the Analogue input PIN (for BBB and RPi), but these are normally voltage limited
* Or you can set the One Wire address (for a DS2450, which is what I use) and the offset for the input which will give you up to 5V.
* You can set the Volume Unit (this doesn't matter since there's no conversion between values at the moment)
* Adding a volume point will add a new data point to the system. When you have three or more the system will be able to calculate the volume.

9pYNdQf.png

RaspberryPi or Beagleboard?


The BeagleBoard Black does have a big advantage over the RPi, it has onboard analogue inputs, but these are 1.8V.

The RaspberryPi works fine with the existing software, the only thing you need to do differently is naming the GPIO Pinouts.
One Wire & OWFS


One Wire is fantastic (in my opinion) each sensor or device has a full 64 bit address, and you don't have to worry about the order and you can chain them!

One Wire devices can be chained, with only one Pullup resistor before the first connection to a device. I currently have 4 Temperature probes on my circuit, and a ADC, connected using XLR jacks.

OWFS is a much better One Wire Implementation, it is highly recommended to install it, and it is REQUIRED if you use One Wire based Analog inputs (like the DS2450

Install it using your standard package manager, then you need to set a mountpoint up (I use /mnt/1wire) and set

server: w1 in the OWFS configuration File (/etc/owfs.conf by default), you can chose the ports as you want for OWFSHTTP and OWServer, the configuration tool will setup OWFS if it can.

To manually setup OWFS, use the option -owfs when starting up Elsinore

Cutoff Temperature


After the incident I decided to add a cutoff temperature, in my case I have a temperature probe on my SSRs, and when they go over a certain temperature I want to kill the server so it doesn't get badly damaged

This is to come in the updated Web UI setup.

System Temperature

To enable the System Temperature reading, please add

Code:
<system />

In the <general> section of the configuration file.

Timers

Use the web UI, click on "Add Timer" to create a timer.

Pump Control

To add a pump, use the "Add Pump" button on the Web Interface

Config File

This is now automatically controlled, you shouldn't need to do anything to it, except for backing it up.

Control Interface

Visit
Code:
<ip of your system>:8080/controller
to access the webUI, which works on mobiles too:

j59BcFZ.png


Album of the UI Progress

This is an example of the PID control interface, temperature probes are displayed on the right hand side as LCD displays. On the Raspberry Pi you'll also get the system temperature (this isn't enabled on Beagleboard yet)

There is also a Android Application which is not currently in development, search my repositories to check this, but it's not deprecated yet, I haven't changed the JSON output from the system to it should continue to work.

Thanks For reading this, if you have any queries please contact me or file a bug.
 
Looks good DougEdey! I have a small question regarding the the 1-Wire probes and using OWFS. Do you have an idea of how fast your update times are with all four probes being read?
 
Looks good DougEdey! I have a small question regarding the the 1-Wire probes and using OWFS. Do you have an idea of how fast your update times are with all four probes being read?

It loops around every 5s, OWFS has a trigger mechanism I just haven't gotten round to enabling it yet.
 
It loops around every 5s, OWFS has a trigger mechanism I just haven't gotten round to enabling it yet.

Thanks, that is kind of what I thought. That is a long time for a PID loop, good thing temperature loops are slow reacting. I wasn't sure if the DS2450 would allow you to poll all the temperature probes simultaneously rather than serially.
 
First off, thanks for all the hard work Doug!

A couple of questions:

- On the raspberry pi, how do you name the gpio outputs?
- Can you provide more detail on how to include the Pi's temperature? I tried modifying the config file, but then it tells me it's not a valid xml file

Cheers
 
Thanks, that is kind of what I thought. That is a long time for a PID loop, good thing temperature loops are slow reacting. I wasn't sure if the DS2450 would allow you to poll all the temperature probes simultaneously rather than serially.

Yes, you're right, I'll make this user adjustable.
 
First off, thanks for all the hard work Doug!

A couple of questions:

- On the raspberry pi, how do you name the gpio outputs?
- Can you provide more detail on how to include the Pi's temperature? I tried modifying the config file, but then it tells me it's not a valid xml file

Cheers

RPi pinouts are the standard ones from ELinux: http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29 So use GPIO_15 to use GPIO 15, same goes for the BBB (though the BBB uses banks too GPIO_1_7 for instance).

The System temp will be selectable via the UI. I'll update it late today
 
OK, I have one more question.
Since the RPi only has one PWM output available, how are you controlling multiple heating elements?

Thanks again.
 
OK, I have one more question.
Since the RPi only has one PWM output available, how are you controlling multiple heating elements?

Thanks again.

It doesn't use PWM at all, you just hook up SSRs and the system turns them on/off appropriately for the duty cycle.
 
RPi pinouts are the standard ones from ELinux: http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29 So use GPIO_15 to use GPIO 15, same goes for the BBB (though the BBB uses banks too GPIO_1_7 for instance).

The System temp will be selectable via the UI. I'll update it late today

OK thanks.

I've got the Pi set up and connected to a ds18b20 and is reading the temperature. I put a GPIO reference in and tried messing around with duty cycles etc. but it's not showing anything. If not hooked up to a full system, should it show as working?
 
OK thanks.

I've got the Pi set up and connected to a ds18b20 and is reading the temperature. I put a GPIO reference in and tried messing around with duty cycles etc. but it's not showing anything. If not hooked up to a full system, should it show as working?

Ok, so I actually hooked the PID up (no power going to it, just from the Pi), changed the reference from GPIO_25 to GPIO25 and now it works. I do have another question though, I go into the auto area in the PID and try to change the settings and it won't let me... for instance it says 74 in the temp area, I try to erase it to put in 73 and it just flips back to 74..

thanks again
 
That shouldn't happen, in my testing clicking any of the buttons should prevent updates.

Which browser are you using?
 
That shouldn't happen, in my testing clicking any of the buttons should prevent updates.

Which browser are you using?

I can't edit the setting when it is running, I can when it's not. Not sure if this is be design or not.

I don't think it's a browser issue, I've tried it using a few different browsers.

I've tried it using:
Chronium (linux)
Firefox (linux)
Chrome (windows)
Chome (android)
Iphone

There are a few things weird with the GUI (see image)


Here is my config file:

<elsinore>
<device id="Kettle">
<aux/>
<probe>28-000003ccc32f</probe>
<duty_cycle>90</duty_cycle>
<cycle_time>2</cycle_time>
<set_point>175</set_point>
<proportional>60</proportional>
<integral>0</integral>
<derivative>0</derivative>
<gpio>GPIO25</gpio>
</device>
<general/>
<timers>
<timer id="null"/>
</timers>
</elsinore>

sb screenshot.jpg
 
Ah my bad, I misread you, I'll update the UI to make it clearer, but you need to click the mode again (i.e. auto).

I'll change the UI so the buttons are disabled until you click on the mode.
 
Updated. The inputs are grayed out until you select the mode again.

Thanks Doug. Any thoughts on the GUI from my picture above?

The right side of the PID setup looks weird, and I can't input 'D'

Also, when I turn it 'off' the GUI indicates the power is set at whatever the manual option is set at. Not really an issue, but should likely be 0. (No signal is being sent to the SSR at this point..)

Cheers.
 
I'll look at the D input, but I'm not sure what you mean by weird, unfortunately the image is compressed too much and I can't see anything except for blurr.
 
Thanks Swab, I'd forgotten a & for the Integral, and I've fixed the differential value not being displayed.

Hutch1001: I'm using Ubuntu, but any distro should work.
 
Thanks Swab, I'd forgotten a & for the Integral, and I've fixed the differential value not being displayed.

Ok, the GUI looks much better now. Now though, I can't edit the duty time, on either the auto or manual tab.
 
I think that I am missing some tools. This is a screenshot of what I am getting.
ubuntu@arm:~/SB_Elsinore_Server$ ./launch.sh
Starting Elsinore as ubuntu
sudo: invalid option -- 'j'
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-u user] file ...
ubuntu@arm:~/SB_Elsinore_Server$

I have a BBB rev B with a fresh install of Ubuntu. and I have the wifi working kindof.
 
ubuntu@arm:~$ cd SB_Elsinore_Server/extras
ubuntu@arm:~/SB_Elsinore_Server/extras$ ls
BeagleboneBlackSetup.md dtc_setup.sh RaspberryPiSetup.md w1.dts
beaglebone.json jgpio-00A0.dtbo w1-00A0.dtbo w1_setup.sh
ubuntu@arm:~/SB_Elsinore_Server/extras$ sudo dtc -O dtb -o /lib/firmware/w1-00A0.dtbo -b 0 -@ w1-00A0.dtbo
[sudo] password for ubuntu:
Error: w1-00A0.dtbo:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree
ubuntu@arm:~/SB_Elsinore_Server/extras$


Im sure I am missing some other tool or step.
 
ubuntu@arm:~$ cd SB_Elsinore_Server/extras
ubuntu@arm:~/SB_Elsinore_Server/extras$ ls
BeagleboneBlackSetup.md dtc_setup.sh RaspberryPiSetup.md w1.dts
beaglebone.json jgpio-00A0.dtbo w1-00A0.dtbo w1_setup.sh
ubuntu@arm:~/SB_Elsinore_Server/extras$ sudo dtc -O dtb -o /lib/firmware/w1-00A0.dtbo -b 0 -@ w1-00A0.dtbo
[sudo] password for ubuntu:
Error: w1-00A0.dtbo:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree
ubuntu@arm:~/SB_Elsinore_Server/extras$


Im sure I am missing some other tool or step.

Sorry, that's my fault, I'll update the doc when I get home, the dtbo is compiled, the dtc is the uncompiled (incase people want to change things):

sudo dtc -O dtb -o /lib/firmware/w1-00A0.dtbo -b 0 -@ w1-00A0.dtc

The instructions do state that there's a pre-compiled one you can copy though.
 
Doug

Awesome. I was able to get the UI to boot up and get it to recognize my temp probes.

When i go to assign a name it sometimes doesn't accept it and wont recognize the SSR when i assign it.

Do i have to type GPIO23 or GPIO 23 on the second line of the temp desplay.

Thanks again.

Chris
 
Sorry, I should've added in some REGEXP or a mask, I'll do that this week.

For RPI (or BBB bank 0) GPIO_<n>
For BBB banks GPIO_<bank>_<n>

Where bank is the GPIO Bank number, and n is the pin number
 
OK, I've added checking on the GPIO Inputs (for the PID and the Pumps) so it'll tell you if you've given it an invalid value and the placeholder text gives you hints too.

Sorry about the delay, I've been working on an android homebrew recipe app (which I'm about to start giving to alpha testers)
 
Got the GPIO to register and fire the SSR in manual mode.

Randomly works in the Auto mode although no hooked up to HLT yet just a rough build.

What has anyone found to be reliable P,I, and D settings for consistent temperature maintenance?

Thanks

Chris
 
Not sure what you mean by "Randomly works"

The PID values are specific to your setup, you'll want to get the P first, this is the rate that your element can heat the water inside it.
It's the time it takes to go up by 1F (or C depending how you have your temperature set).
For instance, if you can heat 1F in 1 minute, the value is 60.

If it's 10F in one minute, the value is 6.

http://www.betterthaneveryone.com/archive/2008/04/26/pid-in-a-nutshell.aspx
 
So I've fixed a bug where OWFS wouldn't recover the reads.

And I've spun off a new branch for changes where people use relays to control SSRs and need to invert pins: https://github.com/DougEdey/SB_Elsinore_Server/tree/inverted_outputs

You'll need to add -Dinverted_outputs, but ONLY do this if you know what you're doing. I do not accept any responsibility if you use this branch. Since it is UNTESTED.

The side project I've been working on is in public Alpha here; https://github.com/DougEdey/Strangebrew_Android

Android recipe app (also works on BB10+), it's very early alpha at the moment.
 
Doug,

Great work, and thank you for all that you have contributed.

I am looking into setting up a Pi or BB to replace my current panel that has Auber PID's one for my RIMS tube, and one setup just as a temp switch to control my burner.

Can StrangeBrew Elsinore be run with just a temp switch for my BK/HLT?

One other thing that I am not sure about is I currently start heating up all my water the night before with my RIMS tube that way I am ready to mash in when I wake up in the morning. Is that possible to run on your software?

One other thing I am looking at is running my DC pumps with PWM to vary the speed, is that a possibility with your software?

Thanks again,
-G
 
What do you mean by just a temp switch? It works as a software based PID at the moment with aux control (for secondary outputs) and pumps/anything that relies on a relay/SSR.

Elsinore is stable as far as I am aware, and unless your system hangs or crashes in some way then it should be OK overnight, if there's a shutdown signal then it should disable all the GPIO outputs on shutdown.

I've not got PWM running on this because I don't have any DC pumps, if you want to send me one I can get it going then send it back. But my pumps are AC.
 
My solenoid valve for my burner can't handle duty cycles like an element can. At the moment the control I have doesn't use the PID algorithm when controlling my BK/HLT(same vessel). So it works like a stc 1000/ranco/johnson controller.So I guess I could just run it in manual mode with the duty cycle at 100%.

Good to know that I can still heat up my water overnight.

I might take you up on the pump bit.

Thanks for answering my questions.
-G
 
I must stress this hasn't been used for burners (propane/NG) as I've only ever seen the valves in other peoples systems and have no idea how they work.

What can the solenoid valve handle? How does the current controller work?
 
Back
Top