Connecting a beam load sensor to netduino
#1
Posted 03 February 2011 - 09:40 PM
#2
Posted 03 February 2011 - 11:38 PM
Can you post a link to the datasheet of this sensor? The photo does not help muchI have the beam load sensor which is on the picture. It has 4 cables:
red - E+
white - S-
black - S+
yellow - E-
#3
Posted 04 February 2011 - 01:35 AM
#4
Posted 04 February 2011 - 06:50 AM
#5
Posted 04 February 2011 - 09:03 AM
#6
Posted 04 February 2011 - 10:34 AM
#7
Posted 04 February 2011 - 02:33 PM
#8
Posted 05 February 2011 - 02:37 AM
This is the IC that I have INA128P. Look at the schematic on the first page.
1. Connect S- to pin 2 of the INA128, connect S+ to pin 3 of the INA128.
2. If you have a bread board connect the netduino +5v and ground pin to the power rails on the bread board.
3. Connect E- and E+ to the breadboards power rails.
4. Connect pin 7 on the INA128 to the +5v rail.
5. Connect pin 4 and pin 5 of the INA128 to the ground rail.
6. Either use a resistor for the gain you want or do what I did and use a pot as a variable resistor. Use a multi meter to determine which two pins of the pot will show a resistance change when you turn the pot and connect those to pins 1 and 8 of the INA128.
7. Connect pin 6 of the INA128 to the analog pin of the netduino.
This should get you up and running quickly.
Back in September of 2007 I took apart a bathroom scale and found some 3 wire load cells. Here is the thread on Electro-tech-online.com where I stumbled through figuring out load cells.
Here is a picture of the load cell I picked up last year and got working with an arduino.
Hope that helps and let me know if you have any more questions on getting this going. I remember it being a pain when I started learing about load cells so if I can help save you some of that heartache I'd be more than happy to.
Thanks
John
- Rob Brinkworth likes this
#10
Posted 06 February 2011 - 11:11 AM
#11
Posted 06 February 2011 - 05:37 PM
#12
Posted 15 February 2011 - 06:12 PM
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!
#13
Posted 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
#14
Posted 15 February 2011 - 09:11 PM
#15
Posted 16 February 2011 - 06:36 AM
#16
Posted 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.
#17
Posted 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.
#18
Posted 17 February 2011 - 05:58 PM
#19
Posted 20 February 2011 - 07:12 PM
#20
Posted 23 February 2011 - 06:03 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users