(brewblox) tuning ferment cool pid tips

#1

I’m moving over from brewpi to brewblox and I’m trying to get brewblox to get my beer temp to be close to my beer setting. Currently, the beer temp is +8F from my beer setting (I’ve seen it be as close as +2F).

I have a 7 cubic foot chest freezer and a 25W heater that are controlled by the Spark 3 with solid state relays.

When I was using the BrewPi software, it was very good at keeping the beer temp very close to my beer setting.

I’m using a Ferment Temp Profile to keep the beer at 35F.

What changes should I make to get my beer temp closer to my desired setting?

I was thinking of increasing the Kp from -5.5F to -8F and the Ti from 2h to 1h. Thoughts?

#2

It’s absolutely doable to keep within 2F of target temperature with BrewBlox, so there’s certainly room for improvement.

Could you please post a picture of your graph over a longer period? You can select periods in the actions button.

Also useful may be screenshots of your PID graphs (service page, select PID, PID actions, graph). You can also select time period there.

#3

No problem, here’s a 1 day graph for the chamber, and the cool and heat PID’s:

Thanks!

#4

Well, this may be part of the problem. Looks like it’s lost connectivity with the spark:

Here’s what the error log says:

{
“fetch”: [
{
“info”: “/spark-one/discover_objects”,
“body”: “500: CommandTimeout(DiscoverObjectsCommand)”,
“time”: “Sat Jul 13 2019 16:35:44 GMT-0700 (Pacific Daylight Time)”,
“status”: 500
}
],
“db”: []
}

As I’m writing this post, the Spark service is back, showing a boot time of 2 minutes.

-Grant

#5

Now I’m seeing this:

Here’s how things look from the command line:

grant@raspberrypi:~/brewblox$ brewblox-ctl status
The following shell commands will be used:

 echo "Your release track is \"$BREWBLOX_RELEASE\""; echo "Your config version is \"$BREWBLOX_CFG_VERSION\""; docker-compose ps

Press ENTER to continue, Ctrl+C to cancel

Running command:
echo “Your release track is “$BREWBLOX_RELEASE””; echo “Your config version is “$BREWBLOX_CFG_VERSION””; docker-compose ps

Your release track is “edge”
Your config version is “0.2.1”
Name Command State Ports

brewblox_datastore_1 tini – /docker-entrypoint … Up 4369/tcp, 5984/tcp, 9100/tcp
brewblox_eventbus_1 docker-entrypoint.sh rabbi … Up 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp
brewblox_history_1 python3 -m brewblox_history Up 5000/tcp
brewblox_influx_1 /entrypoint.sh influxd Up 8086/tcp
brewblox_mdns_1 python3 -m brewblox_mdns - … Up
brewblox_spark-one_1 python3 -m brewblox_devcon … Up 5000/tcp
brewblox_traefik_1 /traefik -c /dev/null --do … Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
brewblox_ui_1 nginx -g daemon off; Up 80/tcp

Here’s my brewblox.log:

brewblox.log (195.2 KB)

#6

Thanks for the comprehensive report!

It looks like your Spark is rebooting rather often. We had some issues with the Wifi stack a few weeks back. If you clear the Wifi credentials, and connect over USB, does the problem persist?

#7

How do I clear the wifi credentials? When I go to Service -> Action -> Wifi, there aren’t any settings to clear. When I run brewblox-ctl wifi, I get stuck at the SSID prompt:

grant@raspberrypi:~/brewblox $ brewblox-ctl wifi
Please press ENTER when your Spark is connected over USB
The following shell commands will be used:

 docker-compose down
 docker pull brewblox/firmware-flasher:rpi-edge
 docker run -it --rm --privileged brewblox/firmware-flasher:rpi-edge wifi

Press ENTER to continue, Ctrl+C to cancel

Running command:
docker-compose down

Stopping brewblox_history_1 … done
Stopping brewblox_spark-one_1 … done
Stopping brewblox_eventbus_1 … done
Stopping brewblox_influx_1 … done
Stopping brewblox_ui_1 … done
Stopping brewblox_mdns_1 … done
Stopping brewblox_datastore_1 … done
Stopping brewblox_traefik_1 … done
Removing brewblox_history_1 … done
Removing brewblox_spark-one_1 … done
Removing brewblox_eventbus_1 … done
Removing brewblox_influx_1 … done
Removing brewblox_ui_1 … done
Removing brewblox_mdns_1 … done
Removing brewblox_datastore_1 … done
Removing brewblox_traefik_1 … done
Removing network brewblox_default

Running command:
docker pull brewblox/firmware-flasher:rpi-edge

rpi-edge: Pulling from brewblox/firmware-flasher
Digest: sha256:af25abef814f1a512a41a7fbca4c03832bf7eed721a07c90b6785f613d3b5df6
Status: Image is up to date for brewblox/firmware-flasher:rpi-edge

Running command:
docker run -it --rm --privileged brewblox/firmware-flasher:rpi-edge wifi

Important: Select no when asked to scan for Wi-Fi networks
? Should I scan for nearby Wi-Fi networks? No
? SSID

Please enter a valid SSID

#8

I probably should’ve mentioned that. My apologies.

https://docs.particle.io/tutorials/device-os/led/photon/#wi-fi-network-reset describes how to clear wifi credentials. On a Spark 3, the setup button is on the side. You’ll need a pin of some kind to press it.

I believe the sticker on the Spark indicates where the button is, but I don’t have one on hand to verify.

#9

Thanks! The spark is now connected via USB.

Now back to adjusting the settings so that this can get my beer temp closer to my beer setting.

Any tips in this area would be appreciated.

Thanks for all of your help!

-Grant

#10

Well, darn. Things were going so well there for a few hours. The beer was actually being cooled down to 35F. Now the spark is rebooting every minute or so (I can hear the beep).

Attaching spark-one service view, json log and brewblox.log

brewblox-errors (3).json (266 Bytes)

brewblox.log (173.1 KB)

Any ideas on where to go from here would be appreciated.

Thanks

#11

The reset reason given by the spark is a watchdog reset: no control loop being run for 60s, which triggers a reset by design.

What is on the display and what is the color and pattern of the LED? Could something be pressing on the display holding it in the display calibration routine?
I don’t think this is WiFi related.

#12

I get a screen like this when it’s rebooting. The led is white and “breathing” (wifi off)

I don’t have anything pressing against the screen, it’s attached to my control panel with velcro on the back.

Thanks

#13

Ah, I think I know what this is.
The OneWire bus master IC can get stuck after a sudden reboot and needs a power cycle.

If you remove the USB cable and 12V adapter and plug them back in, I think your problems will be over.

I think I might be able to do the power cycle in software, so I’ll add that to the next release.

#14

My standard way of rebooting the spark has been to remove the USB and 12V cable to have it completely power off.

#15

In this case, the problem may have started when the Spark rebooted during an update.

Could you please manually reboot / power cycle?