Hi Bob,
I m facing two issues..
1)
To interface ADS1230 with microcontroller, i m using the usual formula:
s_data =( ((h_data - n_data) - (TARE)) * cal_data ) / (adc_count - no_load) //were TARE = (h_data - n_data).
The above formula is working fine, for my weighing scales.But the problem i m facing is,when i m calibrating for higher weights..i.e. 300kg,500kg..The cal_data will be = 300000 for 300kg and 500000 for 500kg to enter into the microcontroller.
So during calibration time the adc internal counts is also increased from no_load to adc_count.
Consider my adc counts are increased from 10500(no_load) to 55000(adc_count)// while placing weight on the loadcell.
So as from the formula
s_data = (((55000 - 10500) - TARE) * 500000) / (adc_count - no_load)..
So here during multiplication process the value will sometimes exceeds the memory space and shows the error values for higher capacities.Because i m using " long int datatype".
Due to this reason i used float datatype to divide and store the values,So my_data = ( cal_data / (adc_count - no_load)) ,then
s_data = ((n_data - h_data) * my_data)..so here i get the exact weight.
This procedure is working well. but the microcontroller takes more machine cycles for the operation and its a slower process..
So how to deal with the adc counts for higher value calibration without exceeding the memory space or without using float datatype.
2)
Consider my weigh scale in zero weight.After sometime the counts may drift slightly due to environmental changes , adc error or loadcell error.So after sometime the customer need to push the TARE button to balance the error.In my weigh scales there is no Auto tare option to provide zero stability.So what step should i take to provide Auto tare option,without pushing the TARE button for slight changes...?
Please help..I need your valuable suggestions to take further steps....
Thank You
by
Ajit.