| 1 | $Id: README,v 1.3 2009/03/22 22:18:54 simimeie Exp $ |
| 2 | |
| 3 | Intro |
| 4 | ====== |
| 5 | |
| 6 | This project contains schematics and firmware for a little |
| 7 | board with an Atmel AVR ATtiny45 microcontroller that |
| 8 | allows you to connect Dallas/Maxim DS18b20 temperature |
| 9 | probes to an USB port on your computer. |
| 10 | |
| 11 | Some linux software to read the data from the USB device is also included. |
| 12 | |
| 13 | Licence for my own source code is GPL, |
| 14 | Licence for the included libavrusb is their Licence - see the files in the |
| 15 | usbdrv directory. |
| 16 | |
| 17 | Features |
| 18 | ========= |
| 19 | |
| 20 | The attiny45 is very small, it only has 8 pins. All of these pins are used |
| 21 | by this project. |
| 22 | An external crystal is used to generate a 15 MHz clock. |
| 23 | In theory, you can connect an unlimited amount of temperature probes to the |
| 24 | onewire-bus, and read them. However, in reality there are a few limitations: |
| 25 | - There is a maximum number of probes supported set at compiletime. You can |
| 26 | increase the define in ds1820.c, but be aware that each additional |
| 27 | probe will require memory, and you will run out of memory at some point. |
| 28 | You could use an attiny85 (that has the same pinout but more memory) |
| 29 | to increase the number of probes possible. |
| 30 | - The length of the bus, and the power used by the probes. If the bus gets |
| 31 | too long, signals and power won't be delivered anymore. The same is true |
| 32 | for too many probes on the bus. |
| 33 | I currently have NO idea what these limits are - I only tested 2 probes on |
| 34 | a short cable so far. Feel free to send me success-reports. |
| 35 | |
| 36 | When compiled with avr-libc 1.4.7 and avr-gcc 4.2.2 (and -Os as a compiler |
| 37 | switch to optimize for size), this code uses around 3900 of the 4096 bytes |
| 38 | of flash the attiny45 has. If you want to add your own extensions, you'll |
| 39 | probably have to resort to the attiny85 instead, which has 8 KB flash |
| 40 | instead of 4. |
| 41 | |
| 42 | How to use |
| 43 | =========== |
| 44 | |
| 45 | To make any use of this, you will need: |
| 46 | |
| 47 | To compile the AVR firmware: avr-gcc, avr-libc |
| 48 | use 'make all' to compile. |
| 49 | To compile the linux host software: libusb, libusb-dev |
| 50 | use 'make hostsoftware' to compile. |
| 51 | For flashing the AVR with avrdude, there is a 'make upload' target. |
| 52 | That target is configured for a STK500 on /dev/ttyS0 - you will have to |
| 53 | adapt the makefile if you use a different programmer and/or port. |
| 54 | |
| 55 | For hostsoftware usage information, call it with parameter --help. |
| 56 | |