Showing posts with label Thermocouple. Show all posts
Showing posts with label Thermocouple. Show all posts

Friday, 15 June 2012

Signal Conditioning

I have been having some issues with noisy outputs from the µChameleon DAQ so when running the dashboard to see how well my sensors and their associated circuitry performed. The voltages I'd measure on a multimeter were fine, however Labview would show wildly fluctuating signals which had the needles on the gauges jumping over very large values. If you look at my previous Labview vi's you might notice that I had tried to lessen the effects of this unknown noise using a simple mathematical method where I limited the number of decimal places of the number string. I had tried to do some fault finding a few weeks ago and didn't really get anywhere as I didn't yet have an oscilloscope, but it now seems I have fallen victim to the dreaded aliasing...

Looking at the RPM voltage signal on the oscilloscope showed not the linear voltage I was expecting, but a triangular waveform that had a mean voltage that was the same what I was seeing on the multimeter. The maximum to minimum voltage was in the region of 1.8V!!! Which, after figuring out the scale I'd used, corresponded to the magnitudes of the needle fluctuations I was seeing in my Labview gauges.

That was one mystery solved, but why was the DAQ giving me a signal that looked like random noise. Now when I bought the DAQ I noticed it had a sample rate that was more than sufficient, at 50KHz. Even if it only ever realised 60% of that claim it would be more than fast enough, can you see where this is going? It does indeed seem that you get what you pay for, and in my case that would be a measured sample rate of around 50HZ on my analogue channels which is only 0.1% of the claimed sample rate. Some digging on the products help forum showed similar results from other people, although it seems like the moderators don't keep on top of the spam robots which seem to have flooded the site when I checked it a couple of days ago. Putting this into context, at 50Hz the time step between each sample is 0.02 seconds, as you can see in the graph of the waveform above, the period of that signal is 0.0005 seconds. This means that the DAQ cannot capture the waveform and the result is a signal that looked noisy. Incidentally, if I had a sample rate of twice the measured frequency, Nyquist theorem, then I'd need a sample rate of 10KHz.

Putting this together it seems like the low sample rate and the noisy waveform was the source of my frustrations. Even if the DAQ had a higher sample rate and aliasing wasn't a problem, the values would still oscillate and I'd still have data which would be unusable. I looked at commercial signal conditioning, but after a few seconds the cost and complexity had me running for coffee and an easier solution. Digging out some of my uni notes from a third year module, I found that I might solve the problem using a filter, specifically a 'Low Pass filter', this comprises of a capacitor and a resistor. Couldn't be simpler, so literally a few minutes later I had found that a 1MΩ resistor and a 220nF capacitor reduced the magnitude of the noise from 1.8V to 0.3mV and the noisy behaviour of the Labview gauges had stopped. Finally!!


Now that I have sorted the noisy signal issues I have also been able to implement Labviews built in Thermocouple vi  to interpret the temperature from the thermocouple. This saves me from creating a large lookup table to locate the temperature value based on the voltage. Previously I have been using a quick and dirty method to estimate the temperature based on the product of a simple conversion factor and the voltage. I did a test where I dunked a couple of digital thermometers into a cup with one of my thermocouples and monitored how it performed by watching the temperature drop of boiling water and observing the values. I'm happy to say that the temperature my thermocouple was giving values within 1°K of the food grade thermometer than the thermometer that I use to monitor one of my aquariums. Looks like I won't be using that one in my reef tank anymore.

Still have to sort out my load cell, pressure transducers and flowmeter, but things are coming together quite quickly now. Stay tuned!


Friday, 13 April 2012

Amplifying Millivolt Signals.

Thought I'd write piece on a simple circuit I have built to amplify the output from a thermocouple. I am using two types of type K thermocouple for my temperature measurements, I don't know the technical names for each type off the top of my head, and it is past 4:30 am so I can't be bothered to find out. I call the type in the first picture 'probe' and the inset picture 'bulb'. These thermocouples come in several 'Types' depending on the requirements and are in essence a bi-metal strip that produces a voltage change proportional to the change in temperature, and this voltage is generally in the millivolts scale. The Type K probes are found in all commercial micro-gas turbine engines to measure the exhaust gas temperatures and I will be using the same but I have limited space within the engine and will therefore use the bulb type. They also have a faster response time which will give better results when the engine is throttling away from steady state operation.



The circuit diagram shows the final layout circuit I will be using, it is based around the LM358N op-amp which I sourced on EBay as they were very cheap. I originally omitted the small ceramic capacitor but since I will be using several amplification circuits and thermocouples in parallel there may be some noise which this should help to minimise. At this point you should know I am relying on the electronics I have learned at uni, since my course is triple accredited, (or cursed depending on your viewpoint), we have to cover a certain number of mandatory electronic engineering modules. But I digress, anyway these circuits are pretty simple and if you have any suggestions for improvements please let me know...



I couldn't help but transfer the circuit onto a bread board for testing and it worked  flawlessly, I even hooked it up to a DAQ and used WINDAQ in oscilloscope mode to see how stable the output was and it was surprisingly well behaved. I can't wait till my oscilloscope arrives as it will save me a lot of time messing about with a DAQ everytime I need to see how a circuit behaves. Dunking the bulb thermocouple into hot water then into cold showed a good response time, (something I need to further investigate to see how accurate temperature measuring will be when the engine accelerates or decelerates). Swapping over to a probe and holding a flame underneath it gave similar results.




Just need to make up five of these circuits on some vero board and then I can carry on with the Labview dashboard program. The pressure transducers have also arrived so more fun things to come as I can't really do much with the RPM frequency to voltage converter yet as I really need the oscilloscope. I have also been thinking about buying one of the DIY PCB kits from Maplins and making my own PCB's. This would be a more elegant method than vero board. Hmm...