Who is here? 1 guest(s)
 Print Thread
4-channel TC meter and datalogger project
JimG
Hi, Bill -

I agree with your conclusion of 15uV per bit (4.096V / 262,144). That should be good enough to resolve 0.7F differences at 400F using type K. Better than I would have guessed. 18 bits is a lot of bits!

If differentiation of that signal is part of the plan, though, I think you'll get better results with more resolution.

For example, without smoothing, if you sample at 1 Hz, +/-0.7F translates into a resolution of +/- 42F in rise per minute terms. And if you sample faster, it gets worse. Of course, you will have to smooth to get meaningful results, but I think this shows how important the resolution might be for differentiation.

Off hand I can't think of any reason not to use the full 8X gain of the ADC? After amplification, the signal should still be well under 100mV.

Thanks for guiding me through getting the zip file. This time I was successful in loading the .sch and .brd files into Eagle.

I think the board looks great. I am very much a newbie when it comes to PCB design. So if I feel the urge to offer "help," I will resist to the very best of my ability.

Jim
 
bvwelch
Hi Jim,

The internal ref for the ADC is 2 volts, not 4, correct?

I welcome any suggestions, I'm more of a embedded software guy than a hardware guy, and certainly not an analog guy.

I'd like to understand your comments about differentiation?

What I do now, is sample each channel in sequence, so that is actually a 2 Hz rate per channel. I have enough RAM in the Arduino to save the readings in a ring-buffer so I have one minute of history for all 4 channels, and my 'rise-o-meter' simply does a subtract from now - 60 seconds ago, and it updates every 2 Hz as new samples comes in. Seems OK but I'd like to hear your approach.

I'm no expert at how the ADC works internally but perhaps it has the effect of smoothing built-in?

Also, what do you think of the inputs? I left some placeholders in the circuit for extra circuitry, but I've just been hooking one side of the TC to ground, and running single-ended.

Some folks have mentioned using this for other things besides TC like pressure sensors.

However, we can also use the Arduino's built-in Analog inputs which are much faster but lower resolution. -bill
Edited by bvwelch on 06/11/2010 1:21 PM
 
JimG
The internal voltage reference is 2.048V, but the 18 bits cover the range from -2.048V to +2.048V. So you effectively have to span 4.096V with the 18 bits.

Your method of calculating the rise rate is perfectly fine. There's no one way to do it, and every method has trade-offs.

Using samples 1 minute apart will give very stable results. But the trade-off is that you are reporting a 60 second moving average as it existed 30 seconds ago. If the rise rate is to be used to make on-the-fly adjustments while roasting, you might like something a little more current.

Andrew Partridge worked on some ways to digitally smooth and condition the raw temperature data so that a reasonably smooth derivative could be made. I think he posted this over on the H-B thread.

I don't think the final word has been written yet on how best to digitally compute the rise rate. I personally think the answer will involve using samples that span a 10 to 20 second interval, tossing out some outliers, then reporting a rise rate that is no more than 5 to 10 seconds old.

But the universal thing is, I think, that the smoother the incoming data, the better the result. So more resolution will be mo' better than less.

Jim
 
JimG

Quote

bvwelch wrote:
Also, what do you think of the inputs? I left some placeholders in the circuit for extra circuitry, but I've just been hooking one side of the TC to ground, and running single-ended.

I know just enough to know that you can have problems with grounded thermocouples when one side of the TC is connected to the ground of the instrument.

I know this because some lower quality PID controllers I tested a while back did very poorly when I used grounded thermocouple probes connected directly to an espresso machine boiler.

I'd proceed as-is and then work on understanding it better only if it becomes a problem. One solution will always exist as a fallback: use ungrounded probes (even though they have a slower response).

In any event, though, both leads of a TC must be at the same known temperature at the point where they get connected to the sensing instrument.

Jim
 
bvwelch
Hi Jim,

About the gain of the ADC - sure we can experiment - it is just a register we can tweak from the Arduino software.

About the PCB - the intent is to make the board hackable - so please think about what you might want to modify on the front end / TC, 4-20mA loop, mV input, Volt input - like other PID controllers such as Fuji. Did I miss anything? My intent was to at least leave room, even if you might have to cut a trace here or there.

Likewise in the prototype area-- I just made that up in a hurry while looking at an old Radio Shack protoboard. Do we need some SIOC or other SMT proto areas?

You asked about getting some PCBs made - sure we'd like to do that, soon if possible. The silk-screen layer is a mess so that will need cleaning up, but we may not want to bother with that until we're happy with the circuit.

You mentioned you have an Arduino board already? If so, please check our physical layout and our pin assignments. In particular, the infamous change-up between Arduino digital pins 7 and 8. All I've had to go on is some example shields Eagle files -- I don't have an 'official' arduino here yet, nor do I have any official shields here to measure.

That being said, there are a couple of 'shield template' or 'Eagle library parts' that claim to be correct, and when I lay them on top of our project, things seem to line up pretty well.

About getting boards - some options are 4pcb.com aka barebonespcb.com aka 33something.com. I've been using them recently and they do pretty well. The 'barebones' don't have silkscreen but otherwise they are cheap and quick.

I'm curious about these Dorkboard folks (despite the name) -- they do a monthly pooled build very cheap. But then next deadline is this coming Monday morning so I don't know if we could be ready for that. http://dorkbotpdx.../pcb_order

Lots of other folks out there. Here one summary page:
http://www.slugsi...hives/1285

And here's another: http://hackaday.c...nufacture/

Thanks for any suggestions! -bill
Edited by bvwelch on 06/11/2010 4:02 PM
 
JimG
Just eyeballing things, the shield arrangement looks good with respect to the Duemilanove. I also checked your pin locations against a .brd file for the Duemilanove that I downloaded, and they seem to agree.

I wonder if you've thought about replicating all of the Arduino's pin sockets on your shield?

There are four sets of jumper blocks on the Duemilanove. It looks like the current 4TC shield design replicates one of the two blocks of digital pins. But it doesn't replicate the remaining block of digital pins, and neither of the analog blocks.

I am coming to this process very late, so I apologize if this has already been considered, or if the answer is really obvious. But I would think you'd want access to the entire I/O space of the Arduino for things like roaster control, LCD displays, and the like.

Jim
Edited by JimG on 06/11/2010 9:55 PM
 
allenb

Quote

JimG wrote:
I don't think the final word has been written yet on how best to digitally compute the rise rate. I personally think the answer will involve using samples that span a 10 to 20 second interval, tossing out some outliers, then reporting a rise rate that is no more than 5 to 10 seconds old.

Jim


When C1 arrives I find I'm watching tenth's of a degree tick off to ensure I slow things down sufficiently but avoid stalling. I don't know how useful a rise-o-meter would be if not absolutely real time.

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

Not sure what you're saying -- my intention is to have all Arduino I/O available. We have connectors that should mate up with (using the 2009/Duemilanove schematic names) J1, J2, J3 and 'Power' connectors. What else is there?

Or, are you saying you'd like an extra set of pads/holes for each connector?

Please explain, since you've got a real board and I don't, I am probably missing something important about how/why folks use shields.

I was thinking of 3 use-cases so far:

1) as an Arduino shield
2) as a standalone board, with just a cable from a RBBB or other 'run-time' Arduino board connected to our small J4 connector.
3) as a plug-in 'daughter board', plugging into a larger breadboard or perfboard, etc, which is why I am wanting thru-hole pins to be aligned on a common 100-mil grid.

Please keep those ideas and concerns coming! Thanks! -bill
 
bvwelch
Hi Allen, please tell us in more detail what your 'dream' meter would be/do. We've got a lot to learn so please advise.

This ADC chip can take an 18-bit reading slightly more than 250mS, I think around 300, so I am using 500mS to keep things simple. With 4 channels that works out to a 2 Hz update rate.

But this is software, and so we can tweak it how ever you like -- maybe only use 2 channels, or even just one channel during critical phases like 1C, and sample the other channels less often or not at all.

You'll always have the 'real-time' numbers available. The rise-o-meter is in addition to, not instead of, the real-time temps.

If you want your rise-o-meter to be one-sec deltas that can be done easily - might be noisy though. I was using 60 seconds, sounds like 15 or 20 might be better.

We'll be able to tweak these things, and you can have your preference and I can have mine.

These things are 'in-circuit' re-programmable -- the 'firmware' can be updated over the same cable as the 'data logger'.

-bill
Edited by bvwelch on 06/11/2010 11:13 PM
 
JimG

Quote

bvwelch wrote:
Not sure what you're saying -- my intention is to have all Arduino I/O available. We have connectors that should mate up with (using the 2009/Duemilanove schematic names) J1, J2, J3 and 'Power' connectors. What else is there?

I've been thinking of this shield as a TC interface only. In that light, if you wanted to do some other things, you'd build another shield and piggyback it. So if that's the route taken, you'd need some pin sockets on the TC shield to facilitate stacking. That was my thinking in regard to "replicating" the pins on the Duemilanove.

OTOH, there's plenty of room left on the TC shield to add components to do the "other stuff." Then you'd have no need to stack another shield. Probably this is what you have in mind.

I don't have enough Arduino experience to form an opinion as to which approach is better (i.e. stacked shields or an all-inclusive shield).

Jim
 
JimG

Quote

bvwelch wrote:
You mentioned you have an Arduino board already? If so, please check our physical layout and our pin assignments. In particular, the infamous change-up between Arduino digital pins 7 and 8. All I've had to go on is some example shields Eagle files -- I don't have an 'official' arduino here yet, nor do I have any official shields here to measure.

Bill -

I've been looking at the Duemilanove and thinking about how a shield would stack, in particular in the vicinity of the USB connector.

I'm concerned about the clearance (actually the lack) between the bottom of the shield and the top of the USB connector housing (which is conductive, BTW). I've seen at least one shield .brd that masks this area out.

It looks like there might be a problem with shorting the bottom traces on the shield, especially where there are through-hole components.

Hopefully someone with some hands-on experience with shields on a Duemilanove can chime in.

Jim
 
bvwelch
Hi Jim,

Thanks for pointing out the issue with the USB connector -- I've seen some shields that didn't extend to that area and wondered why not. Maybe we should move our TC connections to the other end and toss or reduce the prototyping area?

About stacking in general, I thought that folks used some 'long' header pins such that shields literally stack vertically on the Arduino headers: http://www.hvwtec...uctID=1231
 
bvwelch
Or maybe just slide everything to the right? That would be an easier change if it would work OK.
 
JimG

Quote

bvwelch wrote:
About stacking in general, I thought that folks used some 'long' header pins such that shields literally stack vertically on the Arduino headers: http://www.hvwtec...uctID=1231

Those clever devils! Now I understand. Thanks.

Jim
 
JimG

Quote

bvwelch wrote:
Or maybe just slide everything to the right? That would be an easier change if it would work OK.

I hate to suggest changes without knowing for sure if the USB connector presents a problem. But moving everything 0.5" to the right would eliminate the possibility.

Jim
 
bvwelch
Hi Jim,

I'm really glad you found this problem early-- I'll move everything over to the right. Looking at the Duemilanove Eagle PCB file, seems like 0.4 might do it, but since you've got the physical board, I'll go with 0.5.

While we're at it, what would you think if we cut off some on the other end also? Say about where the mounting hole is? Seems like the headers will secure the board, no real need for the mounting holes, so long as we don't obstruct them.

Have you thought any more about the input section to the ADC? Is what I've done sufficient? Too much?

Thanks!

ps: If you'd like to make the changes yourself, that is fine, please do! I've got to work today so I'm not sure when I'll get these changes implemented.
Edited by bvwelch on 06/12/2010 9:13 AM
 
JimG
I think you are right that 0.4" would be sufficient. The shield .brd file I was looking at used 0.5", maybe to clear the very back of the power connector, too?

In regard to the input section: if maximum accuracy was a design requirement (which I don't think is so important for monitoring roasts), then you would probably try and get the TC connectors and the ambient temp sensor into a single isothermal region. Fluke uses a flat copper bar as a substrate in their 50-series thermometers for this purpose.

I am not suggesting this is necessary for this project. But keeping the temp sensor chip as close (thermally and geographically) as possible to the TC connectors is a good design practice.

I appreciate the misplaced trust you have in my abilities to modify the board. But I think it would be in everyone's best interest if you continue the excellent job that you've started :-)

Jim
 
bvwelch
Jim,

I understand what you're saying about ambient temp measurement - it is a trade-off but should be OK for coffee roasting.

If anyone cared to, they could buy those panel-mount TC jacks with the built-in thermistor, and run each thermistor back to a separate Arduino analog pin.
 
allenb

Quote

bvwelch wrote:
Hi Allen, please tell us in more detail what your 'dream' meter would be/do. We've got a lot to learn so please advise.

This ADC chip can take an 18-bit reading slightly more than 250mS, I think around 300, so I am using 500mS to keep things simple. With 4 channels that works out to a 2 Hz update rate.

But this is software, and so we can tweak it how ever you like -- maybe only use 2 channels, or even just one channel during critical phases like 1C, and sample the other channels less often or not at all.

You'll always have the 'real-time' numbers available. The rise-o-meter is in addition to, not instead of, the real-time temps.


-bill


Bill,

I'm not sure how necessary it is to see immediate real time data on the rise-o. I think a lot of us find when we get near the critical phases it helps to be able to make a change in power level before it has a chance to get out of control.

I use my Fuji PID controller display which displays in 10ths of a degree F which gives an idea of rate of change.

As far as dream meter is concerned, I currently have one control cabinet with a couple of PID controllers, small variac for fan speed control and some switches for kicking the drum on/off. I have one large variac after the SSR to limit power to the heating elements. This causes current spikes due to transformer in-rush.
The cabinet has input and output jacks so I can use the one box for three different roasters. I just didn't have the $ to do three separate sets of controls.

The dream meter would be one that could take the place of my current setup but would have to be at least as easy to change PID and ramp profile settings. I currently don't have any need for any inputs other than TC's. I know that folks with larger fluidbeds will most likely want to monitor/control static pressure.

I want to thank you for your major expense of time/labor with this project. It's got to be a major pain in the...

Keep up the battle!
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
JETROASTER
Great project!!!! .....I have very little understanding of all that has been involved in the design and work-up.

However, I do understand that it will be a huge benefit.
Let me know when I can buy in!
I realize it's a passion, but thanks for all your hard work. -Scott
 
JimG
I've had an ongoing project for a while, and it has nothing to do with roasting. Reading this thread, seeing Bill's shield, and digging into things a little made me realize I needed to change direction with my original project.

So yesterday I took Bill's shield and tweaked it to suit the particulars of my original project. I think, though, that the result may be close enough to the goals of the 4-channel TC logger project to be of use here, too. At least as a prototype along the way to a final design.

To see the direction I went with it, I've uploaded the following files to my web pages:
http://www.mlgp-l...filled.pdf
http://www.mlgp-l...01-sch.pdf

Differences and changes:

1. Added jumpers to allow optionally grounding the negative leads of the TC's (or other sensors).

2. Eliminated the prototyping area.

3. Added a couple of output ports to drive external SSR's (controlled by PWM digital outputs of the Arduino).

4. Used through-hole components for everything except the two IC's (my surface mount soldering skills ain't where they need to be yet).

5. Squished the shield down a little, both to avoid the Duemilanove USB connector, and to minimize board cost.

With these changes, I plan to use this shield to start testing my original idea. I'm planning to order a single board from BatchPCB today or tomorrow, with my fingers crossed that the design doesn't have a fatal flaw.

@Bill -- send me an email address if you would like to receive the .brd and.sch files.

Jim
Edited by JimG on 06/13/2010 9:49 AM
 
bvwelch
Hi Jim,

I wish I had checked in here earlier and see your post -- I just finished updating the proto board, see it here: http://github.com...ch/arduino

Your board looks great!!!

maybe we should just mothball my board unless/until Randy or some others speak up and want the extra features.

Assuming you're OK with adding your version to my github repository ( your version is still CC-BY, correct? I'm not so knowledgeable about licenses ), yes please send the Eagle files to bvwelch at gmail dot com

Why not pool our resources and get more than one board made? I can try and review very carefully later tonite, after church services.

Thanks! -bill
 
JimG
Bill -

Eagle files have been emailed to you for your use and posting to your online archive area.

I sent the Gerbers to BatchPCB.com. So if nobody sees any fatal flaws in the board, I'll be ready to pull the trigger on a few samples .... and then w--a--i--t. But there's plenty of time to fix things if you see something.

I've also uploaded the following updated files to my web pages:
http://www.mlgp-l...01-brd.pdf
http://www.mlgp-l...01-sch.pdf

[EDIT] These show CC-BY copyright/license notice. If I have done this incorrectly, please let me know! Thanks.

Jim
Edited by JimG on 06/13/2010 5:53 PM
 
milowebailey
I'd be interested in a couple of these boards if there is a group buy
 
JimG
Would like potential users of this board to answer a question:

Should the supply for OT1 and OT2 be taken from the raw, unregulated Vin pin, or from the regulated 5V pin? At present, they are supplied from the regulated 5V pin. But I am leaning heavily towards making the change to Vin.

Opinions?

Quote

milowebailey wrote:
I'd be interested in a couple of these boards if there is a group buy

At present, goldphoenix.com seems to offer the best combination of price and production schedule.

For ~$90, it looks like they will build 25 boards in 5 business days. That is only 20 boards more than we need :-)

Also checked 4pcb.com. Better turnaround time (1 business day). Five boards would run ~$95 for their bare bones option. But there is no silkscreen offered at that price, and I see that as significant problem.

Jim
 
Jump to Forum: