Items you'll need:
- Arduino (of course!) a Atmega328 type is best - we always recommend going with an official 'classic' Arduino such as the Uno.
- Adafruit data logger shield - assembled
- SD card formatted for FAT and tested using our example sketch
- CdS photocell and a matching 10K pulldown resistor
- Temperature sensor with analog out, such as TMP36
- Battery pack such as a 6-AA 'brick' and a 2.1mm DC jack.
- or you can use a 9V clip for a power supply but a 9V powered logger will last only a couple hours so we suggest 6xAA's
- Some 22 AWG wire, soldering iron, solder, etc.
You can get most everything in that list in a discounted pack in the Adafruit shop!
The sensors
We'll use two basic sensors to log data, a CdS photocell to track light (this will tell us when the door has been opened) and a semiconductor temperature sensor to log the ambient fridge temperature.
We have two great tutorials for these sensors on our site, if you haven't used them before or need some refreshment, please read them now!
We will wire the sensors as shown in the diagram below.
Note that we connect ARef, the power pin of the temp sensor, and the light sensor to 3.3V not to 5.0V - we do this because the 5V line is very noisy and the 3.3V regulator is better filtered. In the actual board we used the 3.3V line from the datalogger's regulator, see the images below - in theory its the same as the one off of the Arduino but we trust ours more.
Wiring it up
The prototyping area on the board is a simple array of holes with soldering pads. The steps below show how we built this circuit and illustrate some some basic circuit prototyping techniques. For clarity, we will use the same color wire as shown in the circuit diagram above:Position the sensors
The sensors could go anywhere on the prototyping area, but we chose this arrangement to simplify connections between the components later on.Prepare some jumpers
Measure a piece of wire (red) long enough to reach from the 3v breakout hole to 1/2" past the temperature sensor. Strip about 3/4" from one end, and about 1/4" from the other.Measure another one (yellow) long enough to reach from the AREF pin to the hole between the two sensors. Strip 1/2" from one end and 1/4" from the other.
Install the Jumpers
Place the jumpers as shown, with the long stripped ends nearest the sensors.Since there are no signal traces between the holes in the prototyping area, we will use the long stripped ends to join the legs of the components on the board.
Make the connections
- Solder the first jumper (red) to the 3v hole.
- Bend the stripped end of the wire so it rests next to the legs of the light sensor, the temperature sensor and the end of the AREF jumper.
- Fold the sensor legs and AREF jumper legs over the 3v jumper and solder to make the connection.
Add more jumpers for the Sensors
- From Analog Pin 0 to the hole near the light sensor and resistor. (white)
- From GND to the hole next to the other end of the resistor (black)
- From the Analog pin 1 to the hole next to the center pin of the temperature sensor (green)
And also for the LEDs
- From L1 to Digital Pin 2 (yellow)
- From L2 to Digital Pin 3 (yellow)
Solder and trim all connections
Using the same technique of folding the component legs over the jumper - make all connections as shown in the wiring diagram.Make sure that all connections are soldered. Also solder wires and component legs to the board where they pass through the holes.
Prepare the Battery Pack
- Place the black plastic ferrule from the connector over the battery pack wires.
- Solder the red wire from the battery pack to the center pin
- Solder the the black wire to the outer barrel.
- Crimp to hold the wires securely
- Screw the black plastic ferrule on to cover the solder joints.
Text editor powered by tinymce.