How to power Attiny85 and LED's seperately

Thread Starter

aodock

Joined Jan 18, 2016
4
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,..?
 

Thread Starter

aodock

Joined Jan 18, 2016
4
Looks like your negative supplies need to be connected together, also i would use a fet instead of a bipolar transistor.
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.
 

Dodgydave

Joined Jun 22, 2012
9,205
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.
 

Thread Starter

aodock

Joined Jan 18, 2016
4
kk
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.

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)..?
 
Top