Close
0%
0%

not so tunable-white light

dimming warm-white and cold-white LED panels with an Attiny45

Similar projects worth following
509 views
Initially a project for me to work with MOSFETs controlled by an ESP board, but weak panels made me return to an attiny45 and an ULN2803s. And 10 lines of Arduino code. Man I'm lazy.

When my flatmate told me about her job to design an LED based projector "thing", she also mentioned tunable-white LEDs and I was interested. Turns out, you can't just PWM your way on the color temperature by using 2 LEDs, but I was interested anyways to build a prototype light device that does just that.


The LED panels I bought are described as 3000K and 5000K, 12V with resistors on the backside. I chose an old battery from a mac book as a case, since a friend gave it to me for extracting the LiPo cells for a power bank like my #Recycled LiPo Powerbank / PSU


Quickly I decided it would be controlled by my #Ignore this ESP8266 board with some beefy MOSFETs I've never used before. But when the panels arrived and I saw that they were only using 150mA I thought that a ULN2803 would be more than enough. Interestingly when I measured the current I saw that it would rise with the temperature, while it started with 140mA it reached 150mA finally.

  • code

    davedarko01/16/2016 at 14:52 0 comments

    int wwhite = 0;
    int cwhite = 1;
    int ain = A1;
    
    void setup() 
    {
      pinMode(cwhite, OUTPUT);
      pinMode(wwhite, OUTPUT);
      pinMode(ain, INPUT);
    }
    
    void loop() 
    {
      int val = analogRead(ain);
      val = map(val, 0, 1023, 0, 255);
      analogWrite(wwhite, val);
      analogWrite(cwhite, 255-val);
    }

View project log

Enjoy this project?

Share

Discussions

Jon wrote 09/08/2020 at 08:03 point

I'd be interested to read more about your experience with the quality of light produced as it has implications for my own project ( https://hackaday.io/project/174098-lighting-color-control-with-commodity-lamps ).

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates