How to power Attiny85 and LED's seperately

Discussion in 'The Projects Forum' started by aodock, Jan 19, 2016.

  1. aodock

    Thread Starter New Member

    Jan 18, 2016
    4
    0
    Im trying to do a blinking tail light for my bicycle. Im using a Attiny85 to vary the 'ON & OFF' time of an LED by reading an analog input (10k potentiometer).
    I can successfully run it by connecting one LED to the digital output pin. Next, i wanted to connect 6 LED's (2 in series and 3 such connected in parallel). Now since there where more LED's, i connected them with a different power supply(9v battery) and to turn on the 6 LED's i made use of TL188(PNP Transistors). Now the LED lits up extremely fain(like a single red dot inside LED's.
    bike_blinker_bb.png

    I know the above connection may be really amateur, and may make sense at all,. Some help please.
    How to connect 2 different power source / is connecting 2 different power source appropriate way,..?
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    Looks like your negative supplies need to be connected together, also i would use a fet instead of a bipolar transistor.
     
  3. aodock

    Thread Starter New Member

    Jan 18, 2016
    4
    0
    I tried connecting both negative together... What happened was, the light stayed on bright and had a small twitch which lasts for a fraction of a second instead of blinking.
     
  4. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
  5. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    The reason it stays on is the Arduino is powered by 5v, so the pnp stays on as its emitter is at 12v, you need an Npn or nfet.
     
  6. aodock

    Thread Starter New Member

    Jan 18, 2016
    4
    0
  7. aodock

    Thread Starter New Member

    Jan 18, 2016
    4
    0
    kk

    I used BC547(NPN type) earlier. The LED was so faint during the on cycle and completely off during off cycle.
    can you suggest any specific NFET (part number)..?
     
  8. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    If you use a Npn, the emitter goes to ground and the led goes from collector to the 15V rail, common both negative supplies together.

    Like this circuit, the red line goes to your Arduino
    http://sub.allaboutcircuits.com/images/05222.png

    If you want to use a mosfet use IRF540, IRF510,
     
    Last edited: Jan 22, 2016
Loading...