# CraftBeerPI Brew Controller



## Manuel

Hi,

I like to present my Raspberry PI base brew controller CraftBeerPI.

Features:

- Control as many kettles as you like
- Hardware control: agitator, heater, pumps, valves
- Installation wizard
- Flexible brew steps
- Automatic and manual steps
- Smartphone, tablet and desktop user interface
- 3 standard kettle automatic logics
- Custom logics can be implemented easily
- Recipe book
- Temperatur chart for each kettle
- Support for direct GPIO, PiFace or Gembird USB Socket
- Support for Fahrenheit and Celsius
- Free!

Website: www.craftbeerpi.com
Facebook: facebook.com/craftbeerpi

Cheers,
Manuel


----------



## hobospy

Looks interesting, hoping to add some sort of control to my Crown Urn over the next month to get a bit of accuracy on reaching mashing temps. Currently looking at buying an Auber Ins PID but this might also work and save me a big chunk of money.

Anyone with any info on the temperature probe being used in this, apparently it is a DS1820 single wire probe?

Manuel, anymore info on what this can do, I can sort of guess from the pictures but couldn't get too much more info from the website?

Thanks,

Christopher


----------



## GibboQLD

hobospy said:


> Anyone with any info on the temperature probe being used in this, apparently it is a DS1820 single wire probe?


Had a quick look at the github codebase -- looks like it supports 1wire straight out of the box (i.e., DS18B20), but also has provision for custom temperature probes to be added as required.

Looks to control temperature using a python PID script.

Seems like a fairly interesting project, reckon I might have more of a look through the codebase when I get some time.

Edit: There's a thread over on Homebrew Talk too.


----------



## Manuel

Correct, the software supports 1wire thermometer out of the box. But the architecture of the application is build in a way that it can be extended quite easy. As mentioned before with a few programming skills you can connect other types of thermometer. The same holds for the heating/automatic logic. Out of the box it supports a pid, a overshoot logic and a really simple fermentation logic to control a fridge. 

Now some information how this software works.

After the the first start the setup wizard will pop up. You select you hardware setup and do the basic configuration of your kettles. You can select between 1 and 3 kettles during the wizard but in general you can setup as many kettles as you like.

Next step is to configure you recipe steps. It supports mashing and boiling steps. You key in step name, a timer, a target temperature, select the kettle for that step and select if it's an automatic or manual step. Automatic steps will switch to the next step by the self. For manual step the brewer has to click the next button. The recipes can be saved in a internal recipe book. 

To start the brew process you switch to the dashboard view and click start. The software will high light the selected kettle for the first step and will a set the target temperature for the kettle. The automatic (i.e. Pid) will keep the temperature. Via the web ui you can switch on and off additional hardware like pumps or valves. 
The software will automatically start the timer when the target temperature is reached. For each kettle you can show a temperature line chart. 

I will make a short introduction video the next days. Maybe this gives a better overview.

Let me know if you have further questions or need support for the installation. 

Regards 
Manuel


----------



## sp0rk

I happened to receive a free Raspberry Pi 3 from IBM yesterday, so I'm thinking I'll run CraftBeerPi on it
Just hoping there's enough power there to run some torrent server stuff in the background


----------



## SBOB

sp0rk said:


> I happened to receive a free Raspberry Pi 3 from IBM yesterday,


me too... nice freebie


----------



## dblunn

How did you blokes manage a free Rpi?


----------



## SBOB

dblunn said:


> How did you blokes manage a free Rpi?


IBM developers promotion (its over now)

to be honest im surprised I got one, but Im not complaining


----------



## dblunn

I have a mk 1 pi. Nice but will not run the code mentioned in this thread. Good luck to you, hope you put it to good use. They are a nice system.
Dave


----------



## hobospy

Manuel said:


> Correct, the software supports 1wire thermometer out of the box. But the architecture of the application is build in a way that it can be extended quite easy. As mentioned before with a few programming skills you can connect other types of thermometer. The same holds for the heating/automatic logic. Out of the box it supports a pid, a overshoot logic and a really simple fermentation logic to control a fridge.
> 
> Now some information how this software works.
> 
> After the the first start the setup wizard will pop up. You select you hardware setup and do the basic configuration of your kettles. You can select between 1 and 3 kettles during the wizard but in general you can setup as many kettles as you like.
> 
> Next step is to configure you recipe steps. It supports mashing and boiling steps. You key in step name, a timer, a target temperature, select the kettle for that step and select if it's an automatic or manual step. Automatic steps will switch to the next step by the self. For manual step the brewer has to click the next button. The recipes can be saved in a internal recipe book.
> 
> To start the brew process you switch to the dashboard view and click start. The software will high light the selected kettle for the first step and will a set the target temperature for the kettle. The automatic (i.e. Pid) will keep the temperature. Via the web ui you can switch on and off additional hardware like pumps or valves.
> The software will automatically start the timer when the target temperature is reached. For each kettle you can show a temperature line chart.
> 
> I will make a short introduction video the next days. Maybe this gives a better overview.
> 
> Let me know if you have further questions or need support for the installation.
> 
> Regards
> Manuel


Thanks for that Manuel, good description, video would be really good though.


----------



## GibboQLD

dblunn said:


> I have a mk 1 pi. Nice but will not run the code mentioned in this thread.


There's no reason why it wouldn't run on a Mk1, since it's all python-based and not limited by specific ARM instruction sets.

The website even claims that it runs on all Raspi models.


----------



## dblunn

GibboQLD said:


> There's no reason why it wouldn't run on a Mk1, since it's all python-based and not limited by specific ARM instruction sets.
> 
> The website even claims that it runs on all Raspi models.


I'm sure I saw it stated that it only runs on later models, glad to be wrong though. I'll dig out my old Rpi and see if it will work.


----------



## MastersBrewery

Might be os dependant. Jessie changed the folder structure of var/www/ so it may be a Jessie-Wheezy thing.


----------



## Manuel

Hi,

I run it on a Raspberry PI model A. 
The software architecture is quite simple. It's a "Python Flask" based web application with some background jobs.
The user interface is a responsive Angularjs application. Most computing power is required for the web browser.
Many people are using a tablet or a smartphone to display the UI.


----------



## Manuel

How to install CraftBeerPI software. Step by step video.
It takes less than 5 min to install the software from scratch.

https://asciinema.org/a/du84msz9t56yqqg6j6qfjmvjd


----------



## Manuel

As promised here a video of CraftBeerPI


https://www.youtube.com/watch?v=2zM2dnFyB5w&feature=youtu.be


----------



## Manuel

CraftBeerPI 2.1 offers a HTTP {REST} API. That gives other software programs the possibility to communicate with CraftBeerPI. For example a brew recipie planning tool can push data directly into CraftBeerPI.
The API is documented by using Swagger.io. With Swagger you can generate a CraftBeerPI REST client for your favorite programming language.

CraftBeerPI {REST} API: http://craftbeerpi.com/api/#/

For the version 2.2 CraftBeerPI will support the import of Beer.xml from BeerSmith

Facebook: http://www.facebook.com/craftbeerpi


----------



## sp0rk

Thanks Manuel!
I still haven't got mine set up but I'm finally in the process of ordering my parts to get it done
Looking forward to beer.xml support, that way we can hopefully just push recipes and mash schedules straight across

Great work!


----------



## GibboQLD

Manuel said:


> CraftBeerPI 2.1 offers a HTTP {REST} API.


Nicely done Manuel -- I've recently finished building an Excel-based tool at work with embedded REST/JSON capabilities, so my mind immediately jumped to a modified version of IanH's Kit/Extract/BIAB calculators that can push mash steps/hardware information directly to the RPi.

Reading between the lines, am I right in guessing that the v2.2 API will allow recipes to be pushed to the RPi in addition to importing BeerXML?


----------



## Manuel

Yes you are right. The version 2.2 will support both features. CraftBeerPI is a platform which is open to communicate with other systems.

Cheers
Manuel


----------



## dblunn

Hi all,
this may be a silly question but, how do I run this thing? I have installed it on a rPi ver 1B and it reports that the service is running (I'm using a remote login from my pc) but now what? Do I use a browser or something to access it?
Linux challenged Dave


----------



## Manuel

Hi Dave,

now you can use the browser of your Laptop, tablet or smartphone and open the following URL:




Code:


http://<IP-Address>:5000



The <IP-Adress> musst be replaced by IP of the rPI. You can get the IP if you connect to the rPI console and key in:




Code:


ifconfig



Alternatively you can view the connected devices on your local WIFI router admin interface to get the IP of the rPI.


----------



## dblunn

That fixed it Manuel! I configured it with dummy hardware so I don't really know if it is all working but it certainly looks good. Thanks for your help and and a great tool.
Regards, Dave.


----------



## berazafi

Cool


----------



## tumi2

Hi 
Im really interested in this topic but im no wiz with this stuff so excuse the potentially silly questions...

I have been given a Raspberry Pi Model B and am trying to find a project. I am a keen home brewer and have some IT techno (not a programer but have basic dos and unix skills).

I already have a fridge temp controller and i brew using Gas not electricity. However, in winter i tend to ferment ales at room temp because my ferment fridge is always in use but room temp sometimes gets too cold. I was thinking about buying a heating blanket or heat pad.

Could i use my RPi and CraftBeerPI to measure the ferment temp, chart its stages, save the temp profile and also power on and off the heating blanket based on the ferment temp?

If so what hardware do need above the RPi?

Thanks for your assistance,
Ivan


----------



## Manuel

Hi Ivan,

absolutiy. Thats was brewers in Germany alreday doing with CBP. They control a fridge. For that I recommand to use the simple overhsoot logic with a small offset value.
The version 2.2 will get a dedicated fermentation module.

You need the RPi a relay (Solid State Relay or mechanical relay), a DS18B20 1Wire Thermometer and 4.7k resistor for the thermometer.
And of course your heating blanket.

Regards,
Manuel


----------



## tumi2

Thanks for the reply Manuel. I will start buying parts then wait for v2.2 with fermentation module.


----------



## farsonic

Can I use a standard solid state relay for this or do I really need to use a larger mechanical relay for controlling a Crown Urn? I have a few sainsmart 4 port relay boards I could use for this purpose? Any thoughts? 

FP


----------



## tumi2

Firstly, thanks for your efforts Manuel. I love your app.

I have now setup my RPI and installed CraftBeerPi app. I can access the app via a web browser and over the internet through my home router by adding the port forwarding rules. Next step is the hard part, the hardware setup :blink: .

Question: is there a way to add a password to the initial load screen of the app as currently it is pretty open to the internet.

I would be pissed off if some hacker loaded my web interface and played with my beer ferment temp to....  . Disaster...


----------



## GibboQLD

farsonic said:


> Can I use a standard solid state relay for this or do I really need to use a larger mechanical relay for controlling a Crown Urn?


You should be able to use anything that allows a 5V signal to switch a 240V load.



tumi2 said:


> is there a way to add a password to the initial load screen of the app as currently it is pretty open to the internet.


Depending on how comfortable you are with linux, you could take a leaf out of the Brewpi playbook and implement something like this to control access.


----------



## Manuel

@tumi2
Thanks for the positiv feedback. I understand the security issue. You are right, with the current version is 2.1 it's not a good idea to make i accessable from the internet. 
Let me check if I can add a login dialog to version 2.2.

Regards,
Manuel


----------



## Manuel

I did a quick spot check regarding the security. With a few lines of code I can add a simple security with username and password. I will add this to the dev2.2 version next week.

Regards
Manuel


----------



## tumi2

Hi
Has anyone got any photos / diagrams of the electrics circuits and example photos of how others have their craftbeerpi setups. I am confident with the RPI to breadboard to thermometer curcuits but i want to find a way to control my heat belt. Ideally i want the heat belt connection to the SSR to be something i can plug in and out from the SSR and wall mains power. I am unsure how i can do this part.

Thanks
Ivan


----------



## tumi2

Hi
Has anyone got any photos / diagrams of the electrics circuits and example photos of how others have their craftbeerpi setups. I am confident with the RPI to breadboard to thermometer curcuits but i want to find a way to control my heat belt. Ideally i want the heat belt connection to the SSR to be something i can plug in and out from the SSR and wall mains power. I am unsure how i can do this part.

Thanks
Ivan


----------



## dblunn

An SSR is just a fancy opto coupler thingy, so plan to put about 20mA through the the low voltage side like you would a LED. The high voltage side is just interrupting the active line, therefore you just pass through the neutral and earth (especially the the earth, if you use BP connectors, use the 2 screw type). The last part of the setup is the heatsink. The power rating of a solid state device is an indication of the size of the silicon and it's thermal coupling to the case, if you can't get the heat away from the case then you will never realise the full power capability of the device. So use a good heatsink and have a reasonable airflow across it. (a little bit of airflow goes a long way, kinda like vegemite)
Dave


----------



## dblunn

Edit multiple post - bloody internet


----------



## dblunn

Edit multiple post - bloody internet


----------



## mord4z

Hi guys, just sent portuguese translation to the project.


----------



## sittingaround

tumi2 said:


> Hi
> Has anyone got any photos / diagrams of the electrics circuits and example photos of how others have their craftbeerpi setups. I am confident with the RPI to breadboard to thermometer curcuits but i want to find a way to control my heat belt. Ideally i want the heat belt connection to the SSR to be something i can plug in and out from the SSR and wall mains power. I am unsure how i can do this part.
> 
> Thanks
> Ivan


Here is my Ghetto control box for my Version 1 build. as you can see i have 2 power points on the front one for my heater/Kettle and one for my pump.

https://www.dropbox.com/s/g1ga8hxwq5s17t9/20160623_081552.jpg?dl=0

The SSR is just a fancy relay so you connect to low voltage side (positive to your Gpio pin on the Pi) then the (Negative to the Neg on the Pi) The high Voltage side is just an interupt for the live wire. Mains comes in live to either side of the SSR then the other side goes to the live input on the plug. The Nutrual and the Earth wires and direct to the plug.

https://www.dropbox.com/s/qeqgq5eqpg6nnsi/20160623_081607.jpg?dl=0

Hope that helps But remember mains voltage KILLS!!!! so it is recommended you get a electrician to look over you setup.


----------



## tumi2

Thanks for that “sittingaround”. Just what I needed. I had spent ages on the internet trying to understand it and I had figured it out in theory but your pics make it nice and clear for me. So many of the pictures i came across are cluttered.


I will certainly get a sparky to look over my setup.


----------



## Mat B

Hi Manuel,

I'm going to give this a crack with my raspberry pi. I found your build instructions following your website's links and it calls for a SS relay. The one you have is 20A. On ebay you can get pretty affordable FOTEK ones that are 20A and 40A. Does it matter which one? 

Cheers,

Mat


----------



## Manuel

Hi Mat,

the GPIO of the RPi creates a 3.3 V control signal. Make sure that the SSR you like to use supports a 3V control signal.
My SSR requires a control signal between 3 - 32 VDC.

Regards,
Manuel


----------



## Mat B

Thanks Manuel,

This unit looks exactly the same as yours, but is just a different brand. It also supports 3 - 32VDC. 

So I'm guessing the 20A & 40A versions will both be suitable?

Cheers
Mat


----------



## sp0rk

Mat B said:


> Thanks Manuel,
> 
> This unit looks exactly the same as yours, but is just a different brand. It also supports 3 - 32VDC.
> 
> So I'm guessing the 20A & 40A versions will both be suitable?
> 
> Cheers
> Mat


The should both work fine
However keep in mind there are lots of counterfeit Fotek SSRs on ebay, I wouldn't trust any of them controlling over 10A
I'll be buying Inkbird ones for bigger loads


----------



## Mat B

Ok, I've been trying for ages and I'm pretty confident that I'm following the install instructions correctly. Each time I clone from github using the command line program on Raspbian, it clones then asks me for a username and password, which I can't find anywhere online.

Anyone had this issue?


----------



## sittingaround

Na never had that issue. Are you using the clone line of : git clone https://github.com/manuel83/craftbeerpi


----------



## Moad

Have never really dabbled with the R Pi so apologies if this is a stupid question. How many I/o ports are there and does craftbeerpi recognise io expansions if they are available. Would be interested in controlling up to 20 valves, pumps and elements


----------



## Mat B

sittingaround said:


> Na never had that issue. Are you using the clone line of : git clone https://github.com/manuel83/craftbeerpi


Yep. On one page he says to use a line ending with craftbeerpi.git and on another he says to use a line just ending with craftbeerpi 
I've tried both, and both resulted in the cloning happening (just like on the instruction video) but they both then result in a line prompting for username, then another for password.


----------



## sittingaround

sound like it may be asking you or your pi admin login details.
default are username = raspberry password = pi
give that a try


----------



## sittingaround

Moad said:


> Have never really dabbled with the R Pi so apologies if this is a stupid question. How many I/o ports are there and does craftbeerpi recognise io expansions if they are available. Would be interested in controlling up to 20 valves, pumps and elements


it may do. dont really know to be honest.


----------



## Mat B

sittingaround said:


> sound like it may be asking you or your pi admin login details.
> default are username = raspberry password = pi
> give that a try


Just tried your suggestion. No go.

It says to enter username for 'github.com' and password for '[email protected]'

I might email Manuel.


----------



## sittingaround

Mat B said:


> Just tried your suggestion. No go.
> 
> It says to enter username for 'github.com' and password for '[email protected]'
> 
> I might email Manuel.


yeah thats really od. i only did a fresh install the other day and had no issues.


----------



## Mat B

sittingaround said:


> yeah thats really od. i only did a fresh install the other day and had no issues.


Turns out I'm just a massive moron and had typed Manuel183 instead of Manuel83. My eyes saw a 1.

I'll put my head in the sand now.


----------



## sittingaround

Mate i did the same bloody thing.


----------



## tumi2

Hi manuel
I have at last got a prototype circuit setup on a breadboard and have managed to record temp via the sensor. My plan is really only to track fermentation temperatures and control the fridge power. I do BIAB mash with gas to control temp so i cant use craftbeerpi to mange the gas flame when doing the mash!!.

I wonder if you can tell me how i can extract the temperature graph into a file (eg. .txt,.csv) that i can keep for future reference from the craftbeerpi application. I could not find where the temp data is stored.

Thanks for your efforts with this application
Ivan


----------



## Manuel

@Ivan
The Version 2.2 will have an CSV export. That allows to export the temperature data.






First draft of a Raspberry Pi Custom Shield for CraftBeerPi.
Community feedback is welcome.


----------



## Mat B

Hi Manuel,

I have been trying to get this set-up for days with no success. I have installed in my pi following your online guide/video and that seems successful. Whenever I try to access the 5000 server from another device on my network, nothing happens. I also tried running the script sudo python runserver.py which comes up with a response python: can't open file 'manage.py': [Errno 2] No such file or directory

I'm using Raspbian Jessie. I have been following your instructions very carefully. If anyone could tell me what I'm doing wrong, that would be awesome!

My plan is to run it from the Pi using a HDMI output, rather than access from another device.

Cheers,

Mat


----------



## sittingaround

Hey Mat are you using your network ip with the port of 5000. So eg 192.164.0.11:5000


----------



## Mat B

sittingaround said:


> Hey Mat are you using your network ip with the port of 5000. So eg 192.164.0.11:5000


 I am yeah. I'm using my network's IP address (from the router) and adding 5000 as you describe. Doesn't work. The only thing I can see where I'm not in line with the instructions is running the script: sudo python runserver.py

On Manuel's instructions, it says to run that, then it will be available on the IP 5000. When I try the script, I just get: python: can't open file 'manage.py': [Errno 2] No such file or directory

I'm very new to using the pi for anything other than kodi, so I'm not sure if python is something I was supposed to already have installed and understood, or if the fresh clone of craftbeerpi would be all I needed.


----------



## Mat B

Oh, I just figured it out. I needed to use the Rpi's IP, not the router's one. Found it and now it works. Thanks for the help sittingaround!


----------



## tumi2

Im hoping someone may be able to help me troubleshoot my SSR. I have been getting my Craftbeerpi project going and have made good progress but run into a hurdle i cant figure out.

I have Craftbeerpi receiving temp correctly and have set the app and i can see it is tripping the SSR at the DC input side because a little Red LED lights up on the SSR. The problem is i don't get power at the plug where i have a small light 3 prong power load indicator plugged in.

I suspect this is due to not enough volts to set the SSR to turn on. I measure the DC input at 3.18v when the application is trying to turn on the load and the SSR LED is on. If i connect a 9v battery to the same input the SSR LED switches on and i also get full light as i should through to the power load indicator. Therefore, the SSR works but only with the 9volt battery to set it On. (The 9 volt battery is actually only providing 4.4v as it is a little flat).

I tried all i can think of. I use a 5.2v - 2.4amp iPad charger to power the RPI so think i have enough power into the RPI.

Anyway i can increase the volts to the SSR from the GPIO to get the SSR to trip.?

Thanks in advance.


----------



## dblunn

I think you have correctly diagnosed the problem. I have played with a SSR and found that 3V is not enough for reliable turn-on. Use the rpi to switch a transistor and use a higher voltage on the SSR.
Dave


----------



## tumi2

@dblunn
Thanks for the confirmation.

I don’t know anything about transistors and am new to electronics. Im just using logic and internet browsing to figure it all out so im trying to avoid circuitry if possible. Happy to read more but I had this idea… Is this feasible…

I connect a small 1.5v watch battery into my box and wire it directly to the SSR through an On/Off switch. I turn the switch On when I’m using the application. This provides an additional although small voltage direct to the SSR, then when I add it to the 3.1v from the GPIO when it is activated it will have enough cumulative volts to turn on the SSR but not enough when the GPIO is not activated. Would this fry my RPI GPIO because I am sending 1.5 v back to it via the DC side of the SSR and/or would it fry my SSR because it has 1.5v input which is not enough to activate it.…. Is this where a transistor comes in?

Before any of that though I am going to try a second SSR, it is exactly the same model but worth a try anyway. SSR model is Fotek 25DA, input is 3v to 32v.


----------



## sp0rk

tumi2 said:


> @dblunn
> Thanks for the confirmation.
> 
> I don’t know anything about transistors and am new to electronics. Im just using logic and internet browsing to figure it all out so im trying to avoid circuitry if possible. Happy to read more but I had this idea… Is this feasible…
> 
> I connect a small 1.5v watch battery into my box and wire it directly to the SSR through an On/Off switch. I turn the switch On when I’m using the application. This provides an additional although small voltage direct to the SSR, then when I add it to the 3.1v from the GPIO when it is activated it will have enough cumulative volts to turn on the SSR but not enough when the GPIO is not activated. Would this fry my RPI GPIO because I am sending 1.5 v back to it via the DC side of the SSR and/or would it fry my SSR because it has 1.5v input which is not enough to activate it.…. Is this where a transistor comes in?
> 
> Before any of that though I am going to try a second SSR, it is exactly the same model but worth a try anyway. SSR model is Fotek 25DA, input is 3v to 32v.


Try an Inkbird SSR, I'm betting your "Fotek" is one of the knock off ones and not within spec


----------



## dblunn

Hi mate,
Sounds like a dodgy solution to me, you are better off using 12 V through a transistor and limiting the current through a 470 Ohm resistor (you want about 20mA through the SSR). I have attached an equally dodgy image that may help.
Regards, Dave


----------



## sittingaround

Im running a fotek nock off and have no issues with the 3 v. As long as the light is coming on it should be active. Have you got a photo of how you have it wired up?


----------



## tumi2

[SIZE=10.5pt]Thanks for your help guys. First time ive attached in the forum and trying to share form Google drive so i hope you can see this....[/SIZE]

[SIZE=10.5pt]The images show my wiring. In the green light image, the green light On is what is expected when SSR flow is Off. When SSR flow is On it should have Red light also. This does not happen when controlled via the RPI GPIO but does work when i connect a 9v directly to the DC inputs of the SSR with GPIO disconnected.[/SIZE]

I think the transistor is the way to go but have to wait 4 weeks for ebay delivery from China. @dblun, thanks for the diagram. I think o get the setup but was hoping to use a 9v battery as the second power source as i will have one in the project box already.

See images here


----------



## sittingaround

cant really see much from those pics. have you got the ssr gpio2? make sure in software you have the correct gpio pin selected for the heating element.

Also try plugging a lamp into it.


----------



## tumi2

I am only running 1 * SSR as I currently BIAB with gas but I plan on switching to electricity and an urn which is what im getting this setup for. 

In the software i setup the Kettle with GPIO 26. I use this Pin on the RPI to drive the DC side of the SSR. Im sure it is correct because i can see the Red light on the SSR come on and off in line with the auto kettle toggling on the application.

Im going to try and rewire using less joins and solders in case i am loosing volts and current in my dodgy wiring. Im also going to switch to a computer PSU to supply 240v, 12v and 5 volts all at once. That way i can hook up a transistor if i cant get this SSR flowing.


----------



## dblunn

Hi, yes you can use a 9V battery, just drop the value of the series resistor to 330 Ohm.
Dave


----------



## sittingaround

tumi2 said:


> I am only running 1 * SSR as I currently BIAB with gas but I plan on switching to electricity and an urn which is what im getting this setup for.
> 
> In the software i setup the Kettle with GPIO 26. I use this Pin on the RPI to drive the DC side of the SSR. Im sure it is correct because i can see the Red light on the SSR come on and off in line with the auto kettle toggling on the application.
> 
> Im going to try and rewire using less joins and solders in case i am loosing volts and current in my dodgy wiring. Im also going to switch to a computer PSU to supply 240v, 12v and 5 volts all at once. That way i can hook up a transistor if i cant get this SSR flowing.


yeah i have mine connected straight to the Pi via header leads


----------



## tumi2

Still no go after a rewire but i have tested again and am convinced the SSR does not have enough volts to switch on. It definitely turns on my heater when connected to a 9v battery. The 3.2v from the rpi is just not quite enough to activate the SSR even though the specs say 3v to 32v input. I have ordered an Inkbird one and some transistors. Its a 4 week wait for delivery.....


----------



## Mat B

tumi2 said:


> Still no go after a rewire but i have tested again and am convinced the SSR does not have enough volts to switch on. It definitely turns on my heater when connected to a 9v battery. The 3.2v from the rpi is just not quite enough to activate the SSR even though the specs say 3v to 32v input. I have ordered an Inkbird one and some transistors. Its a 4 week wait for delivery.....


Hi tumi2,

Can I make a suggestion that you've probably already tried? I'm at the same stage as you and have just wired up my prototype and also found the pi wouldn't activate the SSR (also using a dodgy ebay Fotek). A 9V battery did however. I was annoyed thinking I was having the same problem as you, but I played around with the craftbeerpi dashboard anyway. On the panel that has your kettle (or any other hardware) there is a little button that looks like a flame. When I hit that, it worked. I can now toggle the switch on and off using that, suggesting the SSR is getting enough love from the pi.

Now that I've figured that out, I can't seem to get the SSR to fire when I hit 'Start" on the "steps" panel. I assumed once all the steps were set up, you just hit start and it ran from there. Watching the youtube video, I see he hit a heap of little buttons on the kettle panel, but I don't actually know what they're all for.

Can anyone give me an idiots guide to actually getting it to run the mash steps?


----------



## Mat B

The four buttons he's playing with on the video are a diamond shape, a car, a flame, and a refresh logo. What are the first 2 for (as far as I can tell the flame just manually turns it on) and I'm guessig the last one just refreshes it.

Ok, so the first one (diamond) sets target temp, but isn't the temp already set in the mash schedule? 

Edit: Ignore all that, I just figured it out (I really should apply some restraint before being a pest poster). When you hit the car button it runs the mash program and activates the SSR. The diamond is to manually set a temp (to override the mash sched I assume). 

It's all working well. Such a cool project!


----------



## sittingaround

The last synol is turn on and off there agitator.


----------



## tumi2

Hi MatB, unfortunately my issue is not as you describe as i have the software working fine and it does toggle the SSR with the AUTO setting on the app. My problem is that when it toggles the SSR lights comes on but only dimmly and is not enough to switch On the SSR. I have ordered new SSR and am reading about using a transistor as the previous poster suggested. Glad to hear yours is running.


----------



## alexbrand

Tumi2 does your SSR work with a different power source? A 9 volts block battery can be used to test the device.


----------



## tumi2

@alexbrand - yes it does with with a 9v battery.

An update - i got this working over the weekend using a transistor to increase voltage slightly. I am using the 5v power rail of the PRI as the extra power source. I run the 5v from the RPI to the positive side of the SSR, the negative side of the SSR to the Collector pin of the transistor. I run the GPIO kettle output (in my case GPIO26) through a 330 Ohms resistor into the Base pin of the transistor. I connect the Emitter pin of the transistor to the Negative rail of the breadboard on the same side that i earth the 5v from the RPI.

It work instantly after doing this.

I am now trying to better work out what resistors i need. Some say i dont need one between the 5v input and the Collector pin, other say i do and im not 100% certain about the resistor between the GPIO data and the Base.

Anyway, as @dblunn suggested it seems have a dodgy Fotek SSR that is slightly under specs and requires more than 3v to activate it.

Thanks to everyones assistance with this.


----------



## alexbrand

Great to hear that it is working now.
Seems like some SSRs do not meet their own specs (input voltage).

I am about to switch from my old brew controller to BrewPi, too.


----------



## Mat B

Today I used the craftbeerpi controller to do a brew for the first time. I couldn't get the mash schedule recipe to actually control the kettle. I only have one kettle (BIAB) and no pumps/agitators etc. It reads temp ok, and i can manually activate the element using the flame button on the kettle panel. When I wanted to start the recipe schedule, I opened my recipe, hit the little car button on the kettle panel and pressed start above my recipe schedule. It wouldn't activate the kettle until I hit the flame button, and then once it reached temp it would just keep climbing. Also the timer clock that appears underneath each step would just stay at 00:00:00 and not move. If I hit start again, it would just skip the step. Somehow I managed to get one of the steps to work (but the timer wouldn't), and it would automatically use the overshoot logic to shut off close to target temp, but then it would just fall and not reactivate.

I ended up just turning the kettle on and off manually to control the temp. Not what I had planned.

What the hell am I doing wrong? All I want is for it to activate the kettle element, maintain temp then move on to the next step according to the times and temps I've preset. I'm hoping someone smarter than me can see where I've missed something. I set everything up following the official youtube clip.

Cheers! B)


----------



## sittingaround

Mat B said:


> Today I used the craftbeerpi controller to do a brew for the first time. I couldn't get the mash schedule recipe to actually control the kettle. I only have one kettle (BIAB) and no pumps/agitators etc. It reads temp ok, and i can manually activate the element using the flame button on the kettle panel. When I wanted to start the recipe schedule, I opened my recipe, hit the little car button on the kettle panel and pressed start above my recipe schedule. It wouldn't activate the kettle until I hit the flame button, and then once it reached temp it would just keep climbing. Also the timer clock that appears underneath each step would just stay at 00:00:00 and not move. If I hit start again, it would just skip the step. Somehow I managed to get one of the steps to work (but the timer wouldn't), and it would automatically use the overshoot logic to shut off close to target temp, but then it would just fall and not reactivate.
> 
> I ended up just turning the kettle on and off manually to control the temp. Not what I had planned.
> 
> What the hell am I doing wrong? All I want is for it to activate the kettle element, maintain temp then move on to the next step according to the times and temps I've preset. I'm hoping someone smarter than me can see where I've missed something. I set everything up following the official youtube clip.
> 
> Cheers! B)


Spid question but when you set up your mash schedule you allocated a time frame for each step? Can you post a pic of you mash schedule?


----------



## Mat B

sittingaround said:


> Spid question but when you set up your mash schedule you allocated a time frame for each step? Can you post a pic of you mash schedule?


Here's some screenshots after my brew. I know it's recorded the times, but I manually controlled the kettle the entire time. It never ran the timer.


----------



## tumi2

i also did my first brew on the weekend using Craftbeerpi. I used a dual Kambrook portable heating plate to get me to mash temp and then maintain it. i usually brew 100% on gas.

It all worked fine including the auto schedule where it timed each step and turned the element on an off accordingly.

@Mat B - I know when i do it I always load my steps > Press Reset > then Start > then the Auto car button only after i can see the little arrow appear at step 1. Perhaps it is the order that you press the buttons.

One thing i noticed is that the timing all worked very well and in all my tests worked just as planned but at one stage it overshot my mash temp from 67 to 79 degrees (ouch!!). Not sure how it happened because everything else worked just to plan. I wonder if the wort heated slowly and then a mass of hot water sitting below the temp probe rose to the middle where my probe was. At this time the wort was now way past the desired temp the element turned off and i had to quickly add cold water to get temp back down. I cant think of how else this could have happened.... It made me realise why so many brewers recirculate the wort.

Overall though, i can see that craftbeerpi will be very good, particularly when the version 2.2 is released.


----------



## Mat B

Yeah I thought it might have something to do with the order I hit the buttons. I might do a test with some water following the steps you've outlined.

Regarding your big temp increase, something similar happened to me. I noticed that the probe had slipped a little bit out of the thermowell, and wasn't getting a good reading. I also suspect some cold draft blowing towards the thermowell entrance didn't help. So I put it back in and blocked it up which solved it.

Also Tumi2, what have you got the overshoot logic set to?


----------



## sittingaround

Mat B said:


> Yeah I thought it might have something to do with the order I hit the buttons. I might do a test with some water following the steps you've outlined.
> 
> Regarding your big temp increase, something similar happened to me. I noticed that the probe had slipped a little bit out of the thermowell, and wasn't getting a good reading. I also suspect some cold draft blowing towards the thermowell entrance didn't help. So I put it back in and blocked it up which solved it.
> 
> Also Tumi2, what have you got the overshoot logic set to?


Come to think of it i did have an issue getting to start but hitting reset a few times seemed to fix it. I ran overshoot for my firat brew and it was always over or under by upto a 1 deg. I found using the pid logic works fantastically well. Hit target temps without o erahooting and holds them there within .3 of a deg.


----------



## tumi2

I certainly seem to need to push Reset at least once, wait a few secs and then hit start. I think this is simple delay in the input being received by the app over your wifi network and then running whatever scripts need to run. I have noticed a little inconsistency in getting the Start button to start by hitting Reset waiting a sec and then start seems to work.

I have my Overshoot set to 1 degree. I am going to set it to 2 degrees to allow for a delay in the desired temp being reached and then the app adjusting accordingly.

Im not really sure what PID logic means and what the fields stand for.


----------



## Mat B

tumi2 said:


> Im not really sure what PID logic means and what the fields stand for.


I'm also not that familiar with it. My understanding is most temp controllers are PID controllers. How does this option vary from the overshoot option?

BTW, good advice re the reset button delay. I'll be sure to try that.


----------



## sittingaround

It seems to control the rate at witch it climbs and tappers off as it reaches the target temp. I found the overshoot logic seemed to ramp right up at full ball then pull up just before.


----------



## Mat B

I found the same thing. It was annoying.


----------



## GibboQLD

tumi2 said:


> Im not really sure what PID logic means and what the fields stand for.





Mat B said:


> I'm also not that familiar with it. My understanding is most temp controllers are PID controllers. How does this option vary from the overshoot option?





sittingaround said:


> It seems to control the rate at witch it climbs and tappers off as it reaches the target temp. I found the overshoot logic seemed to ramp right up at full ball then pull up just before.


I'm not affiliated with CraftBeerPi at all, just taking a crack at answering this for you in case Manuel doesn't show for a few days.

Overshoot logic is basically a comparison between your current temperature + the overshoot amount, and the target temperature. If your target temperature is 68° and your overshoot is 2°, your element will run at 100% until it reaches 66°, at which point it will turn off. Similarly, if the element is off and the mash cools below 66°, the element will be turned back on at 100% until it tips above whatever your setpoint is, less the overshoot amount. There are only ever 2 settings: off (0%) or on (100%).

As you've already found, overshoot can be good if all you need is simple temperature control, but since the element continues to heat the mash/water after it's turned off, you can get quite large spikes in temperature which make it hard to "dial in" mash temperatures and/or hold precise temperatures. It only gets worse if there's a bit of a path/process between the element and your temperature sensor, since there may be a few degrees difference between those points anyway, let alone what happens after the element is switched off.

There are people on this forum (and the internet in general) who could explain PID way better than I could, but in a nutshell, it allows you to scale the output of your element to suit the setpoint, and to maintain temperatures with much less variation. Without boring you with the details about type A, B or C implementations, the PID algorithm in the context of CraftBeerPi has three terms:

Proportional term: compares the difference between the setpoint and the current temperature. If the difference is large, the proportional term is large. Referred to as 'error value'.
Integral term: compares past error values with the setpoint and adds them together, determining the effectiveness of the current output in reaching a target temperature. If the current output is too slow or not strong enough, the error values will accumulate over time and the controller will respond by scaling the output accordingly.
Derivative term: works on the rate of change and tries to scale the output to meet future values.
All three terms are summed and the resulting output typically represents a percentage between 0 and 100. As with the case of the overshoot logic example above, if your setpoint is 68° and the current temperature is 66°, the resulting output would be the combination of the proportional term (i.e., a small difference), the integral term (i.e., accumulation of small error values) and the derivative term (which may actually be negative if the rate of change results in future values that are too high), which may cause the output to scale to a very low percentage in order to meet the temperature.

There's a pretty good write-up about PID as it relates to homebrew here, which I believe may have been referenced by Manuel for CraftBeerPi. It also includes a good run-down of how the writer tuned his system and derived values for Kc, Ti and Td to suit his brew setup.


----------



## Mat B

Sounds like PID logic might be worth a try then. SO if I understand correctly, the PID logic will adjust/scale the output as it approaches target, which should reduce the chance of it overshooting wildly?


----------



## sittingaround

Yeah thats how i read it. Ive used both and the pid logic hasnt overshot my set temp once since using it. I run a multi step mash and it works really well.


----------



## tumi2

Thanks for that good explanation. I will give it ago but it may take a few brews to tune the system correctly.


----------



## Moad

Edit: a little research answered my question...


----------



## sittingaround

Ok so be careful and nake sure you can see you control pannel at all times. Im using 2.1 and brewed with it yesterday 4th brew and i was running a stepped mash with a mash out at 78. As i eas getting my sparge water ready the temp prob stopped sending or the Pi stopped reading either way i had to shut down and reboot the pi. As a result the element goes full ball and my mash out temp reached 85 before i noticed it. Thankfully it waa withing the last 5 mins of mash out.


----------



## GibboQLD

sittingaround said:


> As i eas getting my sparge water ready the temp prob stopped sending or the Pi stopped reading either way i had to shut down and reboot the pi. As a result the element goes full ball


From the pictures of your setup, it looks like you've got your SSR connected to either pin 3 or pin 5 -- a few people have done tests on the power-up condition of the GPIO pins and found that pins 3/5 (GPIO 2/3) default to high unless configured otherwise, which would explain why your element was active.

Might be a good idea to investigate/implement a bit of interface circuitry between the Pi and the SSR to prevent the element from turning on under similar conditions. Alternatively, you could change the way it switches so that low = on and high = off, assuming CraftBeerPi allows you to configure it that way.


----------



## sittingaround

Na the was active because it was on auto mode so when the temp probe cut off it read as -1 so the software turns on the element to reach the pre set step temp of 78.


----------



## tumi2

An update on my experience to date with Craftbeer Pi... Overall i think I am going to stick with this and look forward to version 2.2 to be released. 

1) SSR experience
So if you recall from earlier posts i could not activate my Fotek SSR without adding a power source and adding a transistor into the circuit. Once the transistor was added using the 5v power from the RPI the Fotek SSR worked as expected. Someone on here advised to try Inkbird SSR which I did on the weekend and it worked directly from the RPI input and activated as expected. The lesson here is that the dodgy Fotek SSR's did not activate directly from the 3v input pin while the Inkbird does. I have tested this with 2 Fotek SSR's and they both would NOT activate without the transistor circuit. So im now ordering another Inkbird SSR so i dont need the complication of transistor circuity.

2) PID and Overshoot logic
I brewed on the weekend and tried to use PID logic rather than Overshoot. Last time i used overshoot it massively oversshot my mash target. The PID logic seemed to work better but it was continuously switching my SSR in a pretty consistent pattern of 4 seconds Power Off and one second Power On. This concerned me a little as i wondered if it would damage either the SSR or my heating element. Due to this i reverted to Overshoot with a setting of 2. Provided i frequently stirred the mash to ensure an even spread of temp the overshoot worked much better. I also set the temp probe quite close to the base of the pot so it would read the water as it is heated. The lesson here was stir the mash to ensure even temp distribution and the Overshoot logic works fine. 

3) Calibrating PID Logic - Can anyone share their calibration that i might be able to steal rather than figure my own out. I brew BIAB in a 50L SS pot in about 35 liters of mash water. I want to try the PID logic again but think the calibration is important


----------



## Dave_022

tumi2 said:


> 2) PID and Overshoot logic
> I brewed on the weekend and tried to use PID logic rather than Overshoot. Last time i used overshoot it massively oversshot my mash target. The PID logic seemed to work better but it was continuously switching my SSR in a pretty consistent pattern of 4 seconds Power Off and one second Power On. This concerned me a little as i wondered if it would damage either the SSR or my heating element. Due to this i reverted to Overshoot with a setting of 2. Provided i frequently stirred the mash to ensure an even spread of temp the overshoot worked much better. I also set the temp probe quite close to the base of the pot so it would read the water as it is heated. The lesson here was stir the mash to ensure even temp distribution and the Overshoot logic works fine.


SSR's are fairly resilient that is why they are preferred over Electro-mechanical Relays (EMRs) these days. The mean time before failure of an EMR is about 100K where as an SSR will operate between 50-500 million times before failure. Implementation of PID logic for temperature is generally as follows.

Take the total output power of a system (say 2400W)
Take the error; which is the difference between the setpoint and measured temp.

Then the error is used to determine the proportional, integral and derivative which basically try and ramp temperature up as fast as possible without overshooting or creating a 'ripple effect' by measuring the changes to error over time. 

This gives a % of power required at any given (preferably regular) interval at which the calculation is performed. 

If the system is analog then you can simply set the power i.e 1200W for 50% etc.

However to use a digital system which only does on and off you select a window (5 seconds for example) and set a duty cycle from this; so for your 1 second on 4 seconds off it is working at 20%.

What you should see is it on all the time at the beginning and as you approach set temp it to spend more time off than on.

Given the above failure times and the use in this application i wouldn't worry to much about the SSR and the heating element won't know the difference between being operated like this and having a lower current passing through it because it is just a big resistor.

In comparison overshoot just realises that the element will still be hot when the power has gone and therefore it will continue to rise until it reaches equilibrium; so we take a punt at what the residual temperature rise will be. Obviously you can easily measure this by manually heating water, turning it off and measuring overshoot.

PID is a bit more complicated as you need to balance P, I and D to ensure that actually temp is reached; and in a timely manner and that it doesn't overshoot.... which is short, is a sod.

So why PID? When set properly the temperature will rise evenly without overshoot and then stay within about 0.1 degree C.

However, PID systems usually control systems where the setpoint changes and you don't want too much overshoot i.e. a missile guidance system where the target moves and you don't want it flying too far left then too far right etc etc.

Water heating on the other hand is a simple system so it may be considered overkill for this application; a bang-bang temperature control should be able to keep you within 1 degree easliy and probably better.

The choice is yours of course; in the past I have gone for PID because I spent ages perfecting the algorithm for another application on Arduino..... 

On the other hand, I also like to drink beer so spending ages calibrating a system may fall further down on my priority list...


----------



## loco88

Can any of you blokes take a few pics of your Pi/Relay/Probe setup for me? I've setup a BrewPi before but that wasn't using the Pi pins, plus I want to see if I have enough spare parts lying around to make one of these  Cheers


----------



## tumi2

loco88 said:


> Can any of you blokes take a few pics of your Pi/Relay/Probe setup for me? I've setup a BrewPi before but that wasn't using the Pi pins, plus I want to see if I have enough spare parts lying around to make one of these  Cheers


Hey loco88 - I have some pics in this Google Drive link
Im pretty sure this is how i set mine up via a breadboard. 
A Tip - don't use Fotek SSR as i could not get mine to activate direct from the GPIO pin voltage without adding in a transistor circuit to provide additional voltage. I switched to Inkbird and it worked direct from GPIO Pins as expected, so i am ditching the transistor complexity.


----------



## Mat B

I'd like to point out that my Fotek works perfectly fine. I think you need to be careful on which ones you get, as there are some fake ones out there.


----------



## loco88

tumi2 said:


> Hey loco88 - I have some pics in this Google Drive link
> Im pretty sure this is how i set mine up via a breadboard.
> A Tip - don't use Fotek SSR as i could not get mine to activate direct from the GPIO pin voltage without adding in a transistor circuit to provide additional voltage. I switched to Inkbird and it worked direct from GPIO Pins as expected, so i am ditching the transistor complexity.


That's pretty much what I'm looking for, cheers. I plan on adding a pump, so two relays but that's a good start, thanks.

Although...


----------



## sp0rk

Just so you know, those are both counterfeit units
But there are reports of fake ones doing the job just fine, but the odd one will be out of spec due to lack of QC


----------



## loco88

sp0rk said:


> Just so you know, those are both counterfeit units
> But there are reports of fake ones doing the job just fine, but the odd one will be out of spec due to lack of QC


Any easy way of telling fake from real? Save me a google seeing as you know what I'm actually using them for!


----------



## sp0rk

http://www.ul.com/newsroom/publicnotices/ul-warns-of-solid-state-relay-with-counterfeit-ul-recognition-mark-release-13pn-52/
Basically, the bottom right corner of the label should have a small bit missing (on the real ones) 
Also they should say "Made in Taiwan" "Rated: 10A Max"
Looks like they've started adding the Taiwan claim to the counterfeits

Most things I've read on the dodgy Foteks say they work fine, but they're under-rated
Most of the 20A ones have 12A triacs, so if you're trying to switch a 15A circuit, she'll go boom
You having 10A SSRs, I'd possibly be a little careful with them
Using higher rated SSRs isn't a problem, you're safe to use 20A or 40A SSRs for a 10A circuit


----------



## tumi2

Dave_022 said:


> SSR's are fairly resilient that is why they are preferred over Electro-mechanical Relays (EMRs) these days. The mean time before failure of an EMR is about 100K where as an SSR will operate between 50-500 million times before failure. Implementation of PID logic for temperature is generally as follows.
> 
> Take the total output power of a system (say 2400W)
> Take the error; which is the difference between the setpoint and measured temp.
> 
> Then the error is used to determine the proportional, integral and derivative which basically try and ramp temperature up as fast as possible without overshooting or creating a 'ripple effect' by measuring the changes to error over time.
> 
> This gives a % of power required at any given (preferably regular) interval at which the calculation is performed.
> 
> If the system is analog then you can simply set the power i.e 1200W for 50% etc.
> 
> However to use a digital system which only does on and off you select a window (5 seconds for example) and set a duty cycle from this; so for your 1 second on 4 seconds off it is working at 20%.
> 
> What you should see is it on all the time at the beginning and as you approach set temp it to spend more time off than on.
> 
> Given the above failure times and the use in this application i wouldn't worry to much about the SSR and the heating element won't know the difference between being operated like this and having a lower current passing through it because it is just a big resistor.
> 
> In comparison overshoot just realises that the element will still be hot when the power has gone and therefore it will continue to rise until it reaches equilibrium; so we take a punt at what the residual temperature rise will be. Obviously you can easily measure this by manually heating water, turning it off and measuring overshoot.
> 
> PID is a bit more complicated as you need to balance P, I and D to ensure that actually temp is reached; and in a timely manner and that it doesn't overshoot.... which is short, is a sod.
> 
> So why PID? When set properly the temperature will rise evenly without overshoot and then stay within about 0.1 degree C.
> 
> However, PID systems usually control systems where the setpoint changes and you don't want too much overshoot i.e. a missile guidance system where the target moves and you don't want it flying too far left then too far right etc etc.
> 
> Water heating on the other hand is a simple system so it may be considered overkill for this application; a bang-bang temperature control should be able to keep you within 1 degree easliy and probably better.
> 
> The choice is yours of course; in the past I have gone for PID because I spent ages perfecting the algorithm for another application on Arduino.....
> 
> On the other hand, I also like to drink beer so spending ages calibrating a system may fall further down on my priority list...


Thanks for that explanation. I am going to give PID another go next brew but this time take close notice of how it works, timings and switching.


----------



## tumi2

Has anyone upgraded to Dev2.2 of Craftbeerpi?. There seem to be some people using it and i can see on Git Hub that Manuel has been a busy developer and made lots of good changes recently.... all power to him i say :beerbang: :beerbang: .

I would like to upgrade but am not sure how i go from 2.1 to 2.2.

Do i just rename the current craftbeerpi folder and then run a git clone https://github.com/manuel83/craftbeerpi/tree/dev2.2 then run the install script to get a new installation of Dev2.2 or is there an upgrade path?


----------



## Manuel

Hi

Version 2.2 is under heavy development. I updated all the python libs to the latest version and now I'm fixing issues.
I don't recommend to you version for brewing but any help for bug fixing is appreciated.

You can clone this version by using the following command:

git clone -b dev2.2 https://github.com/Manuel83/craftbeerpi

Cheers,
Manuel


----------



## tumi2

Thanks Manuel. Im happy to clone and install dev2.2 into a different directory on the RPI to help with bug testing. 

If i do will 2.1 still work?


----------



## Manuel

CBP2.2 is under heavy development. I do a lot of changed. Last week I updated all the python libs to the lastest versions. This was a major change.
Unfortunately these libs are not compatible to the libs used in version 2.1. To run both versions on one RPi I recommend to use virtualenv.

http://docs.python-guide.org/en/latest/dev/virtualenvs/


----------



## tumi2

Manuel said:


> CBP2.2 is under heavy development. I do a lot of changed. Last week I updated all the python libs to the lastest versions. This was a major change.
> Unfortunately these libs are not compatible to the libs used in version 2.1. To run both versions on one RPi I recommend to use virtualenv.
> 
> http://docs.python-guide.org/en/latest/dev/virtualenvs/


Thanks Manuel, i have now installed dev2.2 and 2.1 does not work as you mentioned but that is fine as i do not need to brew for a while.

Dev2.2 looks really good. It is much easier to identify hardware and the way you can name and view hardware is better. I also like being able to export the temperature profiles. Looking forward to the fermentation module being available as that looks good also.

How would you like me to report bugs? Should i just add them as Issues in GitHub or do you want me to put them in this thread?


----------



## Manuel

Please use github for reporting issues but keep in mind 2.2 is still under development.


----------



## Dave_022

How are changes for PID values including duty cycle window made?


----------



## terragady

anyone tried PiZero? Does it work? Maybe dietpi.com would be nice idea, even for normal RPi 2/3

BTW you can check my github for some PCB's for CraftbeerPI similar to ArdBir's ones.

https://github.com/terragady


----------



## Dave_022

I tried setup on dietpi as it is quite minimal; GPIO for 1-wire doesn't work out of the box to read sensors so it is a pain. Settled on Raspian Lite in the end as the fastest to setup.


----------



## terragady

Dave_022 said:


> I tried setup on dietpi as it is quite minimal; GPIO for 1-wire doesn't work out of the box to read sensors so it is a pain. Settled on Raspian Lite in the end as the fastest to setup.


Do you use Raspberry Pi Zero?


----------



## Dave_022

No, I was using model 2, I dont have a zero was thinkng of using a 3 though, just torn between other projects i have that may require the extra power as this seems quite lightweight. However i want to use the most stable setup as, while i can keep an eye on a kettle during brew day, an interruption to fermentation over a few days would be a pain!


----------



## tumi2

can anyone help me with the commands to run an upgrade over version 2.2. I installed v2.2 about 1 month ago and wanted to upgrade to any recent changes Manuel has made in the last month.


----------



## terragady

Can't you just install it from scratch again? 2.2 doesnt not meant to be for brewing yet, just for development from what he says.


----------



## tumi2

terragady said:


> Can't you just install it from scratch again? 2.2 doesnt not meant to be for brewing yet, just for development from what he says.


yep i could but i figured there may be only minor changes that might be easier to upgrade.
It is not ready for brewing but the bulk of it works well and is a large improvement on v2.1.


----------



## terragady

yes it is, I think he just updated it to beta version?


----------



## tumi2

Hoping for some thoughts about wiring multiple DS18B20 temp sensors to the RPI. 

I currently run 2 temp sensors using separate GPIO and a dedicated 4.7k resistor for each sensor. It all works fine in CBPI v2.2, i can see each sensor in the hardware list, i can switch SSR's with both sensors and can record separate temparatures.

However, after doing some reading i understand that i have this design incorre t and that i should actually chain the sensors through a single 4.7k resistor. Furthermore they should all share the same GPIO 4.

What is the reason for chaining the sensors and can i just keep my current setup? Is it just to save curcuitry and the fact that the RPI GPIO 4 can accommodate multiple sensors or is there a technical reason why i must chain them.?


----------



## malt junkie

tumi2 said:


> What is the reason for chaining the sensors and can i just keep my current setup? Is it just to save curcuitry and the fact that the RPI GPIO 4 can accommodate multiple sensors or is there a technical reason why i must chain them.?


The idea of one wire was to use less IO and run more devices.






this little doodad is a one wire interface(using RJ12 sockets {telephone jacks} for the one wire cabling) for an SSR it has a second out put for a second SSR and three further jacks for other one wire devices eg. temp probes. this sort of thing really tidies up your wiring too.

Cheers
Mike


----------



## tumi2

That is a really nice device. E-bay ?

You would laugh at my wiring. I run 3 * SSR's and 2 * temp probes and everything through a breadboard so it is a bit like spaghetti. It is housed in a HP Desktop stripped out. 

It does work though and color coding helps a lot.


----------



## malt junkie

Your not in a bad spot in Sydney plenty of fellow brewers into their electronics. Once you get the circuitry and a lot of it is simple, especially one wire, you can make a custom board with things set out the way you want. The pic above is from the brewPI store they've got onewire boards for motorised valves too.
So in essence you could have coming from your controller

one cable for all your sensors, one for all your pumps and valves, and another for all your heating or 
one cable for each vessel, controlling all of the above
one cable for the entire rig, controlling all of the above
It's simple bus topology, the down side is; the longer the bus the harder it can be to track faults. So I would choose either option 1 or 2 probably leaning heavily toward 2 though.

BTW if it aint broke......


----------



## terragady

malt junkie said:


> The idea of one wire was to use less IO and run more devices.
> 
> 
> 
> 
> 
> this little doodad is a one wire interface(using RJ12 sockets {telephone jacks} for the one wire cabling) for an SSR it has a second out put for a second SSR and three further jacks for other one wire devices eg. temp probes. this sort of thing really tidies up your wiring too.
> 
> Cheers
> Mike


Wait is not it that 1-Wire protocol can use only 1 GPIO at the time without kernel modifications? and by default this gpio is 4?

@tumi2
how were you able to connect more sensors to different GPIOs?


----------



## malt junkie

arduino set what every pin you like(within reason) and multiple buses is doable(the default is GPIO 4?), I haven't played with the RPI GPIO (yet).


----------



## terragady

wait, but what arduino is doing there?  There is only RPi, no arduino. I know that in arduino you can use multiple GPIOs but not in RPi. Default for 1Wire is GPIO4 and this can be changed easily, but if you want multiple sensors connected to multiple GPIOs then this is heavy stuff which include modifying and compiling the kernel.
That is why I am surprised how he get it to work when connected 2 sensors to 2 GPIOs


----------



## tumi2

Really sorry for the confusion.... 

i just traced my spaghetti wiring and realised that i DO share GPIO 4 across both sensors but i use separate power, earth and resistor.

Needless to say i am going to clean it up this week and use single circut for all sensors.

Appoligise again....


----------



## sp0rk

Anyone got any pics of their setups yet?
I'm looking for some inspiration for my build


----------



## loco88

I'm hoping to have something (most likely ugly) soon, honest!


sp0rk said:


> Anyone got any pics of their setups yet?
> I'm looking for some inspiration for my build


----------



## Mat B

I gave up. Kept playing up and not reading temps.


----------



## kaiserben

sp0rk said:


> Anyone got any pics of their setups yet?
> I'm looking for some inspiration for my build


Is this the sort of thing you're after? 




(you might notice some shitty MS Paint stuff where, to avoid confusion, I've blotted out some power cords that were coiled underneath the box). 

It looks a bit of a mess, but once I close it up it's nice and easy to handle. 

Inside is a RPi 3 and Sainsmart 4 switch relay. 

Clockwise from the bottom left is the power cord to mains and the power source for the RPi, then 2 temp sensors. Then on top I have 3 sockets for 3 of the 4 relays (I could buy another socket, but at the moment I really only need 2 (one for cooling and another for heating).


----------



## sp0rk

No that's good
For some reason in my head I was over complicating it looking at other people's rigs with breakers built in, etc etc
I'm going to have 2 x 10A leads going in, 3 leads coming out
1 out will be for my HLT, which has a 2200w element, so I have 200w left for the Pi to come from the same in
The other 2 out will be my hex, which is 1800w, and a keg king pump, which is something like 60w


----------



## sp0rk

*edit*
m-m-m-m-multi post!


----------



## takai

kaiserben said:


> Is this the sort of thing you're after?
> 
> 
> 
> 
> IMG_1557.JPG
> 
> (you might notice some shitty MS Paint stuff where, to avoid confusion, I've blotted out some power cords that were coiled underneath the box).
> 
> It looks a bit of a mess, but once I close it up it's nice and easy to handle.
> 
> Inside is a RPi 3 and Sainsmart 4 switch relay.
> 
> Clockwise from the bottom left is the power cord to mains and the power source for the RPi, then 2 temp sensors. Then on top I have 3 sockets for 3 of the 4 relays (I could buy another socket, but at the moment I really only need 2 (one for cooling and another for heating).


I wouldnt trust those Sainsmart relays at 10A, ive blown up two units at well under 10A on other projects. They can handle limited 10A peaks, but sustained 10A for things like elements and they start to get quite toasty.


----------



## Dazbrews

Hey guys I've just made the switch to CBP after using StrangeBrew Elsinore for the last year or so.

I have 12v pumps hooked up to sainsmart relays and I need to invert the gpio signal for just those devices.

Has anyone done this - I know it's an edit to the python code somewhere, but I can't find where.

Cheers!


----------



## tumi2

sp0rk said:


> Anyone got any pics of their setups yet?
> I'm looking for some inspiration for my build


Here is a Google Drive link to my images. Its a bit hard to make much from it. Hope it helps though.....

The entire build is in a old HP Small Form Factor box. It has 3 * Inkbird SSR's, 3 * GPO plugs that i connect my Recirc pumps, Kettle Heating Element, Sparge heat element into. The SSR's sit on large heat sinks which take up a fair bit of space.

I connect 3 * 1 wire temp sensors through old school Serial plugs. The good thing about this is that i can run 2 or even 3 separate temp probes from a single 9 pin serial plug.

I do it all through a breadboard which makes playing and troubleshooting easy and so far i have not had any issue with loose connections on the breadboard.

The computer sits in a shelf in my brewery trolley which is built on a strong flat bed trolley so the entire brewery is mobile.


----------



## sp0rk

Brilliant, that's more or less exactly what I was thinking mine would look like
I would guess a lot of the builds I'm seeing online are building in sub boards for the power or something

Thanks!


----------



## kaiserben

Ah! I just realised this thread is about mash and boil control. My box is just a fridge controller and data logger (like a BrewPi) done via wifi.

I had planned to build one that'd control a mash and boil, but my flashed STC1000+ is doing a good enough job for me and my 2000W element.


----------



## PeteQ

This morning i finished my first brew with craftbeerpi in a modified matho controller. I jumped in the deep in and tried out v2.2 straight off the bat which was probably a mistake but got through the brew and should still have very drinkable beer in a couple of weeks. 

After around 4 years of using mathos controller it was quite nice easily inputting steps through my laptop. being able to see the exact times and graphs of your brewday is great for judging quick trips to the shops, kids sports, SWMBOs chores, etc. I haven't yet figured out how to login offsite, but that is definitely next on the list.

During todays brewday I felt it was missing a few bits and pieces which would make brewday a breeze such as ability to choose PWM % during boil, on/off hardware option in each step, hop timer (I used separate steps for hop additions today which worked but clunky), ability to change buzzer length or maybe just for hop additions, LCD or OLED integration to display step/temp/time and a chill step and alert when reaching desired temp. Uploading beersmith recipes would also be a fantastic feature but maybe asking too much?

Further expanding on the on/off hardware option in each step, this could open up a world of options. Solenoids for automatic filling and racking, depending on your setup it could turn it into a nearly fully automated system. I'm sure there's plenty more that i have missed but this would be a fantastic feature.

If i have missed anything please let me know, still very green with the system.

If anyone is interested on how i attached the pi to the controller i used one of these https://www.itead.cc/wiki/File:IM140714004_3.jpg and slightly modified it for it to work with craftbeerpi. 

Cheers


----------



## farsonic

Pete - did you replace the Arduino in your mathos with a Raspberry PI for this build? If so I'm keen to know more about how you did this?

Cheers

F


----------



## snails07

I've just installed version 2.2 and started testing it - it looks really good!!

One question though. I have a kettle and a pump and I am just wondering the best way to automatically turn the pump on/off at different times?
Or does a pump need to be run manually?

I've found the 'PumpLogic' option but not really sure if this is it what I need and what the 4 fields mean: wait_time, PumpTime, PumpPause, PumpAbschalt


----------



## PeteQ

As far as I'm aware the pump is completely manual at this stage. 

I believe there is a lot of code that still needs to be integrated/developed into version 2.2, hopefully this will come with time.

Still working on getting the LCD code to work - https://github.com/Manuel83/craftbeerpi/issues/45 

Cheers


----------



## snails07

No worries, thanks Pete - not a big deal to hit the pump switch.

I think I am going to hook it up to a cheapo 7" touch screen like they've done here - http://www.leaningman.com/2016/05/automated-brewery/


----------



## kjparker

terragady said:


> anyone tried PiZero? Does it work? Maybe dietpi.com would be nice idea, even for normal RPi 2/3
> 
> BTW you can check my github for some PCB's for CraftbeerPI similar to ArdBir's ones.
> 
> https://github.com/terragady


Looks good, Any chance of getting either the gerbers or the "brd" file for the 4.2 pcb uploaded?


----------



## mattieharding

Can you control a fermenter and also a mash tun at the same time?


----------



## kjparker

PeteQ said:


> As far as I'm aware the pump is completely manual at this stage.
> 
> I believe there is a lot of code that still needs to be integrated/developed into version 2.2, hopefully this will come with time.
> 
> Still working on getting the LCD code to work - https://github.com/Manuel83/craftbeerpi/issues/45
> 
> Cheers


With the release of 2.2, is this still the case?

I can't find any documentation regarding this one way or another. 

I am still undecided which way to go, Craftbeerpi, or openardbir for my 1v build, and that could be the decider! I have most of the parts (except for a pretty PCB) already so hardware wise, I could probably go either way, but would rather do it once, and not have to worry about it again!


----------



## PeteQ

clueless said:


> With the release of 2.2, is this still the case?
> 
> I can't find any documentation regarding this one way or another.
> 
> I am still undecided which way to go, Craftbeerpi, or openardbir for my 1v build, and that could be the decider! I have most of the parts (except for a pretty PCB) already so hardware wise, I could probably go either way, but would rather do it once, and not have to worry about it again!


It hasn't been implemented yet but apparently will be - https://github.com/Manuel83/craftbeerpi/issues/121 

If you like the idea of wifi//web based controller you could give this code a crack - https://github.com/vitotai/BMESP8266 Not nearly as polished as CBP but looks like it's based on Open Ardbir code using an esp8266 rather than arduino. 

Or just hit up Lael for an awesome Open Ardbir/Brauduino controller!


----------



## PeteQ

mattieharding said:


> Can you control a fermenter and also a mash tun at the same time?


If your fermenting chamber and brewing setup are next to each other i believe you should be able to.


----------



## O-beer-wan-kenobi

I have a RPi3 running CraftBeerPi 2.2 but I'm having issues with my 2 * DS1820b sensors. I'm trying to extend the cables to the heat exchanger which is a 2m run and the other sensor to my fermentor which is a 5m run.
I can see both sensors when connected with out the extended cables or one sensor with one extended cable but when I connect both cables I can only see the closest one and this sometimes dropped out. 

I have tried different things, parasite connected, star connected, daisy chain connected and putting the resistor in different points of the bus but nothing works with stability. 

What have people done with a similar setup that works for them and what hardware are they using? I have been playing around with this for days now and I'm running out of ideas


----------



## srm

O-beer-wan-kenobi said:


> I have a RPi3 running CraftBeerPi 2.2 but I'm having issues with my 2 * DS1820b sensors. I'm trying to extend the cables to the heat exchanger which is a 2m run and the other sensor to my fermentor which is a 5m run.
> I can see both sensors when connected with out the extended cables or one sensor with one extended cable but when I connect both cables I can only see the closest one and this sometimes dropped out.


I understand the DS18B20 needs from 3 to 5V to work. If you are using your RPi3's 3.3V, have you checked that you have at least 3V at the connectors and cable joints ?

I personally am terminating my DS18B20s with RJ45 plugs (+5V, Gnd & 1-wire on pins 4, 5 and 6 respectively). I am using 4-way RJ45 breakouts (http://www.ebay.com.au/itm/161188269552?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT) on each of my boxes and straight through RJ45 patch leads as extension leads between boxes.


----------



## GibboQLD

O-beer-wan-kenobi said:


> I have a RPi3 running CraftBeerPi 2.2 but I'm having issues with my 2 * DS1820b sensors


Any chance you could share a few photos/diagrams of your setup? Also -- what size is your pull-up resistor, and what sizes are the extension cables?


----------



## O-beer-wan-kenobi

My cables are 2m and 5m. These are wired back to a set of commoned terminals next to my Rpi and with a 4.7k resistor. Not quite the same as the diagram attached.
I have now changed to 5v to supply these and also done a fresh install of Raspbian and CraftbeerPi 2.2 just in case.

It seems that with one sensor the system is reletively stable but with two connected the longest cable that goes to my Fermetor drops out more frequently. Any ideas whats going on?


----------



## GibboQLD

O-beer-wan-kenobi said:


> My cables are 2m and 5m ... It seems that with one sensor the system is reletively stable but with two connected the longest cable that goes to my Fermetor drops out more frequently. Any ideas whats going on?


It sounds like a voltage drop / low signal issue -- are you able to swap out the 4.7k resistor at all? What type of cables are they / what's the cross-sectional area?

While 4.7k pull-up resistors work for 1wire networks in most cases, I've seen projects use anything between 1k and 10k to compensate for any number of variables (i.e., cable cross-section, supply voltage issues, etc).

If you're able to, you could try swapping out the pull-up resistor for a 1k resistor in series1 with a 10k potentiometer and adjusting until both sensors work properly. Alternatively, if you can't swap the pull-up resistor out, but you're able to put additional resistors in parallel with it, you could try working backwards through the E12 series from 47k until both sensors work2.


1. You could leave this out and just use the 10k pot, but then you have no insurance policy if you accidentally set the pull-up resistance too low, resulting in fried/damaged sensors.
2. Just don't go below about 1.8k since the total resistance will get too low, etc, etc. See above.


----------



## O-beer-wan-kenobi

Cable I have used is a 6 core shielded comms cable which is pretty small, maybe 0.5mm2 and even 2.5mm2 that I had laying around. I will give it a go with different resistor sizes and see how I go.
I have left this a few days to monitor it and it is much more stable than before. The different sensors are dropping out at different times and with different frequencies. I have a 3rd sensor that is connected with a 20cm length of cable and this still drops out.
Does it make a difference if the different sensors have differnt resolutions? One has 2 decimal points where the otehr is only 1 decimal point.

The dropouts seem momentary so I can live with this for the mash heater control but for my fridge I dont want that comming on and off too often as it will burn out.


----------



## O-beer-wan-kenobi

I have tried using 2k resistors but it doesnt seem to be any better.
You can see from teh screen shots that some sensors are dropping out.
Mash sensor has been extended by 2m, Test sensor is extended 4m and Test 2 sensor is 20cm. I would have thought the closest sensor would be the most stable?


----------



## tom86

Hi quick question,

Has anyone added a level indicator into this? I am thinking about putting a level switch into my 2v system to control the pump to maintain constant level in the mash tun (just on off control). Also I need volumes slightly larger than my kettle so I need the pump to run all the time or it will overflow... Is this simple to add in?

My experience is mainly in ladder and FBD programming with a small amount of structured text.


----------



## loco88

Does anyone have it wired up to a PiFace and feel like taking some photos for me? I've come across a piface and it seems much more achievable to wire it up to that, but I'm definitely gunshy about doing the 240V in the relays, and where the temp probe should be going into has me confused a bit. I've googled, but it's mostly German sites and all the photos are artsy or more complex setups than I need to see which makes it hard to follow what goes where.

Cheers


----------



## bluc

I have v3 installed I have set a static ip on my pi but cannot get the web interface to connect. I see the craftbeerpi splash screen on my pi's boot screen. Is there something I need to enable or configure to get the web interface working?


----------



## Alchomist

It should be accessible in chrome at 10.0.0.xx:5000 (replace the xx with your RPi’s IP address )

Make sure you have v3.0


----------



## bluc

Yes I definately have v3.
I have now tried 
http://192.168.1.69:5000
http://10.0.0.192.168.1.69
http://10.0.0.69:5000
then locally on raspberry pi browser
http://127.0.0.1:500
and finally
http://localhost:5000

Nothing works..


----------



## bluc

I got it sorted seems python was a bit off fixed it with the commands in this thread https://github.com/Manuel83/craftbeerpi/issues/197 by "Hootsbroklyn" cheers and thanks for helping..


----------



## Alchomist

I went through the same thing last year checking out v3.1_alpha, it set up a second IP address changing the address I had bookmarked.


----------



## tumi2

Check this out...
https://cbpi.mricesolutions.com/viewtopic.php?f=3&p=18
You probably need to install some requirements.


----------



## snails07

Has anybody here used CraftbeerPi to control a WiFi smart plug?
I see there is the TP-Link plugin but wondering if this is suitable to switch the element during PID operations - https://github.com/aravndal/TPLinkPlug


----------



## jose luis Banegas

[QUOTE = "Manuel, post: 1368635, member: 44687"] Hola,

Me gusta presentar mi controlador de infusión base Raspberry PI CraftBeerPI.

caracteristicas:

- Controla tantas teteras como quieras
- Control de hardware: agitador, calentador, bombas, válvulas
- Asistente de instalación
- Pasos de preparación flexibles
- Pasos automáticos y manuales
- Interfaz de usuario de teléfono inteligente, tableta y escritorio
- 3 logotipos automáticos de caldera estándar
- La lógica personalizada se puede implementar fácilmente
- Libro de recetas
- Tabla de temperaturas para cada caldera
- Soporte para conexión directa GPIO, PiFace o Gembird USB
- Soporte para Fahrenheit y Celsius
- ¡Gratis!

Sitio web: www.craftbeerpi.com
Facebook: facebook.com/craftbeerpi

Aclamaciones,
Manuel
















[/CITAR]



Manuel said:


> Hi,
> 
> I like to present my Raspberry PI base brew controller CraftBeerPI.
> 
> Features:
> 
> - Control as many kettles as you like
> - Hardware control: agitator, heater, pumps, valves
> - Installation wizard
> - Flexible brew steps
> - Automatic and manual steps
> - Smartphone, tablet and desktop user interface
> - 3 standard kettle automatic logics
> - Custom logics can be implemented easily
> - Recipe book
> - Temperatur chart for each kettle
> - Support for direct GPIO, PiFace or Gembird USB Socket
> - Support for Fahrenheit and Celsius
> - Free!
> 
> Website: www.craftbeerpi.com
> Facebook: facebook.com/craftbeerpi
> 
> Cheers,
> Manuel


hello how are you, I am from santa cruz bolivia, I want to build a craftberr in a raspberry, the equipment will be 3 containers and I would like to control the agitator, 3 water pumps and solenoid valves for a gas system, you could help me to make it from the PCB board, until the programming. my email is [email protected], whatsapp +591 70842029
Thank you


----------



## Dubzie

Hop addition times...

Did my first brew over the weekend, i dont know if my hop additions were bugged, but i put them in how i normally did in my STC-1000 (60, 15,10, 5, 0)

The hop alerts did't pop up at the expected times. Is this the right way to add them?


----------



## Wobbly74

What boil logic are you using?


----------



## Dubzie

Wobbly74 said:


> What boil logic are you using?


I was just using Hysteresis, next one will be the PIDBoil addon.


----------



## Dubzie

so 0 addition alert was as soon as the timer started. (10 min timer)
Hop 3 alert went off at 8mins...


----------



## millsii

Dubzie said:


> so 0 addition alert was as soon as the timer started. (10 min timer)
> Hop 3 alert went off at 8mins...



As you have found it is backwards to how you would normally refer to hop additions. The hop timings are minutes from start of boil.


----------



## Dubzie

millsii said:


> As you have found it is backwards to how you would normally refer to hop additions. The hop timings are minutes from start of boil.


*sigh* well thats just silly...


----------



## Wobbly74

The good news is that you can actually code your own boil logic if you'd like to change it


----------



## Drtmonster

I hope this is the right place to ask this:

Does anyone have a full wiring diagram for an Australian brew panel using a CraftbeerPi? If not is there a PID style panel wiring diagram that is best to modify?

A list of parts would also be very helpful.

Thanks


----------



## Dubzie

Wobbly74 said:


> The good news is that you can actually code your own boil logic if you'd like to change it


I think the boil logic is seperate from the boil step control, even after changing boil logic, the step control is the same


----------



## Dubzie

Drtmonster said:


> I hope this is the right place to ask this:
> 
> Does anyone have a full wiring diagram for an Australian brew panel using a CraftbeerPi? If not is there a PID style panel wiring diagram that is best to modify?
> 
> A list of parts would also be very helpful.
> 
> Thanks



http://web.craftbeerpi.com/hardware/


----------



## Dubzie

@Manuel any word on CBPi 4


----------



## tranber28

Sorry to disturb you

I am looking to buy a v2 card but I can not find and on the official Facebook page I have no answer! Do you have a link ?

Thank you Good day


----------



## Half-baked

tranber28 said:


> I am looking to buy a v2 card but I can not find and on the official Facebook page I have no answer!



On the FB page, there’s talk of a v3 board being released soon. Mash to Brew is the go-to for the v2 boards, but are sold out. I suspect they aren’t ordering more of the v2 but waiting for the v3. 

From memory the v3 will allow you to connect pressure sensors to measure the volume of the wort...


----------



## Joachim

tranber28 said:


> Sorry to disturb you
> 
> I am looking to buy a v2 card but I can not find and on the official Facebook page I have no answer! Do you have a link ?
> 
> Thank you Good day




Look at mash to brew, there I bought a board tree weeks ago


----------



## Half-baked

G’day all,

Finally ready to build after getting most things from Mash to Brew a few months ago (mostly Jaycar for the rest). 

Less out of my depth now than when I started but still reasonably clueless. 

Two things to ask...

First, could those more knowledgeable than me please have a look over the below (badly drawn) diagrams to tell me what I’ve done wrong? (Other than not using a ruler.)

Second, I know 240v kills, so looking for a qualified electrician in Sydney who might be interested in coming to the inner west in the next 3-4 weeks to check it out when finally built? Have a couple of cases to impart in return for the favour (or let me know soon and could swap a full 19l keg for an empty one). 

Thanks,
Heath


----------



## Lorenzo99

Half-baked said:


> G’day all,
> 
> Finally ready to build after getting most things from Mash to Brew a few months ago (mostly Jaycar for the rest).
> 
> Less out of my depth now than when I started but still reasonably clueless.
> 
> Two things to ask...
> 
> First, could those more knowledgeable than me please have a look over the below (badly drawn) diagrams to tell me what I’ve done wrong? (Other than not using a ruler.)
> 
> Second, I know 240v kills, so looking for a qualified electrician in Sydney who might be interested in coming to the inner west in the next 3-4 weeks to check it out when finally built? Have a couple of cases to impart in return for the favour (or let me know soon and could swap a full 19l keg for an empty one).
> 
> Thanks,
> Heath
> 
> View attachment 115406
> View attachment 115407
> View attachment 115408
> View attachment 115409
> View attachment 115410
> View attachment 115411
> View attachment 115412


 Ok, i know nothing about the project you are building. I am however a qualified elec and the drawings you have done are pretty good.(don`t be too hard on yaself haha) My only question is how many amps is your kettle and HLT? i see you have 40 amp ssr`s but everything is only being supplied of 1 x 10 amp breaker. DO you have heat sinks for the ssr`s? you will need them. Other than that it all looks good. Smart controlled automation i like it!


----------



## Half-baked

Awesome, thanks for the feedback @Lorenzo99! You've given me the confidence to finally start the build!

Running a 2200w HLT (20L urn) and a 2200w kettle (30L urn). Apparently there is some CBPi wizardry (PWM) that allows the two to be used concurrently (either at a reduced voltage or they very quickly alternate, but haven't looked into it properly yet). The theory is I should have just enough juice for the 2200w for HLT/kettle + 25w for pump + 45w to run the Pi...

Have both SSRs hooked up to this heatsink, which is hopefully overkill.

The hope is for the controller to be scaleable, moving onto a bigger kettle down the track, with only the breaker and power cable needing an update...

Now here's hoping it doesn't take me another three months to figure out the software side of things...


----------



## Wobbly74

Of you have one 10a breaker you will probably trip it if you need to use both urns at the same time. Cbpi will pulse the elements when maintaining temperature but will run them at 100% when ramping. So theoretically you could pre heat the HLT, then heat the water in your kettle (assuming you're mashing in your kettle and sparging from your HLT) while maintaining mash out temp in your HLT, but this will extend your brew day unless you preheat. Also, problems often arise and if you find yourself needing to heat both at the same time you'll have to stagger the heating process.


----------



## Lorenzo99

Half-baked said:


> Awesome, thanks for the feedback @Lorenzo99! You've given me the confidence to finally start the build!
> 
> Running a 2200w HLT (20L urn) and a 2200w kettle (30L urn). Apparently there is some CBPi wizardry (PWM) that allows the two to be used concurrently (either at a reduced voltage or they very quickly alternate, but haven't looked into it properly yet). The theory is I should have just enough juice for the 2200w for HLT/kettle + 25w for pump + 45w to run the Pi...
> 
> Have both SSRs hooked up to this heatsink, which is hopefully overkill.
> 
> The hope is for the controller to be scaleable, moving onto a bigger kettle down the track, with only the breaker and power cable needing an update...
> 
> Now here's hoping it doesn't take me another three months to figure out the software side of things...



You will definitely need a 20amp rcd/mcb you will be pulling 19.3 amps just with your HLT and your kettle running. 19.43amps with everything running. Make sure you use at least 2.5sqmm cable as well.

Best practice is to have the ssr`s hooked up to separate heat sinks.


----------



## Half-baked

Thanks @Wobbly74 and @Lorenzo99. 

It’s a 3v system, so if I can’t run HLT and kettle concurrently then will either a) let the sparge water cool down naturally, maybe insulating it or b) hook up the kettle to a different circuit to ramp to boiling (which is what I do now).

Still not sure about CBPi’s capability so still hoping it’s possible to c) alternate between heating HLT and kettle (e.g. 4 min to heat kettle, then 1 to bring HLT back to sparge temp). 

Not planning to get a 20a plug just for a 23l batch if I can avoid it!

For reference, pic of my system is attached..


----------



## Lorenzo99

Half-baked said:


> Thanks @Wobbly74 and @Lorenzo99.
> 
> It’s a 3v system, so if I can’t run HLT and kettle concurrently then will either a) let the sparge water cool down naturally, maybe insulating it or b) hook up the kettle to a different circuit to ramp to boiling (which is what I do now).
> 
> Still not sure about CBPi’s capability so still hoping it’s possible to c) alternate between heating HLT and kettle (e.g. 4 min to heat kettle, then 1 to bring HLT back to sparge temp).
> 
> Not planning to get a 20a plug just for a 23l batch if I can avoid it!
> 
> For reference, pic of my system is attached..
> View attachment 115418


You could always run a separate 10 amp plug through a second 10 amp circuit breaker specifically for your hlt or kettle for example out of the second circuit breaker straight to the SSR for the hlt or kettle. Providing you have nothing else in your house on the circuit you could even plug it into the same double GPO. if you do have other points on the same Circuit as long as you're not using appliances plugged in to those outlets you will have no problem


----------



## Wobbly74

That's pretty much what I do - two power lines in to the control box from two different GPOs each to different SSRs but the pi controlling the 3v signal to each. One power line does kettle & pump SSRs, the other the HLT SSR and powers an external power board.


----------



## Half-baked

Thanks guys, TBH enclosure doesn’t have much space, so will just run an extension cord to the kettle during the sparge. 

Really only want the kettle hooked up to the Pi for hop stands and kettle sours, so can live with this...

Cheers for the help, will post pics when up and running


----------



## Half-baked

Not up and running yet but thought I’d post some pictures before I get a sparky in to have a look (and do some odd jobs). 

Any glaring problems, please shout out (apart from the obvious of not having the power in connected). 

One thing that’s gnawing at me: do I need a monitor or will remote access be okay? Won’t be opening up the box when power is on...

Some learnings to share:
- plan what you need before you buy
- get a bigger enclosure than you think you will need 
- you can go from knowing FA to having a basic understanding by putting in a bit of effort. 

Cheers,
HB


----------



## Muzzaguzza

Don't forget to earth your din rail.


----------



## Half-baked

Thanks @Muzzaguzza. 

DIN rail is connected to the back plate, would be easier to earth that... would that be sufficient?


----------



## bluc

Ok so have setup my pi zero w and I am having same issue as tumi2 with the ssr not triggering..my understanding is I should be able to use a logic level converter to switch with 5v instead of 3.3v. But cant get that to work either. I had it hooked up. 5v to
Hv/3v to lv/ 5v and 3v side grounds to ground. And I had gpio 18 to lv2 and then a lead of hv2 to the + on the ssr low voltage side...No idea why this wont work..help much appreciated..I also tested the level converter with multimeter and got 3v on lv2 and same reading hv2 so I must have it wired wrong..


----------



## Dubzie

bluc said:


> Ok so have setup my pi zero w and I am having same issue as tumi2 with the ssr not triggering..my understanding is I should be able to use a logic level converter to switch with 5v instead of 3.3v. But cant get that to work either. I had it hooked up. 5v to
> Hv/3v to lv/ 5v and 3v side grounds to ground. And I had gpio 18 to lv2 and then a lead of hv2 to the + on the ssr low voltage side...No idea why this wont work..help much appreciated..I also tested the level converter with multimeter and got 3v on lv2 and same reading hv2 so I must have it wired wrong..


Use an Inkbird SSR (ebay)
Once i got one of these it fires off strait from the 3v gpio


----------



## Truman42

Hi guys, keen to set up a CBPi to run my Guten and Ive already installed CBPi3 on a pi zero w. Im still a bit lost with setting up the Äctors"etc in cbpi. I set up actor 1 as element 1 and actor 2 as element 2 and then actor 3 as my pump, but it has actor 2 (element 2) connected to the pump icon. Is there a better way to do this or should I connect both elements on the guten up to the one SSR and just use the power setting to lower it for mashing?


----------



## Truman42

So I finished my Craftbeer Pi controller for my Guten and am very happy with how it turned out. The main thing I wanted to acheieve from this is be able to use CBPi to control my Guten but also be able to switch back to the Gutens own controls as a back up if CBPi crashed or when I was just heating water up for cleaning etc, or if I sold the unit at some stage. Here are some pics for those interested in doing the same thing.

installed a switch connected to the elements. so one way is CBPi controls and the other is the Gutens own controls. (Yet to label it) Providing you only plug in either the Gutens power lead or the CBPis power lead you cant stuff anything up.






Here is a schematic of how its wired.






I installed 2 sockets in the existing cable well. 1 for the pump and 1 for the elements. It was easier than trying to cut into the Gutens stainless sidewall and they are up out of the way.






I installed the PT100 probe in a stainless T where the tap is fitted as I didnt want to drill a separate hole just yet. But it seems to work well here so I might leave it as is. I will probably get a plug in XLr connector so I can remove the probes lead. (But I already had this setup from my herms.) The Gutens probe is an NTC so wont work with CBPi and visa versa unfortunately.. I have a sight glass tube so might change this stainless T to a Cross so I can install the sight glass on top.






The probe sticks out enough to get an even temp reading.






Here is the CBPi box. Ive since moved the heat sink inside the box and installed a fan on the outside which works well. SSR doesnt get above 38C. Both elements are wired together as I can use pulse width modulation within CBPi to run them at a certain percentage of full power.
Ive got a Raspberry Pi 4B with a protyping hat board installed on top and used a darlington array to give the SSR 5 volts instead of the 3v3 that normally comes from the GPIOs. Although I brought an Inkbird SSR (Instead of Chinese ebay crap) Ive read too many storys of many SSRs not working well with 3v3 so went with the Darlington array setup. (Pic shows the ULN2003 darlington IC installed on the hat board.)






Here is the control box- Power in on the left, element and pump feeding down to the IEC sockets installed under the Guten on the right. Im using a MAX31865 amplifier board to power the Pt100 probe and have a 1wire probe installed under the first heatsink fin to monitor SSR temperature. 






Very happy with how it turned out although not happy with the wiring inside the control box. I changed things around and added the Darlngton array setup, and the MAx31865 board later on so room is tight and wires are a mess. I should have used a bigger project box. It ran through the autotune no problems and i have set the mash to run at 85% of full power on the elements and the boil drops to 85% once boil has been reached so i get a nice even rolling boil.

Here is CBpi GUI showing system temp of the raspberry Pis CPU and SSR temp.


----------



## #bewlife

How did you drop the power of the individual elements? 

also wondering if anyone has set this up to automate valves?


----------



## Justin McCabe

Hello fellow craftbeerpi users,

I use craft beer pi and love the automation and control it provides. One thing I'd like to do is the ability to control water flow for chilling. I have a plate chiller and a solenoid connected to a TPLink smart plug. I have set the smart plug up using the TPLink plugin and I can turn on and off the water using an actor in craftbeerpi, which is very useful as I don't have a tap close by for my water mains. 
What I would like to do is have the ability to turn on the water for chilling and when my kettle temp drops to say 75C turn of the water, to perform a hop stand.

Anyone know if something like this is possible with craftbeerpi ? Turn off an actor when temp drops to a specific temp ? 

Thanks.


----------



## cat007

Hi all,
I'm trying to get CraftBeerPi to install and run - but upon running the install, I get the below.
After I say yes to "would you like to install wiringPI I get an error:
"fatal: unable to connect to git.drogon.net"

I'm guessing this is why I am unable to start the service?

When I run:
systemctl status craftbeerpiboot.service

I get:

failed to execute command Exec format error
Failed at step EXEC spawning /etc/initi.d/craftbeerpiboot: Exec format error
Control process exited, code=exited, status=203/EXEC

Any ideas?


----------



## cat007

Ok so I manually installed Python - and all is well. It installed and I can browse the web page and set up some of the config.

I can't seem to add 1-wire temperature sensors. From the drop down all I get is "Please select" but there are no other options.


----------



## Engibeer

You need to make sure you have 1 wire interfaces enabled. 

Easy way:
https://www.raspberrypi-spy.co.uk/2018/02/enable-1-wire-interface-raspberry-pi/


Hard (backend way)
https://pinout.xyz/pinout/1_wire


----------



## Engibeer

And I'm assuming you have a 1-wire sensor correctly wired in?


----------



## cat007

Hey,
Yeah I've got the 1wire interface enabled. Interestingly I was able to add 2 temperature sensors without anything plugged in. I was wondering why I could only add 2 so I changed the type of sensor in the config to 1wire_v2 - which gave me an average and a maximum setting that I wasn't sure about. 
I then changed back to 1wire as the sensor type and can't choose anything from the drop down now.
I have also tried wiring in a 1wire sensor with no change.

I have restarted the service and when trying to start it up, now I'm getting:


$ sudo service craftbeerpiboot status
● craftbeerpiboot.service - LSB: Put a short description of the service here
Loaded: loaded (/etc/init.d/craftbeerpiboot; generated)
Active: failed (Result: exit-code) since Mon 2020-03-09 04:13:27 GMT; 10min ago
Docs: man:systemd-sysv-generator(8)

Mar 09 04:13:27 beerpi systemd[1]: Starting craftbeerpiboot.service...
Mar 09 04:13:27 beerpi systemd[664]: craftbeerpiboot.service: Failed to execute command: Exec format error
Mar 09 04:13:27 beerpi systemd[664]: craftbeerpiboot.service: Failed at step EXEC spawning /etc/init.d/craftbeer
Mar 09 04:13:27 beerpi systemd[1]: craftbeerpiboot.service: Control process exited, code=exited, status=203/EXEC
Mar 09 04:13:27 beerpi systemd[1]: craftbeerpiboot.service: Failed with result 'exit-code'.
Mar 09 04:13:27 beerpi systemd[1]: Failed to start craftbeerpiboot.service.
lines 1-11/11 (END)...skipping...
● craftbeerpiboot.service - LSB: Put a short description of the service here
Loaded: loaded (/etc/init.d/craftbeerpiboot; generated)
Active: failed (Result: exit-code) since Mon 2020-03-09 04:13:27 GMT; 10min ago
Docs: man:systemd-sysv-generator(8)

Mar 09 04:13:27 beerpi systemd[1]: Starting craftbeerpiboot.service...
Mar 09 04:13:27 beerpi systemd[664]: craftbeerpiboot.service: Failed to execute command: Exec format error
Mar 09 04:13:27 beerpi systemd[664]: craftbeerpiboot.service: Failed at step EXEC spawning /etc/init.d/craftbeerpiboot: Exec format erro
Mar 09 04:13:27 beerpi systemd[1]: craftbeerpiboot.service: Control process exited, code=exited, status=203/EXEC
Mar 09 04:13:27 beerpi systemd[1]: craftbeerpiboot.service: Failed with result 'exit-code'.
Mar 09 04:13:27 beerpi systemd[1]: Failed to start craftbeerpiboot.service.


----------



## cat007

Hmmmm not sure what's going on. Restarted the whole pi and it came up fine.
But when I try and add a temp sensor, there's nothing in the drop down boxes except for "Please select"


----------



## cat007

Alright so I've found the version 3 of CraftBeerPi and have installed that.
Seems to be more robust in regards to restarting of the service and even the whole pi itself.
However I am still not getting anything in the temperature drop down list. 
I have tried a few sensors.


----------



## cat007

Another update (is there a limit? haha)

Plugged in my original BrewTroller 3 sensor harness which had wired in in resistors and it works!

Is there a way to average out 2 of the sensors?
I used to have one on the IN of the HERMS coil and one on the OUT and would average the 2....


----------



## Aydos

Hey all,

Is there any way to run a UPS for the raspberry pi whilst running the Craftbeerpi V3.0 board and 12V input power?

Could I get a 5V UPS that plugs into a usb port on the rpi board or into the usb-c jack without it interfering with the power supply from the CBPi board?

I looked into a 12v battery pack but i couldn't seem to find one that will supply the necessary 5A.

Cheers


----------



## cat007

Aydos said:


> Hey all,
> 
> Is there any way to run a UPS for the raspberry pi whilst running the Craftbeerpi V3.0 board and 12V input power?
> 
> Could I get a 5V UPS that plugs into a usb port on the rpi board or into the usb-c jack without it interfering with the power supply from the CBPi board?
> 
> I looked into a 12v battery pack but i couldn't seem to find one that will supply the necessary 5A.
> 
> Cheers



How are you powering the pi currently?


----------



## cat007

Next question - volume measuring.
I was previously using the bubbler method for volume measurement in the HLT and BK and it worked very well. 
I would like to employ the same setup but I don't know how to do it and I can't find a suitable plugin. 
Does anyone have any ideas on how to get this to work?


----------



## Aydos

cat007 said:


> How are you powering the pi currently?


Through the CBPi board, 12v supply


----------



## Blackman

Aydos said:


> Through the CBPi board, 12v supply


Look on ebay. You will find a 12v to 5v converter on there. I was looking at them a while ago for the same purpose but was going to use an NBN UPS as the supply.


----------



## ajburnet

Hey folks - just planning my electric RIMs setup (well the controller with CraftBeerPi as the brewery is built!). 

Using the expansion board (v3), looks like I'll need one additional relay than the board caters for to cover off my solenoid valves - can I add additional relays using the GPIO pins? Also, I want to add three flow meters to measure volume - can I add more than one?

Thanks folks!

Alex.


----------



## Trippinonprozac

Anyone care to build one for me lol


----------



## tom86

Anyone upgraded from V2 to V3 and reccomend the upgrade?

Ive been running V2 for about 4 years and its just locked up on me last time I used it (wont let me start or stop steps or change target temp). So thinking about donig the upgrade.


----------



## tom86

So I did the upgrade (Think V2 froze on me as the SD card was full...)

However now with V3 running I have an issue hopefully someone can help. 

It's running fine but will periodically crash causing whatever output was on at the time to remain on. I restart it by inputing the run.py code into the terminal which gets it back working again but will crash again 10-30mins later?

I havent found a solution online yet although I have read some suggestion that a solid power supply fixes a lot of issues so might try that.


----------



## FatDrew

tom86 said:


> I havent found a solution online yet although I have read some suggestion that a solid power supply fixes a lot of issues so might try that.


Hey Tom
If you're not a member already, get on to the craftbeerpi group on facebook, you'll probably get more help there given the user base is so much bigger. 

If you continue to have issues with CBPi you might like to look at Node Red. There are a number of ex CBPi users going towards this as apparently it's less prone to crashing and bugs, plus it's real easy to work with and properly open source. Have a look here


----------



## tom86

FatDrew said:


> Hey Tom
> If you're not a member already, get on to the craftbeerpi group on facebook, you'll probably get more help there given the user base is so much bigger.
> 
> If you continue to have issues with CBPi you might like to look at Node Red. There are a number of ex CBPi users going towards this as apparently it's less prone to crashing and bugs, plus it's real easy to work with and properly open source. Have a look here



Awesome! Thanks mate ill check it out.


----------



## JnR_Mc

does anyone happen to have an Expansion Board spare at all?


----------



## FatDrew

JnR_Mc said:


> does anyone happen to have an Expansion Board spare at all?


Gday
I looked around for one of these last year but had no luck. Built one myself instead (albeit much more basic), not too difficult if you have a bit of time which I did during last year's lockdown


----------



## Bobby

FatDrew said:


> Gday
> I looked around for one of these last year but had no luck. Built one myself instead (albeit much more basic), not too difficult if you have a bit of time which I did during last year's lockdown


I have one sitting around if you are interested, I bought two a year or so ago.


----------



## JnR_Mc

Bobby said:


> I have one sitting around if you are interested, I bought two a year or so ago.


I'll send you a PM Bobby


----------



## mischa6262

Has anyone ever built the *raspberry pints* system? i got most of the gear but never had the time to build it now ive forgotten how to assemble and set it up lol


----------



## Moad

I have built a few kegbot systems which are great but the raspberry pi display and interface looks better than kegbot. The live pour (if using a tablet) is cool on kegbot, unsure if raspberry pints does this. I am tossing up between raspberry pints and brewpi as my next project. Once my brewzilla is out of warranty I would like to use brewpi in parallel with the inbuilt controller


----------



## JnR_Mc

Well on my way to the new controller, using the Avollkofp Fork

I have the Pi up and running with the setting that I wanted. Carried out some simple testing using a GPOI break-out board to ensure that all actors were doing what they should be. Other parts on order. Once I finish this work swing, I'll be into the building phase.


----------



## ajleech

Though I would share my new brew controller build for a biab setup. Case was 3d printed out of asa And running craftbrewpi 4.


----------

