Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help me convert adc value in kg

Status
Not open for further replies.
Post two measurements:
1: Sensor reading without load (0 Kg)
2: Sensor reading with a known weight on it..

post the weight of the load and the adc reading on both cases.
 
Progarmming language I am using is c and controller type is avr series atmega 16

My without load adc reading is 325 with load is 750 somting .
Tell me to how to convert adc value into kg.
 
Progarmming language I am using is c and controller type is avr series atmega 16

My without load adc reading is 325 with load is 750 somting .
Tell me to how to convert adc value into kg.

It is impossible to convert "someting" into kilograms. What is the load.. and what is the raw ADC reading when you put that load to the scale?
 
1 litre of water is 1 Kg.. put that on the scale and post the ADC reading. Then take the load off and post the ADC reading. Two measurements and that is all it takes to calibrate the scale.
 
Last edited:
You need atleast two known conditions

a) When there is no load
b) When there is a load

Then you need to convert the input value to the output

actual KG reading = ((ADC reading - ADC min reading) * Kg span) / ADC span ) + Kg minimum reading..
 
@ Ian Rogers
tell me waht is ADC span and Kg span

in adc reading the value is max or min i placed over there.
where i am getting kg minimum reading
 
@ Ian Rogers
tell me waht is ADC span and Kg span

in adc reading the value is max or min i placed over there.
where i am getting kg minimum reading

You answered your own question here..
without load the load cell adc value is 300 something and with load max adc value is 850 something


ADC min = 300 and ADC max = 850... So ADC span = 550


0 kg = 300.. So how many Kg's was load max? If we assume 100Kg then your Kg span will be 100Kg....
 
@ misterT

My without load adc reading is 325 with load is 750 somting .
Tell me to how to convert adc value into kg.
 
@ Ian Rogers

I make this equation according to u. It gives me +ve and -ve value both. The max to max adc value is 1024.

x = read_adc(1);
y = (1024-x);
kg =((1024-x)*50)/y+0;
 
This is the math then:

x = read_adc(1);
y = (x - 300);
kg = (y*50) / 450;

Be careful with the math. If you use unsigned integers the math will fail very easily. Use floats if you have the processing time available.
 
[MODNOTE]Deleted Off Topic[/MODNOTE]
 
Last edited by a moderator:
Hi shivpsit4

You may have seen this site, but if not, it has a simple explanation of how to convert the ADC reading to Kg: https://www.sparkfun.com/products/10245

Check the video. The description of the calculation begins at about 6:30 and ends at 7:30. That is, it takes about one minute.

Good luck.

John
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top