Tuesday, March 5, 2013

Hacking a milligram balance (scale) with a Parallax Propeller microcontroller

For an upcoming project, I'd like to develop a dispensing system that can measure out a desired mass of material. The idea would be to use a microcontroller, dispensing valve, and electronic balance to provide feedback. I already have an American Weigh Scales miniPro-100, and decided to hack it so that my microcontroller can discover how much mass is on the balance. It can then regulate the dispensing valve appropriately.

The balance contains a Cirrus CS5530 24-bit ADC. I tapped the clock and data lines and found bursts of data that occurred at 7.5Hz. The clock is about 150KHz. I used a Parallax Propeller running assembly in one of its cores to capture the data stream and load it into my main program.


2 comments:

  1. Hi Ben,
    Nice video.

    I haven't played with the Parallax chips before, my tool of choice would be an AVR. You could put its SPI hardware in slave mode, and use that to read the data from the scale, without needing too many interrupts (one per 8 bits).

    Also, when debugging serial I/O, I found that using a scope can be tedious, particularly for protocols like I2C. A tool like the Saleae Logic helps, since they have built-in serial decoders in the software.

    ReplyDelete
  2. Sir, You are brilliant. The tasks you take on are at a level above me, but I always feel smarter for seeing what you are up to.

    ReplyDelete