Who is here? 1 guest(s)
 Print Thread
TC4 Roasting App
greencardigan
Hi all,

I've just published my TC4 Roasting android app on the Google Play Store.

Free version link

and

Ad free version link


TC4 Roasting App Summary:
The TC4 Roasting App makes it easy to control your TC4 based coffee roaster remotely via bluetooth, and gives you instant visualization of roasting temperatures and roaster settings. It features real time plotting and display of your roasting temperatures as well as saving to a roast log file.

You can operate your roaster manually using the customizable control buttons or automatically using simple roast profiles stored on your device.

Main Features:
- Remote control of TC4 based coffee roaster.
- Allows automatic heater control using PID Set Variable commands and simple ramp/soak roast profiles.
- Live digital display of roasting temperatures and roaster settings.
- Live plotting of roasting temperatures.
- Logging of roasting temperatures and roaster settings to a CSV file.
- Customizable control buttons.
- Customizable plotting and logging options.
- Dedicated button for marking crack times, start/stop roast and logging.
- Customizable input parameters to define what parameters are being received and logged.
- Ability to send repeated 'read' and 'PID' commands at customizable intervals.

Works with:
- TC4 based coffee roaster controllers with bluetooth dongle attached. The default setting in the App should work fine with the aArtisan sketch for the TC4 and TC4C. (more info here: http://forum.home...ad_id=3334)
- Other hardware (eg. Arduino) capable of sending comma separated data via bluetooth.
greencardigan attached the following images:
screenshot_2015-07-24-19-55-59.png screenshot_2015-07-24-19-55-53.png screenshot_2015-07-24-19-55-14.png screenshot_2015-07-24-20-58-33.png screenshot_2015-07-24-19-54-44.png
 
greencardigan
And a quick demo video.


Edited by renatoa on 04/18/2023 1:18 AM
 
JackH
It looks great Brad. Nice work!
---Jack

KKTO Roaster.
 
ginny
very nice Brad,

thanks for letting us know.

ginny

cool
 
greencardigan
TC4 Roasting App - User Documentation

1. General

While this app can be used with various coffee roaster hardware setups, it was developed to support the TC4 Shield for Arduino and the TC4C controller. The TC4 system can be programmed with the aArtisan.ino sketch or aArtisanQ_PID.ino sketch. However, other code versions may also work. The default settings in the app are compatible with the aArtisan.ino sketch. See the following links for more information.

http://forum.home...ad_id=2222

http://forum.home...ad_id=3322

The coffee roaster controller must be able to send and receive text data over bluetooth. A simple way to add bluetooth support is to use a low cost HC05 type bluetooth module connected to a tx/rx port on you Arduino or other device.

2. Connecting to a Roaster

To connect to a bluetooth enabled coffee roaster controller, select 'Connect to Roaster' from the options menu. Previously paired devices should be displayed in a list. Clicking on a device will initiate the connection. If you gave not previously paired your roaster, press the 'Scan for devices' button and select your device from the 'Other devices found'.

3. Control Buttons and Commands

Most of the control buttons on the main app screen can be customised. Both the text displayed on the button and the command sent can be changed. This can be done from the options menu -> 'Settings' -> 'Button Text and Commands'.

Some buttons are not customisable or only partially customisable such as the 'Start Roast' and 'End Roast' buttons which can only have their commands changed. The button text for these buttons can not be changed. Similarly, the 'Start Log', 'End Log' and 'Crack Marker' buttons have a dedicated uses in the app and cannot be customised.

Commands accepted by the TC4 system can be found here: http://code.googl...mmands.txt. aArtisanQ_PID adds the following additional commands:

OT1;UP
OT2;DOWN
OT2;UP
OT2;DOWN
PID;GO
PID;STOP

Commands can also be entered into the text input field on the main app screen and sent by pressing the 'Send' button.

The current command being used for each button can be quickly viewed by long pressing on the button.

The 'Start Roast' button will send the optional command, reset the elapsed time and start logging any received data. The 'End Roast' button will send the optional command buit will not end the logging.

The 'Start Log' does not send any control commands but will start the app logging any data received from the roaster. The 'End Log' button will end the logging and save the log file to your device's internal memory as a CSV file.

The crack marker button (initially labeled 'FC Start') allows the user to add a marker to the log file corresponding to the various stages of the roast. At the commencement of a roast, the button is labeled 'FC Start'. Pressing this button will add a 'Frist Crack' marker to the log file. The buton text will then change to 'FC End' followed by 'SC Start' after a second press. Each press will add the relevent marker to the log file.

4. Receiving data from your roaster

Data received by the app from the coffee roaster controller should be in comma separated values (CSV) format. The type and order of received data parameters can be specified from the options menu -> 'Settings' -> 'Received Data Parameters'.

For example, setting 'Parameter 1' to 'Bean Temperature' will result in the first value in the received data string to be allocated to the bean temp variable and thus displayed in the digital display and graphed if enabled. Setting a parameter to 'Other' will not assign the received value to any variable but still allow it to be logged. Setting a parameter to "Not Logged" will result in the received parameter being ignored.

Any data received from the coffee roaster controller that begins with a '#' symbol will be treated as a comment and added to the log file (if logging) along with a time stamp.

5. Read Command

The app provides a 'Read Command' option where a command is sent to the coffee roaster controller at a specified interval. For the TC4 system (running aArtisan or aArtisanQ_PID), the coffee roaster controller will return measured temperatures and coffee roaster settings once the correct 'Read Command' is received. The 'Read Command' and 'Read Interval' can be enabled or customised from the options menu -> 'Settings' -> 'Read Command'.

6. Roast Profiles

Roast profiles stored on your device's memory can be loaded into the app by selecting 'Load Profile' from the options menu.

Roast profiles need to be in a CSV (comma separated values) file format. The first line in the file is not used but can contain the column headings. See the example format below.

SV,RAMP,SOAK
25,0,0
150,240,0
200,240,0
216,240,0
0,0,0

This sample roast profile would result in the set variable (SV) starting at 25 degrees at time zero, ramping to 150 degrees over 240 seconds (4 minutes), then ramping to 200 degrees over another 240 seconds, then ramping to 216 degrees over another 240 seconds, and finally dropping to zero after a total of 720 seconds (12 minutes).

If the 'SV Command' option is enabled ('Settings' -> 'PID Set Variable Command'), the app will attempt to send the set variable command followed by the SV value. The interval for sending the set variable command can also be specified here. For example, when using the TC4 roaster controller, the SV Command would be PID;SV; and the app would send PID;SV;xxx where xxx is the current SV values coming from the loaded roast profile.

Roast profiles can also be unloaded by selecting 'Unload Roast Profile' from the options menu.

A default roast profile can be set to auto load when starting the app. This setting can be found in the options menu under 'Settings' -> 'Load Roast Profile on Startup' and selecting a roast profile to auto load.

7. Log Files

Once logging is ended, the app will attempt to save a CSV file to your device's internal memory. The default location for storing the log files will be in your device's base directory under a folder named 'Roast Logs'. The log file filenames will have the following format: 'Roast_YYYYMMDD-HHMMSS.csv'. If a roast profile was loaded, the name of the roast profile used will be appended to the filename as follows: 'Roast_YYYYMMDD-HHMMSS_RoastProfileName.csv'.

The first line in the log file will contain column headings. These column headings are created based on the 'Received Data Parameters' as set up in the app settings.

8. Default Folders

The default location for storing log files will be in your device's base directory under a folder named 'Roast Logs'. The location for saving log files can be adjusted from the Options Menu -> 'Settings' -> 'Roast Log Folder'.

The default location for storing roast profile files can also be specified under the Options Menu -> 'Settings' -> 'Profile Storage Folder'

9. Graph and Color Settings

The app currently allows for graphing of the 'Bean Temperature', 'Environmental Temperature' and the Roast Profile if loaded. The plotting of these variables can be enabled/disabled from the Options Menu -> 'Settings' -> 'Color and Chart Settings'.

Colors for the plotted lines and digital display of variables can also be customised from the Options Menu -> 'Settings' -> 'Color and Chart Settings'.
 
Will2
Do not forget to switch the Android system language to English.
Otherwise it will not work roasting by loading a profile, the application will crash.
A problem with Java.
At least for me on two android devices.

Viliam
Edited by ginny on 02/15/2016 7:40 AM
 
BenKeith
Brad, will the blue tooth work on the ATmega328 UNO R3 or does it have to be the Mega 2560? I've ended up with a couple extra UNO R3's where they've quit, order a new one and then get the old one going again, but it looks like everything I see in Bluetooth is for the Mega 2560.
I have a TC4 just for running your 5.3 as a stand alone when I don't want to mess with the computer, and I really like the looks of your Bluetooth App. Just got to figure out what all I need. It's looking like the Mega 2560 and Bluetooth module.
 
greencardigan
It should work on both the UNO and Mega. I have the bluetooth module simply connecting to the rx and tx pins. These two pins should also be connected to the USB socket via the USB to Serial converter chip.

If you have the bluetooth module connected, it will probably stop you using the USB connection. I add a switch on the data rx or tx line (can't remember which) between the Arduino and the bluetooth module. I essentially use this switch as a USB/Bluetooth toggle.

See my attached wiring diagram (modified version of Jim's)
greencardigan attached the following image:
brads_tc4-wiring-small-20111120_2_1.jpg
 
BenKeith
Thanks, I guess I should have opened one up and looked, I thought it connected to the Arduino, didn't realize it connected to the shield.
I will order one and see how it does. Looks like a great option.

Wages must be mighty low there. Your share of 99 cents for the app is not going buy much coffee.
 
greencardigan
Well it connects to the TC4 shield but those pin aren't used by the TC4 so it goes directly down onto the Arduino anyway.

Haha, I'm not really trying to make any $ from app sales. I spent WAY too many hours trying to learn app development and build the app and I don't expect the app to be popular enough to make it anywhere near profitable. If I can get my $25 app developer fee back I'll be happy.

Don't forget there is the free version if you don't mind losing a bit of screen real estate for an ad.
 
BenKeith
I'd pay $10 to avoid the adds!

Anyway, a Bluetooth board is on order.

I think I will just build a third. I have a couple R3 boards that I've repaired. One of my TC4 boards went south on me so I ordered another, and got the one messing up fixed before it arrived so I have three TC4 shields now. I have a spare display but won't need it with the app. The boards are about the size of a 1,800mAh 3S LiPo battery I have. Make me a small case to stack everything in and shouldn't be no bigger than a pack of cancer sticks.
 
greencardigan
What bluetooth boards are you getting? I use the cheap HC05 modules. Let me know how it goes when you give the App a try.
 
BenKeith
Now he tells me. I could have bought three of those. When I typed in Arduino UNO R3 Bluetooth. they were all coming back and $9.90 something. Some kind of a 4.0 HM-10. Said it works as a Master or slave. I just picked the one that had the highest customer satisfaction rating.
 
BenKeith
I figure with my luck, there will be compatibility problem since you used the HC05, so I now have two Bluetooth modules on order. Ordered the HC05 also.
 
Will2
I'm joined HC-06 module.

up.picr.de/24608600lp.jpg

Properly is, when is used also 5V / 3V IIC UART TTL Logic Level Converter Module, although it also works without it.
I think in the original image from Jim's is not entirely clearly marked connection ZCD pin?s +5V as NO connect. This should be connected to + 5V always when I want to use aArtisanQ_PID.

Good luck!

Viliam
 
greencardigan
I've also released another bluetooth app called Arduino Centrale which could also be used for logging and controlling a coffee roaster.

It currently doesn't have the ability to send SV values to the TC4 but has enhanced control options like toggles and sliders that the TC4 Roasing app doesn't have.

Free version: https://play.goog...trale.free

Paid version: https://play.goog...trale.paid
 
Will2
I am very grateful for the application TC4 Roasting App.
Now just open the .csv file in Excel and create a chart.

up.picr.de/24640377cq.jpg

A complete overview of all parameters of roasting at every second.
In the future, maybe even add a RESET command to TC4 at start of roasting, so I can use the command pid;P1 as it was in the previous version of the program.
Viliam
 
BenKeith
I thought the first one allowed controlling it. I guess I will be getting the second one.
I'm going to have to learn how to use aArtisan again. I haven't use it since I started using RoatLoggerTC4 and the way it allows setting RoR's and controlling by that. Matter of fact, I think it was Q_PID 4.3 I used almost all the time.
Since doing a relearn of everything, I haven't roasted any without the computer and that's what I used aArtisanQ-Pid for.
Edited by BenKeith on 02/19/2016 8:04 PM
 
greencardigan
Both Apps will control the TC4 and log data.

TC4 roasting allows full control of the TC4 including sending SV values stored in a profile saved on your Android device. It also has customizable buttons to control the TC4.

Android Centrale cannot automatically send SV vales from a profile but can still control the roaster with customizable buttons and sliders. Android Centrale was intended to be a more general purpose bluetooth control/logging app.
 
BenKeith
It they weren't just so dang expensive I could probably just download both and see which one I like.
 
greencardigan
Haha if the Australian dollar drops any lower I'll have to pay you instead of getting paid.
 
BenKeith
OK Brad, I just made you a wealthier man, I just downloaded both of your apps.

The HC05 Bluetooth module came today and I just stuck it on that third TC4/Arduino board I have since it's not even in a case, Just the two boards, nothing else, other than the Bluetooth I just connected.

Now I've got to figure out just what I do have.
Using the TC4 Roasting app, it shows I'm connected to the Bluetooth and showing no profile loaded

Now, there is one problem I'm running into. Without the Bluetooth Tx and Rx plugged in, the aArtisanQ_PID and the Profile Loader load to the Arduino just fine as always. However if I have the Tx and s***, it just dawned on me, that's what I ordered the switch for, to turn the Tx and Rx off when the USB is connected. I was going to say I was getting a Sync500 error but that's probably why.

I guess I need to print and read all your instructions now on how to use it and get a profile loaded
Edited by BenKeith on 02/29/2016 7:30 PM
 
greencardigan
Yes, I don't believe you will get USB and bluetooth working at the same time if you're using the tx and rx pins on the UNO.

The HC05 may come with it's BAUD rate set at 9600, so you may need to change the BAUD rate setting in user.h.
 
BenKeith
Well, so far, with the Bluetooth on this bare board, with nothing but the Arduino and TC4 piggy backed on it, I'm not getting anything other than it says I'm connected. I changed the baud rate to 9,600 in userh but I'm yet to see anything on the chart, or temps, fan htr etc. All that's blank. Unless it has to have a profile loaded first because apparently it doesn't recognize the one loaded in the Arduino with the Profile loader.
 
greencardigan
Some things to check.
- USB cable from Arduino to computer unplugged?
- Check in the app settings to see if it's sending the READ command automatically each second.
- HC05 tx to rx on Arduino and HC05 rx to tx on Arduino

Also you could try connecting to the TC4/HC05 bluetooth using the Arduino Serial terminal on the computer.
 
Jump to Forum: