Embedded Systems Design
See the schematic here: http://www.cl.cam.ac.uk/teaching/1011/P31/docs/project_pcb_schematic.pdf and the PCB layout here: http://www.cl.cam.ac.uk/teaching/1011/P31/docs/project_pcb_layout.pdf
The data logger PCB has been designed to help with some projects, particularly portable ones, where a PCB is much easier to deal with than the prototyping board. The board is a trade off between supplying everything which a project might want, and minimising unused parts, and may need some customisation. Give some thought to the configuration you want - removing through-hole connectors once fitted can be difficult. For surface mount components, the pads may lift off the board after a couple of solder/desolder cycles, so you might need to set up a replacement. If you aren't confident about soldering the demonstrators can help.
The components are numbered from the top to the bottom of the PCB. 'Top' here is the pin 1 end of the microcontroller. Note that some parts are fitted to the underside of the PCB.
The board is designed to work at 3.3 Volts, and has 2 voltage regulators fitted. On (IC2) is permanently on, the other (IC1) is controlled by PB0, with a low on PB0 enabling the regulator. If you want to use the LCD, note that it must have a 5V supply. When connecting an LCD to JP6, you must omit the connection to pin 1, and power the LCD from a separate supply. 3.3 Volt level signals on PD6,PD7 are just high enough to interface to the 5V logic on the LCD interface PCB.
Vibration switch / BCD switch.
Vibration switch / BCD switch.
Fit a shunt in the East position of LK2 to use the vibration switch, West to use the high bit of the BCD switch.
LEDs / LCD.
See the section above which explains that the LCD needs 5 Volts to work. If you still want to use the LCD, desolder R3,R4.
Voltage reference for Analogue to Digital converter.
If you aren't using the A to D, remove the shunt from LK1 to save power.
If you are using the microcontroller supply as a voltage reference, desolder IC5.
To reduce the power requirement for the precision voltage reference, fit the shunt on LK1 in the East position, to connect it to the switchable 3.3 Volt supply instead of the permanent 3.3 Volt supply.
If you don't need the serial port, then JP1 can be used as general IO.
If you want to attach an SPI device, use the programming header to connect it.
If you need an accurate clock, fit the crystal Q2. The 22pF capacitors are already fitted.
A socket for an ATMEGA168 or ATMEGA328 microcontroller. The -328 has more RAM, but is otherwise the same. More RAM may be vital if you are logging data to flash ram and need to store it until you have a page full (256 bytes).
A Micro SD socket capable of taking RAM cards up to 2Gb capacity. These devices have a maximum working voltage of 3.3 Volts, which limits the microcontroller and all other circuitry to the same maximum voltage. The device uses the SPI bus. There is some library support for using it.
A DS1302 Real Time Clock, which shares the SPI bus, and also has library support. Rather than a backup battery (which is bulky) the board has a capacitor to maintain the RTC during battery changes. The capacitor should be good for 180 seconds, but any longer than this and you may have to reset the time.
A connection for a serial lead just as in the workbook. This one shouldn't fall out as often as the connection on the prototyping board. If you don't use serial, then this connector has 2 I/O ports and ground for you to use.
A vibration switch for the movement sensing projects. This shares a line with the BCD switch.
A BCD switch. There is example code available to make using this easier. For many projects such as data logging you may have a logging mode, and a playback mode, plus possible clock setting modes etc. This shares port PD2 with the vibration switch, so fit either R6 or R7 to select which function you want the pin to have.
In a similar way, the two LEDs and the LCD share PD6 and PD7. Remove R4 and R5 to save power if you use the LCD. The LCD connector uses a switched 3.3 Volt supply, more on this later. Although the LCD requries 5 Volts to work, the interface PCB has a voltage converter fitted. Because the microcontroller only has outputs to the LCD, the rule about not mixing 3.3 Volt and 5 Volt logic can be bent a little.
JP2, JP3, JP4 allow you to interface 6 lines, which can be digital I/O or analogue inputs. JP4 has both a fixed 3.3 Volt supply (same one as the microcontroller), and a switched 3.3 Volt supply, which you can enable using PB0. For some external devices, you may be able to power them part time. The same switched 3.3 Volt supply powers the LCD through a voltage converter. If you are using the ADC there is an accurate voltage reference IC6, which can be powered full time (fit R1) or from the switched 3.3 Volts (fit R2) or removed altogether if you want to use AVCC or the internal 1.1 Volt reference.
Q1 can be changed for a different frequency, or omitted altogether.
The board has space for a 1 Farad capacitor. For some experiments you may not need to have the battery connected once the capacitor has been charged.