View previous topic :: View next topic |
Author |
Message |
eyenierazali
Joined: 03 Oct 2012 Posts: 4
|
source code for load cell |
Posted: Fri Mar 01, 2013 5:03 am |
|
|
hello.
is there anyone who familiar with load cell sensor? i am using 500g load cell sensor with instrumentation amplifier INA114AP. i want to convert the weight to volume (ml). is there any examples of load cell source code using C compiler? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9229 Location: Greensville,Ontario
|
|
Posted: Fri Mar 01, 2013 7:29 am |
|
|
yes, though you've got to explain better!
Normally you'ld setup an experiment with min and max weights,observe the analog output going to the PIC ADC.A couple of mid weights would be good,incase output is not 100% linear.
Once satisfied with the output range'get max bits for max weight',etc.,then cut code as required.
We don't know...
PIC type
Compiler version
math for weight->volume conversion(material dictates 'math'?)
display choice (LCD,PC,LEDs,audio,??)
You're best to start with the '1Hz blinking LED' and 'Hello World' programs.Once you've got them working, run the 'experiment' and report back.Include your test program.
After that we can help out...
Also you MUST mention if this is a Proteus simulation !!
hth
jay |
|
|
eyenierazali
Joined: 03 Oct 2012 Posts: 4
|
|
Posted: Fri Mar 01, 2013 7:52 am |
|
|
tq for the reply.. and i"m sorry for the lack of the information..its due to i'm not too clear with this project.
yes, it is a Proteus simulation.
PIC type : 16f877a
Compiler version : C compiler
display choice : LCD
i will do the experiment first then. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Mar 01, 2013 8:00 am |
|
|
You don't tell us much.
1) Is this school project, commercial product?
2) Is it part of a something else not primarily weighing, eg robot?
3) What resolution do you want?
4) What about temperature stability?
5) Have you got REAL hardware to work with?
6) Have you got any results to date?
7) What experience do you have?
8) Have you read the forum guidelines?
................
Mike
PS. If this is Proteus only simulation, then I'm out. |
|
|
eyenierazali
Joined: 03 Oct 2012 Posts: 4
|
|
Posted: Fri Mar 01, 2013 8:41 am |
|
|
hi mike..tq for reply. so i will explain what i am trying to do. i hope this help.
this is actually my fyp project. my project is about digital blood donor scale. the current scale is still mechanical type. so the process of monitoring blood level is done manually. the objective of this project is to alert the nurse that the blood has reached the stipulated volume and to make sure the collected blood is exactly 350 ml or 450 ml. before the blood reached the stipulated volume, there will be a buzzer and LED alert at some programmed level of blood. and of course i need to do the hardware also. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Mar 01, 2013 9:04 am |
|
|
eyenierazali wrote: | hi mike..tq for reply. so i will explain what i am trying to do. i hope this help.
this is actually my fyp project. my project is about digital blood donor scale. the current scale is still mechanical type. so the process of monitoring blood level is done manually. the objective of this project is to alert the nurse that the blood has reached the stipulated volume and to make sure the collected blood is exactly 350 ml or 450 ml. before the blood reached the stipulated volume, there will be a buzzer and LED alert at some programmed level of blood. and of course i need to do the hardware also. |
I don't understand what you mean by "exactly 350 ml".
As it stands you're asking for an infinite No of bits resolution.
That's not possible.
So, you still have to specify the required resolution.
Are you looking for +/- 1ml, or better?
Is the density of blood consistent enough for a weight measurement to give you sufficiently accurate volume?
OR are you really wanting 350g (450g) of blood.
If all you really want is the "nearly there" warning, can't you just use an opto sensor to detect the blood level in a transparent vessel?
I don't know. It's your project.
Mike
Last edited by Mike Walne on Fri Mar 01, 2013 4:45 pm; edited 1 time in total |
|
|
necati
Joined: 12 Sep 2003 Posts: 37 Location: istanbul
|
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Mar 01, 2013 9:29 pm |
|
|
Weight is proportional to volume. If you can read an analog input and multiply by a scaling factor, it does not matter if the analog signal comes from a load cell or any other source. There is no "load cell C code" just code dealing with an analog to digital converter.
The analog circuitry to interface to a load cell is not trivial, but not too hard either. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Sat Mar 02, 2013 4:13 pm |
|
|
Quote: |
this is actually my fyp project.
|
what does FYP mean , spelled out?
Have you done any other PIC based projects and analog conditioning circuitry previously, or is this all new to you,
and a student assignment? |
|
|
|