GS/3 Mod EP "Chimera" - a fully configurable profiling mod for La Marzocco GS/3 AV - Page 5

Equipment doesn't work? Troubleshooting? If you're handy, members can help.
Tobias007
Posts: 38
Joined: 6 years ago

#41: Post by Tobias007 »

Hi,

Assaf made really a great job here! Thanks to him I managed to mod my GS3 and it is running pretty fine!

One useful addition to Assaf's solution might be to Wifi-Enable Chimera that you can update the firmware of the Arduino remotely:

I used the following components for this:

- Adafruit Huzzah ESP8266 breakout board (this has the advantage that it works with 5V out of the box)

Advantage if Wifi Module is attached:
- Full remote programming of Mega possible incl. Reset
- Serial monitor via Webinterface

Most tricky thing is to get the right firmware for the ESP. Most solutions need to compile a new firmware which is a nightmare. Finally a simple way is via the precompiled ESP-LINK firmware:

Get it flashed with the ESP-LINK firmware (v3.2.47):
https://github.com/jeelabs/esp-link/tree/master

Push a new bootloader to the arduino:
https://github.com/nickgammon/arduino_sketches

For serial interface: set the communication to 115200 baud (other baud rates make trouble)

If ESP8266 is wired correctly to the Mega you can now program it via Wifi with the following command line:
./megaflash.sh IP_OF_ESP Hex_File
megaflash program is included in the ESP-LINK package...

(most useful infos I got from the following page: https://github.com/jeelabs/esp-link/issues/87)

Cheers, Tobias

Advertisement
User avatar
AssafL (original poster)
Posts: 2588
Joined: 14 years ago

#42: Post by AssafL (original poster) »

Tobias' work is impressive. Especially given the sloppiness of the descriptions (it was never intended to be instructions). Hats off to him. Anyway, now that there is a following, Chimera has some expectations to live up to.

Anyway - the ESP8266 is indeed an excellent addition as it enables one to program the Chimera remotely. Furthermore, ESP-LINK provides for a transparent telnet (port 23) connection to the Arduino. So it is possible to do telemetry and high resolution graphing of the shots, or do more involved analytics - such as tuning the PID loops. See more below...

I also added a DIGMESA nano brass 9N*-01 series flowmeter. For every pulse of the Gicar flowmeter, the DIGMESA gives us 20. That makes better resolution obvious. But it also seems to be substantially more accurate (albeit the datasheets do not reflect this - both claiming 2%).



A Hearty BIG Thank You to H-B'er piezo who sent me the DIGMESA.

Significant changes to the software included over the last couple of version (all on GitHub) include:

v0.27
Added Nicolas' support for HM10 BT breakout board and Acaia Lunar scale
Added weight, dose and EBF support

v0.30
Removed Motor Current
Condensed Dashboard view
Enlarged graph view

v0.33
Added support for Otto Controls HTWF Hall Effect control paddle with center indent aligned to FLB threshold
(PI until center indent, main pull beyond it)

v0.34
Added color variable support
Corrected some Acaia Lunar support enable/disable issues
Added support for ITEAD and other non Adafruit displays (larger, but the displays aren't of similar quality)
Corrected Flush behavior

v0.35
Corrected some bad pumpPWM casting

v0.36
Added Combo mode 7: Slayer like PI and subsequent Pressure Profile... SLAYER_LIKE_PI_PRESSURE_PROFILE

v0.37
configuration file

v0.38
Refactored shutdown sequences
Refactored flush sequences
Added optional MQTT support
Removed non-Serial support (should be replaced with defaults)
Moved parameter manipulation to Serial port & ESP8266 Telnet port
Removed parameter manipulation from UI
Removed debug code

v0.39
Added SINGLE_PUMP mode (per TH)
Moved color definitions to color_definitions.h (per TH)

Most recent version v0.40 Added support for telemtry.

So, in an effort to claim title to the prestigious "geekiest thread on H-B" awards I share the following plots of pressure profiling working. The usual warning applies - don't look under the PID hood if you don't want to see just how bad your PID tuning is. Sure it worked (I called it "nicely") - but it is far from being a well stabilized loop.

Pink is the output to the motor. You can see it oscillates. The proportional is grey. The error swings the other way (Ki too high) and stays there as the Ki slowly dissipates. The derivative (blue) tames the effect reasonably well when the headspace fills with water and the pressure "jumps".

Can you tell what is wrong with the following loop?


As a hint, look at case 2 (I scaled back Y - as PWM to the pump is not governed by the loop during PI - it is FL PI ala Slayer during PI):


Yup - case 1 was a blind basket - whereas case 2 was a nice, CBR of 2.5, Ethiopean roasted about 5 days ago. About a 65 second pull, of which 15 seconds were PI until the machine decided PI was over, opened FLB and let the PID run the pump. Sp for pressure was 9 bar.

Now for the mundane task of taming the PID. I have no idea how to do that... yet.
Scraping away (slowly) at the tyranny of biases and dogma.

mschol17
Posts: 41
Joined: 10 years ago

#43: Post by mschol17 »

Look at the Ziegler-Nichols method here- http://pages.mtu.edu/~tbco/cm416/tuning_methods.pdf

This worked well in my previous life to settle on a PID value for stabilizing a high finesse laser cavity.
Michael Scholten
Grand Rapids, MI

User avatar
AssafL (original poster)
Posts: 2588
Joined: 14 years ago

#44: Post by AssafL (original poster) replying to mschol17 »

Thank you - Ziegler Nichols seems promising...

As for the step method - does it need to be a step or can I just increase motor speed?
Scraping away (slowly) at the tyranny of biases and dogma.

mschol17
Posts: 41
Joined: 10 years ago

#45: Post by mschol17 »

I always found the closed loop method more effective. Start there and you can tweak parameters to see if you can improve the behavior.
To answer your question:
The fourier transform of a step is a broad range of frequencies, so this method is intended to measure the frequency response (Bode diagram) of the system. So, whatever you do needs to be fast relative to the response frequencies of the system.
Michael Scholten
Grand Rapids, MI

User avatar
Jake_G
Team HB
Posts: 4333
Joined: 6 years ago

#46: Post by Jake_G »

You need to command a step change in your setpoint. Best method is to use your Scace-like device with pwm fixed and then enter a target pressure or flow with only a proportionate constant and let the.controller take over. Then adjust that constant until the output of the PID oscillates. The constant that achieves this oscillation is ku, and the period of the oscillation is pu.

I suspect you will find different constants for pressure control and flow control...

Cheers!

- Jake
LMWDP #704

meander
Posts: 3
Joined: 8 years ago

#47: Post by meander »

Hi AssafL, I have upgraded my DC mini with a needle valve preinfusion/flow control like this Flow-profiling mod on KvdW Speedster
My problem is that when after preinfusion i switch (by solenoid valve) from the needle valve plumbing circuit to the regular than the 9bars of pressure (fluid o tech solenoid valve) hits the puck very quick. Although the limited flow through the needle valve provides gentle preinfusion, the 9bars of pressure builds up instatly in the "regular plumbing" circle, therefore if i switch the solenoid valve when there is a pressure of app. 3bars on the puck this higher pressure hits (and i assume damages) the puck.
I am aware that your upgrade is 10times more sophisticated, but I am wondering if any of it could help me build up brewing pressure gradual. Do i understand correctly that your flow limit bypass valve is a regular solenoid valve that is electronically controlled to open slower? Or do you / or anybody else have an idea how to solve the above issue? Thanks.

Advertisement
User avatar
AssafL (original poster)
Posts: 2588
Joined: 14 years ago

#48: Post by AssafL (original poster) »

Water is incompressible so pressure ramps up quickly.
Hence the answer is that you have to wait for the pressure to ramp up. At 3 bars there should be no (or little) disintegration of the puck. If you can close the needle valve a bit and up the pump - you can get to 4 or 5 bar (4 is my "step" pressure).

Hope this helps.
Scraping away (slowly) at the tyranny of biases and dogma.

meander
Posts: 3
Joined: 8 years ago

#49: Post by meander »

I see i didn't put it clear. In my machine i can switch between water coming through the needle valve or the regular way without any restriction. When i do pre-infusion trough the needle valve the pressure slowly builds up on the puck. On the other hand before the solenoid valve the 9bar builds up instantly. As soon as i have some pressure on the puck means that the gap between the puck and the shower screen is filled with water so if i switch to the regular way (without any restriction) and I have the "main" brewing process the pressure jumps to 9 bars instantly. As you said water is incompressible.
Now i can use my machine either without pre-infusion so there is some decent pressure ramp up, or opening the needle valve to a point where i can reach 9bars under pre-infusion so when i switch to a higher flow rate ("main" brewing) there is no change in pressure that would damage the puck.

My question is if you have any solution on mind that would give a gradient when i switch from pre-infusion to "main" brewing. E.g. the solenoid valve would open gradient or something.

User avatar
AssafL (original poster)
Posts: 2588
Joined: 14 years ago

#50: Post by AssafL (original poster) »

It is a matter of compliance - can the system - during PI - reach 9 bar. If it can - you can wait for it to reach 9 bar. If it can't, you will have a jump (not too bad since the coffee is already fully bloomed).

For me the pump speed is adjustable. So I can get pretty high even with the needle valve closed. I don't (since the pressure ramps up anyway... even if a wee bit quicker). I typically wait for the first drops to appear.

I had thought of linearizing the response (i.e. starting with needle valve & ramping up flow - then at some point bypassing the needle valve while simultaneously reducing the pump speed so either flow rate and/or pressure are maintained). I didn't since it is a bit meaningless if you do this at 4 bar...

Another option is a proportional valve like the Burkert valve - On Jake's Ramble thread Cafillo has one Array/espresso-machines/my-long-and-rambling-path-to-preinfusion-pressure-profiling-t49539-70.html#p564115. But note that most have too high a Cv.
Scraping away (slowly) at the tyranny of biases and dogma.