Odd schematic mystery - Page 1
Forum section: electronics / projects

author: Canobi
author_rank: Regular Contributor
timestamp: November 15, 2015, 01:13:53 pm
content: Hi guysI found this article which shows how to make a 1w LED flicker randomly using a transistor and candle effect LED:http://www.evilmadscientist.com/2011/does-this-led-sound-funny-to-you/I'm interested in achieving this effect for a lightsabre project I'm working on and as I've never used MCUs I've been looking for a neat hardware solution to save on PWM coding.However, this schematic for the circuit has me stumped as to how it is supposed to work:It's probably my lack of understanding as I'm still a little green when it comes to transistors but where the heck is the gate getting it's positive voltage from with the LED attached to it like that?I thought I was getting my head round transistor physiology until now. As far as I was aware, current only passes from collector to drain but it has been bugging me lately whether the positive goes through the gate as well, as logically, it must go somewhere (I couldnt find much info specifically regarding this though).

author: Seekonk
author_rank: Super Contributor
timestamp: November 15, 2015, 01:50:58 pm
content: First I would reverse everything and make it a NPN transistor. So it is a flicker LED and the transistor jut amplifies the current to drive a bigger LED. You can buy modules from China that do all sorts of pulsing including random flicker and drive a couple amps for a buck in a nice package. I'd say it is time to learn to program a $3 mini 328 to make it look right. Anyone can do ten lines of code.

author: Deathwish
author_rank: Unknown
timestamp: November 15, 2015, 01:59:01 pm
content: the ic inside the flickering led will take the transistor base high and low randomly and therefore turn on/off the transistor from what i read

author: mich41
author_rank: Regular Contributor
timestamp: November 15, 2015, 02:03:43 pm
content: The BJT terminals are: emitter, base, collector. No gates, no drains here.The arrow always shows the internal base-emitter diode. Current flowing through the BE diode allows extra current to flow between C and E - that's how all BJTs work. This one is PNP (because EB is PN, judging by arrow direction) so it turns on when B voltage fallsbelowE voltage.

author: xrunner
author_rank: Super Contributor
timestamp: November 15, 2015, 02:07:18 pm
content: Quote from: Canobi on November 15, 2015, 01:13:53 pmI've seen these LEDs before. There is 4.5V biasing the flicker LED and the base of the transistor. If there is 0.6 V or so dropped across the B-E junction, then there is enough left to power the flicker LED IC. When it flickers, there is more and less voltage drop across it, hence more and less biasing for the transistor. Hence, it randomly changes the transistor current and the current going through the larger LED.

author: Canobi
author_rank: Regular Contributor
timestamp: November 15, 2015, 03:28:30 pm
content: Quote from: Seekonk on November 15, 2015, 01:50:58 pmMy saber fx system is quite module heavy already. I'm designing a PCB to mount them on so I don't have to deal with strip board and birds nests of wires. There's just enough room for some extra semiconductors so was looking at including this circuit on the board to give the blade LED a bit of flicker.

author: AF6LJ
author_rank: Unknown
timestamp: November 15, 2015, 03:39:17 pm
content: I don't understand the reasoning behind changing the circuit over to an NPN transistor.It is just as easy to understand, and sooner or later PNP transistors fit into an application better than the extra parts required sometimes to achieve the same function.

author: c4757p
author_rank: Super Contributor
timestamp: November 15, 2015, 03:44:31 pm
content: Quote from: AF6LJ on November 15, 2015, 03:39:17 pmAgreed. The circuit is exactly the same with NPN as it is with PNP, and there isn't an appreciable price difference or anything anymore...

author: Delta
author_rank: Super Contributor
timestamp: November 15, 2015, 03:44:56 pm
content: Please stop randomly conflating BJTs and FETs.

author: AF6LJ
author_rank: Unknown
timestamp: November 15, 2015, 03:47:02 pm
content: Quote from: Delta on November 15, 2015, 03:44:56 pmJust wondering how that is happening?Please explain.

author: Canobi
author_rank: Regular Contributor
timestamp: November 15, 2015, 05:40:09 pm
content: Quote from: mich41 on November 15, 2015, 02:03:43 pmAahh, thanks mich41, I know where I'm derailing now as I've only really looked at mosfets in depth so far as I needed a way to soft switch the 1w LED via MCU.So BJTs work a little differently then and that's where I'm confusing thingsWell I think I've worked out how to include it in my circuit but will need to swop the fet for the BJT in my schematic:

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 15, 2015, 05:42:46 pm
content: OP, terminology:Shown is a PNP bipolar junction transistor (BJT). It has three terminals, emitter (diagonal, with an arrow), base (going in straight) and collector (diagonal like the emitter, but without an arrow).Field Effect Transistors (FETs) have gate, source and drain terminals.There is no fundamental device which mixes these. A few hybrids are known, such as IGBTs (which have a collector and emitter, but a gate instead of a base -- the actual base terminal is integrated inside), or ESBT (emitter switched bipolar transistor, e.g.http://www.st.com/web/en/resource/technical/document/datasheet/CD00134986.pdfwhich has both base and gate terminals, and is clearly a dual device).Tim

author: Canobi
author_rank: Regular Contributor
timestamp: November 15, 2015, 11:24:07 pm
content: Quote from: T3sl4co1l on November 15, 2015, 05:42:46 pmThanks for defining the differences between FETs and BJTs, I definitely need to swat up on the latter lol.Here's the revised schematic. I've swoped one fet for a BJT. I looked for the nearest SMT equivalent as I need to keep things as small as possible. I left the other FET in as a switch to turn the circuit on and off via the MCU. Hopefully it'll work as expected:There's one tiny detail I need to clear up first. I'm using a 3.7v battery so probbaly need to recalculate the value for R2 and I'm not sure how to do that for a BJT (yet).

author: HowardNamath
author_rank: Newbie
timestamp: November 16, 2015, 03:55:04 am
content: If you're going to use an N-channel FET to turn the circuit on and off, you probably want to put it between R2 and ground. It also looks like you have the source and drain swapped on that FET so that the body diode would be conducting.

author: Fungus
author_rank: Super Contributor
timestamp: November 16, 2015, 04:03:42 am
content: Quote from: Canobi on November 15, 2015, 01:13:53 pmIt's a PNP transistor so the current goes into the collector andoutof the base.

author: AF6LJ
author_rank: Unknown
timestamp: November 16, 2015, 04:56:30 am
content: The current goes in the emitter and comes out the collector, the base controlls the flow of current by being more negative than the emitter.

author: Canobi
author_rank: Regular Contributor
timestamp: November 16, 2015, 10:00:02 am
content: Quote from: HowardNamath on November 16, 2015, 03:55:04 amNice one for spotting my mistakes Howard. Just goes to show how green I am with em lol.

author: Canobi
author_rank: Regular Contributor
timestamp: November 16, 2015, 03:05:55 pm
content: Quote from: AF6LJ on November 16, 2015, 04:56:30 am:wtf The pin names are somewhat misleading then, no wonder I was getting confused lol.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 16, 2015, 03:06:57 pm
content: "Emitter" emits electrons into the base layer, causing it to become conductive B-C.In the NPN transistor, it emits holes.Polarity doesn't matter, it's emitting (and absorbing) somethingTim

author: SeanB
author_rank: Super Contributor
timestamp: November 16, 2015, 04:18:55 pm
content: As an aside if you do not have a flickering led is that you can also use a greeting card COB to drive a led and make it flicker. Simply connect the card board so it always plays, mostly just removing the 2 button cells, and a switch formed of sheet pressing on the pcb, and solder a wire to the negative of the cells and the positive after the switch. Then connect the LED in place of the speaker and power it with 3V. It will flicker, and if you want brighter simply use a NPN transistor on the one lead to give you a higher current switched output. the card will run from 1V5 to 3V so will need a separate low current supply if running from 5V or more. A white led driven at 5mA will do.I did the opposite with a flickering led, added the 32R speaker out of an old telephone, and a CR2032 cell, and it plays a tune. According to Big Clive this is done as the card chips are ultra cheap, and they do work here, so if you take a few different flickering units apart you will get some different tunes.For a light sabre you probably want to get a Star Wars greeting card to use as a sound and light generator, the COB can drive the speaker and a LED, using the piezo speaker from the card in a larger resonator cavity.

author: mich41
author_rank: Regular Contributor
timestamp: November 16, 2015, 04:44:58 pm
content: Quote from: T3sl4co1l on November 16, 2015, 03:06:57 pmMan, you had 50% chance to get it right

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 16, 2015, 09:32:46 pm
content: Quote from: mich41 on November 16, 2015, 04:44:58 pmThat's the nice thing about deduction: either you're 100% right, or 100% wrong.Actually, a good way to remember is that it's the opposite of what the terminal is doped as. NPN = emitter emits electrons into the P base. Hence, BJTs operate on minority carriers.FETs operate with majority carriers, so an N-channel MOSFET conducts electrons through an (induced) N channel. Which is normally something like P-doped substrate, and the gate applies a positive electric field to draw electrons to the surface, making it conductive. (P-channel FETs work the other way around, of course, but holes don't move as freely as electrons do, hence the channel resistance is always worse for PMOS of the same dimensions. Which is why NMOS is widely preferred for power/switching applications.)Tim

author: AF6LJ
author_rank: Unknown
timestamp: November 16, 2015, 09:53:20 pm
content: This is also why you don't see very many PNP RF transistors much above low to mid VHF.

author: rsjsouza
author_rank: Super Contributor
timestamp: November 16, 2015, 10:06:46 pm
content: Quote from: AF6LJ on November 16, 2015, 09:53:20 pmYep. PNPs are slower.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 17, 2015, 12:43:16 am
content: Although BJTs operate more on diffusion, which has similar rates for holes and electrons, so when one has a "matched pair" of NPN and PNP, they really are fairly close, with the NPN being on the order of 10-20% better. Whereas the difference in FETs is more like 250% (i.e., N is ~2.5 times better than P).The mismatch is even worse for FETs in other materials, which is why GaAs CMOS (or anything, really) never took off. The Cray supercomputers that used GaAs were all NMOS (or something like that) -- no improvement upon ye olde Z80 or 6502, just a faster material, more of it, and painstakinglyroutedplumbed for data (and heat) flow!Tim

author: AF6LJ
author_rank: Unknown
timestamp: November 17, 2015, 03:04:22 am
content: Good post Tim;That is what we were taught, that PNPs were slower. I never thought I would see any moderate power PNP RF devices, then I worked at a local two way radio shop. Motorola built 100W VHF PAS WITH PNP parts, worked well at 174MHZ, they saw the light at UHF and 800MHZ though and went with their NPN designs. You can get away with a lot when you cook up your own trannys....

author: amyk
author_rank: Super Contributor
timestamp: November 17, 2015, 08:48:18 am
content: For some reason this makes me think of a very clandestine way to distribute secrets...

author: AF6LJ
author_rank: Unknown
timestamp: November 17, 2015, 12:54:53 pm
content: Quote from: amyk on November 17, 2015, 08:48:18 amI thought passing them in PS-4 chat rooms was good.....Oh wait............They just figured that out...