Stacy DeRuiter's How To Make Almost Anything Blog - Week Seven

How to Measure Almost Anything - Digital Volt Meter

Monday, October 31, 2005

This week, the class will be working on a cooperative assignment - each of us will start designing and building a chunk (one sensor, component, or interface) of an "How to Measure Almost Anything" device. Tom and I are assigned to make a digital volt meter (dvm).

Wednesday, November 2, 2005

We decided that we wanted to make a dvm that can measure DC voltages from 0-15V (the max we think a computer might send out to a hello world chip), and that will use the hello world board's Vcc (about 5V) as its reference voltage. We succeeded in laying out a schematic of the PCB we would like to use for our dvm and routing it.



Want the actual eagle files the pictures came from for some reason? Here they are:
dvm.sch
dvm.brd
We basically decided to have a probe input pass through several resistors in series...the resistors serve to limit current (that's why we chose to use relatively large 1k resistors - that way the input should be well below the 40mA that the pins on the tiny13 can handle) and also to step down the input voltage. Because we have 3 resistors in series and we send the input to the tiny13 ADC pin between the second and third resistors, the input voltage to the tiny should be 1/3 that of the original input. (Therefore, a 15V input will not exceed Vcc, the reference voltage -- so it will be measure-able, and will not fry the board either.) We cut out 2 of the boards on the Modela with no problems, and Tom stuffed them. Now we just have to work on code to make them "go"!

Thursday, November 3, 2005

Today we got some code written that we think will work, and we planned to program and test our chips. We had ENORMOUS trouble doing the programming! We kept getting the error message that the AVR was no responding. Finally, after an hour and a half and some help from Manu, we uncovered our stupid mistake. We thought that just having the serial cable plugged in to the chip provided it with power. NOT SO! A hello world board (designed to draw power from the computer it's connected to via the serial port) must be plugged in to the computer, AND a program (e.g. rx.py or echo.py) must also be running to power the chip. Once we figured that out, we were able to program the chip with no trouble. I later found out that that itself was no small feat, and was due to Tom's wonderful, actually-functional programming cable (see my week six rant about programming cables). We set to work debugging the code (assembly code, and code to print the measured voltage to the computer screen).

Friday, November 4, 2005

The dvm works! We used it to measure Vcc and the voltage output by a 9V battery, and both seemed to work.



Here are a few things we worked through as we wrote our code:
Assembly code

Python Script to print measured voltage to computer screen

Sunday, November 6, 2005

Here are some of my concerns, and things I would like to improve on...