Monday, 30 January 2012

Twilight Mk2

The picture shows an updated version of Twilight driving a 3W LED inside a salt crystal. The new circuit:
  • does away with the LEDs, using the controlled light itself as an indicator,
  • ditches the variable resistor, using a long-press on the switch to indicate the light-level at which to switch on,
  • stores this light-level in EEPROM to preserve it across power cycles
  • uses an ATtiny85 for a smaller footprint
When switched on for the first time, the light is flashed quickly four times. When the environment reaches the desired level of twilight, the user presses the switch for two seconds to indicate this light level is to be stored. The light is then flashed slowly twice.

A circuit diagram and sketch (for Arduino 1.0) are shown below.

1 comment:

  1. Hi
    like your project , but have some problem. After i upload sktech and turn on. Light flashed 4 times and i wait prox 10-15sec i push SW 2sec and Light flashed 2 times. Then test move on front of PIR. I don't know why Light not turn ON