08-01-2012 09:07 AM
I suggest you stop writing code and fix your electrical problem. You have 4 volts p-p at 50Hz of NOISE shown on your scope photo. There must be a ground loop or bad ground somewhere. No load cell is going to put that out. Your signal should be a low mV level signal with very low noise (uVs) when nothing is on the cell and a 4-5V signal with low noise when there's a load. Can you send a picture or diagram of your setup? There is clearly something very wrong and trying to filter out that much low frequency noise is going to mess with your accuracy. You should have no reason to filter at all. Taking 100 readings quickly and then averaging will give better results than filtering out information.
Your "awful offset" and lack of stability sound like a floating signal problem (often occurs in differential mode) which also indicates faulty ground connections.
Read this before you go any further and apply the info to your connection setup: http://www.ni.com/white-paper/3344/en
08-01-2012 03:48 PM
I agree with NIquist that you have an electrical problem which is overwhelming any software issues.
Try disconnecting the inputs to the 6008 from the load cell. Then ground the inputs (to AI Gnd) and see if you get a nice zero signal. If that works, then connect a single cell battery and see if you get ~1.5 V and no AC. You may need to connect one side to ground but I think the USB-6008 input circuitry may not require that.
If you get good results from those tests, then the Field Wiring Guide linked in NIquist's post should get you to the load cell data.
Lynn
08-02-2012 04:36 AM
Thanks for your replies.
Im going to take a look at it, i believe that the photo i may of taken may be the output stage after amplification not of just the load cell, so whatever noise the load cell is creating along with the amplifier may be getting amplified hence the large amount. But as i said ill check it out today. Thats a good suggestion johnsold, ill try that aswell. Ill let you know of my progress as the day goes on.
Many thanks
08-02-2012 09:02 AM
Hi NIquist
I re-checked my load cell (actually disconnected it from rest of circuitry) and tested it with an oscilloscope. Attachment 1 shows the output. The settings were 50mV and 2ms. As you can see there is only max 100mV pk-pk with no load however when then gets connected to a DMM it averages out at -0.0087. Once connected up to the amplifier i receive attachment 2 (1V/div , 5ms) and when a load is applied attachment 3 (same settings). Ill take into consideration your suggestion however personally i put the filter in because i wanted to reduce any extra noise that may be introduced.
Im not very used to using a DAQ as i mainly used microcontrollers. My current setup is as follows : Load cell connected to 12V adaptor, +ve output of loadcell to input of amplifier, Output of amplifier to DAQ. Ground to DAQ. +ve and -ve regulators supplying amplifier at 5v. Im using a sampling rate of 1khz with 100 samples (like you recommended). Ill attach an image of the setup in next post as it only allows for a maximum of 3 attachements. I had a read through what you supplied however im struggling to understand what setup im meant to use(im not a professional just do this as a hobby).
Many thanks
08-02-2012 09:31 AM
I realize that you may be in the process of attaching more information but something jumped out of your description.
If the load cell is excited from 12 V, then the outputs of the load cell will be at 6 V (+/- a few millivolts due to the load). Your amplifier is powered from 5 V (possibly +5 V and -5 V - you were not completely clear). BIG PROBLEM!! The input to the amplifier is at a higher voltage than the power supply of the amplifier. At the very least it will not work. It might damage the amplifier.
If you are running the amplifier from +/-5 V, then excite teh load cell from the same +/-5 V. Thsi will produce a common mode voltage of zero and make your amplifier's job much easier.
Lynn
08-03-2012 10:38 AM
Thanks for your replies
The load cell is connected to a stand alone power supply, the outputs from the load cell are then connected to a seperate circuit which has the amplifier and regulators etc. I will say though i have been utterly stupid and not checked the connection setup between the daq, it was actually a friend who said and i realised two things, I wasnt taking it from ground just a line i had designated ground so using the RSE setup was incorrect and i kept connecting it incorrectly when i changed it to differential mode.
I have gotten the program to work but im just now working on accuracy and stability. Ill post pictures from labview next week showing the progress, signal pattern, setup and i would appreciate any input you's may have!
Many thanks
08-03-2012 11:54 AM
Glad you solved that problem. Anytime you see power line frequency signals much bigger than the expected signals it is a clue that some grounds are not connected proeprly somewhere.
Lynn
08-06-2012 09:16 AM
This will be the last post, Is there any possible way to get the display to round up to multiple of a number. Im trying to finish the the coding off, but when i do values of 5p onwards the rounding is terrible. Is there a way a creating a rule that it has to equal a multiple of 5 10 etc?
Many thanks
08-06-2012 09:21 AM
Simple math.
Take your number. Divide by 5. Round to nearest integer. Multiply by 5.
08-06-2012 01:24 PM
Well would b simple enough.
However problem i have is with 50pence and 5pence the values are close but they change between values. For instance i had £17 pounds in 50 pences, and on the display it says changes between 16.7 - 17.1. I know this is probably down to the accuracy, but just wondering if there is anyway to only get it to show like the multiples.
When you say round to nearest integer how do you do that?
Many thanks