It would be easy using the timers on the sx or the propeller. I believe that you could do it on a basic stamp because I think that they have some method or measuring the time of input pulses. So, I think that it should work with any of the Parallax products The propeller is really nice though and could display it on a tv or monitor though. Guess which I have
Edit: I just checked the data sheet and I can't see what frequencies it puts out. Also since it is a 5v device if you use a propeller you will need to include a resistor in the output.
Post Edited (stevenmess2004) : 3/7/2008 11:10:11 AM GMT
Does anyone know what the max weight is ? It looks like they make different models for 10lb, 50lb, 100lb, and 200lb.
The website says 250KHz to 150KHz.
Hmmm Not a lot of info available. I see Loadstar sell a convertor module, changing the frequency to an analog voltage output. I suppose doing a count on the frequency with a propeller would work. Don't think the stamp could read the freq, but maybe with a dac interface.
The BASIC Stamp has a COUNT instruction which would work fine for top-end frequencies ranging from 120KHz (BS2) to 416KHz (BS2p). A simple frequency divider IC can bring higher frequencies within counting range. A frequency-to-voltage converter would only complicate things.
I agree with Phil.
The whole point of the iLoad Mini is that the sensor output a digital signal.
You could just make a data table and interpolate to get a reading (avoiding most of the math).
I just received my iLoad sensor and here is some info:
· LoadStar Model: FS-C-010-200-AX
· Load Range: 10 pounds
· Freq with no weight: 213,175 Hz (this frequency goes DOWN as weight is added, website says 150KHz is lower limit)
· Ref Freq: 226,011 Hz (this frequency is not affected by weight)
· Current: about 2mA (I don't know why they ask for 50mA ? Startup maybe ?)
· The CTRL pin seems to be pulled-up internally. Connecting to +5 did nothing.
· If I did the math right, my sensor would indicate 10 pounds with a Fx frequency of 187075 Hz so that is about 2609 Hz/pound
· It should be noted that the frequency is too high to be COUNTed on the BS2, BS2e, and BS2pe models.
· SX/B would require at least a 20MHz clock for the COUNT command, but the RTCC counter or a timer(on the SX48) could be used with a slower clock speed like the internal 4MHz.
Here is about the simplest program in SX/B to read the sensor.
I know it's not as accurate as using the formula in the datasheet, but it seems to give reasonable results.
Here are some answers to questions about iLoad sensors raised in above queries:
- The capacity of the iLoad Mini-PX sold through Parallax is 10 lbs with overload protection up to 15 lbs (150%) - higher capacity units are available upon request from Loadstar at http://www.loadstarsensors.com
- The iLoad Mini sensor has 2 frequency outputs. When Control Input = logic ‘1’, the Mini outputs the sensor frequency, Fsensor. When Control Input = logic ‘0’, the Mini ouputs the reference frequency, Fref. The compensated frequency Fcomp = Fsensor - K*Fref, where K is a constant provided by Loadstar. Loadstar also provides the coefficients for the quadratic equation to translate Fcomp to weight. (Weight = Ax^2+Bx+C where x=Fcomp).
- There is an "object" on the Parallax "Object exchange" site that provides example code to use the iLoad sensor with a Propeller chip/board to obtain calibrated forces/loads http://obex.parallax.com/objects/247/
- The baseline line frequencies (Fsensor & Fref) are typically around 150KHz (always less than 250 KHz) but can vary from sensor to sensor
- The frequency drops as the load is applied
- The change in frequency is proportional to applied loads
- A quadratic fit gives better accuracy than linear fit
- The manufacturer provides the constants for each sensor as shipped
Doesn't look as anyone replied to the question about using 'pulsin' rather than 'count'.· Would this be doable in a BS2p application?· Would it be more efficient to measure the pulse width rather than count pulses?
Do the math. At 200KHz and 50% duty cycle, pulses are only 2.5µsec wide. Since the granularity of PULSIN on a BS2p is 0.8µsec, that would correspond to a result of 3. That's much too coarse to be of any value.
Comments
Edit: I just checked the data sheet and I can't see what frequencies it puts out. Also since it is a 5v device if you use a propeller you will need to include a resistor in the output.
Post Edited (stevenmess2004) : 3/7/2008 11:10:11 AM GMT
The website says 250KHz to 150KHz.
http://www.loadstarsensors.com/iloadmini.html
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
I assume it is okay to post them here.
NOTE: The values in the pdf·will vary from unit to unit. They are supplied by the mfg.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
Post Edited (Bean (Hitt Consulting)) : 3/7/2008 6:54:46 PM GMT
-Phil
The whole point of the iLoad Mini is that the sensor output a digital signal.
You could just make a data table and interpolate to get a reading (avoiding most of the math).
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
· LoadStar Model: FS-C-010-200-AX
· Load Range: 10 pounds
· Freq with no weight: 213,175 Hz (this frequency goes DOWN as weight is added, website says 150KHz is lower limit)
· Ref Freq: 226,011 Hz (this frequency is not affected by weight)
· Current: about 2mA (I don't know why they ask for 50mA ? Startup maybe ?)
· The CTRL pin seems to be pulled-up internally. Connecting to +5 did nothing.
· If I did the math right, my sensor would indicate 10 pounds with a Fx frequency of 187075 Hz so that is about 2609 Hz/pound
· It should be noted that the frequency is too high to be COUNTed on the BS2, BS2e, and BS2pe models.
· SX/B would require at least a 20MHz clock for the COUNT command, but the RTCC counter or a timer(on the SX48) could be used with a slower clock speed like the internal 4MHz.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
Post Edited (Bean (Hitt Consulting)) : 3/12/2008 6:18:57 PM GMT
I know it's not as accurate as using the formula in the datasheet, but it seems to give reasonable results.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
- The capacity of the iLoad Mini-PX sold through Parallax is 10 lbs with overload protection up to 15 lbs (150%) - higher capacity units are available upon request from Loadstar at http://www.loadstarsensors.com
- The iLoad Mini sensor has 2 frequency outputs. When Control Input = logic ‘1’, the Mini outputs the sensor frequency, Fsensor. When Control Input = logic ‘0’, the Mini ouputs the reference frequency, Fref. The compensated frequency Fcomp = Fsensor - K*Fref, where K is a constant provided by Loadstar. Loadstar also provides the coefficients for the quadratic equation to translate Fcomp to weight. (Weight = Ax^2+Bx+C where x=Fcomp).
- There is an "object" on the Parallax "Object exchange" site that provides example code to use the iLoad sensor with a Propeller chip/board to obtain calibrated forces/loads http://obex.parallax.com/objects/247/
- The baseline line frequencies (Fsensor & Fref) are typically around 150KHz (always less than 250 KHz) but can vary from sensor to sensor
- The frequency drops as the load is applied
- The change in frequency is proportional to applied loads
- A quadratic fit gives better accuracy than linear fit
- The manufacturer provides the constants for each sensor as shipped
Thanks,
Scott
Do the math. At 200KHz and 50% duty cycle, pulses are only 2.5µsec wide. Since the granularity of PULSIN on a BS2p is 0.8µsec, that would correspond to a result of 3. That's much too coarse to be of any value.
-Phil