Who is here? 2 guest(s)
 Print Thread
TC4 - Bourbon application software
JimG
The Bourbon application (actually a small family of applications) is the entry level package designed for the TC4 Arduino shield.

A very long discussion of the TC4 is here:
http://forum.home...ad_id=1774

Although there is a great deal of discussion regarding Bourbon in the original thread, I think it makes more sense now to dedicate a new thread to Bourbon.

A (very) short summary of Bourbon:

1. Intended for roast monitoring only (i.e. no roaster control features).

2. Can be used as a standalone roast monitor when paired with an LCD panel.

3. Can be connected to the USB port on a PC to stream serial data to a realtime graphing/monitoring application on the PC.

4. By default, measures BT (bean temperature) and ET (environmental temperature) on type K thermocouple probes.

5. Peforms digital signal filtering at selectable levels.

6. Calculates BT rate of rise (RoR) and ET-RoR.

7. Displays timestamp, BT, ET, and BT-RoR on LCD display.

8. Streams timestamp, ambient temperature, BT, BT-RoR, ET, and ET-RoR on serial port.

9. Optionally supports the LCDapter board, which allows button presses to mark roast events (start, first crack, second crack, and eject).

The Bourbon application family includes:

1. aBourbon : an Arduino sketch that must be compiled using the Arduino IDE, and then flashed to the Arduino board connected to the TC4 shield. aBourbon has been successfully tested on Arduino Duemilanove, Uno, and Pro Mini boards, as well as the RBBB board from Modern Devices.

2. pBourbon : a processing language sketch that is run inside the processing IDE. This applications "listens" to the stream coming from aBourbon, and provides plotting, logging, and roast marker functions. It should run on any host computer that supports the processing language.

Bourbon package releases, and in-development software (open source) can be found on the TC4 project googlecode site:
http://code.googl...c4-shield/

Jim
Edited by JimG on 04/06/2011 11:44 AM
 
JimG
Notes to Bourbon developer/contributors:

The project is using a Subversion repository, hosted on googlecode. The top level folder in the repository for the Bourbon project can be found here:
https://tc4-shiel...ns/Bourbon

Below the top level folder are separate trees for aBourbon and pBourbon. Within each of these trees are a trunk folder, a branches folder, and a tags folder.

The trunk folders will generally contain the most current working versions of the source.

We will use branch folders for two purposes:

1. Release branches (RB-xxx) will be created and used to finalize and test release candidates. I will create and maintain the release branches for Bourbon, at least for now.

2. Try branches (TRY-name) will be created and used where volunteers step up and offer to help to add new features, fix problems, etc. For now, for Bourbon I will determine when/if the try branches get merged back into the trunk.

We will use tags folders to memorialize software releases. Tags folder names will be REL-xxx. For Bourbon, I will be responsible for tags folders.

Currently, the active development in pBourbon is being done by greencardigan (Brad), and can be found in this try branch:
https://tc4-shiel...s/TRY-Brad

Active development in aBourbon is being done by JimG (me) and can be found in this release branch:
https://tc4-shiel...hes/RB-200

Both aBourbon and pBourbon are nearly ready for a new release. It would be greatly appreciated if the TC4 community would do some testing of both of these programs, beginning now!

Jim
 
greencardigan

Quote

greencardigan wrote:

Quote

Bhante wrote:
I am experimenting with it just now, and when it got to 5 minutes the graphs all went blank and the axes were not extended. Did you disable that feature during your marker tests?

No, I haven't coded that feature yet.

The max time currently needs to be set before running. The axis will then scale to fit to the max time value.



A pBourbon update for Bhante smile

The time axis now gets extended by 2 minutes as the graph reaches 1 minute from the end.

pBourbon_Brad_3.zip

Some testing would be appreciated.

Brad
Edited by greencardigan on 04/07/2011 1:20 AM
 
JimG
Latest revisions to pBourbon by Brad added to repository. Click this link for diff:
http://code.googl...mp;old=430

Brad's current source can also be viewed/downloaded at this link:
https://tc4-shiel...s/TRY-Brad

Thanks, Brad smile

Jim
Edited by JimG on 04/07/2011 5:15 AM
 
JimG

Quote

greencardigan wrote:
Some testing would be appreciated.

Two roasts tonight using your current pBourbon. No problems to report. Everything went fine, in both F and C units.

First graph is from the roast done using Fahrenheit units:
JimG attached the following image:
pbourbon-test-fahrenheit.jpg
 
JimG
2nd graph is using Celsius units.
JimG attached the following image:
pbourbon-test-celsius.jpg
 
JimG
There remains one annoying little thing in the Bourbon application. The timer on the Arduino (not sure if the PICAXE will behave the same) begins as soon as the aBourbon application starts up on the Arduino.

pBourbon works with the time elapsed since pBourbon was started.

Since the applications are started at different times, and since aBourbon has to be running before pBourbon, the time displayed on the LCD screen is always going to be anywhere from a few seconds to a few minutes ahead of the pBourbon plot on the PC screen.

I guess the solution would be to have pBourbon send a timer reset code to aBourbon to sync the clocks?

Jim
 
greencardigan
Excellent! Were you using the buttons or keyboard for the markers?

I'm currently adding code to load and plot log files from previous roasts. A bit like the draw profile function. Is this worth pursuing?

Also, I don't like how the temp axis text is on the chart with the text and trace and marker all clashing. I don't think that is an easy fix though.
 
JimG
I used the LCDadpter buttons. Worked flawlessly.

Jim
 
greencardigan

Quote

JimG wrote:
There remains one annoying little thing in the Bourbon application. The timer on the Arduino (not sure if the PICAXE will behave the same) begins as soon as the aBourbon application starts up on the Arduino.

pBourbon works with the time elapsed since pBourbon was started.

Since the applications are started at different times, and since aBourbon has to be running before pBourbon, the time displayed on the LCD screen is always going to be anywhere from a few seconds to a few minutes ahead of the pBourbon plot on the PC screen.

I guess the solution would be to have pBourbon send a timer reset code to aBourbon to sync the clocks?

Jim

And the time stamp in the log files is the aBourbon time I think?
 
JimG

Quote

greencardigan wrote:I'm currently adding code to load and plot log files from previous roasts. A bit like the draw profile function. Is this worth pursuing?

I am focused on releasing a stable version of Bourbon ASAP. A bunch of people bought TC4 boards last month, and I'm not crazy about the quality of the current Bourbon package.

So I would really like to get something out there for the new TC4 users to have. And I think this timing mismatch needs to be solved first.

My proposal:

1. Brad adds code to pBourbon to issue "RESET/n" on the serial port when pBourbon is ready to start accepting data.

2. Jim adds code to aBourbon that watches the serial port and resets its timer when it receives a RESET command.

3. Test/release Bourbon with the current feature set, plus the reset feature.

How's that sound to you?

Jim
 
greencardigan
Sounds good to me.
 
Bhante

Quote

JimG wrote:
1. Brad adds code to pBourbon to issue "RESET/n" on the serial port when pBourbon is ready to start accepting data.


Sounds good. By "is ready to start accepting data" I assume you mean after clicking on the graph.

It would be nice to have the possibility for a further timer reset when adding the beans, as an option in the config file (i.e. if set in the config file, then both timers will be reset again when the beans inserted button is pressed. Then the displayed graph will start from the start of the roast, and the displayed elapsed time will always relate to the beans inserted point.

Many thanks for the new features, I'll be doing a test roast this afternoon and will post the results.
 
Bhante

Quote

greencardigan wrote:
I'm currently adding code to load and plot log files from previous roasts. A bit like the draw profile function. Is this worth pursuing?


I think so, definitely! See the Too Much Coffee link below for some nice ideas about doing this.

Quote

greencardigan wrote:
Also, I don't like how the temp axis text is on the chart with the text and trace and marker all clashing. I don't think that is an easy fix though.


GreenBean has a very nice solution to the marker texts in his logger project on Too Much Coffee here:

up.picr.de/6773506pex.png

For those not familiar with this project you can find out more here:

http://www.toomuc...;start=135

Bhante
Edited by Bhante on 04/08/2011 4:22 AM
 
joelk00
I apologize for my ignorance but is there any place that I can go that will give me step-by-step instructions on how to 1) get what I need to implement this program 2)tell me how to implement it in idiot speak? All this technical talk is very confusing to me and would love to get this going on my roaster. Sorry, it may just be a matter of me not wanting to read 500 threads as wellsmile I sincerely mean no offense to anyone involved with this program, this sounds AWESOME and would just like to get my hands on what I need in the most simplistic way possible.

Thanks!
 
JimG
I understand completely your frustration!

In the very near future, I plan to launch a new thread that provides exactly the information you described. Splitting this Bourbon application thread off was a first step towards trying to distill the huge TC4 discussion into usable chunks.

Hopefully, over the next few days, I'll have a chance to start the planned thread called TC4 - Overview and announcements, as described in this thread.

In the meantime, your choices are to wade through the original TC4 thread:
http://forum.home...ad_id=1774

or to hop over to the googlecode site for the project:
http://code.googl...c4-shield/


Jim
Edited by JimG on 04/08/2011 9:49 AM
 
joelk00
Thanks Jim,
I think i will wait for the new thread smile honestly I would just confuse myself with all this if I continued to read. On a scale of 1 to 10, 1 being the easiest...I order a few parts and plug them in and start roasting, and 10 being the hardest...I need to order stuff, put it together, go to the hardware store 10 times, and want to drive off a cliff during the whole process, where would this program and getting this up and running fall. Please be honest!

Thanks,
Joel
 
JimG
Today, the number would be 42 smile

With improved documentation, we can probably lower it into the 8-ish range, at least for the Bourbon application.

If you already have 2 type K thermocouples mounted in your roaster, the difficulty probably drops to 5, depending equally on your proficiency with a soldering iron and patience with installing new app's on your PC/Mac.

Jim
 
Bhante

Quote

JimG wrote:
Today, the number would be 42 smile

Wait, isn't 42 greater than 10? Sounds a bit dangerous ... Maybe you mean 9.42 ...

Quote

joelk00 wrote:
10 being the hardest...I need to order stuff, put it together, go to the hardware store 10 times, and want to drive off a cliff during the whole process
 
randytsuch
For some of my other projects, I have made blogger pages to document the build process.

For projects like putting together a TC4/arduino/roaster, forum posts aren't the best vehicle (IMHO).

It would be nice to have a set of instructions to point to.

At some point, I attempted to create instructions to help install and setup the arduino and processing software, they are available on the download page.

Randy
 
randytsuch

Quote

JimG wrote:

Quote

greencardigan wrote:I'm currently adding code to load and plot log files from previous roasts. A bit like the draw profile function. Is this worth pursuing?

I am focused on releasing a stable version of Bourbon ASAP. A bunch of people bought TC4 boards last month, and I'm not crazy about the quality of the current Bourbon package.

So I would really like to get something out there for the new TC4 users to have. And I think this timing mismatch needs to be solved first.

My proposal:

1. Brad adds code to pBourbon to issue "RESET/n" on the serial port when pBourbon is ready to start accepting data.

2. Jim adds code to aBourbon that watches the serial port and resets its timer when it receives a RESET command.

3. Test/release Bourbon with the current feature set, plus the reset feature.

How's that sound to you?

Jim


Just an FYI post
In Kona, I didn't like it that that time started as soon as the arduino program started running.

I created a start of roast variable, and set up the logic to wait, and not start the PID program until "starttemp" is reached. For my use, I set starttemp at 200F. Until then, the program just turns on the heater at some level PWM (I think I set it at 80%).

Once ET reaches 200F, then the PID program starts, and this turns on the chart display for pKona.

I remember the time of starttemp, and subtract that from the global time, to come up with a roast time.

Hope that make sense, not sure if it matters either.

Since my roast time always start at the same ET, my charts and other numbers are pretty consistent.

Randy
 
bvwelch

Quote

JimG wrote:
My proposal:

1. Brad adds code to pBourbon to issue "RESET/n" on the serial port when pBourbon is ready to start accepting data.

2. Jim adds code to aBourbon that watches the serial port and resets its timer when it receives a RESET command.

3. Test/release Bourbon with the current feature set, plus the reset feature.

How's that sound to you?

Jim


With just slightly more effort, you could define an equivalent message for each of the 4 tc button operations. I'm not sure how useful that is, but t wouldn't be too hard.

In future another slight variation would be to detect Artisan mode versus pBourbon mode.

Once aBourbon starts parsing incoming lines from the Uart, you've opened Pandora's box. :-)

On the other hand, I'm not sure I favor seeing aBourbon/pBourbon getting more and more features... The number of bugs/quirks/problem seems to increase with the number of lines of code... At least in my code it does.
Edited by bvwelch on 04/08/2011 4:18 PM
 
Bhante

Quote

greencardigan wrote:
Some testing would be appreciated.

I have done a trial roast, and the general program controlls all did fine without a hitch.

I found using my HotPot gas roaster the RoR oscillates pretty wildly, compared to the HottoP. I'm wondering what my best solution for the filtering is in this case. I had BT_Filter and ET_Filter both on 10, and Rise_Filter on 85. The main problem is to cancel out the heavy fluctuations in the very short term. Maybe it wants some kind of averaging combined with the RC filter. The T0 and T1 values in the log file are totally without any filtering I think, is that right? So I should be able to experiment with them in excel (if I can work out how to do it, that is!).

Having a close look at the log data there are some strange anomalies, all in the second minute. There are 4 anomalous values of T0 and one of T1, all of which last only 1 reading and are all in the range 390 to 394 degrees Centigrade, and the values on either side are all within 124 to 178 degrees. RoR goes up to well over 2000 in each of these cases.

up.picr.de/6779533eko.jpg

Bhante
 
JimG

Quote

bvwelch wrote:
Once aBourbon starts parsing incoming lines from the Uart, you've opened Pandora's box. :-)


Too late. The demons are out Shock

Kidding aside, it was a very simple addition to the code. And it seems to work.

Better yet, I am really pleased with how it cleaned up the timing sync issue with pBourbon!

Jim
 
JimG
I have completed a series of revisions to pBourbon. Apologies to Brad for jumping the gun, but I needed the RESET code in pBourbon to debug aBourbon.

Here is a link to a diff showing the revisions I made from Brad's last post:
http://code.googl...mp;old=444

I've placed the most up to date pBourbon in a release branch (RB-200) for final tests/tweaks:
https://tc4-shiel...hes/RB-200

Please let's use the RB-200 version for testing, fixing from this point forward. Thanks.

Jim
 
Jump to Forum: