Shop OBEX P1 Docs P2 Docs Learn Events
project weight — Parallax Forums

project weight

sofossofos Posts: 7
edited 2006-09-03 20:07 in BASIC Stamp
How can help me? i want to start with my basic stamp discovery kit. for a (school) robotic project i want to monitor the weight a cup of water while water is leaking. at a certain point an alarm (sound or led lights up)should go off. the weight of the cup and water is about 400 grams; the alarm should go at e.g. 30 gram.·i want to·program the uC Basic stamp and put it in a small robot stand-alone.·the signal comes from a flexiforce demokit sensor;·energy from a small battery
who can help me with circuit suggestions and maybe a small Basic program?
thanks!
sofos, Belgium

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-08-24 14:29
    sofos -

    Based on how I'm reading the flexiforce data sheet, I don't think you will be able to get either the low end range, nor the accuracy that you may need for your project. I certainly stand to be corrected, however.

    A better bet might be to go with a load cell (wheatstone bridge principle):
    http://en.wikipedia.org/wiki/Wheatstone_bridge

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • sofossofos Posts: 7
    edited 2006-08-24 14:36
    thank you Bruce. good suggestion; is it possible, in your opinion to incorporate that wheatstonebridge principle with a uC. I want to program the setpoint and besides that i want to monitor the signal; i also need a alarm signal when there is no lekkage but still water in the cup.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-08-24 15:04
    Take a look at the RCTIME command in the "What's a Microcontroller" manual.

    You might also want to look at the "Applied Sensors" manual for measuring liquid levels.

    Both manuals can be downloaded from the Parallax website.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-08-24 15:16
    sofos -

    Oh sure. What you want to do it quite doable. I am by no means a load cell "expert", but here's how I would approach it:

    1. Find an appropriate load cell which meets your particular needs. This will include force range, physical size and accuracy.

    2. Find an appropriate A/D chip which is DESIGNED for load cell applications. Often these contain an amplifier and/or an exciter circuit if one is needed. A good place to look is Linear Technologies. You might even be able to get them to part with a sample. Again, make sure the load cell A/D chip meets the specifications and accuracy you require.

    3. Hook it up, test it out, calibrate it if necessary, and you should be pretty much good to go.

    Best of luck with your project.

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 8/24/2006 3:46:51 PM GMT
  • metron9metron9 Posts: 1,100
    edited 2006-08-24 15:26
    Here is an Idea.

    Since the flexforce measures 0 to 100 lbs in 0 to 4.5V your 30 grams trigger is just way to small to measure with it.

    How about a balance system similar to the wheatstone idea



    Set up a balance platform scale, put 30 grams on one side and your cup for the water on the other side as the water leaks out to the point where both sides are equal weight the beam will be parallel and continue to rotate until the beam bottoms out. Connect a simple on off switch to the beam so that when it tipspast center yoiu know the cup side is less than 30 grams. (add the cup weight as well to the measurement side)





    cup
    30gms
    ........... /\..................... trigger switch when this side drops past centerline.



    The other sensor you need is to measure the flow of the water you said.

    Since the state fair just started, I am thinking about the ferris wheel...

    Use a circle cut from plastic maby 2" diameter, put slots in edges maby 20 around the diameter, inset small plastic squares to make a mini waterwheel
    put that under the flow of water comming from the cup, on the water wheel put a on off sensor to measure its rotation, if it's not rotating there is no water flow.
    If it's just drops of water use an ir sensor and a black center (hubcap) with holes in it, a light on one side and count the pulses of light to see if it's spinning.


    Course there are a million other ways to do it as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think outside the BOX!

    Post Edited (metron9) : 8/24/2006 3:36:36 PM GMT
  • sofossofos Posts: 7
    edited 2006-08-24 17:31
    thanks for the replies! for the (school) project it is necessary to use the Basic stamp (for training in Basic langage also); after programming the stamp in the kit i have to place the stamp in the 'robot unit' (it drinks out of the cup).
    my idea was and with your suggestions : a wheatstone bridge/load cell -> analog signal -> A/D convertor-> digital signal -> stamp kit -> Basic program for setpoint and monitoring teh weight -> stamp upload -> stand alone

    this nis teh beginning: now i have to consider teh components and programming. maybe you can help me with some circuit ideas?
    i hope i am not asking too much.
    thanks again
    sofos
  • sofossofos Posts: 7
    edited 2006-08-25 08:46
    i found a nice circuit on the linear techn. site (thanks Bruce!):
    industrial_sensortransducer.jpg
    For my application: can i built this system on the parrallax Basic stamp kit? and/ or can somebody advise me which uC to use for programming the setpoint (cerian weight) and monitoring the amount water in the cup·(weight monitoring over time) and the other parts. i am·not very familiar with this stuff. thanks again. sofos
  • Mohamed RefkyMohamed Refky Posts: 47
    edited 2006-08-28 18:23
    Load Cell is connected directly to AD7730 A/D for weigh scale.

    I use BS2 with the AD7730 in weigh scale application like liquid filler and·checkweigher.I use keypad for programming setpoints.

    Look at my first project:

    http://www.parallax.com/html_pages/resources/custapps/app_paint.asp

    Go to forum search and search for AD7730.

    Mohamed Refky
  • achilles03achilles03 Posts: 247
    edited 2006-08-29 02:01
    You can always use a "lever" idea with the flexiforce sensor... If you have a lever (Type 2) with, say, a 30 to 1 ratio, then you've cut the "range" of the sensor by a factor of 30 (no problem, since it goes to 100lb or so), but you've also increased its resolution by a factor of 30. All you need is a place to put a longer lever (say 30 inches or so?). And you can always calibrate it after-the-fact to determine the actual ratio. See the attached diagram.
    410 x 108 - 4K
  • sofossofos Posts: 7
    edited 2006-08-29 09:56
    thanks Mohamed for your information. i looked at the datasheet of the AD7730 and ordered·a sample.·then i·want to·examine·it with the BS2·kit.·i hope it would be possible to program a setpoint at a·certain resistance of the load·cell. i also want to monitor the change of the resistance in time (no change -> than·alarmsignal) Can you help me with·suggestions for the software program? is it easy to connect the AD7730 with the BS2?·thanks for reply!
    ·
  • Mohamed RefkyMohamed Refky Posts: 47
    edited 2006-08-29 21:23
    The AD7730 accepts low volt from load cell and outputs serial digital word.
    BS2 code reads the 16 bit word and converts it to weight so you will program
    a setpoint at certain weight not resistance of the load cell.

    Here is example codes of writing and reading of registers:

    ADdata···· ·var·word· 'variable to hold 16 bit result.
    DATAin······con·2····· 'AD data input pin.
    DATAout··· con·3····· 'AD data output pin.
    SCKL········ con·4···· ·'clock to AD.
    RDY··········con·5····· 'RDY input .

    input 5

    Initial:

    SHIFTOUT DATAin,SCLK,MSBFIRST,[noparse][[/noparse]$FFFF\16,$FFFF\16]·'write 32 ones will reset the AD7730 to the default state.

    SHIFTOUT DATAin,SCLK,MSBFIRST,[noparse][[/noparse]$02]··'write to communication register setting next operation as write to mode register.

    SHIFTOUT DATAin,SCLK,MSBFIRST,[noparse][[/noparse]$3080\16]·'write to mode register starting continuous conversion for 10mV input range,unipolar,16 bit data word and 5V reference.

    SHIFTOUT DATAin,SCLK,MSBFIRST,[noparse][[/noparse]$21]··'write to communication register setting next operation as continuous read from data· register.

    low 2········ ' set DIN line low to insure part is not reset while in continuous reade mode.

    ReadData:

    waitRDY:
    ··· IF RDY = 1 THEN waitRDY···'wait for RDY to go low to indicate output update.

    ··· SHIFTIN DATAout,SCLK,MSBPOST,[noparse][[/noparse]ADdata\16]·'read conversion result from data register.

    DEBUG DEC ADdata,cr····'display data in decimal.

    pause 500················· ·'wait 0.5 second between reading.

    GOTO ReadData
  • sofossofos Posts: 7
    edited 2006-08-31 19:26
    thanks a lot Mohamed! I wait for my sample AD7730 (Sept8th). Is it possible to include a (flexiforce) single element pressure sensor in a Wheatstone bridge? a loadcell is very expensive. My idea is to put a single flat element under the cup of water; the weight pressures the element and inner resistance is changing; when the element is connected with three other resistors as in the Wheattone bridge than it could be solved?? Mohamed is this a good solution for the sensor part?
    thanks again for your reply if possible, sofos
  • Mohamed RefkyMohamed Refky Posts: 47
    edited 2006-09-02 15:44
    I use Revere load cell,the model 640 is about $40· 3,5 Kg

    http://www.revere.nl/Index/indexp.htm
  • sofossofos Posts: 7
    edited 2006-09-03 19:10
    thanks Mohamed for your reply. for my application the in-built properteis are too large. i need a flat sensor as i mentioned. do you think it is a good solution as i described (wheatstone bridge and one resistor is replece with the flat sensor e.g. flexiforce)?
    thanks!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-09-03 20:07
    If cost is a big issue, you can set up a 'spring scale' by hanging the cup device on a spring.· The wonderful thing about this is you have a very predictiable linear function and there are a lot of different kinds of springs that you can use depending on weight and the amount of stretch you can to use.

    Since the spring will contract as it gets lighter, you can measure the position by using a variety of methods:

    electro-mechanical, potentiometers, light, or sound.

    You could use ultrasonic distance to measure the bottom of the cup, you could use a sliding [noparse][[/noparse]linear motion] potentiomer to measure the distance, paired leds and sensors, or you could set up a series of electical contacts that indicate exact possition.

    The BasicStamp will generally limit you to only 16 electrical contacts.· If that is not enough resolution, I suspect you can use logic chips to gain a higher resolution.

    This project is really about reliable calibration and selecting a system that will allow that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Sign In or Register to comment.