It's not a short circuit because the resistors restrict the current flow.
You can't use just one pole of the battery, because there would not be a "circuit" if the current couldn't flow around.
It isn't a transistor, that is a programmable unijunction transistor, and it has an anode, a cathode, and a gate (no base).
By the way, contrary to what one might think, the 2N6027/6028 does not have just one junction, it has three junctions (four layers). The name "programmable unijunction" comes from the fact it can be used in similar applications to an earlier device called a unijunction transistor.
This is a simple LED blinker circuit ~ 1Hz.
Edit: Even if you don't yet understand how the circuit works, you can see that the current is limited. Whatever G (gate) does, it can't be worse than shorted to ground (it actually does something like that when the PUT fires). Under those conditions the current through the 15K resistor is 6V/15K or about 0.4mA (not much current). The current through R3, no matter what happens with that A (anode) can't be any higher than 6V/470K or 13uA, which is quite tiny.
Edit': The 15K and 27K resistors form a voltage divider. Before it fires, the PUT gate is pretty high impedance, we can ignore it for analysis. The voltage from the two resistors is 6V * 27K/(15K+27K) = 3.9V. The PUT will fire at about 0.35V more than 3.9V, or about 4.2V.
RG (as shown on the datasheet) can be calculated as a bit under 10K.
So each flash, the capacitor starts off at a small voltage and charges to 4.2V through the 470K resistor, then discharges through the LED, and the cycle starts again.
Why were those values chosen, instead of different values or leaving one resistor out entirely?
You don't want to make the voltage divider voltage too high or the
capacitor charging will not be consistent, or may not fire at all.
That means you need R2 and it has to be not too different from R1.
The voltage has to be high enough that the residual voltage on the
capacitor doesn't matter too much and you don't need a bigger
capacitor than necessary. For sure you need R1.
There is a natural voltage to use that is about 2/3 the supply
voltage (1-1/e), which gives you a time that is about R multiplied
by C.
- The parallel combination of R1 and R2, 10K in your example, must not be too high or the
PUT will latch on. It must not be too low or a lot of power will be wasted and it will be harder to trigger, perhaps stopping the oscillation. A good value to use is one that's on the datasheet because you don't have to guess about what it will do. There are two options- 1M (too high) and 10K (okay).
Per TOSHIBA's ULN2003APG datasheet, this driver already has built-in input base resistor, for ULN2003APG, the resistance is 2.7k\$\Omega\$. It's dedicated to interface directly to TTL. or 5V CMOS level. So you can directly connect their inputs to your MCU.
For driving LEDs, the common pin maybe left open.
Because it's a sink (not source) driver, so you can connect your LEDs with anode tied to power supply, and cathode with a current limiting series resistor to the driver's output pin.
Best Answer
The transistor is jellybean Chinese PNP transistor. The specs (and even the pinout) vary somewhat from maker to maker- no JEDEC standardization here, but it's broadly similar to the Fairchild SS8550. They seldom fail if not abused.
Anyway, the thing under the blob is an IC chip (Chip-On-Board), and chances are very good that's where the problem lies (quite possibly in the wire bonds to the chip). In which case, the unit is not economically repairable. That construction technique is not particularly good (reliability-wise) for this kind of application but it is very cheap in high volume.
You could always hack in a mechanical switch (toggle or whatever) across the transistor and ignore the electronics. It's mostly there to allow an almost free momentary switch and allow blink modes. I'd try to disconnect the chip itself - I find that the one I have slowly drains the 4 AA cells whilst allegedly off. Or if you're ambitious beyond all reason, hack in a small microcontroller to drive the transistor.