-
• #2
I see no reason why a normal load cell wouldn't work.
I don't think anyone has done that yet with the Espruino (if they did, they haven't talked about it), but just about anything that can be read with an Arduino can be read with the Espruino.
-
• #3
This module would read a strain gauge directly, note normal ADC inputs are just not sensitive enough. This module should be pretty simple to interface to the Espruino.
http://www.ebay.co.uk/itm/400567204760 -
• #4
The module above looks good - then it's just a matter of finding a load cell.
As @DrAzzy said, it's worth checking Google for ways that people have done it with an Arduino, as they will almost certainly also work on an Espruino.
There may well be some kitchen scales you could 'hack' - for instance I just did a quick check and found this: http://www.avdweb.nl/arduino/hardware-interfacing/scale-interface.html
I'm sure there are others, but there's a pin on those scales that outputs a simple square wave, and then you just have to measure the pulse width. On Espruino it's actually even more simple than in Arduino - you just do:
setWatch(function(e) { var time = e.time - e.lastTime; // ... }, A0, {repeat:true,edge:"falling"});
-
• #5
cool thanks.
-
• #6
Just a bit more information about the strain gauges used in loadcells. The basic strain gauge found in nearly all cells is a bridge of 4 resistors, these resistors are wired as a whetstone bridge. This bridge needs to be read by an ADC with a differential input. The strain gauge is "excited" by a voltage typically between 1V and 10V, the gauges produce very small signals, normally a gauge may be specified as 2mV/V, this means for an excitation voltage of 1V it will produce 2mV output at maximum load. Similarly for an excitation of 2.5V it would produce a full scale output of 2mV * 2.5 = 5mV. As you can see the voltages involved are very small hence the need for an ADC with amplification like the unit mentioned above from ebay (I've not tried this but it looks to be made to read loadcells).
Another thing not note is that your accuracy depends on the stability and accuracy of your excitation voltage, so this is generally fed from a voltage reference.
Hope the above helps
-
• #7
Hi,
I've tried to connect the hx711 to espruino.
unfortunately, the hx711 pd_sck pin asks for a pulse of 1 and 0 (24 to get the bits of reading) then 1-3 bits for the gain setting.
and the max time for the 1 period is 50microseconds (pcd_sck high time)
https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdfand the espruino min delay for a digitalwrite is 160 microseconds. I've measured with my oscilloscope.
so the hx711 is "too fast" for the espruino.
Do you have an idea how I can get the adc values ?
-
• #8
Edit: moved my reply to the other thread you started on HX711 here: http://forum.espruino.com/conversations/287046/#comment12991639
It'd be best to discuss this there.
I'm brand new to the IoT scene so sorry for the newb question. Is there a load cell that will work with Espruino ? I would like to be able to sense weight in pounds up to 10lbs when and object is placed on top of the sensor.