Inspired by various LED Throwies, blinking LEDs and similar instructables I wanted to how led works pdf my version of an LED controlled by a microcontroller. The idea is to make the LED blinking sequence reprogrammable. This reprogramming can be done with light and shadow, e. This is my first instructable, any comments or corrections are welcome.
Here is a video of reprogramming it. An LED is used as output. As input I used an LDR, a light dependent resistor. This LDR changes its resistor as it receives more or less light. The controller has two modes of operation, one for recording a sequence, the other for playing back the recorded sequence. In recodring mode the input of the LDR is measured multiple times a second and stored on the chip.
If the memory is exhausted, the controller switches back to playback mode and starts to play the recorded sequence. That is space enough for 10 seconds with 40 samples per second. 1 x Low-current LED, 1. I used the ATtiny13v because this version of this controller family is able to run at 1. That makes it possible to run the circuit with a very small battery.
To have it run for a very long time, I decided to use a low current LED which reaches full brightness already at 2ma. Some comments on the schematic. The reset input is not connected. This is not best practice. Better would be to use a 10K resistor as pull up.
But it works fine for me without and it saves a resistor. To keep the circuit as simple as possible, I used the internal oscillator. That means we save a crystal and two small capacitors. The internal oscillator lets the controller run at 1.