This forum is the property of Proton software developers
Started by chris_cb_uk, Oct 29, 2021, 02:36 PM
Device = 18F4550 Declare Xtal = 16 Symbol loadclock PORTD.1 Symbol loaddata PORTD.2 Dim loadraw As Word Dim rubbish As Word Dim loadcellout As Word Dim calculatedload As Word Dim loadc As Byte Start: If loaddata =1 then bypassmeasure ' if data line low it's ready, if not bypass until next try. Print $FE, 1 ' reset screen SHIn loaddata,loadclock,MsbPost_L,[loadraw\16,rubbish\9] ' shift in with 25 bits for gain 128 ch A calculatedload= (loadraw-883)*2.477291495 ' 883 is 0g constant, have already calculated new scale based on 3kg = 2094, given ratio of 2.477 ishbypassmeasure: Print At 1,1,Dec loadraw Print At 2,1, Dec calculatedload," g" DelayMS 100 GoTo Start
Quote from: chris_cb_uk on Oct 29, 2021, 02:36 PMJust to save anybody else wanting to play with these inexpensive loadcells and chips (picked it up from ebay in uk for less than £6 reading up to 20kg) I've included some working code.
Quote from: trastikata on Oct 29, 2021, 03:40 PMIf this is something that needs reliability, I'd stay away from HX711 - my experience with it is overall not too positive.
Quote from: chris_cb_uk on Oct 29, 2021, 04:17 PMIn what way didn't it work for you?
Quote from: chris_cb_uk on Oct 29, 2021, 04:54 PMLike everything, there is always more than one way to do something. I just posted the code if anybody saw the chip and wanted to play with loadcells in a simple inexpensive manner.
Quote from: trastikata on Oct 29, 2021, 05:07 PMP.s the high zero drift was due to thermal drift, thus if you plan using it at different temperatures than calibration temp, keep this in mind.