This project is about adding an USART (and optionally Bluetooth) interface to a kitchen scale. This is done by measuring a PWM duty cycle if a ramp-compare ADC in the scale. The PWM duty cycle is directly (or within acceptable margin of error) proportional to the applied weight.
You can read more here: http://adam-dej.github.io/2014/07/08/scale-interface.html
Components
1×
Scale with a ramp-compare ADC with accessible PWM pin
I'm not using ADC of the AVR, I'm just measuring the duty cycle of ramp-compare ADC of the scale. The inaccuracy comes from the nature of this hack, I'm just measuring, in effect, the maximum voltage (by measuring the duty cycle) the ramp-compare ADC ramps to. The scale knows the exact voltage at which the sampled voltage from the tensometer is equal to the ramped voltage, and sometimes it ramps the voltage a little higher than is actually necessary. This is manifesting itself as the +-5 grams error. The +-2 grams error may be caused by the imprecise measurement of the conversion constant (duty cycle vs weight ratio) or by the fact that the voltage of the capacitor in the ramp-compare ADC is not directly proportional to the charging time.