The weekly assignment was:
The software that i've used this week are:
My idea for the first board, was to make a PCB with 2 of the 3 sensors that i'm planning to use for my final project:
a temperature sensor and a photoresistor.
I've started by taking a look at the boards designed by Neil here.
In particular, i've considered these two:
Phototransistor board
Thermistor board
I've then tried to mix the two boards togheter and i've designed this in eagle:
Schematic:
Board
This is the BOM (bill of material) that i've used:
Code | Description | Quantity |
223-2394 | 10Kohm resistor | x4 |
223-2265 | 49.9Kohm resistor | x1 |
696-2513 | ATtiny 45 microcontroller | x1 |
766-1062 | 1μF capacitor | x1 |
682-1406 | Thermistor | x1 |
xxx-xxxx | Photoresistor | x1 |
223-2394 | Switch | x1 |
To program the board i've used the FabISP board builded in week4.
I've used the following files to program the board through the same procedure described in week6
...
...
//
// init A/D
//
ADMUX = (0 << REFS2) | (0 << REFS1) | (0 << REFS0) // Vcc ref
| (0 << ADLAR) // right adjust
| (0 << MUX3) | (0 << MUX2) | (0 << MUX1) | (1 << MUX0); //
ADCSRA = (1 << ADEN) // enable
| (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0); // prescaler /128
...
...
I want to use both the thermistor and the phototransistor in my final project because i want the Snail to be able to read theese two kind of data from the Snail's horns. I failed in combining the two boards but i feel happy because i was able to discover which was the mistake by reading the datasheet of the MCU. By the way, i found this week partcularly useful in order to have a complete overview on which are the most important input devices that is possible to control through an MCU. I think that when you need to read multiple sensors, is more convenient to use an MCU with more pins (especially to deal with ADC).