ATtiny85 Data Acquisition

85

The folks at Ivmech recently had a need for some new hardware. They needed a small, cheap device able to sense some analog values, toggle a few digital pins, and log everything to a computer. What they came up with is the IViny, an extremely small data acquisition device built around the ATtiny85, capable of logging data to a computer.

The IViny features two digital channels and two 10 bit analog channels, just like you’d find in any ATtiny85 project. Power is supplied over USB, and a connection to a computer is provided by V-USB. There’s also a pretty cool Python app that goes along with the project able to plot the analog inputs and control the digital I/O on the device.

It’s not exactly a fast device – the firmware only supports 100 samples per second, but an upcoming firmware upgrade will improve that. Still, if you ever need to read some analog values or toggle a few pins on the cheap, it’s a nice little USB Swiss army knife to have.

27 thoughts on “ATtiny85 Data Acquisition

      1. Of course… but then again there were plenty of projects where it was simply used to measure a thermocouple. Sure the accuracy was good to have, but in some cases we were watching a +- 200*C change in temperature swing.

        No need to tie up an expensive instrument for something like that.

        1. Agreed. If you have very sloppy requirements, such as measuring a thermocouple with +/- 5-10 *C error, you can use a device like this. Somebody selling professional equipment needs to do a lot better, otherwise their targeting a very small market.

      1. ATtiny85 has a built in 1.1V reference. This can vary due to manufacturing process from 1.0 to 1.2V, but once known it is pretty stable. Check out my post on calibrating for the reference voltage, storing in EEPROM and doing (reasonably) accurate measurements: http://www.re-innovation.co.uk/web12/index.php/en/information/electronics-information/accurate-voltage-measurement.
        Great project – very useful for loads of data monitoring applications where low cost is better than high accuracy.

  1. Without any gains and using the low res internal ADC, you won’t be able to use thermal couples. Unless you are interest only in resolution of about 120C per LSB and that assuming their noise floor is below that. Riiiiight.

    May be they are going for getting extra bits from oversampling and injecting noise!?

    1. It looks like the AVR has a 20x gain buffer, so that’s an option. It requires using the two analog inputs as a differential pair, so you’d only have a single channel. Even so, the performance would be pretty bad, and there wouldn’t be a decent cold junction compensation.

    2. You would want an amplifier for the thermocouple. Even with some of the higher end DAQs we used an external amplifier. In the interest of budget I’m thinking an LM358 ($0.40) would be a good choice. It puts most of my K-Type thermocouples somewhere in the 0-1V/0-4V range, with 10bit ADC that should be sufficient for accuracy.
      Then we calibrate it… a 0*C measurement (ice water) and a 100*C measurement (boiling water) are the easiest and ethylene glycol boils right around 200*C. The three measurements give a curve that we can create an equation from and should give a pretty accurate reading… of course if you do 10 measurements you’ll be even closer, but what’s 1-2*C anyway?

      1. Maybe surprisingly, it takes quite a bit of skill to calibrate using ice water and boiling water. For ice water, you want to make sure the water and vessel are really clean. Contaminations can shift the melting point. Also, you need to use a slushy mixture of ice and water, not just water with some ice cubes. The ice water needs to be in a thermos/dewar, and needs to be stirred continuously. For boiling water, you need to measure not in the water, but in the vapor, and compensate for air pressure. In both cases, there will be heat transfer through the stem of the thermocouple, so ideally you’d calibrate it in the same way as you’ll end up using it. It is also important to treat the thermocouple nicely. Moving it from boiling water to ice water with a shock can change the molecular structure, and shift the thermocouple curve. Of course, if you’re happy with a few degrees error, none of this matters very much :) But if you want less than a degree, all of this stuff (and maybe more) becomes critical.

      2. I’ve used the AD7793 chip. It’s got everything inside for direct hookup to a thermocouple, including an amplifier, a small current source for detecting open connections, and very good 50/60 Hz filter. Because it has 3 channels, you can use one for the thermocouple, and the other 2 for ratiometric measurement of cold junction NTC.

  2. IIRC arduino uses an IC onboard for USB interface. This project is essentially just featuring V-USB. I have never heard of any software solution for sending and receiving data over usb without using HID or a dedicated IC. So this project is useful for my super cheap computer controlled robot arm.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.