What I made
I tried to measure illumination with photo transistor in this assignment.
STEP1: Studying a circuit and program to use light sensor by using Arduino UNO & sensor module. STEP2: Making two cicuit boards. I made micro processor board and photo transistor board separraterly. STEP3: Programming to the board and mesuring illumination.
At first I used CDS sensor module and Arduino UNO for practice. This module includes CDS sensor, resistor, and pin header.
CDS sensor kit:
I conected pins and write program to read analog values of illumination and display on Serial monitor. I used map function to convert the range of maximum value and minimam value, and invert them. I studied how to use light sensor through this trial.
I designed circuit with EAGLE. This board was based on hello echo board. I remove the LED and button from it, and added the pin header to the vacant pin of ATTINY 44.
|Resistor 10K ohm||2|
|6-pin programming header||2|
I created tool path data with Fabmodules and milled circuit board with SRM-20. And then, I soldered all parts.
dpi:500 cut depth (mm): 0.1 tool diameter (mm): 0.2 number of offsets: 3 offset overlap (%): 50
|Resistor 499K ohm||1|
In the same way as before, drawing a circuit diagram with EAGLE and creating png data for milling.
I used Fabmodules and SRM-20 just like above. And then I soldered all parts.
dpi:500 cut depth (mm): 0.1 tool diameter (mm): 0.4 number of offsets: 4 offset overlap (%): 50
At first, I tried to program .c file (hello.light.45.c) with makefile. But it was failed. When I did meke clean command, the following message was shown. I couldn't fix this bug. So I decided to write a program using arduino IDE. After burning bootloader on ATTINY44 and proram the following sketch. The workflow is described in assignment 8
After programing, I took off the programmer(AVRISP mk2) and connected the photo transistor board. When opening the serial monitor, the sensor value was displayed.
When illuminating the phototransistor or covering it by hand, it changed in response to it.