Pretty on the outside and ugly on the inside prototype

So I’ve been busy doing a bunch of computer maintenance and looking into other things I’ve neglected while building the roaster so it’s been a bit slow.  I decided I wanted to start gluing corners together and drilling some holes to see how the case goes together so I can eventually get back to fixing the issues with the roast controller case.  Over the past several weeks I soldered together all of the boards, made wiring harnesses and figured out a bunch of “oops” moves I had made designing things when I got rushed for time.

Turns out I was not able to get stand offs locally in the sizes I had wanted so the heights are all screwed up where I placed holes on the outside surfaces.  I also forgot to specifically allocate power for the exhaust fan in the original design BUT I did have “Spare” pins allocated. The fan I ordered also was not the right size for the hole template I had used (Inside fan dimension vs outside screw / case dimension)… neither of them were actually labeled right the way every other fan I have is sized.

So with everything screwed or harnessed in place this is what I have for the Arduino…

The Arduino wired for Coffee Roaster control

It is a MEGA2560 mounted on a Crib for Arduino.  On top is an Ethernet Shield w/ microSD slot.  Then I used a variety of crimped headers to connect to some of the pins on the MEGA and on the ethernet shield.  I have twenty five lines in the bundle going to the Arduino.  I had some spare 10 strand cables from a project at Halloween and no 25 strand cables to use so I used one of those cable wraps to keep the all together after connecting DB25 to one end and header pins to the other.  Once the lid for the crib for Arduino is in place it then connects to the back of the enclosure.

Wiring Harness connecting to the back of the controller enclosure

As you may notice the sockets I was using for connecting the power out are the type that snap in.  The majority of these will not snap into most laser cut plastic sheets and instead are designed for aluminum cases.  The plug to the right on the other hand screws in.  These work great with a variety of thicker locations.  The fan was originally going to be on the inside with a wire cover on the outside but with the wrong size fan hole in use I had the wrong cover to fit the fans that I had that would fit the hole.

For the DB25 connectors it turned out good that I had decided to use a cut out pattern  that had the holes on the side for the anchoring hex nuts rather than just having them cut out so that I could mount them to the socket and anchor the connector.  Since the stand offs were too short they don’t allow me to anchor the PCBs to the bottom plate.  Instead I had to screw them to the back plate using normal screws and with the burnt circles on the laser cut work I had to use some washers too to keep it sturdy.  This is what the back plate looks like.

Rear Panel of controller

This panel includes – One non-filtered switched 15Amp Power Entry module, 2 snap in 15 amp convenience plugs, 1 5VDC fan, 2 DB-25.  The left one is the main guts for the LCD, TRIAC control, potentiometers, thermocouple, and a variety of other sensors.  The right includes all the non-essential stuff for backlighting all the buttons on the button pad and a few other things including spare wiring.  You cna see just a screw on the right since it was relatively intact and so it won’t block the DB25 plug being used.  The right DB25 has washers and screws in place.  These are primarily used to attached the PCB in place attached to the back side.

Next up is the inside view of the electronics area:

Rear View of the Back Panel

Rear view of the back panel.  I need to shrink up the crimp connectors around the wire  (they shrink like heat shrink tubing but is actually much firmer).  Also the connector on the right side (the switched power entry module) should have the screws more securely fastened with nuts and washers but this is mainly just a test to ensure it all fits together and then allow me to focus on some programming for a while to see if I can get more working and develop menus etc.  The clear acrylic bar is used to anchor the corners better.  I need to change the locations of the screws since I could not find screws the size I wanted without spending way too much for large quantities of them on the internet and having them shipped to me etc.  The thermocouple board on the right had the same issue with the stand offs so it is just floating loose in there right now.  I need to find somewhere to get the Omron thermocouple sockets where I dont need to order them by the 1000s since it looks like Ryan McLaughlin has stopped selling things on his site when they (used to) have problems getting the newer MAXIM thermocouple chip.  They’re all over the place now but he hasn’t restarted his store up so I don’t know the deal there.

Here is the view down into the enclosure from above:

Top view into enclosure

With the cover on:

Front panel installed on enclosure

Front panel running

Front Panel Running

When I send it back out again for a new case I hope to have a different board to install that will be switching the smaller breakout boards being designed onto the circuit board as well as add a power supply and possibly having an arduino board mated on top of the circuit board perhaps to bring more of the electronics inside.  I might want to try to get a Digilent board perhaps to try converting to it as a transition between Arduino and PIC32 before I completely switch to a dedicated PIC32.

I’ve also been looking at possibly creating a dedicated PC application to communicate with it directly via USB and over ethernet.  I am toying around with the “QT/QML” language but havent gotten too far with it.  I may just go back to Processing though.

Ordered more stuff – headaches and new replacement stuff

I had a “Chromalyte” LCD screen that came from EIO.  I needed some sort of cable for another thing going on at home and EIO came up having it in some google search.  It was cheap and the price for a similar cable from darn near anywhere else on the planet was about 5 times higher plus obscene shipping on top of that for something that ultimately ends up in a padded envelope and has $2 of postage on it.  Anyway this LCD was supposed to do 20 characters by 4 lines.  Currently I’ve been using a 20 by 2 lines LCD by Newhaven.  The Newhaven works great.  The Chromalyte?  Not so much.

I googled Chromalyte looking for a data sheet and figuring there may be some info somewhere on the internet about it and maybe using it on an Arduino project or something like that.  I noticed I kept finding pages for EIO.  I looked the product over and kept trying to find some sort of marking on it.  I looked at the data sheet found on EIO and it was pretty basic.

It mentioned using some sort of software available for download from Chromalyte’s website to test it from your Windows PC.  I figured maybe I could try that and tried harder looking for some sort of Chromalyte website.  I threw Incorporated into the search and still kept coming up with EIO.  I really started to wonder at this point and went to Archive.org looking for historical websites that were named Chromalyte.  What I discovered?  EVEN YEARS AGO Chromalyte dot com pointed to EIO’s sales pages.  Today?  It’s current contents?  It’s a GoDaddy “is this your website” listing.  But with the history seeming to always be EIO they don’t even seem to be a real company and are instead just a propped up brand name for EIO.

What made me look into Chromalyte so much that I was having problems with?  Newhaven LCD I can serial.print and serial.write decimal or hex codes to it all day long…. move the cursor around on the screen, clear the screen, put text anywhere etc.  Chromalyte? I print serial to it and nothing happens.  I throw in slash n and r to see if that helps and it doesn’t.  I try sending hex codes for all sorts of thing and nothing.  If I serial.write a clear screen it wipes the screen.  If I serial write movement commands and turn on the cursor I can watch the cursor dance around all over the screen.  I print more serial to it and nothing happens.  I serial.println to it? I get a white box IN FRONT OF the text and the line that I want anywhere I tell it to move the cursor to.

Is there anything about this in the data sheet?  Nope.  Anyone used one on an Arduino?  Not that I can find…. Heck if it wasn’t for EIO listings all over the place I don’t think anything comes back about Chromalyte at all.  I’d have to format some search keywords to force it to drop out EIO responses just to see if I could find anything else because when I searched for that name every entry for pages and pages came back as EIO.

The codes it uses are really bizarre compared to most other LCD brands available.  I think I found someone’s code ONCE that actually used a similar command structure for clearing the screen and moving the cursor but all of the other codes were different.  I’m not a stranger to writing to serial driven LCD as well as using parallel, SPI, and I2C to write to text and graphic LCDs.  This thing is just plain weird.

Sure I could probably email EIO and bitch about it but if this thing is this weird it’s just not worth it to me.  It was cheap enough compared to the hundreds and hundreds of dollars I’ve spent on all the other hardware to build a coffee roaster that it’s but a blip.  I just don’t see myself buying another one, ever.

If anyone out there can send me an Arduino program that DOES indeed work on a Chromalyte labeled as a c420a that simply clears the screen, writes Line 1 to line 1, Line 2 to line 2 and so on I’ll be amazed.  If such a thing does occur I’ll permanently install the screen in a project I’ll be doing later to read a flow meter and open/close a water valve on my reverse osmosis water system so that I can punch up a 1/2/5 gallon fill without needing to watch it.  I’m hoping to have it monitor my total water into the system and the output into a bottle and then monitor TDS sensors to gauge water purity.  Then have it alert me to change the filters and keep track of water input purity throughout the year.

To my girlfriend:  Yes I am too lazy to set a timer to track how long I’ve been adding water to a water bottle.  Instead I will design a circuit, solder up a board, write software for a microcontroller, and then mount the thing in a case so that I don’t have to set a timer so I don’t overflow the water bottle.  I know my limitations.  Building a system to turn the water off by itself is FAR easier for me to do.

So anyway today arrived a Newhaven NHD-0420D3Z-NSW-BBW as well as a pair of PCB solderable DB25 connectors, a bag of 100 B3F-1000 type Omron buttons and a few Maxim MAX31855 thermocouple ADC chips.  I figure I’ll make a board up that does 4 inputs at some point so I got enough to do that plus a couple spares.  I still need the sockets though.  Nobody seems to sell those except for Ryan McLaughlin.  After the MAX31855 that he switched to from the MAX6675 became scarce he shut down his store.  Hopefully he will pop back up sometime soon since his boards were really well made and I think he’d be a great resource for DIY’ers building smoker controllers and coffee roasters and other such things.

Anyway this weekend I will be doing my taxes and then spending the rest of time soldering pins to the Newhaven display and connecting it to the roaster controller.  This past two weeks I converted the entire roaster program over to Arduino 1.0 and updated all of the Libraries that I was using to the latest versions.  I few I had to modify slightly due to them not being 1.0 updated but the majority of them were available on the internet updated already.

The conversion to 1.0 made me make a note of all of the libraries I had used and begin to create a list.  If you look at the menu bar you will see “Resources” up top.  This allows you to pick an Arduino link and then get links that go to sites to download the current libraries if you are looking to build your own project.  I’ll be adding a few more projects and libraries that seem useful to DIY Coffee Roasters (and controllers) over the coming weeks too.

Roast controller now at full power.

So I’ve played around with the PID settings.  I haven’t officially sat down and tried to do a “real” tuning since the processing app I’m using right now lets you play with different numbers and feed it back to the Arduino to tweak it.  As a result I came up with a few numbers that flattened out a lot more than it did previously.

First roast with crudely adjusted PID

Next I will need to take it more seriously I wipe out the configurations, dump some junk beans in, and fire up the roaster and calibrate until I can’t stand it anymore and then roast some coffee again.

In regards to the button controller I have figured out a layout that I will likely use but I’m trying to keep this accurate on the schematic system I’m working with to build a real PCB later.  For whatever reason the part in the system appears to not match every other part I’ve seen out there and what I’m currently working with.  I also need to go back to radioshack and buy a resistor I’m going to need because the big multi-pack I have doesn’t include that one resistor that I need to make the math work.

The last couple roasts with this new controller turned out decent enough.  After 3-4 days rest they had extremely good smells (but tasted only “pretty good”.)  Today’s two tests are MUCH closer to ideal roasting the way they worked out and the smells (and the smoke detector) agreed at the right times.  I’ve got two batches waiting that will get consumed over the next several days and we’ll see how it’s going as they rest.  I’ve got a single serve coffee brewer that’s working out better than some of the other ones so it will take me some time to work through all of the beans.

Ahh the smell of progress… roasting coffee!

So as I mentioned yesterday I roasted some coffee.  This time (except for manual control of the fan) the roaster did it all by itself.  I had given it a handicap of limiting power to the heater only to 85% of the capacity but it appears to have worked ok.  The Arduino roaster controller worked well enough considering the state it is in.  Power control from the Arduino worked for manual potentiometer signaling the fan speed and a data array of settings for the heat controlled the roast automatically trying to maintain the temperature.

I’m going to increase the power again to 90%.  The room temperature was around 45-50 degrees since I roasted it out in my garage so I think it did pretty well getting to temperature.  I’ve also bumped the fan up slightly to a higher maximum.

I will need to get a button controller going soon so that I can force the system from automatic into manual mode so I can quickly shut down heat if necessary without having the laptop connected while letting the fan continue to run.  I’ve got a CAD type design of a PCB going that has a button controller but I haven’t ACTUALLY prototyped it out on some RadioShack boards.  I do have some etch-able boards here to try a toner transfer to build out some controls.  I still need some carbide drill bits though for drilling the through hole parts and the jumper connectors.  If I had SMD header pins I think I actually have all the parts I’d need to build a 6 or 7 button analog pin matrix.  I may need a couple more resistors though to pull that off.  I’m pretty sure I could get at least 4 buttons though.

The power control system had started to get out of control with the heat sinks so I had to beef it up some.  Before anyone says it I know the large heat sink is on upside down.  I didn’t want to drill the board before I was sure it was going to work so those bottom pins are sticking out the top.  I’ll probably run it like this for a little while until I make a permanent board though.

So for those of you keeping track… I went from this:

First working prototype in Radioshack Project Case

To this:

This is MUCH better for the following reason…heat sinks got out of control and all the wires were getting obnoxious:

Next Steps?

  1. Increase allowed power to heater
  2. Make button control pad.
  3. Tune PID.
  4. Improve CSV log system.
  5. Add automation to the Fan control.  Use mild PID triggered adjustments to the fan.  Coarse heat changes by heater.  Minor heat changes (a few degrees) by Fan.
  6. Add current sensor to judge wattage to the heater.
  7. Get profiles loading from SD memory using button pad to select them.
  8. Begin creating circuit to connect my original PIC32 project to the arduino over serial / rx/tx or other communication method.
  9. Complete 7 inch touch screen (I have a screen designed but it’s not entirely stable yet… the backlight flickers occasionally and the image stutters here and there but it’s there…)  I’ll upload a bitmap from the layout tool soon.
  10. Migrate most functions to PIC32 eventually.
  11. Build a final PCB.
  12. Get a case made for it.
  13. Roast lots of coffee.
  14. Brew it.
  15. Drink it.

First test run of the Arduino FreshRoast SR500 Controller

This afternoon when I was home for lunch I ran the Arduino control touching a light bulb plugged into the heater output.  It tracked the heat pretty closely until it got up around 300 degrees.  It overshot by about 10-20 degrees initially and then once it caught up it was pretty close the rest of the way pulsing the power as necessary.  After it neared 300 degrees it couldn’t keep up and started lagging.  At that point I left the fan running at full speed for the duration of a normal roast.

This evening I went out and plugged in the heater.  The heater is a totally different monster!  It tracks but it OBVIOUSLY needs the PID calibrated until it works better.  At low fan when the heater dies down it has a massive swing in temperature going under and then back over again.  It appears to only do ok at the lower temperatures and then is all over the place at the higher temperatures.  What is noteworthy is that it DOES track the same “slop” drift around the target temperature all the way up.  The drop/gain on the % power is simply too drastic and needs to be adjusted to flatten out more.

For giggles I’m throwing out for view a test graph as it ran (no beans) for a few minutes once with low fan and another with higher fan.  I have the heat maxed at 80% power in the program so that I don’t burn anything up accidentally until I’m sure it can run like it should.

First Arduino Roast Controller test with heater connected

In the lower graph it shows a low fan vs a higher fan setting.  The middle one is a heat amount that actually gets reduced to 80% in the code during testing.  The green in the top graph is the target while the red is the actual temperature reading. Both tests were run with the roasting chamber left empty.  I’ll try adjusting the PID settings a little bit to smooth it out to have smaller sweeps and then start loading some old green coffee in to test it with a “load” and see  how much that stops the swing.

Now that the heat is able to be completely shut off this helps the temperature drop a lot faster.  It’s my guess this would be better for the roaster overall to completely drop the temperature of the coils before turning it off while it cools the beans.  I’ve set the system so that the cooling requires the probe to reach a low temperature before turning off so the coffee beans should be quite cooled before it shuts down by itself.

More logging… and floating math.

Two nights ago I managed to finally get the screen that shows graphs to draw the current temperature up in the corner on top of the graph.  Most of the problem was figuring out how to convert the “float” numbers to characters.

I needed to feed this into Microchip’s Graphics Library and accommodate “unicode” characters to get the “degree” symbol on the screen eventually.  Instead of typing a string as string=”Hello There”; it ends up being string={‘H’, ‘e’, ‘l’, ‘l’, ‘l’, ‘o’, ‘ ‘, ‘T’, ‘h’, ‘e’, ‘r’, ‘e’}; which ends up being an array of character values.

A float is a decimal number.  In this case 3 digits for hundreds, a decimal position, and 3 more digits for numbers.  The sensor is kicking out two digits and I’m adding readings together, averaging them, and then rounding up or down with the extra positions in some places.  The PIC32 unfortunately does not have a floating point calculation area in its brain resulting in it “compensating” for it by automatically sliding all the other numbers around using complicated things called mantissa and a few other things I really don’t want to deal with.

The reason I don’t want to deal with them is actually NOT because it is complicated (which it is) but because since it is compensating when you divide a float it has to do MANY cpu cycles for it to compensate and come up with the answer.  It is ACTUALLY easier to multiply the float by 100, 1000, 10,000 etc and insert that number into an integer data type.  Integers can be divided, multiplied, subtracted, etc without worrying about how the numbers line up and doing crazy compensating.  They just don’t end up with a decimal.

If you have a temperature of 175.25 degrees fahrenheit you multiply it by 1000 which equals 175250.  This maintains all of  required digits as a whole number and gives extra space for “rounding” down below.

The issue with the graphics library you need to use a font for every character and take into consideration symbols like degrees etc.  This means it is not simply just a “character” but you need to allocate for all the extra stuff.  This results in a larger space for each character.  To me it looks like a single character in XChar is actually two positions instead of one to leave extra room for the fancy characters to be allowed for.  To convert text strings or float numbers into characters that can be handled by the library you have to load them into an array.  This array to convert the above number (float averaged=175.25)  looks something like this:

int showtemp[8];
showtemp[0]=averaged*1000; //175250

showtemp[1]=showtemp[0]/100000; //175250/100000 = 1 in integer
showtemp[2]=showtemp[0]/10000-(showtemp[1]*10); //175250/10000 = 17.  and then 17- 1*10 = 7 in integer
showtemp[3]=showtemp[0]/1000-(showtemp[1]*100)-(showtemp[2]*10); 175250/1000 = 175 and then 175 – 1*100 – 7*10 = 5
showtemp[4]=showtemp[0]/100-(showtemp[1]*1000)-(showtemp[2]*100)-(showtemp[3]*10); // etc
showtemp[5]=showtemp[0]/10-(showtemp[1]*10000)-(showtemp[2]*1000)-(showtemp[3]*100)-(showtemp[4]*10);

temperaturetext[0]=showtemp[1]+48; // 1 + 48 = 49 = proper number for 1 in character
temperaturetext[1]=showtemp[2]+48;  // 7+ 48 = 55 or proper number for 7 in character
temperaturetext[2]=showtemp[3]+48; // etc
temperaturetext[3]=46; // 46 = proper number for a decimal.
temperaturetext[4]=showtemp[4]+48;  //etc
temperaturetext[5]=showtemp[5]+48;  //etc

 

the results in temperaturetext looks like {‘1′,’7′,’5′,’.’,’2′,’5′}

I roasted twice now using the new graph with actual temperatures listed up top and was planning on comparing the results but I accidentally corrupted the first file.  I’ve got one more batch of some coffee from Rwanda that I was testing with.  I’m getting pretty close to running out of coffee again so it’s time to order some more soon.  I was hoping to have something good from Ethiopia come up for sale but it’s still a little early for that.

Still working on… recognizing temperatures for various(rough) stages the roast is at vs some sort of mechanism to confirm a stage marking things like first / second etc.  Also need to get ambient weather information recorded and get other sensors going on it…. and make it pretier…. and of course get it hooked to higher voltage turning on and off the heat.

User interface work.

So at this point I’ve gotten annoyed with the other temperature sensor and decided I might as well move ahead with the functional part of the roaster.  This means the first thing I needed to do is draw a main menu for options.

Main Menu

As you can see this lists Manual and Auto Roast.  My plan is to make it where the first option simply gives you a few readings and then lets you “drive” by sliding the controls around.   I would make it log the information of what you set things to and what you got back from the system and perhaps let you “store” the settings to play them again as a profile.  That is where the next phase comes in, the Auto Roast.

I expect Auto Roast to be a portion of the system that would let you choose to either A) load a previous profile, or B) let the roaster pretty much run itself using a basic model of “drying” at a lower temperature for the first few minutes at a high fan speed and then begin to lower the fan speed and raise the temperature responding based on the time into the roast vs the temperature.  Expectations of driving first crack and the end of the roast based on a desired result would vary how it would work.  I’d anticipate some sort of yes/no 1/2/3/4 etc sort of question and answer series immediately before the roast activates.  While it would be mostly automatic you can step in at any time and seize control of a particular setting.

Main roasting screen

At this time the roasting system only monitors.  I have yet to work on actually connecting it directly to any of the controls on the roaster.  This will come later when there are more and better controls implemented.  Currently it simply shows bean temperature in Fahrenheit.  I will add the option to switch the temperatures on the Settings option from the main menu.  It also has a slighly inaccurate timer.  It seems to gain a second or two over the system clock in the corner every 40-60 seconds.  I need to work on the prioritization of the interrupts in the system and implement a series of if/else and/or case statements where I can service temperature, screen updates, and time tracking and use all of those checks as part of the delays required reading various sensors etc.  For example if it takes 100ns to service one sensor telling it to read a temperature or something but I need to wait 100ns to do another function then I can initiate the read request, perform the other function, and then return at the end to pickup the temperature result.  Some functions are more critical so they will take priority over other functions.  Those functions will take place on a tighter schedule while the other functions will “squeeze in” anywhere they can and take place based on a “true/false” tracking of whether they’ve run recently.  Once everything has run then everything will reset and things will start looping again.

The roast control system also has a series of buttons down the bottom for returning to the main menu, adding or removing time from the timer, as well as buttons for heat and fan control.  I expect to put more sensor readings as time goes on to display on the empty space.  I’m hoping to get the fan and heat controls to pop up over top of the roasting screen, allow adjustments, and then drop back to the bottom “tray”.

Graphing Temperatures from the MAX6675 on PIC32

Turns out graphing temp data is pretty simple.

Using the standard Graphics Library from Microchip just to display the output right now. Ultimately it’s working pretty much as necessary to show temperature graphically. I need to be able to adjust the top/bottom a little better using some formulas to come up with a scaling percentage dynamically to make it fit the minimum and maximum possible temperatures into the display without squishing it too much. Additionally I need to decide how quickly to scroll from left to right and possibly a way to redraw scrolling backwards to see starting graphs and archive the raw data to be reanalyzed later possibly zooming etc.

The input to the system is using a development board by Ryan J McLaughlin (dot com). The board was designed to be connected up to Arduino microprocessors but I figured out it could be plugged up directly to a PIC32 too. I decided I needed an easy to interface board with a thermocouple socket already on the board and this one fit the bill nicely.

image

Right now it blinks the status LED every time it makes a reading which is somewhere around 2-3 times per second.

MAX6675 with PIC32MX795F512L

As I mentioned earlier I’m using the USB Starter Kit II, the PIC32 Expansion Board, the SSD1926 PicTail Plus board, and a Truly 3.2″ 320×240 LCD display board to develop the roaster system. This has resulted in some “fun” trying to figure out which pins are really going where on the board and the PicTail cards that you can build your own circuits on. Occasionally some of the pins are not exactly labeled the right way or else there are a few pins that are wired together on the circuit boards making you unable to use one of the pins that are wired together or in some cases both cannot be used etc.

I’ve been working through various demos and trying to understand some of the libraries and still trying to identify all of the pins on the expansion board that are already attached to the LCD / graphics chip. So far I have not found any that involved the SPI1 Pins, which I’m sure is incorrect now.

I’ve now managed to get real time readings to occur while using SPI2 instead of SPI1. Originally I was using pins B2 (SS1), C4 (SDI1) , and D10 (SCK1). to communicate with the MAX6675 thermocouple. When the system launched it would begin to read temperatures from those pins properly but only while in animate debug mode. As soon as I would let it run in full speed to get to a break point later it would be partially or completely erroneous in the received readings. I’ve now switched it to the SPI2 pins and using G9 (SCK1), and G7 (SDI1). (The MAX6675 does not use the SDO pins since it only transmits readings and does not receive using SPI data)

I’m now opening the SPI port to communicate with the MAX6675 using 16bit word mode:
OpenSPI2(SPI_MODE16_ON | SPI_SMP_ON | SPI_CKE_ON | MASTER_ENABLE_ON | CLK_POL_ACTIVE_HIGH | SEC_PRESCAL_8_1 | PRI_PRESCAL_16_1, SPI_ENABLE);

[After I clean up all the “Dead code” that I’ve been testing various things with I’ll insert some additional SPI stuff HERE]

Which appears to work properly talking to the MAX6675. Further I’ve gotten the text to display on the screen of the current temperature where it runs a rolling average of the last 3 readings updating the screen after each additional reading. At the moment it flips on one of the starter kit’s LEDs based on the temperature when it needs to heat and turns it off when it’s reached a preset temperature.

I need to work more on getting the LCD display to show the activity that is going on in terms of heating/cooling and run a timer to begin estimating what stage the roast would be in based on temperatures and time-wise. Additionally I’ll need to figure out how to graph the temperature across the bottom of the screen too. I’m thinking screen real estate is somewhat limited so I may want to upgrade the LCD to the wider board to move some of the data to the side leaving a larger graph area to represent the roast curves.

I’m not dead… And finally having SPI progress.

So with all the holidays and other things going on I didnt get to spend much time working on the roaster. In addition due to the complications with the SPI not working all this time I wasn’t feeling very motivated.

Last night after spending hours over many days reading blogs of people who regularly participate on Microchip’s forums I finally managed to get the MAX6675 to start transmitting actual temperature data to the PIC32. I’m not entirely sure why it works now but need to emphasize that it only works OUTSIDE my prototype roaster programming. In other words it is literally a single purpose program that reads a single temperature value from the MAX6675 chip.

It seemed almost reliable by reporting similar temperatures most of the time for each reading for air temperatures and then goes up when I press the thermocouple against my hand and then drops significantly when I press it against a cold soda can. There was a rare spike to 120 plus degrees here and there but infrequently. Otherwise the temperatures appear to be pretty close.

When I return to my roaster program there appears to be something significantly wrong with the speed it communicates with a potential “shift” to the left. If I drop off several of the rightmost (0) bits the resulting numbers are what they are supposed to be with a random wrong bit mixed in. About 60% of the time the results are completely erroneous no matter what. I’m pretty sure now that there is a setting somewhere affecting the communication speed that I’ve lost track of that is disrupting things.

I’ve found that adding some longer delays around the CS changes seems to make the temperatures returned significantly more stable eliminating the 100 plus degree spikes and need to try them out in the roaster code too.