The PCB uses surface mount parts, but all components are available in through hole versions. I use surface mount parts because its faster to make the board without drilling holes.
The end result is a small USB peripheral that measures indoor/outdoor temperatures. Data is available to the PC through a virtual serial port. Temperature sensors are used in the example, but other analog sensors can be added.
See a live graph of the data from my logger here:
Step 1: Design Overview
This USB peripheral is based on the 28 pin PIC 18F2550. This chip has everything needed for a full speed USB interface.
A 0.1uf capacitor between power and ground decouples the PIC from the power supply.
A 20MHz crystal (used to generate a 48MHz internal clock) and two 27pf capacitors.
A 10K resistor from power to the MCLR pin. I added a 1n4148 equivalent diode between the resistor and power so that the 13+volts placed on MCLR during programming doesn’t damage other components on the circuit board.
An ICSP header (5 pins) is used to program and debug the device.
Required USB stuff
A USB female ‘B’ style socket.
220nf-440nf of capacitance is required for the internal USB voltage regulator. I use two 0.1uf capacitors (same as used for decoupling) without a problem.
A LED with 330ohm current limiting resistor is used to display USB connection status.
Required sensor stuff
I used the microchip TC1047A temperature sensor as the indoor temperature sensor. It is physically soldered to the board - this causes it to run a few degrees hotter than room temperature.
A header is used to connect an outdoor temperature probe (TO-92 version of TC1047a). An additional 0.1uf capacitor helps decouple a long wire run from the rest of the board.
USB voltage levels are not consistent enough to accurately measure and compute temperature from the analog sensors. An external voltage reference (MCP1525, 2.5volt) is used. The voltage reference requires a capacitor on the output of 1uf to 10uf. Without this capacitor the voltage reference will not work.