Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

iceman1979

Member Since 04 Feb 2011
Offline Last Active Feb 23 2011 06:18 PM
-----

Posts I've Made

In Topic: Connecting a beam load sensor to netduino

23 February 2011 - 06:18 PM

I found what was going on! Instead of connecting VREF to ground as suggested, I have to put a voltage in there, like for example, 1V. Then it works fine! ( Readings are not really stable but I am working on that. However, I would really appreciatte any help if someone knows how to stabilize a reading using hardware/software ).

Thank you!


Yes, you can connect VREF to 0v (GND), 1.2v, 2.5v, or 5v depending on the offset that you want. They talk about the VREF in the video from the nerdkits website I linked in a previous post.

I'm glad you got it working and sorry I forgot to mention the offset voltage earlier.

For stabability make sure you have caps on your power source. A .1uf cap would do the trick, other than that there is a trick mentioned in the nerdkits video where they show one way of attempting to elliminate the noise in the signal by switching the polarity of the excite voltage back and forth and sample the reading for each direction and then using those two readings to cancel out the noise.

Hope that helps.
Thanks
John

In Topic: Connecting a beam load sensor to netduino

17 February 2011 - 05:58 PM

When I had my amp setup with no weight on the load cell I had it reading out 1v applying light pressure with my thumb I could see the mV going up and down. I had to press hard to get it over 3v but I was only able to get there by playing around with the gain. that's where having a variable resistor helped a lot. The reason you want it to go from 0 - 3.3v is because of the ADC resolution. The 10bit ADC returns a number between 0 - 1023 which is 1,024 steps it can report for a change in voltage between 0 - 3.3v. So, take 3300mV / 1024 and you get 3.22mV per step. That means that for every 3.22 mV change in voltage your ADC will change by 1. For 87mV you should be seeing a number around 27 in the netduino. Even though you can't see it the change is happening even when light pressure is applied. If the volt meter can only show down to 1 whole mV then you are missing the changes in voltage down in the decimal range. For instance... 87.000mV and 87.999mV would be seen as 87mV and you would miss the .1 - .9 change that took place. now, if you multiply that 87mv by 10 you get 870mV and the change in .1 - .9 would be seen as 871 - 879. Now that .1 - .9mV change that didn't register on the ADC because it wasn't a change greater then 3.22mV now shows up because the change is 0 - 9mV. This would cause the ADC value to change by about 3 points. Hope that helps. John

In Topic: Connecting a beam load sensor to netduino

16 February 2011 - 06:42 AM

Just to make it more clear, for instance:

if a have something that weights 200 grams it does not recognize it. If a put 1kgrs then I can se how the response in mV goes high and if I add the previous 200 grams to this 1kgr I can see an increment as well. Somehow, with the empty scale I have an output of 87mV which and I need an "offset" of grams to make the sensor start "sensing".

Any ideas??


yeah, your gain isn't high enough to show the small changes in weight being added. If the gain is set right a small change will be reflected as a large change in voltage.

In Topic: Connecting a beam load sensor to netduino

16 February 2011 - 06:36 AM

As far as I understand, the ADC input can only be between 0-3.3V so why do you say it should go between 0-5v? I tested the way I get the voltage using the code with a voltimeter and it was fine so I gues I am getting it right with.

I am not putting a pot because I checked and with it I didn't obtain gain ( with an impedance like 250 ohms I didn't get any changes in the output of the circuit. )

I am a bit lost..what can I do?


If it is 0-3.3v then thats the range you want to see from the amp. if your pot has 3 pins on it two of them will give you the max resistance and the other two connected will give you a variable resistance that changes as you turn the pot. These two pins on the pot would be the ones you want to connect to.

In Topic: Connecting a beam load sensor to netduino

15 February 2011 - 08:56 PM

Well I finally got my ina128P and build the installation exactly as iceman1979 kindly described. However I am having a problem. Measuring the mV from the chip output I get 83 mV ( without any weight on it). Then, I need to put a considerable weight until I start to see a change on the mV measured at pin number 5. For example, the original scale with this sensor was able to measure 1,2,3.... grams. Now, it does nothing with measures like 200 or 300 grams. Not until I put a certain weight it starts to measure it and increase proportionally to the applied force. What am I doing wrong?

I am using a gain resistor of 68 Ohms.

The code is this:

    class Bascula
    {

        float tara;
        int voltatge_referencia;
        int resolucio_CAD;
        AnalogInput sensor_pes;
        int max_num_tares;

        public Bascula()
        { 
            sensor_pes = new AnalogInput(Pins.GPIO_PIN_A5);
            voltatge_referencia = 3300; //reference voltage of AD in mV
            resolucio_CAD = 1023; //AD resolution
            tara = 0;
        }

        public double GetmV()
        {
            return (((sensor_pes.Read()) * voltatge_referencia) / resolucio_CAD);
        }


    }

and I call the method like this:


    Bascula bascula = new Bascula();
                    
    while (true)
    {
    Debug.Print(bascula.GetmV().ToString() + "mV");
    Thread.sleep(100);
    }

and this is an image of the mounted system:

http://flic.kr/p/9irbH2
http://flic.kr/p/9ircva

Thank you!


With a 68ohm resistor your gain should be between 500 - 1000 to 1. Your voltage should be in the V not mv. I used a pot instead of a resistor so that I could play around with the gain. Use a volt meter to test the circuit before trying to implement into the netduino. This will allow you to fine tune the gain so that you get the max resolution. The idea here is to get the voltage swing to be between 0-5v. Having the voltage got to min and max will give you the best resolution when you hook it up to the netduino.

Hope that helps.
John

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.