Arduino, thermocouples, rocketry.

Hi everyone!

I am programming an Arduino Uno for a club I'm in at school and what we need is for the Arduino Uno to return temperatures after reading a voltage from a couple of Omega thermocouples. The thermocouples are J-type "Fine wire thermocpuples" With a dia./Ga. of .001, Length of 12'' and bare insulation. The part number for them is IRCO-001. These guys are really freaking thin. Which raises my first question, how am I going to get two of these onto an Arduino? They are seriously about the width of a human hair. I have an Arduino ProtoShield Kit that I bought off Adafruit. Here's the link: Adafruit Proto Shield for Arduino Kit [v.5] : ID 51 : $15.00 : Adafruit Industries, Unique & fun DIY electronics and kits That's what I have. I also have a data logger. This is my friends that he's letting me use and I don't know much about it. It comes from "DataQ instruments" Here is its link: http://www.dataq.com/products/obsolete/di194.html He did say he's had it for a while. :wink:

Too Long didn't read? Totally fine. Here's the run down:

What I am doing
I have a rocket. It's going to go up for about thirty seconds. We have a ducted nose cone with a vortex tube in it that separates the wind into two separate areas we have one thermocouple at both of these areas. I want the Arduino to read the temperatures these thermocouples are sending me and store that data. I also want a timer to go off at launch so the Arduino can give each temperature a corresponding time. EDIT: I don't think I made it clear that I'm going to get a different temperature reading from the two thermocouples. If the vortex generator does its job, one thermocouple will be getting cool air and the other thermocouple will be getting warm air. The experiment is measuring the temperature difference from each of the thermocouples. I was just planning on getting the temperature from the two different thermocouples at the same time and finding their difference, so that part the Arduino doesn't have to do.

/Warm air---Thermocouple--------------------/
Air entering from ducted nose cone-----Vortex generator/ /Arduino
/Cool air---Thermocouple---------------------/
Just a really simple picture of what will be happening.
Things I have
-Arduino Uno
-5 Omega thermocouples. Here is the link: IRCO-CHAL-P13R-P10R, Fine Gage Bare Wire Thermocouple J, K, T, E, N, R & S
-A ProtoShield Kit. Here is the link: Adafruit Proto Shield for Arduino Kit [v.5] : ID 51 : $15.00 : Adafruit Industries, Unique & fun DIY electronics and kits
-A data logger. This guy is kinda old and outdated, but I think it will still work. Here is the link: http://www.dataq.com/products/obsolete/di194.html

That's all I have! Now for my questions part...
Questions
-How do I get these hair thin Thermocouples to attach to my Arduino or Protoshield?
-The thermocouples send out microvolts. The lowest an Arduino Uno can read is 5 volts. I'm going to need an amplifier, yes?
-What kind of amplifier should I use and where can I purchase one?
-Will I need the datalogger?
-What are some important functions and commands I'm going to need to know?
-How do I get the Arduino to start a timing program at launch?
-Could this all be done in two weeks time? Due to major part delays I couldn't get started until just now. LAME. :wink:

Thank you so much for any help you can give me, if you found anything unclear please tell me how I can clarify. Thanks!

This would be difficult for an experienced person to get done in 2 weeks. Both building up the HW and programming the SW.

You will need an amplifier for the thermocouple, yes, and possibly lower the ADC reference voltage as well.
LSB will be equal to 5V/1024, or 1.1V/1024, or theoretically less if you have another ADC reference voltage.

Try a test - you know temperature drops about 2C for every thousand feet of elevation change.
Test your thermocouple at standard temps, then freeze it at the temp you think it might to, and see how much change you are getting.

Your rocket will be pretty darn high if it is going up for 30 seconds. I imagine it will also come down quite some ways away as well.
You are planning to store the data in FLASH/EEPROM & then download when you recover the rocket? How many readings do you expect to store?

You could add an accelerometer as well it sense when the rocket lifted off and start reading micros() for time stores.

I think thermocouples are a poor choice for your applications. Thermocouples output a low impedance in the millivolt (not microvolt) range. Not only would if require amplification, but also a cold reference junction compensation. Even then you are dealing with a non-linear temp Vs voltage curve the needs to be calculated or converted with a look-up table. There are special thermocouple interface ICs that can handle a lot of the electrical needs but they are not cheap. And after all that thermocouples don't have all that great an accuracy specification. The main claim to fame for thermocouples is the very high temperature range they can be used in, up to and over a 1,000 degrees if the couples wire insulation is designed for that range. So unless you were trying to measure the rocket exhaust temperature in flight, I think thermocouple is a non-starter for your project.

You would be much better off with some of the newer IC temp sensors, check out the temperature section in the following: Arduino Playground - InterfacingWithHardware

I don't mean to rain on your parade, but I suspect in 2 weeks you will still be having problems trying to interface thermocouples to an Arduino.

Good luck with your project.

@CrossRoads
Oh...Great...

Will any amplifier that I find work or do you know of any kind of amplifier that would work best? How would I go about lowering the ADC reference voltage?

"...then freeze it at the temp you think it might to.."
Could you clarify that please? I'm not following that. lol.

I'm sorry. I used the wrong number! Ascent should be about 20 seconds. Yes, it will most likely take a while to come down, though measuring temperatures for that doesn't matter. Yes, I was planning on that. Is that bad? Will that not work? The thermocouples take in one reading for every 0.15 seconds so my team is hoping to get 130 readings.

I was thinking that. I just might do that. Do you think that's the best option? I was also thinking I would probably use micros() too. Awesome!

@Retrolefty

I was really hoping no one would say that. :frowning: I kinda felt that way too, but it's what the club bought and told me to use and I figured they knew their stuff(This is my first year doing this sort of thing)
How much quicker and easier would this be with one of these IC temp sensor? Would you say they're perfect for use here? Also, how quickly do you think I could get one?

It's completely alright. I had a feeling something like this would come up. lol. So to avoid this messing around with thermocouples you 100 percent recommend IC temp sensors? I'm fine with using them, as long as it saves me time and is easier. I wish I had more time, but our Arduino hasn't even come in yet! I had to take my Arduino off of my Science Fair project and use it for this. lol. Freaking parts. D:

Thanks! I'm going to need it... :cold_sweat:

While I am a great fan of the Dallas temperature measuring chips, I don't think they'll meet your needs for rapid response to ambient temperatures.

I'm guessing you want to do temperature/altitude profiles? Or maybe even infer rocket speed from the differences in the temperatures between your two air streams? The Dallas chips, in that context, have WAY too much thermal inertia. In other words, if I take a Dallas chip from a 15 degree (C) room, which has been 15 degrees for, say, two hours, and take it outside to where it is, say 10 degrees, it will take a minute or two (5 or 10 flights!) for it to get near 10 degrees.

Interesting problem. Not sure of answer... unless you simply want temperature/altitude profiles, in which case I'd use a balloon. Not as much fun, of course!

@tkbyd
So an IC temperature sensor, won't work and I need to stick to the thermocouples I have? I really need the rapid response.

I just want to have the temperature recorded and the time since launch it's been. We have other electronics measuring altitude. The part I'm doing is for the "scientific payload."

Lol. Nah, it has to be a rocket because the club I'm in is a rocket club. :wink:

I really need the rapid response

I thought TCs where not good for fast changes.

Normally you only use them when you need high temp reading in the 150-1500 or so range.


Rob

I thought TCs where not good for fast changes.

If you following the thread you'll have noticed these thermocouples are incredibly thin. Thermal mass depends on size. Also they are metal in a fast moving air-stream. I can't think of a faster way to measure air temperature. An IC temp sensor will be in poor indirect thermal contact with the air as its in a plastic package. They have time constants of 10 seconds or so! Very thin wire will be more like 0.1s

As for attaching to thin non-solderable wires I think some sort of screw terminals with internal metal leaf contacts might do it - the internal contacts don't rotate with the screw and thus don't destroy the wire, merely squeeze it. possibly improvisable with some metal foil.

So, sticking to the thermocouples. Got it.

Thank you so much for teaching me how to make the connections! That was a huge problem for me. Where can I purchase said screw terminals?

Also, does anyone have any ideas for getting these thermocouples to play nice with the Arduino? Am I going to have to do any fancy coding to get the thermocouples to work?

Thank you so much everyone for all your help so far!

This application note will show and tell how to interface properly to thermcouples:

2 weeks and counting. :wink:

Thermal mass depends on size.

Yeah I know, just for some reason I had it in my head that their response was slow, don't know why.

That AP note looks like a nightmare, can't you just use a MAX6675 or similar? No mucking around with cold junction temps etc, just read from SPI.

Or are there some non-obvious gotchas?


Rob

I can't use a MAX6675 because I have J-tpye thermocouples, not K-type.

Thanks so much for the Application note! This will be super useful. Thank you so much!

hahah. Two weeks and counting. :wink:

I'll keep you guys all updated.

There are thermistors almost as small, fast as the thermocouples that would be MUCH EASIER to interface to Arduino.

For thermocouples you need to build or buy the amplifier with cold junction compensation, even if you "take a shortcut" and put the compensation inside and merely assume the temperature.

AltairLabs $0.02 is:
buy a few of these asap

either should work.

Hook 2 identical units in series between +5v and gnd, connect the center tap to Arduino. Arduino analogRead() returns near 512, about mid point, when both are at the same temp. Record this value as your zero differential value.

Immerse the 2 units in different temperatures, the Arduino count deviates from its neutral value. Record the temperature and the analogRead() count. Divide the temp difference by the count difference, this is your scale factor. Doesnt hurt to check a few wider and narrower temperature differences to get a feel of how linear it is.

When you launch, store analogRead()s and see the zero value change as you Hilsch tube operates. Use the scale factor to convert the change in analogRead() counts to temperature difference.

That is the principle of a variometer, to read temperature DIFFERENTIALS.

If you also want the absolute temp, put a thermistor in series with a 100k resistor, and make a table of analogRead() vs temperature using a known thermometer and test chambers (toaster oven, freezer, etc.)

This is something you can wire up immediately and directly to Arduino, it doesnt need an amplifier like thermocouples do. These thermistors are small enough to have time constants < a few seconds, but beware: soldering them to heavy wires can degrade this. Use fine wire and keep the original thermistor leads as LONG as possible to avoid slowing down the thermistors.

We fly thermcouples at work but only inside engines where they need to withstand extreme temperatures there. They can be finnicky even when you DO have the properly designed amplifier. For everything else we use thermistors.

The thermocouples can be used in differential as outlined above, but the Seebeck voltage is so tiny you still need to build and debug a DC amplifier.

The LM temperature sensors recommended above are also easy to get running on Arduino without designing and building special interface circuits. The thermistors I recommend also can connect direct to Arduino, they respond faster, and when you use them in differential rather than absolute temperature they are nearly as accurate.

BTW great idea putting what I assume is a Hilsch vortex tube in a rocket, good luck with your project.

A very handy reference document for such ventures is the old skewl USAF FLIGHT TEST ENGINEERING HANDBOOK.

Antique, but much more accessible and useful to the hobbyist than newer USAF pubs.

I can't use a MAX6675 because I have J-tpye thermocouples, not K-type.

So switch to K-type?

-j

I dont think he has enough time to use thermocouples at all. Hes got like 9 or 10 days left till flight, and a buncha very good but terribly mismatched volunteer parts. Even if he had all chips and parts in hand with a proven design and pre-made circuit board for a compatible thermocouple amplifier, integrating an entire working payload system would be doubtful, even if they are very experienced.

Reminds me of an edge-of-space balloon flight, group project with what we though were modest goals. These were pretty experienced tinkerers, but night before launch everybody came to my basement lab with their assigned parts of the payload. Most were not working in themselves, much less integrated under a BasicStamp. By 0200 one guy and myself were left, we started from scratch, made a simple thermistor controlled 555 oscillator keying an oscillator from a VGA video card, 28.322 MHz = 10 m ham band. We spent the rest of the night calibrating it while trying to get FAA to accept our NOTAM filing. By 0900 everyone else was awake and joined us at launch site, the simple payload flew well to about 88000 ft (estimated from the NWS morning temperature profile) and was recovered less than 45 miles away.

BTW The guy who stayed awake all night with me is asleep in the back of the chase car. The guy in suspenders looks very familiar, I just dont recognize the old man who is in my mirror every morning :wink:

Anyway...

IMHO these folks dont need to be sitting up the night before the deadline trying to get help from this forum to debug unfamiliar circuits and new code. They need something Extremely Simple that has a decent chance of being a working and stable payload SEVERAL DAYS BEFORE the launch so they can get software thoroughly debugged and good ground experience in operating the system, triggering and downloading it, before the actual launch. Maybe even a test flight before going for the grade.

If it was me, sure, I'd be building a thermocouple amplifier, but even with my experience I'd already have those simple thermistors working just in case the deadline arrives "too sooon" .

MY $0.02 with no disrespect to the ideas of others. To borrow westfw's byline "Strongly opinionated, but not official!"

BTW, the one thing that NONE of us has yet helped Tetrahyde with is how to log (STORE) the data. The Dataq "logger" is just an Analog to RS-232 converter, they are fun but not really helpful here. If the data isnt sent down by telemetry and recorded then it gotta be stored onboard. Arduino has little memory, maybe a scheme to start storage on ignition and run till memory is full.... some of you may know sketches that can be adapted. Trigger could be electric igniter voltage or a break wire on rocket movement.

@ Altairlabs

I liked what you said, so I bought those thermresistors. lol. Thought you'd like to know. I suppose what I do is put the thermresistors where I planned on putting the thermocouples, which is right where the two air streams will be coming in near the nose cone of the rocket. Also, the circuit only has to be a series? I mean, that makes sense but wow. Simple. :stuck_out_tongue: Also, thanks for the tutorial on how to get it to work! You're a huge help.

So this marks me letting you all know that I went with the simple thermresistor approach. Once, again thanks.

@kg4wsv

See, I can't do that because the response time on that wouldn't be as quick as is a J-type. And even getting a K-type would still require an amplifier and this thermresistor idea seemed much easier. Thanks though!

Thanks to everyone! You've all been a huge help.
You know what's lame though? We were going to do a launch at the local high-power launch site last weekend but it was canceled because of winds, which means we might not get to launch for the big competition. :confused: But maybe the Range Safety Officer is feeling nice... :wink:

Thanks for posting back !

All the hardware suggestions were technically good, given enough time to make them work...

Been thinkin 'bout how to store the data... there are SD card shields and USB and other hardware stuff to do this, but I think a simple array in RAM memory is enough. A post on old forum says less than 1k of RAM was left free for an array, so there should be enough room in memory to declare

  int time[100];
  int tempDifference[100];
  int tempAbsolute[100];

which would put 100 samples into 600 bytes. That would hold 20 sec of data at 5Hz (five samples per sec) or 50 sec at 2 Hz.

Heres a cartoon schematic and what I imagine you might be doing with it...

Hope you get a chance to fly it.. good luck with your project !

Shoulda added another pair of resistors in series, center tap of this pair goes to a digital input, one resistor is actually a switch or very fine wire that breaks when launch. The Arduino sketch waits for this IO pin to signal when launch, then stores the readings into the array till its full.