Who is here? 1 guest(s)
 Print Thread
TC4 - Bourbon application software
Bhante

Quote

JimG wrote:
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.

Evidently it was 450 in this case, but I tried 750 also with the same result.

Hmmm, I'm rather confused. If the root cause of the error is in processing rather than on the Arduino, why does the Arduino hang - does it have to wait for a response from Processing on the serial port, or does it churn out the data continuously? Why does a shorter looptime generate more data? Each line of serial data is the same. Why would Processing fill up arrays with several lines of serial data? Or do you mean it is storing the data while plotting the graph? In that case it is partly a computer-speed issue. Maybe it hangs when there is a momentary surge in demands on resources on the computer.

Judging from his description of the error message, UNM's error sounds like the same as mine.
 
JimG

Quote

Bhante wrote:
Hmmm, I'm rather confused. If the root cause of the error is in processing rather than on the Arduino, why does the Arduino hang - does it have to wait for a response from Processing on the serial port, or does it churn out the data continuously?

Without more information, I can't explain why the arduino would hang. I don't think the arduino cares whether or not processing is successfully reading the data. It just spits out data to the serial port without waiting for an ACK.

But I suppose it is possible that processing is resetting the COM port when it hiccups? This would cause the arduino to reset as well.

The only issues I've personally seen on the arduino side have been caused by (I think) power glitches that mess up the communication with the LCD. And I have only seen this occur on my espresso machine -- never on the roaster.

Quote

Bhante wrote:
Why does a shorter looptime generate more data? Each line of serial data is the same. Why would Processing fill up arrays with several lines of serial data? Or do you mean it is storing the data while plotting the graph? In that case it is partly a computer-speed issue. Maybe it hangs when there is a momentary surge in demands on resources on the computer.

The processing sketches use large arrays to store all incoming data. Processing redraws the screen constantly "from scratch", so it needs all of the past data for every redraw.

Jim
 
Bhante

Quote

JimG wrote:
But I suppose it is possible that processing is resetting the COM port when it hiccups? This would cause the arduino to reset as well.

The only issues I've personally seen on the arduino side have been caused by (I think) power glitches

If processing is causing the arduino to reset then the arduino will reset not hang. Unless the arduino is waiting for a handshake it appears to me the problem ought to be on the arduino side. I've seen the power glitches you refer to (with a poor quality USB cable with a rather poor connector), but that has totally different effects.

Quote

JimG wrote:
The processing sketches use large arrays to store all incoming data. Processing redraws the screen constantly "from scratch", so it needs all of the past data for every redraw.

If that is the issue, the amount of data involved is very tiny compared with the amount of data Processing is able to handle - I've had it hang after less than 1 minute with a loop time of about 300 ms, and on the other hand I've left it running for a couple of hours with a loop time of 1s, and it continued merrily plotting away without complaint. There is something else going on here.

Bhante
Edited by Bhante on 10/09/2011 1:14 PM
 
UNM

Quote

JimG wrote:

Does this happen on battery power?

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


Not tried battery power, but the wall wart was on the same strip as my triac power control, so interference could well be an issue. Will make up a 9v battery connector and use that, or laptop power in future.

I THINK it was processing 1.2.1 on windoze I initially tested with. Will grab a copy for linux and try that next. I know it is not pBourbon as such, but something in my environment that is the problem.

Many thanks.

No need for a compiled version, but appreciate the offer.
Edited by UNM on 10/09/2011 6:36 PM
 
UNM
No joy with processing 1.2.1, same problems. I've just been using the java environment included with the processing .tgz file, so will install a full java package separately and retest.

The arduino hangs I saw - better news there. Hangs seemed related to power going to the heater - full heat OK, partial heat caused hangs. Heater off, OK.
Tried off battery power and same thing, then realised that in among the mess of cables on the workbench, the power cable between the triac heat controller and the hottop went right under the power connectors of the Arduino/TC4 and the LCD interface cable.
D'oh!

All seems good since rerouting cables. Almost certainly interference.
 
JimG
Sounds like you've figured out the problem. Glad to hear it.

The only other thing I will mention is that I have found the LCDapter (I2C interface to an LCD panel) seems to be a little sensitive to noise (fluctuations in Vcc, I think). If your system acts up again, you might temporarily disable the LCD and see if that makes a difference?

The LCD display I am using on my espresso machine was flaking out once in a while when I switched the pump off. I put a suppressor diode across mains right at the connection to my Arduino's 9V switching power supply, and that has fixed it so far.

Jim
 
UNM
Tried with a Windoze XP netbook and processing 1.2.1. All good and did a dummy test roast (more hangs as the cable from Arduino -> LCD passed under the netbook case. It seems really prone to interference.
Rerouted cable and managed a roast of Harrar with no problems and saved log/graphs.

Will sort out the Ubuntu problems separately.
Next step is to fit plugs/sockets for the thermocouples (so I can easily move the arduino for testing/programming) and add in arduino control of roaster heat/fan.

Bourbon all seems to work fine for now, much easier than pencil and notepad.
 
JimG
Thanks to LoftyNotions, a new installation/user guide for the Bourbon application is available. I uploaded Larry's file to the project googlecode site today. You may view and download it here:
http://code.googl...bon%2Fdocs

Thanks, Larry!

Jim
 
greencardigan
Hi Jim,
I've just downloaded the latest version of Bourbon (2.3a) and it doesn't seem to have any info regarding the changes made since version 2.2.

I'm thinking of adding some PIC algorithms to pBourbon. Do you think that's a worthwhile endeavor?

Brad
 
JimG
Hi, Brad -

Version 2.2 is the latest version of pBourbon. Following are the release notes for that version:


Version 2.20
------------
The program will look for files with these names, and
if found, open them:

"profile.csv":  A guide profile in default F units
"logfile.csv":  A saved log file in default F units

If the config file has put the program in C units, then it will
look for, and open if found, these files:

"profile_c.csv"
"logfile_c.csv"

The guide profile and saved log files are optional.

pBourbon will log up to two output levels (e.g. for a heater or for a fan). 
It will plot only the first output level, however. If pBourbon finds values in
the serial stream following the temperature data, then it will process them. 
If there is no additional data following the temperature data, then no errors will be
generated and no output trace will show up.



What kind of PIC features do you have in mind?

Jim
 
greencardigan
Hi Jim,

Sorry, bad typo. I meant to say PID algorithms.

I downloaded Bourbon-REL-230a.zip and assumed it was version 2.3.
 
ciel-007
Jim, thank you for this valuable update - that's much appreciated!

Might you have a tentative release date for the new interface board that would enable me to attach the Arduino/TC4 to a HotTop ?P?, and to contol it with RoastLogger please? Cheers, Ciel


--------------------------------------------------------------------------------
Ciel... seeking Heaven in my cup with ................................................................................................................. EXPOBAR Brewtus II - MAZZER Mini E - MAHLK?NIG Vario - GeneCafe - RAF-1 Extreme (Modified B-2 HOTTOP) - BellaTaiwan XJ-101
 
JimG

Quote

greencardigan wrote:I downloaded Bourbon-REL-230a.zip and assumed it was version 2.3.

I can't believe you fell for that one, Brad. It's the oldest trick in the book!

Jim
 
JimG

Quote

ciel-007 wrote:Might you have a tentative release date for the new interface board that would enable me to attach the Arduino/TC4 to a HotTop ?P?, and to contol it with RoastLogger please?

It is very close, probably less than 2 weeks. Controlling Hottops with D and B panels has been working correctly for many weeks. But the P panel presented some very odd wrinkles. With an awful lot of work by GreenBean everything has now been ironed out for the P.

Jim
 
ciel-007
Thanks Jim.

BTW, are you referring to THE GreenBean (UK) who did pioneering work using Roast Logger, USB and a WebCam on his HotTop?
Ciel... seeking Heaven in my cup with ................................................................................................................. EXPOBAR Brewtus II - MAZZER Mini E - MAHLK?NIG Vario - GeneCafe - RAF-1 Extreme (Modified B-2 HOTTOP) - BellaTaiwan XJ-101
 
JimG

Quote

ciel-007 wrote:.

BTW, are you referring to THE GreenBean (UK) who did pioneering work using Roast Logger, USB and a WebCam on his HotTop?

That's the one!

Jim
 
ciel-007

Quote

JimG wrote:

That's the one!

Jim


cool!
Ciel... seeking Heaven in my cup with ................................................................................................................. EXPOBAR Brewtus II - MAZZER Mini E - MAHLK?NIG Vario - GeneCafe - RAF-1 Extreme (Modified B-2 HOTTOP) - BellaTaiwan XJ-101
 
Bhante

Quote

JimG wrote:

Quote

ciel-007 wrote:Might you have a tentative release date for the new interface board that would enable me to attach the Arduino/TC4 to a HotTop ?P?, and to contol it with RoastLogger please?

It is very close, probably less than 2 weeks. Controlling Hottops with D and B panels has been working correctly for many weeks. But the P panel presented some very odd wrinkles.

Jim, I am puzzled why you want to use an external SSR and darlingtons etc for switching on the Hottop when the Hottop has all the necessary switching built into the mainboard for heater and fan, and (on all models!!) a logic-level cable coming from the control panel to the mainboard. By simply tapping into the logic-level cable and controlling the logic levels externally you can control whatever you like on all models of the Hottop, as I showed here:

http://forum.homeroasters.org/forum/viewthread.php?thread_id=2303

As far as I am aware, this should work with the analog, D, B and P models. It is the simplest possible solution, and can in principle also be used with many other roasters that use digital control. All you need are a couple of optos and a couple of resistors. If you add a few extra optos you could also control eject, drum etc externally. What am I missing?

Bhante
 
JimG
Bhante -

You are not missing anything!

The interface board uses a very similar approach as you posted. Tom (aka GreenBean) had also built a similar board to your's.

The new interface board adds a few wrinkles, though. Firstly, it will support both the D model's direct logic (i.e. 5V = ON), or the inverted logic of the B and P boards (5V = OFF).

Secondly, it has a microprocessor on board that monitors the state of the roaster to avoid applying heat at inappropriate times (like when the drum is not turning or when the beans have been ejected).

There are many other safeguards built into the firmware on the interface board as well.

Jim

PS - for those waiting for release of the board, please bear with me as I have taken a couple of weeks off for our annual Colorado vacation.
 
jedovaty
I use and enjoy Bourbon application after trying to get the others to load in my tc4 setup - it is simple and works on my aged laptop (ibm thinkpad x31).

I made a small tweak to have the timer appear to reset to zero when you press "B" to indicate start of roast; I have been using it now for a few weeks, seems to be working. It doesn't make changes to the csv files. Attached zipfile with diff as well as the modified processing file. See attached picture (note, three temp readings and fan voltage are not included, Jim and Bill helped me out quite a bit with those, thank you both!!).

Hope others find this helpful!
jedovaty attached the following file:
bourbon_time_changes.zip [8.25kB / 874 Downloads]
jedovaty attached the following image:
roast201209161808-amaro_gayo.jpg
 
alexH
Jim et al, I am getting java.lang.nullpointerexeptions when i click on the bourbon logging window. I am running the 32bit processing on a 64bit windows 7 machine.

java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
 
JimG
Alex -

Those errors suggest to me that Processing is not successfully finding the COM port assigned to your Arduino (or TC4C).

Try downloading/running this little Processing sketch. It will list for you the ports that it "sees":
http://tc4-shield...EL-100.zip

Jim
 
alexH
Jim.

That sketch tells me that it sees COM1 and 3. I set pbourbon.cfg com default to COM3because the arduino program and devmgr tell me that is its port.

Clicking still produces no graph and i get debug output as follows


logs/roast201209261206.csv
The file "profile.csv" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
The file "logfile.csv" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
COM Port: COM3
Baudrate: 57600
Fahrenheit or Celsius: Fahrenheit

Initializing COM port. Please stand by....
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
COM3 comport opened.
comport clear()'ed.

Synchronising with remote:
0 reset(s) required.


Greatly appreciate your help as always.
 
alexH
I unplugged and reconnected the uno+tc4 unit and a click now produces


Synchronising with remote:
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
java.lang.NullPointerException
at processing.serial.Serial.write(Unknown Source)
at processing.serial.Serial.write(Unknown Source)
at pBourbon.resetRemote(pBourbon.java:726)
at pBourbon.mouseClicked(pBourbon.java:738)
at processing.core.PApplet.handleMouseEvent(PApplet.java:2440)
at processing.core.PApplet.dequeueMouseEvents(PApplet.java:2373)
at processing.core.PApplet.handleDraw(PApplet.java:2139)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:662)
0 reset(s) required.
 
alexH
I got it working on my xp laptop, which is what I use for roasting anyway.
 
Jump to Forum: