www.wholelattelove.com: our caffeinated commitment to you

DIY PID-Controller with microcontroller - Page 2

Need help with equipment usage or want to share your latest discovery?

Link to "DIY PID-Controller with microcontroller"by emc on Fri Jun 12, 2009 9:39 am

A flowmeter has been added. The PCU644-18 module can now measure temperature, pressure, flow rate and volume - and control the pump. This is a picture of the flowmeter:
Image
Example measurement (Gaggia Coffee with phase angle control):
Image
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by erics on Fri Jun 12, 2009 2:32 pm

Greetings Dietmar -

Could you provide some details on the flowmeter you installed? P/N, manufacturer, power requirements, output signal ?
User avatar
erics
 
Posts: 1403
Joined: Aug 09, 2005
Location: Silver Spring, MD
www.caffefresco.us: passion · purity · people
www.caffefresco.us: passion · purity · people

Link to "DIY PID-Controller with microcontroller"by emc on Fri Jun 12, 2009 3:14 pm

It's a Digmesa flowmeter from the FHKSC series - this series is used in many automated espresso machines (Jura, Saeco, etc). They are available cheaply as replacement parts and cost 8 - 10EUR. Square wave output, CMOS-compatible. Can be connected directly to a microcontroller. Please see datasheet for power requirements. Some mA.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by dsc on Mon Jun 15, 2009 11:00 am

Hi Dietmar,

I'm guessing you used the MAX6675 chips for type-K inputs? have you measured how accurate the measurements are?

I was thinking of putting together a datalogger, but I'm not sure what level of precision is possible.

Regards,
dsc.
User avatar
dsc
 
Posts: 734
Joined: Dec 12, 2006
Location: UK / Poland

Link to "DIY PID-Controller with microcontroller"by emc on Mon Jun 15, 2009 11:40 am

I'm guessing you used the MAX6675 chips for type-K inputs?

Good guess. MAX6674 or MAX6675 can be installed, they have the same pinout. In case you are looking for an IC for type T thermocouples, consider AD594/AD595.

I haven't measured TC accuracy yet. Currently, a TSic sensor is connected for the PID. It gives 0.1 degree absolute factory-calibrated accuracy (not to be confused with resolution - resolution is cheap). That's about as good as is possible in my price range.

TCs are not so good. According to datasheets, thermocouple wire of class b could have 2.5 degree error and the ICs could add 2.0 degree error, so error could approach 4.5°C in the worst case. In reality, at room temperature, the difference between TC and TSic seems to be <=1°C.

I plan to calibrate the TCs with the TSic (at least around 80°C) before I use them for measurements. TCs' advantage is that they have extremely quick response because they are just thin strands of metal. They'll make great sensors to measure what is coming out of the boiler. Digital sensors - packaged in plastic - are too slow for that.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by dsc on Mon Jun 15, 2009 3:15 pm

Hi,

I've just looked up the AD595 and they are 15GBP each:O freakin' expensive. Do you perhaps know if it's possible to order samples from Analog Devices?

Yup it's either response time or accuracy, you usually can't get both, or it gets very expensive:)

Thanks for the info!

Regards,
dsc.
User avatar
dsc
 
Posts: 734
Joined: Dec 12, 2006
Location: UK / Poland

Link to "DIY PID-Controller with microcontroller"by emc on Mon Jun 15, 2009 3:43 pm

A quick search with google says yes. I know for sure that the Maxim parts are available as samples (Maxim are the greatest in that regard but the downside is that many parts from Maxim are hard to find if you WANT to pay).
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by emc on Wed Jun 17, 2009 6:04 am

@dsc: Made some measurements. Output from the Maxim ICs requires gain and offset correction. Between 40°C and 100°C, 4°C offset correction and 5% gain correction was necessary with my TC probes. They can not be used without calibration if you care about absolute accuracy.

The good: the exposed-junction thermocouple reacts significantly faster than the digital sensor. After a step change of setpoint, the TC sees reaching of the setpoint 8 seconds before the TSic. In other words, temperature overhsoots with the TSic - but you never know by looking at its output.

For 180 seconds after a step change, the digitial sensor is off. Initially off by 7.5°C, still off by 2.5°C after 60 seconds, correct to one degree after ~3 minutes.

I suppose these observations apply to most plasic-encased digital sensors since the TSic306 is reasonably small and shouldn't have an above-average thermal time constant.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by dsc on Wed Jun 17, 2009 9:44 am

Hi emc,

well as long as it's possible to make them accurate (and you have something to calibrate them against) it's not too bad.

I tried to order a pair of samples from AD but you have to contact a local office in order to get them. Haven't done it yet, but I'm guessing they will simply say 'go buy it'.

Regards,
dsc.
User avatar
dsc
 
Posts: 734
Joined: Dec 12, 2006
Location: UK / Poland

Link to "DIY PID-Controller with microcontroller"by emc on Sat Jun 20, 2009 1:33 pm

Designed a small heatsink for relays. Can take three SHARP relays in SIP package per side (S202S02 etc) or two PUK relays per side. Mixing is possible, too:
Image
Made from aluminium. Slotted holes for mounting - should be reasonably flexible. No need for holes in case of Gaggia machines. Can be bend over the edge of a table. More information and drawings/template for DIY will soon appear on my web site.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by emc on Wed Aug 12, 2009 12:36 pm

I've designed a custom display module. It's based on the DOG-M display series from EA:

Image

Image

Features:
  • LCD display available in many variants. Blue, amber, white, positive, negative, ...
  • 3 lines of text
  • Compact display
  • The PCB itself is about as large as the previously used display and has mounting holes in the same positions
  • 6 buttons
  • bi-color status LED below display
  • backlight is turned on/off by software; display remains readable without backlight
  • software-controlled contrast (temperature-compensated)

This module can be mounted on the process control unit as shown above or separately, either behind a cut-out or outside in a very small case (to avoid cutting a hole). I've designed an aluminum bezel if the module is mounted behind a cut-out:

Image

Depending on your demands for a good looking solution, this could be polished or chrome-plated. Aluminum can be polished to a mirror-like finish.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by mhoy on Sat Aug 15, 2009 12:13 pm

Dietmar: Great looking stuff, will it be affordable? When might the main board become available?

Mark
User avatar
mhoy
 
Posts: 954
Joined: Jan 09, 2008
Location: Sunnyvale, CA

Link to "DIY PID-Controller with microcontroller"by emc on Sat Aug 15, 2009 2:28 pm

I don't know when it will be released. There still is a significant amount of work to be done on software, firmware and documentation of the kit.

will it be affordable?

Considering the unique features, it will be a good deal (compared to, for example, the price of commercial multi-channel-PIDs) - but it won't be cheap.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by emc on Mon Sep 14, 2009 12:36 pm

The final CNC parts have arrived. The display bezel is made from rolled aluminium (upper left) and can, if the machine is chromed, be polished to a nice chrome look. It will then fit nicely with upper-class espresso machines:
Image
(enlarged: http://emc.awardspace.com/news.html)

The final heatsink/mounting plates for up to three SIP solid state relays are of the same material (bottom right).

The LCD bezel greatly simplifies installation because only one rectangular hole has to be cut/dremeled instead of cutting/drilling several smaller holes for display, buttons and LED. One could refrain entirely from a hole to accommodate the display module in a small, separate housing - but I've not yet found a nice case.

The final module will not be connected (as shown above) by a flat ribbon cable but with highly flexible silicone wires which can be combined in a visually appealing fabric tube.

Other news:
  • DIY builders of the module can find Service Pack 1 on my web site. It contains updated source code examples and the latest PC software (USB Status Monitor).
  • Now that almost everything is ready, it will not be long until there is a complete kit with an assembled module, display, bezel, heat sink, relays, flowmeter, sensors and so on. Initially, I will only have an EU version.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by emc on Fri Sep 18, 2009 10:34 am

New name for the project: faustino.
Image
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by emc on Wed Sep 23, 2009 1:12 pm

- There is a new faustino manual under downloads (http://emc.awardspace.com/faustino/download.html)
- There is a first "real" PID software with some brief English installation instructions at http://pidmod.blogspot.com/2009/09/gagg ... -1_29.html. This is not yet the planned, extensive espresso firmware but since the programmer will need a bit more time with that one, it's a nice gap filler. It provides everything needed to start installing faustino and take it into use as PID controller: menus, logging to computer, PID functionality, pressure and flow measurements.
Image
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by dsc on Wed Sep 23, 2009 6:36 pm

Hi Dietmar,

seriously very nice stuff, I admire the care for details.

Regards,
dsc.
User avatar
dsc
 
Posts: 734
Joined: Dec 12, 2006
Location: UK / Poland

Link to "DIY PID-Controller with microcontroller"by emc on Mon Sep 28, 2009 9:24 am

DONE!

After quite a bit of work, faustino is ready for use: a microcontroller module, three solid state relays, flow meter, calibrated precision sensor and CNC parts for installation, heat-resistant leads etc. - ready for espresso use and PID control.
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by emc on Sat Nov 28, 2009 6:09 pm

There is an update for the monitoring application: it now visualizes the internal PID parameter dPV/dt as arrow. For demonstration, a setpoint step change:

Image
(save and play with quicktime)

The arrow indicates the internal dPV/dt term of the PID that looks to the future. Ideally, the arrow would be a continuation of the curve as is obvious to a human. That's not so easy for a PID because it works in small intervals. In each of them, the temperature change rate is close to - or below - sensor resolution. Add noise, phase shift by filters etc. and it can add up to significant inaccuracy in the differential term.

With the trend arrow, one can now see easily how large the difference between the human-recognizable trend and the PID's internal calculations is and if there is a problem with resolution, noise, settings for filtering, cycle time, differential quotient etc. If the arrow reasonably matches the apparent trend, parameters are acceptable. If not, one has not found good setting.

Below is a link to another video I made while checking the arrow function (zoom level change in second 104 shows more details):

http://emc.awardspace.com/videos/forum_brewdrop.mov

It's a 25s shot. A free-floating thermocouple is installed 2mm under the brew head of a Gaggia Coffee (no portafilter) to measure the temperature of the escaping water over 25s. As you see, with an electronically adjusted flow rate of 160ml/min, the temperature of the brewing water drops by about ~2.5 degrees. That's a bit much but on the other hand, 160ml/min is more than a typical espresso shot. Anyway, I'm posting the video because it looks as if there is enough potential left in the heating elements to compensate for the temperature drop by feed-forward control.

(the jaggedness of the water sensor curve is due to the wacky measuring method: free-floating thermocouple reacts violently to air bubbles in the flow, every breath of air and drops of water and steam from the brew group).
emc
 
Posts: 36
Joined: Nov 24, 2007
Location: Europe

Link to "DIY PID-Controller with microcontroller"by fergusstew on Sun Dec 13, 2009 10:27 am

emc wrote:It's a Digmesa flowmeter from the FHKSC series - this series is used in many automated espresso machines (Jura, Saeco, etc). They are available cheaply as replacement parts and cost 8 - 10EUR. Square wave output, CMOS-compatible. Can be connected directly to a microcontroller. Please see datasheet for power requirements. Some mA.


Hi,

I'm having trouble finding these flowmeters at a sensible price. I want two Digmesa flowmeters model 932-8505 or 932-9505, these are from the FHKSC series, with 1.0mm bore. The 932-9505 superseded the 932-8505 a couple of months ago.

Any recommendations on where I could get these, in the US or the UK, without paying a huge minimum order cost?

Thanks,

Fergus.
fergusstew
 
Posts: 13
Joined: Aug 02, 2008
Location: Seattle, WA

PreviousNext

Return to Espresso Machines