• Remote control unit

    andrey.malyshenko03/27/2018 at 18:27 0 comments

    I used capacitive sensor library, which turns any 2 pins into touch sensing button. So my button is just piese of aluminium foil covered by plastic tape. From my experience it works perfect!

  • Remote-controlled version

    andrey.malyshenko03/27/2018 at 18:26 0 comments

    I decided to assemble version that is possible to switch on and off remotely using RF433 radio module. Although module itself is building and working fine with Attiny85, it is using Timer0, therefore blocking 2 pwms. Timer0 works in CTC mode, so basically it is always 50% pwm (sort of) and i can only change frequency by adjusting radio channel speed. So trick here is

    • RF library finds register OCRA value in combination with prescaler for which Timer0 overflow will happen once per bit sent, therefore I can find radio speed, so OCRA value will be close to 255 (I found it to be 254 actually, which is close enough)
    • When i have Timer0 running in CTC mode from 0 to OCRA i can set OCRB register value to any value between 0 and OCRA and by hooking up interrupts to OCRB match and timer overflow I'm able to switch led on and off in PWM manner
    • This trick not working brilliantly for small values, but for my case it is good enough

  • Non-remote controlled version

    andrey.malyshenko03/27/2018 at 18:26 0 comments

    I used this article for technical inspiration. Basically Attiny85 has 2 timers, providing 2 pwms each. Unfortunately pins for those pwms overlapping, so getting 4-th pwm is tricky. But 3 is enough for me, so that works quite ok.

    I used smd led for this one (KY-009 module), but actually it is not brilliant, it is not very powerfull and colors are not very bright.