ATtiny85 Data Acquisition


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.


  1. bobfeg says:

    Nice project. I just love the tiny85 and the tiny84.
    So cheap, so simple, and yet able to do so much.
    Just a lot of fun to play with :-)

  2. Ren says:

    100 s/s is good enough for a lot of things…

  3. Spork says:

    We used to pay $100’s for these to use in our lab at the university. I knew the margins were high, but never had time to build our own.

    Good stuff. :)

    • Trui says:

      Maybe the $100’s ones had proper input protection and better accuracy ? Maybe even isolated inputs ?

      • Spork says:

        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.

        • Trui says:

          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.

  4. Shane says:

    Currently trying to figure out just how to bootload an ATtiny84 with an arduino mega. Sure having a hard time finding accurate documentation.

  5. Nova says:

    No bypass capacitors at all? surprised they can get away with that. Especially taking ADC measurements.

  6. castle black says:
  7. Telek says:

    Really not trying to troll, but how is this any different than an arduino? Digispark or something similar pretty much does exactly this already, except for the headers, no?

  8. tekkieneet says:

    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!?

    • Trui says:

      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.

    • Spork says:

      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?

      • Trui says:

        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.

      • Trui says:

        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.

  9. IdareYou says:

    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.

  10. The case could use some mounting holes.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,441 other followers