prima-coffee.com: coffee & espresso equipment and accessories

My Cheap PID project

Postby randytsuch on Wed Nov 04, 2009 2:15 pm

I have a couple Popcorn Pumpers and a Poppery, which I roast with. I mainly use one of the pumpers, because it has the best air flow, which gives it the highest capacity. In the beginning my roasts were pretty good (to me :D ), but lately they have been sour/bitter. I had been trying to improve my technique, and somewhere I got messed up, and could not get back on track, so I decided to build a PID temp controller, and try roasting with that.

All of my poppers are modified to have a separate cord for the fan, and the heater power, which makes it easier to build a standalone PID controller.

At first, I was just going to get a generic PID, but I decided I wanted it to have some kind of serial interface, so I could download data to my PC, and of course it had to be cheap :wink: . Oh, and it needed to have a PC program to interface with the PID. I found some PID's with a serial interface on ebay, but they did not come with a PC program to interface to the PID.

After some looking, I found this one on ebay for a good price, missing box and manual
[url]http://www.automationdirect.com/adc/Shopping/Catalog/Process_Controls/Temperature_-z-_Process_Controllers/1-z-16_DIN_Size_(SL4848_-z-_PM_-z-_TC_-z-_PC_Series)/SL4848-VR
[/url]

It has a free program you can download, to control and get data from the PID.
Link for SW is at the VERY bottom of this page
http://support.automationdirect.com/demos.html


I had already bought a lot of 4 used 40A Crydom SSR's, which I need for the PID for my Gaggia, so I just needed a case and a few odds and ends.

Found a $5 case from a local surplus electronics place. I bought a metal case, to help heatsink the SSR.

Made a square hole to mount the PID.
I made one hole, with a rubber grommet, for the AC line in, another hole for AC line out (connected to SSR), another for the fuse holder, and a square hole on top for the thermocouple connector. Thermocouple connector is epoxied to a piece for Al angle (I had a scrap piece), and the angle is screwed to the chassis. This was in case I need to remove the connector, and open it up, would have been impossible if I glued the connector to the chassis.

Here's how I hooked up the PID

Output (to SSR) pins 1(-) and 2(+)
Thermocouple wires to pins 5(-) and 4(+)
RS-485 pins 9(-) and 10(+) and 8 (gnd)
AC In 12(N) and 11(L)

Power wire is some 16 gauge, 3 conductor wire from Home Depot. Used 15A male and female plugs, as shown in the pics.

RS-485 convertor is a cheapo one from ebay, cost was $8 shipped. My laptop has a serial port, so I just plug it in the back, and hooked up the three wires, and it the interface worked right away, no problems. Automation Direct has a $100 convertor that is way overkill for this, so I was really happy my $8 convertor worked, with no problems or tweaking required.

When I first powered up the PID, I got this error that said "no cont". Looked it up, and it means that the thermocouple is not connected, but I did have it connected. Finally figured out that I needed to tell the PID that it is a type K thermocouple. After that, it sees the thermocouple fine. Then, it was just figuring out polarity. I hold the probe between my fingers, and if the temp goes down, the wires are reversed.

So far, I have used it for a few roasts. I adjusted the P, I and D parameters a little the first day, not really knowing what I was doing, and response improved, but it still lags behind the temperature settings, but at least it is not overshooting things.

Here is the log from the last roast,
Image

Target was
temp delta time
250 2
300 2
395 4
500 12

First crack was at 393.
I don't have the male thermocouple connectors yet, so I am using a short jumper wire from my box to the banana jacks on the probe. I have the males on order, and will rework the probes when I get them. I'm not sure if those short wires are throwing off the readings a little, but it's only temporary anyway. I seem to have to go a little hotter then I used to, to reach first crack, and end of roast, not sure if it's the wires, or my PID is just reading a little different from the meter I was using before.

I don't have the log from the first two roasts, but I served the 2nd roast to my wife and mother in law the last couple of days, and they say it is better then my previous, manual roasts. All the roasts so far have used the temp profile above.

I was wondering if the SSR would get hot, without a heatsink, but it has been fine. I "monitor" it by touching the area above the SSR, and the SSR mounting screws, and they are just warm, not hot at all.

So, I need to play with P, I and D settings, and adjust to the temps of the PID, and also play with the temp ramp/profile, but I'm pretty happy with my little project. It makes roasting much easier, since I don't really have to do anything anymore during the roast. I just have to start paying attention when it hits over 400f, to figure out when to stop it.

And total cost was less then $90.
randytsuch
 
Posts: 255
Joined: Aug 11, 2009
Location: Los Angeles

Postby randytsuch on Wed Nov 04, 2009 2:19 pm

Some pics
Image

Image

Image

Image

Image

Image
randytsuch
 
Posts: 255
Joined: Aug 11, 2009
Location: Los Angeles

Postby another_jim on Wed Nov 04, 2009 3:11 pm

Congrats; nicely done.

I find the final profile segment of 500F in 12 minutes puzzling (to say the least). I'm guessing (hoping) you end the roast manually using visual, sonic and aromatic clues. On most of the PID controllers you can program the unit turn off the heat, and go into cooling mode when you reach your target temperature. This could be convenient.
User avatar
another_jim
 
Posts: 7192
Joined: May 05, 2005
Location: Chicago

Postby cafeIKE on Wed Nov 04, 2009 3:56 pm

randytsuch wrote:I don't have the male thermocouple connectors yet, so I am using a short jumper wire from my box to the banana jacks on the probe. I have the males on order, and will rework the probes when I get them. I'm not sure if those short wires are throwing off the readings a little, but it's only temporary anyway. I seem to have to go a little hotter then I used to, to reach first crack, and end of roast, not sure if it's the wires, or my PID is just reading a little different from the meter I was using before.

Joining dissimilar metals to a thermocouple results in another thermocouple junction. The sign of the error depends on the metals. Since you are measuring after the junction, there is an error.

See How Thermocouples Work
User avatar
cafeIKE
 
Posts: 2905
Joined: Jun 27, 2006
Location: Woodland Hills, CA

Postby randytsuch on Wed Nov 04, 2009 4:30 pm

another_jim wrote:Congrats; nicely done.

I find the final profile segment of 500F in 12 minutes puzzling (to say the least). I'm guessing (hoping) you end the roast manually using visual, sonic and aromatic clues. On most of the PID controllers you can program the unit turn off the heat, and go into cooling mode when you reach your target temperature. This could be convenient.


Jim
Thanks for the feedback
I just put the 500 in there figuring I would always end the roast before then, I wanted the final temp to be higher then I anything I would actually stop at. I am manually stopping the roasts, based on my inadequate roasting skills :) .
One drawback to the PID I picked is that it only works in minute increments. For the earlier ramps, I worked around this limitation as much as I could, but I think it would be difficult to always stop a roast exactly on the minute, so I will probaly stick to manually stopping the roast, unless I eventually upgrade to a better PID.

Ian
Thanks for the link. I figured it was creating an error, hopefully I will get the male connector pretty soon, so I can stop using the wire splice at the connector.

Randy
randytsuch
 
Posts: 255
Joined: Aug 11, 2009
Location: Los Angeles

Postby CRCasey on Thu Nov 05, 2009 8:09 pm

I found this while I was looking at HackADay earlier. It is a hot air popper that is roast profile controlled with an Arduino. The part I liked is that they include a nice library for PID control that interfaces with Processing on a PC for tuning the system.

Apparently once you have tuned the PID you can run without the PC at all as the board uses a LCD for readouts.

-Cecil
Black as the devil, hot as hell, pure as an angel, sweet as love-CMT:LMWDP#244
User avatar
CRCasey
 
Posts: 676
Joined: Jan 20, 2009
Location: Lewisville, TX

Postby randytsuch on Mon Nov 09, 2009 5:10 pm

At some point, I was thinking about gettig an Arduino, and setting it up to control a roast. I might still do it one day, but it was more work then I wanted to do right now. And, I got my PID cheap, it was actually cheaper then the Arduino would have been, by the time you add all the other stuff you need with the Arduino.

So, over this weekend, I tried adding another thermocouple to my popper, to measre ET, and to roast based on ET instead of BT. Have not had much luck with it so far, I did not like my first placement, the wire stuck out a little far, and caught a bean each time.

I move the thermocouple to be at the mouth of one of the air openings, and now it is reading MUCH higher then BT, about 200F higher. I went back to roasting with BT for now, until I get a better handle of BT versus ET in my setup.

Randy
randytsuch
 
Posts: 255
Joined: Aug 11, 2009
Location: Los Angeles

Postby another_jim on Mon Nov 09, 2009 5:33 pm

ET for an airroaster is where the heated air first contacts the bean. The heat gradient from the heater itself to the entry point into the bean chamber is fierce, so if you put the TC there, make sure it cannot move, and realize the temperatures you'll measure will be much higher. However, you will still be able to use it for control once you know how the readings translate.

If you are measuring the ET at the spot where the beans are in first contact, a standard roasting profile, as used by the large industrial bowl roasters, is to run around 350F for the first 3 minutes, ramp up to 480F in 3 more minutes, and finish the roast holding the ET at that temperature.

In my heavily insulated roaster, I do BT as follows: spend a minute running it up 300F, then ramp it to 340 in 3 minutes (bean to 300F), 445 in another 3 minutes (bean to just below first crack, 385F), and do the final ramp in 3 to 5 minutes. The final ET is set 25F higher than final bean temperature for a 5 minute final ramp time, 30F higher for a 4 minute final ramp, and 35F higher for a 3 minute final ramp. This is a lot more complicated than the basic profile, and probably not much better. The major difference is that I prefer to program in a slightly rising ET rather than a level one in the drying and final roast section, since it prevents oscillations in the control. When you pay millions for an industrial roaster, the oscillations are presumably engineered out, and you can run a flat ET.
User avatar
another_jim
 
Posts: 7192
Joined: May 05, 2005
Location: Chicago

Postby randytsuch on Wed Nov 11, 2009 9:04 pm

So I roasted the last couple of nights by BT, while monitoring ET.
Unfortunately, for different reasons, I lost all of the BT measurements, so I just have ET.

The last night roast, I tried this BT profile
temp time
100 1
300 1
340 3
445 3
470 5

Here is the ET, starting from a little into the roast
Image

I'm not sure what caused the big dip in the beginning of the chart.
I do notice that the BT/ET temps dip a bit whenever the PID changes to the next cycle. It seems to take it a second or two to figure out what its doing, and the temp drops, then it kicks the heater back in.

The lowest temp on the chart is 198C, where the dip is.
Highest temp is 284C, or 543F. BT was 459 when I stopped, so delta T was 84F.
First crack was at 413F, BT.

I got divots in the beans, I think because the roast was faster then I normally do, I have noticed the beans I was using (El Savadorian) get divots when I speed up the roast.

Based on previous experience, they will probably not taste that great either.

I was going to try again tonight, slowing things down a tad, with this profile, and see how it goes.
100 1
250 1
300 3
400 3
470 6

Hopefully, I will be able to get both ET and BT today.

Randy
randytsuch
 
Posts: 255
Joined: Aug 11, 2009
Location: Los Angeles

Postby randytsuch on Fri Nov 13, 2009 8:48 pm

I managed to collect some more data.

Image

Data was collected on two different programs, on is the PID program, which was measuring BT.
I also had a meter measuring ET. Meter has a USB interface to my PC. I guessed it took 5 seconds to start the USB meter program, after starting the PID collecting program.

Blue is ET, pink BT and yellow is the delta.

I know that data looks a little strange, in the places where BT is larger then ET, but that's what I got.

I was going to try roasting based on ET, but I am not sure about my data yet, will do at least one more roast on BT, while monitoring ET, and see if I get the similar results.

Oh, and my USB meter program sometimes does not seem to like the PID program, and stops working. That's why ET ends early.

Randy
randytsuch
 
Posts: 255
Joined: Aug 11, 2009
Location: Los Angeles

Next

Return to Home Roasting