Close
0%
0%

Fading LED with ATtiny85

Fading LED with ATtiny85- A Candle like Circuit Sculpture using Attiny85,LED,3V Coin cell and some copper wires !

Similar projects worth following
This is a simple project that uses an ATtiny85, one LED , coin cell and some some copper wires. My intention is to make a circuit sculpture which looks like a candle .

Let me explain this project with a nice introduction..!

let the wires that connect components become art! 

So this is simple circuit sculpture which fades an led using a ATtiny85.

Also here I will be  describing how to program ATtiny microcontrollers using the Arduino IDE in the build instructions.

Portable Network Graphics (PNG) - 39.58 kB - 12/09/2018 at 16:29

Preview
Download

ino - 855.00 bytes - 12/09/2018 at 16:29

Download

  • 1 × ATtiny85 Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × LED I used a yellow color led
  • 1 × 3 V coin Cell CR2032
  • 1 × copper wires for connection
  • 1 × Arduino Uno To program ATtiny

View all 6 components

  • 1
    Wire the Circuit to Flash ATtiny
      ---------- more ----------

      Connect the Arduino to the ATtiny as follows:

      • Arduino +5V ---> ATtiny Pin 8
      • Arduino Ground ---> ATtiny Pin 4
      • Arduino Pin 10 ---> ATtiny Pin 1
      • Arduino Pin 11 ---> ATtiny Pin 5
      • Arduino Pin 12 ---> ATtiny Pin 6
      • Arduino Pin 13 ---> ATtiny Pin 7

      Put the 10uF capacitor between ground and the Arduino reset pin. Make sure to keep an eye on the capacitors polarity (ground to ground!).

      This capacitor effectively filters out the incoming reset pulses that come from your PC when the Arduino software starts to program your part. Because you want to program a part further downstream, you filter the reset pulses coming into the Arduino. Otherwise, you’d invoke the Arduino’s bootloader and program that Arduino, and that’s not what you want at all;);

    • 2
      Set Up Arduino IDE
      • Connect your Arduino, open the IDE, and upload Example> ArduinoISP sketch;

      This Arduino-supplied example sketch turns your Arduino into an ISP (in-system programming)

      Again ;

      • Open Arduino IDE
      • File > Preferences and in Additional Board Manager URLs: and Copy/Paste this:

      https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

      • Click OK
      • Tools > Board > Manager, install: ATTiny and close Arduino IDE
    • 3
      Configure Arduino IDE Tools Menu

      Open Arduino IDE,

      (1)Board: ATtiny25/45/85

      (2)Processor: ATtiny85

      (3)Clock: Internal 1 MHz

      (4)Port: COMXX(Arduino Uno)

      (5)Programmer: Arduino as ISP

      Upload the below given code:

      /*
       Fading LED with ATtiny85 
      
        
      
        The analogWrite() function uses PWM, so if you want to change the pin you're
        using, be sure to use another PWM capable pin. 
      
        This example code is in the public domain.
      
       
      */
      
      int led = 0;           // the PWM pin the LED is attached to
      int brightness = 0;    // how bright the LED is
      int fadeAmount = 5;    // how many points to fade the LED by
      
      void setup() {
        
        pinMode(led, OUTPUT);
      }
      
      // the loop routine runs over and over again forever:
      void loop() {
        
        analogWrite(led, brightness);
      
        // change the brightness for next time through the loop:
        brightness = brightness + fadeAmount;
      
        // reverse the direction of the fading at the ends of the fade:
        if (brightness <= 0 || brightness >= 255) {
          fadeAmount = -fadeAmount;
        }
        // wait for 30 milliseconds to see the dimming effect
        delay(30);
      }

      Also you can get Code and circuit diagram from my Githubpage.

    View all 6 instructions

    Enjoy this project?

    Share

    Discussions

    Mike Szczys wrote 12/10/2018 at 16:44 point

    I really like the coin cell as the base for this, nice touch!

      Are you sure? yes | no

    Amal Mathew wrote 12/11/2018 at 05:27 point

    thank you

      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