Who is here? 1 guest(s)
 Print Thread
TC4 - Bourbon application software
JimG
Second roast, same beans. My objective was to perform an identical roast, so I used Brad's new feature that allows plotting the earlier roast. My drop-in temperature was a little lower on this (the second) roast, and the result is easy to see in the graph.

I am really happy with the improvements made recently to Bourbon (mostly Brad's work). Now, back to the roaster ....
JimG attached the following image:
roast02.jpg
 
JimG
There are a few updates and improvements in the works for the Bourbon and Catuai applications.

1. pBourbon will now automatically load a guide profile and/or a saved roast log if it finds file(s) with these names in the same directory as the pBourbon.pde sketch:

profile.csv
profile_c.csv
logfile.csv
logfile_c.csv

I got very tired of editing the config file, so just decided to make that the default behavior.

2. pBourbon now supports reading, plotting, and logging heater and/or fan output power levels, if they are found in the streamed data from TC4. If it does not find these values, it will not cause any errors, and it will not plot the traces.

3. The time sync code in pBourbon has been cleaned up further, and works very reliably across many Arduino variants.

4. aBourbon was modified so that it no longer outputs a placeholder for heater output levels. With the changes in pBourbon, it was no longer necessary to place this dummy value in the serial output stream.

5. aCatuai has been signficantly improved, and is nearly ready for official release. Finally, I have added the code I always intended so that two of the TC4 outputs can be controlled using dial potentiometers mounted on a panel. I am using this config to manually control both heater output and fan output on my Hottop. pBourbon is fully compatible with the output received from aCatuai.

Anyone wishing to try these applications is free to download them from the googlecode site. It may be another week or so before I have a chance to put together a zip file for release (1.00 for Catuai, 2.20 for Bourbon).

Some links:
pBourbon.pde
aBourbon.pde
aCatuai.pde

Jim
 
JimG
Bourbon release 2.20 is now available:
http://tc4-shield...EL-220.zip

This update is suggested for all users of Bourbon.



Catuai release 1.00 is now available:
http://tc4-shield...REL100.zip

Anyone wishing to both monitor and manually control their roaster should give this a look.

Jim
Edited by JimG on 05/26/2011 11:57 AM
 
tony359
Ok, a VERY basic question.

I have uploaded abourbon on the board. How do I run pbourbon? What is the IDE? The main "arduino.exe"? How can I "run" that software?

Feeling dumb.... smile

Thanks
 
JimG
Hi, Tony -

No need to feel that way. It is understandable given the shortage of documentation offered by the "Bourbon team" Shock

To run pBourbon, download Processing version 1.2.1 from here:
http://processing...-1.2.1.zip

Then run the Processing IDE just like the Arduino IDE. They are almost identical. Load pBourbon.pde into the IDE, and press the Run button.

BTW, version 1.2.1 is the only version that correctly flushes file buffers on exit, so I recommend you stick with this older release until they fix the problems in the newer ones.

Jim
Edited by JimG on 06/09/2011 7:03 PM
 
tony359
A-ah! Thanks! I was looking for a RUN button on the Arduino IDE! smile

many thanks

Tony
 
tony359
It worked thanks.

How can I have the RoR in degrees/s rather than degrees/m?
 
JimG
Currently, the degrees per minute values are multiplied by 10 by the Processing sketch in order to have a usable trace on the graph.

If you want degrees per second, the difficulty may be finding a way to scale the values so that you can use them on the plot.

One option would be to scale the incoming RoR values by a factor of 1000 / 60 (i.e. 16.6667). This would effectively plot 100X the true degrees per second value.

A typical value of 0.333 degrees F per second rise (corresponding to an incoming value from TC4 of 20.0) would plot on the screen as 333.

Jim
 
JimG
Image captured by pBourbon on an Ubuntu laptop, running aCatuai on the TC4/arduino, follows.

The orange trace represents the heater output on OT1, 0 to 100%. The cyan trace represents the fan output on IO3, also 0 to 100%.

This is a manually controlled 250g Hottop roast, using 10K potentiometers on ANLG1 and ANLG2 for the heater output and fan output, respectively.

During the initial part of the roast, the heater was set at 70%. My goal was to avoid exceeding 30 F per minute RoR during drying.

Once the RoR began to drop, I increased the heater output to 100% to get to FC as quickly as possible.

Upon approach to FC, I dropped the heater output to 50%. From that point forward, I adjusted the heater output up or down as needed to extend the roast without stalling.

Jim
JimG attached the following image:
yirgacheffe-acatuai.jpg
 
JimG
New releases of Bourbon and Cataui are posted on the project googlecode site:
http://code.google.com/p/tc4-shield/downloads/list

New features:

1. Support for type J and type T thermocouples (in addition to type K)
2. Better error checking when reading EEPROM calibration data
3. Selectable PWM frequency for fan control on IO3 (Cataui only)
4. Revised button definitions for standalone mode (Cataui only)

Jim
 
Daisy
Hi folks first post,
Ive been following the development recently of the tc4 and id like to say well done for all the work you have put in. I have a quest m3 that i would like to add the tc4/ arduino to for monitoring only with the lcd and i have a few questions. The tc4 seems to have grown to include extra outputs etc to control fans and heaters but if i only want to monitor i dont think i need to use these functions so when i by the kit do i need to solder all the headers and pins to these areas or can you leave them just blank? Sorry for the the basic level questions i have built a few things but my level of knowledge is low in the dc area. Also what is the jeenode for and will i need to use this for my application with abourbon. Last question is the gndpt on the tc4, does this need to be connected to the arduino or is this an extra gnd for adding extra things to the shield? If any one has some photos of completed boards connected that would help my quest dramatically.
Cheers
Daisy
 
JimG

Quote

Daisy wrote:
The tc4 seems to have grown to include extra outputs etc to control fans and heaters but if i only want to monitor i dont think i need to use these functions so when i by the kit do i need to solder all the headers and pins to these areas or can you leave them just blank?

If you only wish to monitor temperatures and view an LCD, then you need only solder these: the 4 stackable headers for connecting to the Uno, the green screw terminals (one terminal for each thermocouple you plan to read), and the 4-pin I2C header.

If you don't need the LCD, and wish to watch the roast on your PC instead, then skip the I2C header also.

Quote

Daisy wrote:Also what is the jeenode for and will i need to use this for my application with abourbon.

Jee3 port was added just for fun smile There was no particular purpose for the header other than to provide support for some of Jee's widgets. Recently, an HRO-er successfully connected a Jee LCD adapter and got it to work.

Quote

Daisy wrote:Last question is the gndpt on the tc4, does this need to be connected to the arduino or is this an extra gnd for adding extra things to the shield?

The grounding pins generally are only needed if you are using grounded thermocouples and also powering your Arduino from a non-grounded power supply. Wall warts and some computer chargers fit into this category. If you run from batteries, or from a power supply whose negative lead is at the same potential as the frame of the Hottop, then no external ground wire will be needed.

Jim
 
Daisy
Thanks Jim,
Its what I thought and I'm alot clearer in my head of what I'm doing. Cant wait to start soldering.

Daisy
 
petershek

Quote

JimG wrote:

The grounding pins generally are only needed if you are using grounded thermocouples and also powering your Arduino from a non-grounded power supply. Wall warts and some computer chargers fit into this category. If you run from batteries, or from a power supply whose negative lead is at the same potential as the frame of the Hottop, then no external ground wire will be needed.

Jim


Hi Jim,

How should I connect the ground pin if I recorded such a shift in temperature readings as shown in pic when I do the following: using battery power-> connected laptop's power supply -> connected TC4's external power supply -> disconnect TC4's external power supply -> disconnect laptop's power supply

farm7.static.flickr.com/6026/6198690106_d3f84717dd_b.jpg

Thanks!

Peter
Edited by petershek on 09/30/2011 1:40 PM
 
JimG
Connect the TC4/arduino GND pins to the frame of the coffee roaster. This should put the grounded thermocouple sheath at the same potential as the arduino system GND.

Alternatively, connect the TC4/arduino GND pins to the earth ground of the outlet powering the laptop or the PSU.

I have not had this problem when using grounded PSU's, or grounded chargers for my laptops.

I would advise having only one power source connected to the arduino at any one time, too.

Jim
 
petershek

Quote

petershek wrote:

Quote

JimG wrote:

The grounding pins generally are only needed if you are using grounded thermocouples and also powering your Arduino from a non-grounded power supply. Wall warts and some computer chargers fit into this category. If you run from batteries, or from a power supply whose negative lead is at the same potential as the frame of the Hottop, then no external ground wire will be needed.

Jim


Hi Jim,

How should I connect the ground pin if I recorded such a shift in temperature readings as shown in pic when I do the following: using battery power-> connected laptop's power supply -> connected TC4's external power supply -> disconnect TC4's external power supply -> disconnect laptop's power supply

farm7.static.flickr.com/6026/6198690106_d3f84717dd_b.jpg

Thanks!

Peter


Thanks for the advice Jim. If I connect power adapter to the arduino board, the power would be automatically shifted to the power adapter from USB power, right?
 
JimG
Hi, Peter -

Yes, the Arduino boards have some circuitry to automatically select external power when both USB power and external power are detected. So as long as everything works like it is designed, there shouldn't be a problem on that end.

When I suggest using only one power source at a time, I am mostly concerned about the possibility of creating more ground loops.

Is your laptop charger grounded, BTW?

Jim
 
petershek

Quote

JimG wrote:
Hi, Peter -

Yes, the Arduino boards have some circuitry to automatically select external power when both USB power and external power are detected. So as long as everything works like it is designed, there shouldn't be a problem on that end.

When I suggest using only one power source at a time, I am mostly concerned about the possibility of creating more ground loops.

Is your laptop charger grounded, BTW?

Jim


I'm using a Macbook and the power adapter seems to be ungrounded. However, my Quest M3 roaster is grounded. So, I think it's better to ground the TC4 or just to use laptop's battery as power supply. I had several occasions that the battery ran out right before 1C and I lost BT readings (then I would drop the beans at about 3 minutes after start of 1C). However, if I plugged in the power supply, either the laptop one and/or a separate power supply for the TC4, the reading of the unconnected TC socket (#4), which was supposed to show room temperature, went up while the other 3 sockets (#1, #2, #3) went down.

This raised another question, why there's a temperature reading when the thermocouples were disconnected from the TC4? And am I right on the assumption that when thermocouple is not connected, the reading shown on that port would be room temperature?

Thanks.
 
JimG

Quote

petershek wrote:
This raised another question, why there's a temperature reading when the thermocouples were disconnected from the TC4? And am I right on the assumption that when thermocouple is not connected, the reading shown on that port would be room temperature?

When a thermocouple isn't connected, the reading from that channel on the ADC is undefined. Most of the time, it reads zero, or something pretty close. And when the ADC reads zero, then the TC4 will report room temperature.

But there's no way to really predict what kind of reading you'll get from an open input to the ADC, so I hesitate to draw any conclusions. If you short TC+ to TC- on any input, however, (e.g. using a short piece of wire) then you definitely should get a reading near room temperature.

Jim
 
UNM
Well, have done a few roasts with the arduino/TC4/aBourbon. Mostly OK, though last time it hung several times during the roast (LCD still displayed, but no updates). reset brought it back.

Could be dodgy connection, something on the workbench shorting something, poor quality Arduino clone or ??? Anyroad, will monitor and see if it happens again.

Just tried to get pBourbon working - no luck yet. I'm using an ancient laptop with ubuntu 10.04.1. processing 1.5.1.

Set correct serial port in pBourbon.cfg - at least when I ran pBourbon the arduino reset correctly.

The log in the sketch window showed an RXTX mismatch betwen jar version RXTX-2.2pre1 and native lib version RXTX-2.2pre2. first error was a java.lang.NullPointerException
at processing.serial.Serial.write!UnknownSource!
and various other errors relating to resetRemote, keyPressed etc.

Will troubleshoot further and no doubt solve what I mis-configured, but if someone knows most likely cause, I'm happy to be put on right track.

At least I got it to open the serial port and reset the device first time.
Might have to borrow the kids netbook and try with windoze as I know I can talk to the arduino from processing under windoze.
 
Bhante

Quote

UNM wrote:
Well, have done a few roasts with the arduino/TC4/aBourbon. Mostly OK, though last time it hung several times during the roast (LCD still displayed, but no updates). reset brought it back.

I've also been struggling with a similar problem with aCatuai ever since version 1.1 was released. However I made a number of changes of my own, and I haven't had the time to check rigorously the exact source. I also went back to version 1.0 of aCatuai since I was also having a number of other problems with 1.1, but unfortunately I borrowed a few lines of code (the new PWM and thermocouple libraries) from 1.1 before realising that it still had the serial port error. Here is some typical output from Processing when the Arduino hangs (LOOPTIME 750, NCHAN 1, MIN_DELAY 300):

thumbs.picr.de/8437001xpx.jpg

Here is another one with LOOPTIME reduced (probably with the above variables 300, 1, 300 or something similar):

thumbs.picr.de/8436999yay.jpg

I was reducing NCHAN to 1 and reducing LOOPTIME accordingly. I also tried reducing MIN_DELAY to 270-280, but that was not the cause (whether it was a contributory factor I cannot yet rule out, but I think not). Crucial was LOOPTIME - if this was less than 1000 (even 750 with NCHAN 1 and MIN_DELAY 300) it would crash (eventually - after around 7-10 minutes, sooner with other values) with a serial port error as shown. Without the new libraries I think I reduced LOOPTIME successfully, but I need to go back and double check because the serial error sometimes only hits in after a lengthy delay and I didn't do any roasts with this setting at that time. However in any case whether or not it has anything to do with the new libraries, I am surprised that it does not allow LOOPTIME to be reduced when NCHAN is 1 - it looks like it is expecting a 1000ms loop somewhere - in the temperature measurement cyle perhaps? I haven't found anything so far.

I got it to display the "idle" time at the end of the loop and there is no problem there; even if I trimmed the idle time quite fine it still seemed to work OK under version 1.0, but maybe I didn't test it for long enough. As long as the loop time is 1000 I haven't had any problems.

I disabled the new button code in 1.1, eventually I found the best way to do so is simply change the default value of standAlone to false.

I had the error on two computers, one a Core2Duo running XP, the other a netbook running Windows 7.

Bhante
Edited by Bhante on 10/09/2011 6:07 AM
 
Bhante
By the way I found that when NCHAN is reduced to 1 in aCatuai, pBourbon does not correctly parse the serial data, although the column headings are given correctly at the start of the serial output received by Processing. Does pBourbon not check the number of columns output? A workaround is to put an extra if statement in Logger to add dummy values to the serial stream:

Quote

if( NCHAN == 1 ) { // dummy values for T2 and RoR2 to avoid confusing pBourbon
Serial.print(", ");
Serial.print( 0.0, 1 );
Serial.print(", ");
Serial.print( 0.0 , 1 );
};

(Note the space after the comma in Serial.print(", "); - it makes the output a lot easier to read!)
Edited by Bhante on 10/09/2011 6:21 AM
 
JimG

Quote

UNM wrote:
Well, have done a few roasts with the arduino/TC4/aBourbon. Mostly OK, though last time it hung several times during the roast (LCD still displayed, but no updates). reset brought it back.

Does this happen on battery power?

On rare occasions, I have seen the LCD either get locked up, or start to display gibberish. For me, it only happens when the arduino is running from AC power and when there is some sort of "event." For instance, the TC4 system on my Silvia espresso machine sporadically had this problem when the brew switch was turned off.

I added a filtering diode across the plug prongs on my wall wart (this point is safely buried inside the machine) and that solved it on the Silvia.

But it seems like the LCD is kinda sensitive to small power fluctuations and spikes?

Quote

UNM wrote:
Just tried to get pBourbon working - no luck yet. I'm using an ancient laptop with ubuntu 10.04.1. processing 1.5.1.

I had all kinds of problems with processing 1.5.1. I would recommend using processing 1.2.1. For me, 1.2.1 works across all my computers (XP, Ubuntu, OSX).

If needed, I think I can release a compiled (under 1.2.1) version of pBourbon. Would this be helpful?

Jim
 
JimG

Quote

Bhante wrote:
I've also been struggling with a similar problem with aCatuai ever since version 1.1 was released. However I made a number of changes of my own, and I haven't had the time to check rigorously the exact source. I also went back to version 1.0 of aCatuai since I was also having a number of other problems with 1.1, but unfortunately I borrowed a few lines of code (the new PWM and thermocouple libraries) from 1.1 before realising that it still had the serial port error. Here is some typical output from Processing when the Arduino hangs (LOOPTIME 750, NCHAN 1, MIN_DELAY 300):

The output window suggests it might have had a looptime of 450? Best guess here is that you exceeded the array limits inside processing since the shorter looptime will generate more than 2X the number of data points.

Quote

Bhante wrote:
I was reducing NCHAN to 1 and reducing LOOPTIME accordingly. I also tried reducing MIN_DELAY to 270-280, but that was not the cause (whether it was a contributory factor I cannot yet rule out, but I think not). Crucial was LOOPTIME - if this was less than 1000 (even 750 with NCHAN 1 and MIN_DELAY 300) it would crash (eventually - after around 7-10 minutes, sooner with other values) with a serial port error as shown. Without the new libraries I think I reduced LOOPTIME successfully, but I need to go back and double check because the serial error sometimes only hits in after a lengthy delay and I didn't do any roasts with this setting at that time. However in any case whether or not it has anything to do with the new libraries, I am surprised that it does not allow LOOPTIME to be reduced when NCHAN is 1 - it looks like it is expecting a 1000ms loop somewhere - in the temperature measurement cyle perhaps? I haven't found anything so far.

Bourbon and Catuai were both written with a 1s cycle time in mind. In principal, I agree that it should be possible to shorten this. But at some point I suppose the array limits in the processing sketch are going to blow up since so much more data is transmitted.

Jim
 
JimG

Quote

Bhante wrote:
By the way I found that when NCHAN is reduced to 1 in aCatuai, pBourbon does not correctly parse the serial data, although the column headings are given correctly at the start of the serial output received by Processing. Does pBourbon not check the number of columns output? A workaround is to put an extra if statement in Logger to add dummy values to the serial stream:

Quote

if( NCHAN == 1 ) { // dummy values for T2 and RoR2 to avoid confusing pBourbon
Serial.print(", ");
Serial.print( 0.0, 1 );
Serial.print(", ");
Serial.print( 0.0 , 1 );
};

(Note the space after the comma in Serial.print(", "); - it makes the output a lot easier to read!)

As you figured out, pBourbon doesn't have too many smarts when it comes to parsing the input stream. It does only a limited amount of checking. It ignores the columns header, BTW, that the arduino sends.

It expects to receive input from 2 channels. So if you change the number of input channels, then you'll have to make a compensating change in the processing source code for pBourbon, or send dummy values as you did.

Jim
Edited by JimG on 10/09/2011 9:07 AM
 
Jump to Forum: