Home |
Search |
Today's Posts |
|
Metalworking (rec.crafts.metalworking) Discuss various aspects of working with metal, such as machining, welding, metal joining, screwing, casting, hardening/tempering, blacksmithing/forging, spinning and hammer work, sheet metal work. |
Reply |
|
LinkBack | Thread Tools | Display Modes |
#1
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
I got an AD7730 IC (load cell analog to digital converter) and connected to an Arduino microcontroller and a load cell. The AD7730 chip is only on a solderless breadboard right now, but I'm getting pretty good results. The load cell I'm using is rated for 30Kg's and I'm able to read 1/10th of a gram with some noise & drift. So far my microcontroller code just configures the AD7730 chip, reads raw values and converts them to units by responding to computer keys for zero and calibration. I'm wanting to get this thing all together in a handheld enclosure with rechargeable batteries, a LCD display and buttons to allow setup, configuration, and calibration. A connector will allow me to change load cells so I can use this with a reloading scale or a 10 ton crane scale, with all the configuration and calibration saved for each load cell I want to use it for, saving data for a dozen load cells shouldn't be a problem. Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. RogerN |
#2
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"RogerN" fired this volley in
m: Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. That would be interesting. I use DATAQ software on my laptop for that, but then, I wouldn't want to build my laptop into a permanent enclosure! I use load cells for all sorts of stuff in small automation, and for measuring thrust of small rocket motors. I use a load cell amplifier of my own design built around an INA-125 amplifier. LLoyd |
#3
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"Lloyd E. Sponenburgh" wrote in message
. 3.70... "RogerN" fired this volley in om: Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. That would be interesting. I use DATAQ software on my laptop for that, but then, I wouldn't want to build my laptop into a permanent enclosure! I use load cells for all sorts of stuff in small automation, and for measuring thrust of small rocket motors. I use a load cell amplifier of my own design built around an INA-125 amplifier. LLoyd A nice part about the DIY project is that I can program it for automatic weighing or about anything else I want. Coarse feeds, fine feeds, pre-act to shut off dosing before set point is reached, auto adjust pre-act if it weighs too heavy or too light, and so on. Or as simple as go / no-go. I have a couple of INA-125 amps in my Digi-Key cart right now. The AD7730 is kind of neat, the amp, filters, calibration, offset, are built into the chip but I think I would like to just get the raw data into the microcontroller and process the data in the microcontroller. One of the nice things about the AD7730 chip is that I can digitally adjust it for unipolar or bipolar ranges of 10mV, 20mV, 40,mV or 80mV, zero offsets, filter settings, etc. That would be handy if I save configurations and calibrations for different load cells in the eeprom. That way I could select the load cell I wanted to work with and it would configure the chip and load the last saved calibration data. The Arduino has build in 10-bit A/D converters, with the INA-125 I plan to try to see what kind of weightings I can get out of them by taking multiple readings. I have heard you can add 16 readings, divide by 4 and get 12 bit A/D results. Anyway it's kind of fun to play with, last time I looked Radio Shack had some of the Arduino's for around $30 or so, they seem a huge leap ahead of the Basic Stamps I was playing with. RogerN |
#4
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"RogerN" fired this volley in
m: I have a couple of INA-125 amps in my Digi-Key cart right now. Roger, Contact me off-list. Lloyd |
#5
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"RogerN" wrote in message The Arduino has build in 10-bit A/D converters, with the INA-125 I plan to try to see what kind of weightings I can get out of them by taking multiple readings. I have heard you can add 16 readings, divide by 4 and get 12 bit A/D results. Anyway it's kind of fun to play with, last time I looked Radio Shack had some of the Arduino's for around $30 or so, they seem a huge leap ahead of the Basic Stamps I was playing with. RogerN You would have to look very carefully at the A/D converter's specs and probably test yours to see if statistical averaging would improve its resolution; I suspect it's barely good enough for 10 bits, in sleep mode with good reference bypassing and attention to ground current paths. The simple check is to apply a ramped input from a higher resolution DAC and record the bit transition voltages, then see if the A/D output consistently changes at a constant fraction of one bit resolution. You can check manually with a 4-1/2 digit DVM and a 10-turn pot. Look closely at the major bit transitions at 1/2 (1/4, 1/8) of full scale, where the DAC resistor ladder changes from 0111111111 to 1000000000. http://www.atmel.com/Images/doc2549.pdf They only claim +/- 2 bit accuracy, see section 26. Fig 26-13 and 26-14 show the potentially variable step size of the internal DAC. Averaging reduces random noise but won't correct gain, offset and nonlinearity errors. jsw |
#6
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"Jim Wilkins" fired this volley in news:jjvd2e$jkh$1
@dont-email.me: I suspect it's barely good enough for 10 bits, in sleep mode with good reference bypassing and attention to ground current paths. There are a few decent and inexpensive stand-alone A/D converters that tout +- 1/2 bit at 10 bits. LLoyd |
#7
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
RogerN wrote:
I got an AD7730 IC (load cell analog to digital converter) and connected to an Arduino microcontroller and a load cell. The AD7730 chip is only on a solderless breadboard right now, but I'm getting pretty good results. The load cell I'm using is rated for 30Kg's and I'm able to read 1/10th of a gram with some noise& drift. So far my microcontroller code just configures the AD7730 chip, reads raw values and converts them to units by responding to computer keys for zero and calibration. I'm wanting to get this thing all together in a handheld enclosure with rechargeable batteries, a LCD display and buttons to allow setup, configuration, and calibration. A connector will allow me to change load cells so I can use this with a reloading scale or a 10 ton crane scale, with all the configuration and calibration saved for each load cell I want to use it for, saving data for a dozen load cells shouldn't be a problem. Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. The AD7730 is an amazing chip. I used them for a downhole tool years ago, to measure temperature and pressure. A little pricy but worth all of it if you're just doing a few devices. |
#8
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"Jim Wilkins" wrote in message ...
"RogerN" wrote in message The Arduino has build in 10-bit A/D converters, with the INA-125 I plan to try to see what kind of weightings I can get out of them by taking multiple readings. I have heard you can add 16 readings, divide by 4 and get 12 bit A/D results. Anyway it's kind of fun to play with, last time I looked Radio Shack had some of the Arduino's for around $30 or so, they seem a huge leap ahead of the Basic Stamps I was playing with. RogerN You would have to look very carefully at the A/D converter's specs and probably test yours to see if statistical averaging would improve its resolution; I suspect it's barely good enough for 10 bits, in sleep mode with good reference bypassing and attention to ground current paths. The simple check is to apply a ramped input from a higher resolution DAC and record the bit transition voltages, then see if the A/D output consistently changes at a constant fraction of one bit resolution. You can check manually with a 4-1/2 digit DVM and a 10-turn pot. Look closely at the major bit transitions at 1/2 (1/4, 1/8) of full scale, where the DAC resistor ladder changes from 0111111111 to 1000000000. http://www.atmel.com/Images/doc2549.pdf They only claim +/- 2 bit accuracy, see section 26. Fig 26-13 and 26-14 show the potentially variable step size of the internal DAC. Averaging reduces random noise but won't correct gain, offset and nonlinearity errors. jsw Sounds like good ideas for checking out A/D. I'm not very hopeful on getting good resolution from the onboard 10-bit A/D converter, beside the INA125 instrumentation amps in my Digi-Key shopping cart, I have some 24 bit A/D converters for around $3 each. If all works out I'll have high resolution converters for load cells, strain gages, pressure transmitters, or whatever else. I'm wanting the amp to have adjustable gain and offset pots so I can adjust for whatever I want to use it for at that moment. Another idea I have is to write the program to calibrate at various weights and interpolate between the calibration points. For example if I calibrate at 10, 20, 30, and 40 lbs, I can use the calibration from zero to 10, 10 to 20... for the weights in that range, hopefully correcting for some non-linearity issues. I don't expect to use 1kg load cells for 0.1 grain reloading weightings but I would like to see how well a 100g load cell does with my reloading scale calibration weights. My idea for automatic powder measurement would be to set a powder measure to dispense maybe 95% of the charge and use a motorized trickle feeder for the exact weight. RogerN |
#9
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"Jim Stewart" wrote in message ...
RogerN wrote: Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. The AD7730 is an amazing chip. I used them for a downhole tool years ago, to measure temperature and pressure. A little pricy but worth all of it if you're just doing a few devices. As I get more familiar with this chip I hope I can get it to work well for me. It seems to work pretty good now but I'm using internal calibrations for zero and full scale when I power the chip up, this doesn't seem to give the same readings twice so I have to recalibrate my scale every time I use it. I'm planning to try it with power up defaults and see if it works without running through the calibration routines every time it's reset. My future plan is to use an LCD display and some buttons so the AD7730 can be configured using a menu and the buttons. The chip does keep the parts down, I have the AD7730, a few capacitors, and the clock crystal on the breadboard. RogerN |
#10
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
|
#11
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"RogerN" fired this volley in news:QY6dnRhtp8rvW_
: . 3.70... Just take away the numeric junk from the lloydsp and stick an @ before the mindspring thing. LLoyd |
#12
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
RogerN wrote:
"Jim Stewart" wrote in message ... RogerN wrote: Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. The AD7730 is an amazing chip. I used them for a downhole tool years ago, to measure temperature and pressure. A little pricy but worth all of it if you're just doing a few devices. As I get more familiar with this chip I hope I can get it to work well for me. It seems to work pretty good now but I'm using internal calibrations for zero and full scale when I power the chip up, this doesn't seem to give the same readings twice so I have to recalibrate my scale every time I use it. I'm planning to try it with power up defaults and see if it works without running through the calibration routines every time it's reset. My future plan is to use an LCD display and some buttons so the AD7730 can be configured using a menu and the buttons. The chip does keep the parts down, I have the AD7730, a few capacitors, and the clock crystal on the breadboard. We always did a recalibrate after a reset. Never found a way around it. Another gotcha is changing channels. Be aware that after changing channels, you have to do several (the number escapes me now) conversions to flush the delta-sigma pipeline before you get an accurate reading on the new channel. Keep us updated on your progress. |
#13
|
|||
|
|||
Quote:
Hari |
#14
|
|||
|
|||
Quote:
|
#15
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
On Friday, March 16, 2012 12:30:19 AM UTC, RogerN wrote:
I got an AD7730 IC (load cell analog to digital converter) and connected to an Arduino microcontroller and a load cell. The AD7730 chip is only on a solderless breadboard right now, but I'm getting pretty good results. The load cell I'm using is rated for 30Kg's and I'm able to read 1/10th of a gram with some noise & drift. So far my microcontroller code just configures the AD7730 chip, reads raw values and converts them to units by responding to computer keys for zero and calibration. I'm wanting to get this thing all together in a handheld enclosure with rechargeable batteries, a LCD display and buttons to allow setup, configuration, and calibration. A connector will allow me to change load cells so I can use this with a reloading scale or a 10 ton crane scale, with all the configuration and calibration saved for each load cell I want to use it for, saving data for a dozen load cells shouldn't be a problem. Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. RogerN Hi Roger, Realise this is an old post now, but if you have any code to hand would be much appreciated. I have simple weigh scale setup going, and didn't have enough resolution with other chips. Working with the AD7730 now, and despite having finally got SPI working it seems to be really finicky. I often seem to end up in a loop of 1 to 4 bytes repeatedly sent back for whatever register I'm trying to read from... And it only seem correctly write to registers on startup about 70% of the time. The others it just returns spurious bytes. Anything you've learned might be helpful Thanks David |
#16
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
wrote in message
... On Friday, March 16, 2012 12:30:19 AM UTC, RogerN wrote: snip Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. RogerN Hi Roger, Realise this is an old post now, but if you have any code to hand would be much appreciated. I have simple weigh scale setup going, and didn't have enough resolution with other chips. Working with the AD7730 now, and despite having finally got SPI working it seems to be really finicky. I often seem to end up in a loop of 1 to 4 bytes repeatedly sent back for whatever register I'm trying to read from... And it only seem correctly write to registers on startup about 70% of the time. The others it just returns spurious bytes. Anything you've learned might be helpful Thanks David I never got real good results but by continually trying after failure it worked good enough but with slow updates. I have a few different versions of the code I was working on, not sure of the version that worked the best but I can send/post what I have. I used a LCD display that has some buttons, I wrote a menu that lets you calibrate, zero, and tare from the keys. It needs completed but didn't work after I moved the circuit from a breadboard to a PC board and I haven't tried to fix it yet. I first wrote a version that used the Arduino's text screen. I also have a custom map() function that works correctly with 24 and 32 bit numbers. RogerN |
#17
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
Anything you have might be useful. I'm at the point of considering another chip. Interface wise, I'm doing communication with the uC over a serial connection and fully automating it, so the LCD, buttons etc might be superfluous.
A few specific problems I seem to have come across are below. Just wondering if they might be the same things that you had to overcome. 1) POL pin set low, SPI_MODE0 does not work. Only POL pin high and SPI_MODE3. 2) To get consistent reads of a register I have to introduce delays that, from my reading of the datasheet timing table, should not be needed. I also need to toggle the CS pin in between a read command and actually reading from the register, which doesn't seem to be specified (example code): void adc_read( int address, int bytes ){ digitalWrite( CS, LOW ); delay( 1 ); SPI.transfer( READ_ONCE | register ); // Write to the com register, specifiying the register to read digitalWrite( CS, HIGH ); // Toggle the CS pin. Does not seem to work without this. Either outputs garbage, or skips a single bit. delay( 1 ); digitalWrite( CS, LOW ); delay( 1 ); for( int i = 0; ibytes; i++){ Serial.print( SPI.transfer( 0x00 ), BIN ); } digitalWrite( CS, HIGH ); delay(1); // Pause to stop next read or write occurring to early } 3) On internal zero or full scale calibration, if I only wait on the RDY pin ( as in the pseudo code examples of the datasheet ) the AD7730 does not always assert RDY LOW ( probably does not manage to calibrate ), and you can't move on 4) Once successfully into continuous reading mode, an interrupt attached to RDY pin will fire (and read the data register ) extremely frequently for a couple of seconds, and then the RDY pin stops being asserted (the AD7730 stops continuous update of the register? ). 5) I can't seem to work out whether continuous conversion in the Mode register, and Read continuous to the communications register are intrinsically linked, or whether you should be able to set continuous conversion, and perform single readings (which would make sense). |
#18
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
wrote in message
... 2) To get consistent reads of a register I have to introduce delays that, from my reading of the datasheet timing table, should not be needed. I also need to toggle the CS pin in between a read command and actually reading from the register, which doesn't seem to be specified (example code): Frequently I've found that the datasheet doesn't quite agree with the timing requirements revealed by an oscilloscope. The datasheet parameters begin as proposed goals to guide the designer, and may not all be tested in production, or verified during development if the engineer doesn't task the lab tech (me) to specifically measure them. Some are "guaranteed by design". I've found some whoppers, really, but have signed non-disclosure agreements. |
#19
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
replying to RogerN , kasunsf wrote:
regor wrote: I got an AD7730 IC (load cell analog to digital converter) and connected to an Arduino microcontroller and a load cell. The AD7730 chip is only on a solderless breadboard right now, but I'm getting pretty good results. The load cell I'm using is rated for 30Kg's and I'm able to read 1/10th of a gram with some noise & drift. So far my microcontroller code just configures the AD7730 chip, reads raw values and converts them to units by responding to computer keys for zero and calibration. I'm wanting to get this thing all together in a handheld enclosure with rechargeable batteries, a LCD display and buttons to allow setup, configuration, and calibration. A connector will allow me to change load cells so I can use this with a reloading scale or a 10 ton crane scale, with all the configuration and calibration saved for each load cell I want to use it for, saving data for a dozen load cells shouldn't be a problem. Just thought I'd share this in case anyone wants to mess with Arduino scales and the AD7730 chip, I can paste my Arduino code that will help get you started. I couldn't find any functional code with my searches so I started with a program that wasn't working and got it going with major modifications. RogerN Hi! i was trying to build a scale using AD7730. I set the POL pin HIGH and SPI MODE0. I was able to write to the registers successfully. I read-back the written register values as well. But when it comes to continuous reading of data register, RDY pin goes LOW only once. Can you please help me to solve this issue? Kasun -- -- posted from http://www.polytechforum.com/metalwo...le-539297-.htm using PolytechForum's Web, RSS and Social Media Interface to rec.crafts.metalworking and other engineering groups |
#20
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
"kasunsf" wrote in message
oups.com... replying to RogerN , kasunsf wrote: regor wrote: snip Hi! i was trying to build a scale using AD7730. I set the POL pin HIGH and SPI MODE0. I was able to write to the registers successfully. I read-back the written register values as well. But when it comes to continuous reading of data register, RDY pin goes LOW only once. Can you please help me to solve this issue? Kasun -- Sorry I don't remember it that well, but I remember that if I didn't get a response after a length of time, it would automatically time out and try again. RogerN |
#21
Posted to rec.crafts.metalworking
|
|||
|
|||
Load Cell Scale
replying to david, Matt wrote:
ibratio Hi, I am having the same problem that you described in point 3 and the calibration of the AD7730 never finishes as the uC waits for the RDY pin to go LOW. Has anyone found a solution to this problem? -- for full context, visit http://www.polytechforum.com/metalwo...le-539297-.htm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Any evidence that front load washer more effective at cleaning thantop load? | Home Ownership | |||
Testing Nicad/nicd or NiMH cell ESR or SLA Gel Cell Battery Internal Resistance | Electronics Repair | |||
Load cell and wheatstone bridge | Electronics | |||
load cell back in business | Metalworking | |||
reverse engineering a hydraulic load cell? | Metalworking |