Equations and boiler pressure - Page 3

Want to talk espresso but not sure which forum? If so, this is the right one.
jpender
Posts: 3899
Joined: 12 years ago

#21: Post by jpender »

jedovaty wrote:Because I don't know how to get a probe into the machine in an easy way, and the pressure transducer is much easier to connect.. I just replace the p-stat with this. Of course, the drawback is math and all the past two pages of junk, but hey, I'm having fun and learning, so it's worth it?

If there's a place to screw in the pressure sensor you should be able to instead screw in a bolt with a temperature sensor. If you can't find one ready-made you could drill a hole in a bolt and seal the sensor leads with high temperature epoxy. That's what I did with my Robot: I drilled through a fitting that threaded into the pressure port in the piston. Then I used JB Weld to seal in the wires. Even at 10 bar the force on such a small orifice is pretty small. And the epoxy is rated to over 250°C.

But if fun is the goal...

jedovaty (original poster)
Posts: 537
Joined: 13 years ago

#22: Post by jedovaty (original poster) »

jpender wrote: If there's a place to screw in the pressure sensor you should be able to instead screw in a bolt with a temperature sensor.
The pressure sensor is at the end of a long copper tube system, so adding a thermocouple to that would require considerable snaking skill, not sure that is even possible. The junction begins at the boiler plate, goes along the face then curves down into a tee which splits into the OPV, manometer, then another tube that I made which branches to the vacuum breaker and the coil. The photo I linked to in my previous post should show that.

I suppose I could replace that whole plumbing system with a tee at the boiler. The probe would fed in lengthwise through the tee without a bend, and then either cut the OG tube carefully or redo the tubing to the OPV, manometer, and vacuum breaker. That's... a lot of work, finding the fittings, measurements, etc. I don't know if there's enough space for this. And then I'm not sure I have the tools or ability to do such precise bending, I was real lucky with the tube coiling seen in the picture of my other post.

Compare all that to screwing in a pressure sensor with some fly-by-night maths, and you see why I'm a little more interested in pressure. Hopefully I won't forget to carry the one :mrgreen:

Just realized, I could just completely forego the OG manometer, and use a basic tee to put in a thermocouple and a vacuum breaker, no additional plumbing needed.

I can provide photos if the above doesn't make sense.

gscace
Posts: 757
Joined: 19 years ago

#23: Post by gscace »

Hi there:

It's a whole lot cheaper and easier to use a thermocouple probe to measure the temperature inside your steam boiler than to use a pressure gauge. You were on the right track that you're looking for temperature corresponding to the steam pressure that you want. Most commercial espresso machines with large boilers run around 1.3 to 1.4 bars of differential pressure, usually measured with a mechanical bourdon tube gauge. There are plenty of online vapor pressure and temperature calculators around.

This one is perfect and easy to use: https://www.weather.gov/epz/wxcalc_vaporpressure

Enter a temperature in the top left box because you want saturated vapor pressure. Your steam boiler has no air inside, only water vapor, so saturated pressure will be total pressure inside your steam boiler. Then click on the convert button at the bottom left and you'll get saturated vapor pressure as absolute pressure in various pressure units. Subtract off ambient pressure and you'll get differential pressure, which is what most gauges on espresso machines give you. By way of example, entering 258 degrees F gives 2405.53 millibar. Subtracting off 1000 mb for ambient pressure gives you 1.4 bars pretty much on the nose, which would be a good starting point for steam pressure in my opinion.

As a practical matter, you want your system to be pretty reactive, so that it turns on quickly in response to withdrawing steam. Tune your integral a little shorter than optimum, so that it is reactive and overshoots a little more than critically damped. Generally coffee machines work pretty well on just PI control, with no derivative.

A good source for thermocouple probes is Omega Engineering. They make all kinds of probes. A cylindrical probe is fine and Omega has fittings with a ferrule that will slide around the probe sheath and position the probe where you want it. You might have to fabricate an adapter to BSPP for your steam boiler, but they might actually have that part. 4 liters is a nice sized steam boiler for a 1 group machine. I'd stick the probe into the water because response time is faster than in the water vapor. Both liquid and vapor will be at the same temperature.

Just so you feel comfortable with what I wrote, I spent 31 years working in humidity, temperature and pressure measurement at NIST. I designed and built all of their current humidity generators, and their gravimetric primary standard. The generators are combined two-pressure principle and divided flow, with unceretainty based on uncertainty in thermometry and pressure and mass ( additional for the primary standard).
★ Helpful

jedovaty (original poster)
Posts: 537
Joined: 13 years ago

#24: Post by jedovaty (original poster) »

gscace wrote:Just so you feel comfortable with what I wrote
Haha no worries, your reputation precedes you :)

Even with my limited experience, all the research I've done has led me to know and agree the thermocouple should be the way to go. Doing so in my case is problematic or goes down a direction I don't want to, and thus the pressure sensor route is actually much easier, with the only difficulty being the math. We got the math worked out, so now let's see what happens!

ETA for the first run is less than two weeks, assuming I ordered the proper fittings from mcmaster and can debug my sad code. I haven't written proper code in over 20 years, and even then it was only modest perl/python scripting. What would take a software engineer a couple minutes with chatgpt took me all of last weekend and then some and I'm still shaking my fist at flicker free text grrrr hahaha. Sad beeps.

The PID tip is noted. No clue how I'm going to tune it, but will start with the library's sample code and go from there.

This is fun :mrgreen:

User avatar
Jeff
Team HB
Posts: 6880
Joined: 19 years ago

#25: Post by Jeff »

jedovaty wrote:No clue how I'm going to tune[the PID]
Being able to capture the time series and graph it will be helpful.

Increasing the gain will typically increase the rise time (the fall time after overshoot is determined by how fast the boiler cools) and will eventually increase overshoot. Increasing the integral will generally reduce offset in the steady state. There is some interaction between them. If you can fit a reasonable model to the heater/boiler system, you can play with it to get a feeling for how they interact.

Modifying the code so that when the boiler is far from the set point to just run 100% may be very helpful in trimming down the warm-up time. Just remember that there is no "negative" control with a heat-only system. This makes a lot of the canned models less valuable than they might be.

Make sure that your controller code deals with integral windup.

Going with PI control may be sufficient.

If you wanted to add in something "fun", I've long thought that home-sized machines might benefit from a period of 100% heater on as soon as the temperature drop from steaming is detected.

gscace
Posts: 757
Joined: 19 years ago

#26: Post by gscace »

Can you mention what kind of machine, and show us a picture of the current pressurestat location on the boiler? Since liquid in the steam boiler is where you want the probe, I'm wondering if there isn't a fitting on top of the steam boiler than can accommodate, and if not, can something be moved to enable it. If I were doing this I'd be using a temperature probe.


-Greg

jedovaty (original poster)
Posts: 537
Joined: 13 years ago

#27: Post by jedovaty (original poster) »

Greg: it's a conti prestina.

I managed to get the code running last night, transducer arrived this afternoon and now it is installed. Low-temp test run to 25psi / 240F worked and has been stable now for an hour! PID might need tuning don't know yet, I, errrmm... forgot to include logging code :p. I'll also need to figure out the pwm cycle, it is included in the pid library I'm using and is working?. No clue what is appropriate for the boiler elements though.

John (jpender) thanks again for the formula and others for helping address the PSI range question :) I may do lookup tables as suggested later, but that means I need to learn how to that first (arrays?), so for now, ever-so-slightly off is fine and I would like to focus on reassembly and cleaning up the rats nest of wires.

2 most entertaining discoveries so far:
1. Can't determine temperature until after water boils and the vac breaker engages.. whoops DUH!
2. The absolute pressure of these units (whether 30psi or 50psi) is actually not the most ideal thing, I'm loosing some resolution. With the 30 psi unit, for example, it will register 2.5V output, so the usable range is reduced significantly. The 50psi comes in at about 1.7V, so it is better. The ebay-no-brand unit I bought a few years ago of questionable material would read 0.2V with no pressure, and gave me a full range to 30 psi (I suppose that would be ~45psi in absolute terms). Fortunately, it's not that big a deal and can manage temp by degree F within the arduino board's resolution according the math.

Pics and videos and graphs once I get wiring cleaned up and the project mounted, that'll be next weekend. Stay tuned if interested :mrgreen:

gscace
Posts: 757
Joined: 19 years ago

#28: Post by gscace »

Hey there:

I should mention that you won't know temperature until you are above atmospheric pressure boiling point AND all vapor in the steam boiler is water. You'll have to be above atmospheric pressure boiling point because otherwise you won't have a mechanism to drive out the non-water gasses. Then you'll have to drive out the non-water gasses to the level commensurate with your desire to be truly on the saturation vapor pressure. In practice we don't care within a coupla percent and it's easy to get the air out by opening a steam valve and bleeding to the room.

-Greg

jpender
Posts: 3899
Joined: 12 years ago

#29: Post by jpender »

How much of a time lag is there between the temperature of the water and the temperature calculated from the pressure? I ask because in the case of moka pots there was a study done and the investigators found that they could not use the steam tables to calculate the pressure contribution from the water vapor using the water temperature. Instead a better fit came from using the temperature of the vapor. Apparently liquid-vapor equilibrium isn't ever really achieved in that system. Maybe an espresso boiler is at quasi-equlilibrium very quickly but I wouldn't know how to tell other than by measuring.

If it were me I'd want to know the actual temperature while I was designing a system to measure the temperature using pressure, as a way to verify and calibrate. But of course if you could do that you wouldn't need to bother with the pressure.

User avatar
Jeff
Team HB
Posts: 6880
Joined: 19 years ago

#30: Post by Jeff »

Controlling the steam-boiler temperature to some specific pressure seems hardly that critical.