Posted Fri May 3, 2013, 10:49am Subject: Re: Next Mod: PID my Gaggia Classic
By the way, in case it isn't obvious, the stock switch module has been completely removed, which means the awkward daisy-chain circuitry done by Gaggia. Without going digital, I can see that was probably the best way to wire the system up.
Now with digital control, I have a separate Steam button, which closes the 3-way and increases the target temp (not implemented yet), and a separate/independent Brew button, which opens the 3-way for water and turns on the pump. Without the bells and whistles on the screen and lighting up the LEDs, it's just one extra line of code. Very nice to 'work on' now. ;)
Stay tuned. I'll have the SD module installed today and more to post later.
Posted Mon May 6, 2013, 2:20pm Subject: Re: Next Mod: PID my Gaggia Classic
So we have a nice looking machine, but we need those espresso shots! I wanna see your new machine in action!
Looking very good so far though.
Still working out the complete redesign of my Visacrem VX Auto, and it's going to have to be controlled by something other than the original boards too so some kind of PID/Arduinio/other is going to be necessary. Trying to soak up all the examples I can get before the electronics design get's decided upon.
Posted Mon May 6, 2013, 3:13pm Subject: Re: Next Mod: PID my Gaggia Classic
Hey Dan, To my taste anyway, the shots lately have been much better with the PID algorithm running and the sensor inside the boiler (upper level).
Stable water temp is one thing. That is/and is not an easy thing to do. The trick is to do that during a pull. I have my target temp set at 200F, and sometimes I'll let it up to about 203F-205F before I pull the shot. I've implemented a "psudo-power meter" on my LCD to tell me where the PID is at during the shot, and it's about 3/4 power during the shot, but the water is pretty stable at 185F. I want to kick up the water temp at at least 195F, giving me only a small window. This would have to be implemented in the software. I'm still tuning the software and implementing a "prekick-off" routine for the heaters so I'll get better temp stability during the shot before I post any results.
However, like I said, the espresso is MUCH better the last couple weeks, since I put in the new sensor.
There has been a setback that I've been working through, the last couple days. I was ALMOST done getting all the hardware together and the last bit was putting in a 12V power supply for my PIDruino. Everything checked out when I hadn't realized the cables where still connected to by controller and the whole thing came crashing to the concrete floor, and dragged a couple feet.
The damage: - two lightly dented corners (not enough to worry about) - dead RTC (real-time clock), then my backup also got fried - heavily damaged Arduino Nano (not phyical, something inside), it started going crazy after that - also my pride, but we're over that now
I spent 6 hours swapping out the Arduino with a spare last night. I also used heat-shrink covered DB socket contacts now for quick connect/disconnect (in case something like this happens again).
I'm waiting for my new RTC to arrive. This is not crucial to making espresso. It's just the heart of the power-save feature, as well as time-based datalogging features.
There also seems to be a software conflict in the LCD-I2C and SD libraries that cause "Japenese" characters to show up on the screen. Everything is fine when I remove the SD libraries, so I'll be looking for an updated or alternative library the next couple days.
Posted Mon May 6, 2013, 11:58pm Subject: Re: Next Mod: PID my Gaggia Classic
Awww! Sorry about the damage to your 'new' Gaggia. All pretty and then you scar it up like that. It's the first scratches that hurt the most, so now that those are out of the way you can rest easy. You can now talk about the time you drop tested the machine just to make sure it was good enough.
(I made a scandanavian style camping knife for a canoe trip a few years back, and the first scratches on that burl handle and leather sheath were the most painful. They came right out, but it also took the pressure off keeping the knife pristine.)
Back to your issue, it sounds like automatically kicking the heater on high when the brew button gets hit might get closer to keeping up, but that depends on your boiler size. I don't know if you have a pre-infuse cycle on that machine code yet, but you could maybe start infusion and the heater at the same time then a few seconds later as the heater coil is getting hot you start the main cycle. Kick off the heater at the end of the cycle, or at least return it to normal operation. That gives you a very short time to get the heating started, but perhaps long enough.
Posted Tue May 7, 2013, 12:38am Subject: Re: Next Mod: PID my Gaggia Classic
Thanks Dan, but the issue wasn't quite that mad. The panel was separate from the Classic, so just the chunk of aluminum with all the electronic components kissed the ground, damn near intimate.
I guess lucky for me, I decided to machine as much as required only and kept the walls THICK. Only two out of eight corners were dinged. I lost the RTC and the 'already damaged' Arduino kicked the bucket. Good thing the more expensive components like the LCD, TC amplifiers, and the custom switch board (the board was cheap, the buttons were upwards of $5 each x5).
Yeah, I had thought about a pre-infusion sequence, but that would either be 1) in a menu under preferences, like my Bunn TB1 tea brewer (only 3 buttons to select from like 5 different tea recipes... with one temperature... pity). 2) I would set up the pre-infusion sequence as a "standard recipe", but set infusion-time to zero if it isn't desired. I've done it manually and the majority of feedback I got was "too chocolaty/mocha". My thought was to set up the controller with the second option, since it would be more versatile.
The Classic boiler is around 3 oz (hearsay, I haven't measured it), but when I've designed my new boiler, it'll be somewhere around 1/4 gallon or so. I haven't put it on paper yet, just a mental design so far. As you know, I already have the heater(s) in-hand, so there's incentive/motivation to get that done.
Right now, I'm programming the buttons for practical use (standard as well as temporary features). Once the system is running smoothly, I'll implement a menu system so I can do things like enter new TC calibration values, set brew recipe, target temp, etc. All that data would be saved into the EEPROM so that they'll be stored in case the power goes out, or the machine has to travel (it's put on quite a few miles the past few days).
Some notes on software implementation: Maybe no one has noticed, but the chassis does get quite hot. I never really noticed, but even the PIDruino housing gets rather hot. That may have added to the demise of the original Arduino, but I'm keeping my eye on this one. I am adamant about having a digital power button and LED because this system will have 3 power modes: - On (fully capable of 1500W of heater power, yet set to a target of 205F, for now) - Off (not really off, just disconnect all high voltage components. The Arduino must always have power. How else would it be able to turn the system back on?) - Standby (sets the target temp to about 150F or so, just like my Bunn, to 1) save power, keep the heat down. We always want the power/heat on to limit the constant cooling/heating of the water to reduce calcium formation.
The LED would be solid on, solid off, and blink based on the power mode. This will be an implementation for the next few days. This is tougher than it sounds, because HUGE chunks of data must be moved around for this to work. I hate moving large chunks of data/code <shivers>.
The second button is designated as the MENU button, which the LED wire was sacrificed for the 3-way output, something I didn't account for at the beginning. For now, until I fine-tune the PID parameters, this will act as an on-demand auto-surf button. I'll probably work on that tomorrow. I think the description is obvious and no need for explanation.
The middle button is designated for steam production. Right now, I don't have steam capabilities, since I sacrificed the steam valve for in internal TC probe some months ago. If you've been following my Custom Thermocouple thread, the new Version 3 is a 2-part assembly, where the mount now has a 1/8 NPT port for steam. The top is threaded to 1/2-13 to accept a replaceable/interchangeable thermocouple rod. So, until I get my steam-parts in (yes, I bit the bullet and ordered the $35 ball valve and it should be here tomorrow or the following day), this button does nothing more than open and close the 3-way. This has actually been useful the last few days.
The fourth button is my Lazy-Automatic button, which will pull an automatic shot, based on the espresso recipe I was talking about. Right now, the timer isn't working yet: another thing I have to work on the next few days. Right now, it does recognize that it's being pressed, opens the 3-way, waits 250ms to let all the mechanic settle, then runs the pump. At this moment, it stays in the "pull-mode" and never stops, so I have to pull the plug on it.
The firth button is a direct replacement for the old mechanical brew switch on the Classic. It does the same thing, only digitally. Again, it opens the 3-way, waits 250ms, then runs the pump as long as the button is held down. Everything happens in reverse order when you let go.
Again, I'll have pictures and videos when it's more complete and running smoothly.
Also, the RTC is not working so there's a big error message on the screen. No use showing that to everyone. LOL
Posted Tue May 7, 2013, 7:41am Subject: Re: Next Mod: PID my Gaggia Classic
Glad it wasn't quite as bad as I had imagined, and to know it wasn't the whole machine.
~100ml for the Gaggia boiler is pretty tight. If you are pulling a 25ml ristreto you are still replacing 25% of the water in that boiler. That's pretty tight, and pretty amazing that it still does decent espresso from the factory. I hope your mods are able to compensate for the temps even better than factory setups.
Posted Tue May 7, 2013, 9:27am Subject: Re: Next Mod: PID my Gaggia Classic
The small boiler has its advantages and disadvantages. One big advantage is it has a quick recovery time, especially with 1500W of power behind it. The disadvantage is that water temperature is highly unstable. Although most people understand the basic concept of PID, they fail to understand it's not a "one size fits all" configuration. I've seen some people do some amazing things on espresso machines with PID setups, like back-to-back shots, maintained at 212.0F on the nose. Well, if you like your shots pulled at 212.0F I suppose. To each his own. Nevertheless, with the sensor outside the water, it is fantastically easy to keep stable temps. But what most believe is that whatever the boiler temp is, so will the water and if there is any variation, you can detect that with a thermofilter then compensate (probably hense the 212F setting I keep hearing everywhere).
I have a sensor on the outside as well as the inside. The numbers show that the inside and outside are hardly ever equal, outside the machine being stale and not making espresso. Just to generalize, the water temp is always trailing a warm up. The boiler is always trailing on a cool down. I have 't logged recently since the SD isn't working yet (on the new implementation) but I have observed up to a 40F difference in the trails at extreme operations. This is taking temps at the upper water level, which is what you'll taste.
My hand-coded 4-step algorithim kept was able to hold temps to within 0.5F, even after recovery. It would overshoot the target temp by only 0.5F! The drawback is that recovery time did not allow for back-to-back shots (I do about 4 b2b shots daily, so that is important to me). Some people are happy with one shot per day and recovery and overshooting the target after recovery don't matter much. So, I decided to scrap my code (I still have it saved in case I do want to go back to it) and go with an actual PID algorithim, which is tricky to find a good balance between accurate and reasonable recovery. I'm also using the algorithim in the "adaptive moode" which has an aggressive behavior when the temps are far off the target, then calms down when the gap closes. For a good recovery time, it will be guarantied to overshoot (mine has gone as high as 250F) and it take forever to wait for it to come down, or I'd have to surf it down, which I have to spend the time doing, rather than prepping the next puck, is why I'm going to implement the auto-surf. Perhaps that will end up as a Post-Pull routine run at the end if the Lazy-Automatic operation.
So after I get all this stuff squared away, my system will be a hydrid PID/situation-aware system. I need to get the datalogger going for that implementation.
Does it make andifference in taste? I won't be the judge, but my wife, daughter, and receptionist (yes, I have to ask outside sources) for their opinions. They have been my study group for a year now and even my daughter (teen) who puts her hand on her hip and says, "I'm more of a TEA person, so I wouldn't know" says the espresso has been good the last couple weeks. A fee minths back, I sunk a lower level sensor in the boiler. Espresso was better than tstat coffee. Then a couple weeks ago, I dropped in a double sensor rod with upper and lower sensors. Now I'm working on closing the temperature drop, hopefully only within a few degrees; the smaller the better but my guess is I'll be able to get down to a 5F gap. This will allow me to change taste, based on temperatures. Wish me luck!
Posted Tue May 7, 2013, 11:00am Subject: Re: Next Mod: PID my Gaggia Classic
Sounds like you are getting the science of the temp control down quite well on that machine. I like reading about these trials and issues, because when it comes time to build and control my own boiler I'm going to want to do it right the first time if possible. Of course software will require tweaking, but if I can physically get the setup right that's half the battle.
Not sure how much luck you need, as the skills seem to be playing out really well. But I'll definitely wish for a little extra lucky coding ideas to head your way so you can complete the project! This stage of the project at least!
Posted Tue May 7, 2013, 11:29am Subject: Re: Next Mod: PID my Gaggia Classic
Back in the day, I use to build race bikes, then street bike modifications when race season was slow. In the motorcycle world, if you do your homework, you can mix and match parts from different makes and models. For instance, I've been able to swap brake calipers from a Honda and put it on a Kawasaki with little to no modifications. Basically, just measure up and what matches your distance between bolt holes and offset, and there you go. I don't think it's the same for espresso machines, like swapping out a group head from one machine and put it on another. I would LOVE to put an E61 on my Classic, but it's physically impossible. Besides, can you imagine an E61 head on a 3oz Gaggia boiler? LOL
I haven't looked up the parts diagram for your machine so I wouldn't know, but unless you replace with a direct replacement boiler, you're either looking at a detached boiler or a full custom. The Classic is a 2-part boiler: group head and main boiler body. Unless I swap out both the group head and the boiler (then it wouldn't be a Gaggia at all), no boiler would work, unless it was a detached unit. I think that would introduce MORE thermal issues than it's worth. So, I'll be building a new upper body (2-piece actually). There would be a lower boiler case/plate, which attaches to the stock group head. This will also keep the heating element (which is sealed with a high temp gasket), so the wires would face down. The upper unit will basically hold the water, and keep the sensors, steam port. I thought about putting the heater on the top unit, but because it is short, it would reheat the already "at temp" water and the cool water would still be offset... so, bottom it is.
As far as PID goes, the heating element I have for my new boiler is only 1000W, which is not as powerful as the stock 1500W (750W x 2) but because it is larger, temp stability will be greater and I won't need as much power to keep a good steady temp (theoretically). I don't have quite enough brass to melt yet. I've been looking around the shop, looking for brass and copper... I have lots of copper but prefer not use use copper.
Let me know what you decide on your boiler.
OH! By the way, my McMaster order came, so I SHOULD have almost everything I need for my steam implementation! Hopefully the adapter I made will fit. Otherwise I'll have to order another adapter from EP.
Posted Tue May 7, 2013, 12:12pm Subject: Re: Next Mod: PID my Gaggia Classic
Alright, this is not PID related, but is in a way related.
Here are my parts from McMaster. I just realized I ordered a brass tube instead of copper tube. I just placed another order with McMaster (for work purposed) and I forgot to add copper pipe. Sigh.
Sorry for the blurry image, but it is what it is. I don't work for National Geographics. :P
What you see in the photo is the very expensive right angle ball valve, which indeed only turns 1/4 turn (YES!), fitted with 1/8 NPT compression fittings. The tube is 3/16". If I use the copper tube I already have, it's 1/8", which I also purchased 1/8 NPT-1/8" tube fittings, so I'm still set there.
However, I actually needed a 1/8 female NPT compression fitting instead of male for the steam want adapter (I've already searched for a 3/8 BSPP to 3/16 (or 1/8" pipe). No dice so we use the EP adapter from the V3 to Classic adapter.
For those who don't know, that's a Rancillio Silvia V3 wand, adapted for the Gaggia Classic.
Symbols: = New Posts since your last visit = No New Posts since last visit = Newest post
Forum Rules: No profanity, illegal acts or personal attacks will be tolerated in these discussion boards. No commercial posting of any nature will be tolerated; only private sales by private individuals, in the "Buy and Sell" forum. No SEO style postings will be tolerated. SEO related posts will result in immediate ban from CoffeeGeek. No cross posting allowed - do not post your topic to more than one forum, nor repost a topic to the same forum. Who Can Read The Forum? Anyone can read posts in these discussion boards. Who Can Post New Topics? Any registered CoffeeGeek member can post new topics. Who Can Post Replies? Any registered CoffeeGeek member can post replies. Can Photos be posted? Anyone can post photos in their new topics or replies. Who can change or delete posts? Any CoffeeGeek member can edit their own posts. Only moderators can delete posts. Probationary Period: If you are a new signup for CoffeeGeek, you cannot promote, endorse, criticise or otherwise post an unsolicited endorsement for any company, product or service in your first five postings.