This project I developed and published first in 2011, years ahead many other similar proposals. It is a well-structured approach with good working and free available software to connect a load cell with USB. I used a cheap kitchen scale for 10 Euros to create an USB scale with a resolution of less than 1g.
Part 1: USB load cell interface controller
Heart of the hardware part is an Atmel ATMEGA644 microcontroller. The controller manages the A/D conversion and reads the results from the AD7797. On the other side the Atmel acts as a low speed USB 1.1 HID device with the advantage that no extra USB driver is needed in the operating system where this circuit is connected to.
Additional functions are provided by the microcontroller like automatic conversion, offset calibration and some statistic calculations. These calculations include mean, median, variance and standard deviation. The statistical base is user defined from 2 to 256 values. Useful debug output is also available at the RS232 interface connected to the ATMEGA644 UART. You have to set the “DEBUG” flag in the firmware source code and recompile to make use of this feature.
The USB part of the firmware uses V-USB, a firmware-only USB driver from Objective Development Software GmbH.
The software for the integrated microcontroller ATMEGA644 is available for avr-gcc. It is written in C and developed with “AVR Studio 4.18”, SP3, an IDE for 8-bit AVR-controller by Atmel. The latest source code is provided under the GNU General Public License (GPL) and can be downloaded here.
Part 2: front end
The front end for the load cells measurement bridge consists of the 24 bits A/D-converter AD7797 from Analog Devices with an integrated amplifier with a gain of 128. So the A/D-converter can be directly interfaced to the load cell without additional amplifier. The reference voltage is generated by an ADR441 ultra low noise voltage reference, also from Analog Devices.
The front end can be offset and gain calibrated. These parameters are stored in the controllers EEPROM and loaded at power up.
Part 3: USB Host Software with GUI
I wrote a software example for Linux and Windows and possibly for MacOS which demonstrates USB HID programming and all of the circuit functions. It is written in C++ and developed with “Qt Creator”, a Cross-Platform Qt IDE by Qt Software and Nokia Corporation. The source code is provided under the GNU General Public License (GPL) and can be downloaded here.
Precompiled program binaries can be downloaded here for linux/x86_64 and win32.
project goals
- 24 bits A/D-converter, 21 bits effective resolution
- integrated statistics functions
- EEPROM stored calibration and startup parameters
- USB HID device – no extra device driver needed
- optional debug output
- multi platform graphical user interface
- unique USB id: vendor: 0x16c0, product: 0x05df, Manufacturer: “runlevel3.de”, Product: “USB-A/D-Interface”
The schematics is available for download here.
USB-AD-Converter_schematics.pdf