Who is here? 1 guest(s)
 Print Thread
4-channel TC meter and datalogger project
randytsuch
Hi Dan and Jim,
FYI, I ended using pins D0, D1, D3 and D5 for my switches.
Switches are pulled up to +5 through a 5k resistor, pulled to ground (0) when I push them.

I understand there are other ways to do it, but since these pins are unused right now, I figured I would use them. I thought I would only move them to an I2C input if I needed those pins for something else. Maybe short sighted, but I thought it was the easiest way to approach.

I know I could save pins by using few switches, they are defined as Plus, Minus, Enter and Escape. I could select profiles with a Plus and Enter key only, but Minus makes it more user friendly. I may get rid of the Escape key. It will be the least used, and having to support Escape (or exit) will make the UI code more complicated.

I want to support Minus, because I was also planning to use the keys to let you modifiy PID parameters on the fly, to make it easier to tune the PID. I have had to recompile and reload every time I want to change something, which is a pain. It will probabaly only allow you to change one parameter per session, but it would be nice to change I throughout a ramp, to see how it effects the output. You will still need to recompile/reload for the final values.

Unrelated note. I had some weirdness last night, I think my program is crashing because I am running out of Ram, and stepping on things. I defined a bunch of structures, which I am pretty sure is the cause.
I am going to try using PROGMEM, to store the profile data, and see if that fixes things.

Randy
Edited by randytsuch on 09/02/2010 10:19 AM
 
JimG
I'm probably getting ready to expose my ignorance (again), but don't you need to reserve D0 and D1 for talking to a PC over a serial interface?

Jim
 
randytsuch

Quote

JimG wrote:
I'm probably getting ready to expose my ignorance (again), but don't you need to reserve D0 and D1 for talking to a PC over a serial interface?

Jim


Hi Jim
Thanks for this information
You are right, I guess I was thinking the USB was coming in on the "magic" pins, but they do come in the the D0 and D1 serial pins smile

So, I need another approach.

I was looking for other pins, and they are really in short supply now, so I decided to try a little harder, and just use one analog input pin.

It should be fairly simple to build a resistor ladder out of a few resistors, there is a description here
http://books.goog...mp;f=false

Thanks for keeping me in line

Randy
 
JimG
I think that A2 through A5 are available on your PCB. I think D3, D5, D6, and D11 are also available.

The resistor ladder is a much more manly solution, though Grin

Jim
 
randytsuch

Quote

JimG wrote:
I think that A2 through A5 are available on your PCB. I think D3, D5, D6, and D11 are also available.

The resistor ladder is a much more manly solution, though Grin

Jim


So I went the manly route ThumbsUp

It takes one more resistor then the other way, but only uses one analog pin.
The program logic is a little trickier this way, but nothing too bad.

And, I had a good day yesterday ;)
(I have had some bad days too :( )
Installed the resistor ladder to A2, and it works fine, after fixing a couple logic errors in my code.

I also think I have the PROGMEM stuff working, so I think I am storing and retrieving the profiles from Flash. I need to do a little more testing, before I declare victory on this.

I am planning to have to program support up to 16 unique profiles.

Hope to roast something tonight or tomorrow, with this new, improved code.

Randy
 
JimG
Nice! Looking forward to learning more about how you're making all this magic happen.

BTW, I goofed on the available pins. Pins A4 and A5 are definitely NOT available. They are dedicated to the I2C bus in our designs.

However, A0 through A3 could have been used for the unmanly option.

Jim
Edited by JimG on 09/04/2010 10:04 AM
 
randytsuch

Quote

JimG wrote:
Nice! Looking forward to learning more about how you're making all this magic happen.

BTW, I goofed on the available pins. Pins A4 and A5 are definitely NOT available. They are dedicated to the I2C bus in our designs.

However, A0 through A3 could have been used for the unmanly option.

Jim


For some reason, I though A0 and A1 were used, I guess not.

I wrote a simple program, to read and display A2, and I found that the switch values are not always consistant, I think because of noise. I did not put any caps on the switches to filter noise out.

I am going to play with timing to see if I can use delays to wait until it's stable, and see if that will work good enough for this.


It would also probably be a more reliable interface if I split up the switches into using A2 and A3, so just two switches on each input, but that makes the wiring more complicated, and I'm not sure if it's worth it.

I also had more crashing last night, I had to comment out some of my code to make it run. I'm sure I'm overwriting something, but not sure how to figure out what's going on. I should be using less ram now, I deleted a bunch of structures I had defined before.

I am probably going to scale things back a little, and support fewer profiles. I guess I could get a eerom, but I'm been waiting for someone to get a 3424 back in stock, and that has delayed my order for parts. And, I seem to be so close using flash to store the profiles.

Randy
 
randytsuch
I did end up rewiring the switches one last time.
I am using D3 and D5 for two of the switches, and A3 for the other two.

My program is written around this implementation, but it would be pretty easy to change.

I ended up supporting 10 programs in memory, allowing you to select one of them at start of roast. I tried a few profiles last night, and they seemed to work fine. PID could stand a little more tuning though.

Need to clean up my code a little, then will share this version.

Randy
 
scooter

Quote

allenb wrote way back on 26 August:
Helpful info & links re SMD soldering

Allen

Quote

JimG also wrote back on 27 August:
More SMD tips & info

Jim


Gday fellas, sorry for the belated reply, have been busy lately.

Thanks for the SMD advice. The value of this project makes it worth persevering learning some new skills methinks! /grin/


Regards & cheers...................Sean
 
JimG
Happy to report that there now is a Bill of Material for the Version 3.00 boards. Here's a link:

http://tc4-shield.../v3BOM.pdf

If any finds any problems with the BOM, please, please, please do two things:

1. Forgive me Grin

2. Show me what needs to be fixed.

I'm very happy to see the continued interest in the boards, as around a dozen of the V3.00 boards have been requested already.

Jim
Edited by JimG on 09/08/2010 9:08 PM
 
farmroast
I just made a tc Y adapter to hook up the original RoR jim made to my now totally manual Behmor with BT, ET and faster motor. I took the boards,thermostats out and have each component connected direct and on a toggle switch. The mains going to a variac. Roasted a few batches without RoR and realized how dependent I am on it now. I actually like my B'Mor now smile
Ed B.
DreamRoast 1kg roaster, Levers, Hand Mills http://coffee-roa...gspot.com/
 
mikeasr
Does anybody know where the MCP3424-E/SL-ND and
MCP9800A0T-MOTGCT-ND can be found? Digikey, Mouser, Newark, OctoPart....no luck

Thanks,
Mike
Edited by mikeasr on 09/09/2010 7:48 PM
 
JimG
I have a few MCP3424 I can spare. I think Digikey has the 9800?

Jim
Edited by JimG on 09/09/2010 10:19 PM
 
JimG
The unleaded version of the temperature sensor is
MCP9800AOT-M/OTG

The leaded version is
MCP9800AOT-M/OT

Looks like Digikey has the MCP9800AOT-M/OT version in stock only.

Jim
 
randytsuch
Just uploaded Kona Ver 102, my PID roasting program based on the TC4.

It is designed to use 4 switches, and a 4x20 LCD. The extra infomation displayed on the 4x20 is really nice for a PID program.

I use this LCD
http://store.grav...cdwib.html

It stores 10 profiles, and then you select the profile when the program starts up.

It allows for "on the fly" changing of a few parameters, only two for any roast, but this will make it easier to tune the PID.

I found a bug, which fixed fan control, so it controls both heater and fan outputs.

It works connected to the bourbon processing program. It does restart time when the roast starts, so the beginning of the graph looks a little funny.

Thanks to Dan and Bill for making this possible, I pretty much was able to incorporate the features I wanted to have in a PID.

I have a draft user's manual which I will upload soon.

Randy
 
allenb
Looks like your making excellent progress Randy.

Good to see the PID side of things working out.

Now, since you probably need to take a break from intense design and testing, here is something to ponder for future optional modes of operation.

Instead of selectable profiles, have a stepped rotary dial allowing the operator to select rate of rise rates at-will during the roast. With that, we could fine tune the contour of the roast while it progresses which would allow real-time interactive roasting without being fully manual. For an example, the asymptote curve Marshall is using around 300F would be easy with this type of control.

For folks liking to roast in more of a hands on approach this would bridge the gap between fully manual and automated.

You could either label the faceplate around the dial with the RoR rates or go fancier with it showing on the LCD.

Allen
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
randytsuch

Quote

allenb wrote:
Looks like your making excellent progress Randy.

Good to see the PID side of things working out.

Now, since you probably need to take a break from intense design and testing, here is something to ponder for future optional modes of operation.

Instead of selectable profiles, have a stepped rotary dial allowing the operator to select rate of rise rates at-will during the roast. With that, we could fine tune the contour of the roast while it progresses which would allow real-time interactive roasting without being fully manual. For an example, the asymptote curve Marshall is using around 300F would be easy with this type of control.

For folks liking to roast in more of a hands on approach this would bridge the gap between fully manual and automated.

You could either label the faceplate around the dial with the RoR rates or go fancier with it showing on the LCD.

Allen


I could probably do a pretty simple program that does this.

Because I already have 4 push button switches, and a LCD, it's easier just to just to use the switches to set ROR, and the display to display the temp and ROR information.

FYI, at the start of each step, my program looks at the delta temp and time for that step, and calculates a slope for the step. The slope is used to calculate the target temp for each second.
The slope is the same as ROR.

Randy
 
bvwelch
A 10K linear potentiometer makes a nice input device - easy to read one of the Arduino analog inputs and then map the result to desired RoR or what have you.
Edited by bvwelch on 09/11/2010 10:46 AM
 
allenb
If and when a program and how to wire it is developed for a selectable RoR control setup I will be happy to throw it together and do some testing.Grin



Allen
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
JimG
I've written some of the code that's needed. It's contained in the current unreleased version of aBourbon.pde on the googlecode site.

The code in aBourbon.pde reads the analog header on the V3.00 PCB and turns converts it into a percent. As Bill described, I have a 10K pot wired to this header, so I just dial in whatever percent heater output I want.

This code should plug in pretty easily to Randy's PID code.

Jim
 
randytsuch
I added some code to Kona (name for my PID program) that creates a manual mode, where you can roast using ROR.

I have 4 "on the fly" modes in my latest version
Each mode allows you to change two different parameters during the roast. I am limited to changing two parameters because I only have 4 buttons.
It was really intended to make it easier to tune the PID, but then I thought it would be nice to be able to change the ramp temp too, and now I added ROR.

mode
0 (default) change end temp for current step and fanspeed
1 change Pb and fanspeed
2 change I and D
3 change ROR and fanspeed

For modes 0,1 and 2, you select a profile, then answer a couple questions that put you in one of these modes, then you can change things while the profile runs.

In mode 3, you have to select a profile, but if you choose to roast by ROR, the profile is ignored, and the temp profile is based on ROR.

ROR is input as degrees per minute, then the program converts to deg per second, and uses it to control the temp. I still have to test this code, but it wasn't that complicated.

This is all based on having 4 push buttons, and a 4x20 LCD.

Then I got to thinking, it would be pretty easy to make a different version of Kona, which roasts based on ROR instead of a time/temp profile.

I was thinking of controlling the roast based on ROR and bean temp.
So, you could say for up to 250F bean temp, ROR = 20, then up to 350F ROR = 15, etc.

For all of the above, ROR is for the control temp(ct), which is ET for my setup.

All the major pieces are already there, so it should not be too big of a deal for this new program.

I could do a POT based input too, but since I already have 4 push buttons, I am trying that first.

Randy
 
allenb

Quote

randytsuch wrote:

I was thinking of controlling the roast based on ROR and bean temp.
So, you could say for up to 250F bean temp, ROR = 20, then up to 350F ROR = 15, etc.

Randy


Wow, you don't waste any time! I was thinking maybe in a few weeks something may materialize to try out but this is light speed.

With my current thinking on roast control if I had the ability to do as you mentioned above, setting bean temp RoR segments instead of temp/time segments and, the ability to switch to manual mode (set the bean temp RoR as the roast progresses) this would be my preferred control setup and I would toss my ramp/soak controller in the scrap bin.

Allen
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
Dan
This project is moving along well! Lots of fits and starts, but a life of its own. I've been trying to keep up, programming is not my thing. I design, build and wire PLC controlled machines, but job out the programming.

From what I can tell, I've not seen an overview or summary, this project and KONA in particular is intended for controlling a hot air roaster, because the profile includes fan speed. Is that true?

If so, I see in the profile program that the fourth line is being used for fan speed, set at percent of full power. From what I can tell, the fan is being controlled with preset speeds but not being set automatically (automatic operation requires a feedback loop).

And, I see that there is a fan overide option for the operator. If an operator must be present to control the fan speed, then ipso facto it negates having the fan being controlled by the controller program in the first place. The whole idea of a controller is so that you don't have to monitor the roast and tend the equipment.

I think there was some discussion early on about using a pressure transducer for fan speed, but these are expensive and the pressure difference between spouting well and not spouting well is minute.

I always thought I'd use an optical sensor for automatic fan control in a hot air roaster. It would be mounted somewhere in the area of the roast chamber where the beans would jump into when spouting, but not at the top. It might need a light source on the opposite wall of the roasting chamber. Then, control the fan speed so that the light from the source is being obscured from the sensor's perspective some proportion of time, say 30% of the time. This makes the fan speed dependent upon spouting height regardless of the bean density before or during the roast.
Edited by Dan on 09/12/2010 6:31 AM
 
randytsuch

Quote

Dan wrote:
This project is moving along well! Lots of fits and starts, but a life of its own. I've been trying to keep up, programming is not my thing. I design, build and wire PLC controlled machines, but job out the programming.

From what I can tell, I've not seen an overview or summary, this project and KONA in particular is intended for controlling a hot air roaster, because the profile includes fan speed. Is that true?

If so, I see in the profile program that the fourth line is being used for fan speed, set at percent of full power. From what I can tell, the fan is being controlled with preset speeds but not being set automatically (automatic operation requires a feedback loop).

And, I see that there is a fan overide option for the operator. If an operator must be present to control the fan speed, then ipso facto it negates having the fan being controlled by the controller program in the first place. The whole idea of a controller is so that you don't have to monitor the roast and tend the equipment.

I think there was some discussion early on about using a pressure transducer for fan speed, but these are expensive and the pressure difference between spouting well and not spouting well is minute.

I always thought I'd use an optical sensor for automatic fan control in a hot air roaster. It would be mounted somewhere in the area of the roast chamber where the beans would jump into when spouting, but not at the top. It might need a light source on the opposite wall of the roasting chamber. Then, control the fan speed so that the light from the source is being obscured from the sensor's perspective some proportion of time, say 30% of the time. This makes the fan speed dependent upon spouting height regardless of the bean density before or during the roast.


Hi Dan
I have a popcorn popper, so I wrote Kona to be able to control fan speed for a hot air roaster. For other roaster types, you can just not use fan speed, and I think it will work fine, with some tweaking.
The program allows you to change fan speed during the roast (depending on the mode you are in), but you don't have to. If you set up the fan speed part of the roasting profile, then you can just let that control fan speed. But it is just a preset speed, there is no feedback for automatic control.
This simple method seems to be working, although I need to tweak my speeds a little.
I used to have to manually adjust fan speed during the roast with a dimmer, and this is definitely better then that.

I'm sure there are ways in add feedback into fan speed control, but unless it is relatively cheap and simple, I am not interested in pursuing it.

I think the problem is finding something that can take the high temps, most electronics don't like it hotter then 70C, maybe 100C for military grade stuff.

BTW, I also have a user's manual, which explains some things better, but this is not in there.

Randy
 
allenb
Randy, can't remember how you ended up controlling the fan. I seem to remember you using an SSR?

It would be great if you could give some more detail as to how you are doing it with your present setup from the Arduino side and power side.

Allen
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
Jump to Forum: