gres
Full Member level 4
I wanted to get original present for my girlfriend, besides wanted to learn working with PWM and analogue ports.
So the lamp consist two modules:
1. docking station, simple charger, plastic cover with brazen bolts and 3 batteries inside ( I’m going to put accumulators there)
2. salt crystal with backlight. Backlight built up with microcontroller AVR family ( Atiny2313 in fact. With light- sensitive resistor that is plugged throught condenser as a dark detector. At outside are 3 transistors that controls 10 led diodes 3 blue, 3 red and 4 green. All made in smd technology. Board designed in Protel software. I used Bascom Avr language.
What about light- sensitive resistor and condenser. Unfortunately attiny2313 consist analogue ports but only “so called analogue”. I need to use another function that would help me to read resistance of light – sensitive resistor. I used getrc. It works like this:
1. firstly high stage charge the condenser
2. next 0 appears that couse uncharged. Time of discharging is measured
3. time is calculating and appear e.g. 246 ( for me 1=47 ohm)
insights:
- I need to use accumulator from mp3 player
- Next time I will put diodes in the same casings
For those who doesn’t like to read I put link to home page of the project. There are a lot of pictures and even some movie.
https://www.elektroda.pl/rtvforum/topic1570066.html