Circuit VR: Current Mirrors

Last time we looked at Spice models of a current sink. We didn’t look at some of the problems involved with a simple sink, and for many practical applications, they are perfectly adequate. However, you’ll often see more devices used to improve the characteristics of the current sink or source. In particular, a common design is a current mirror which copies a current from one device to another. Usually, the device that sets the current is in a configuration that makes it very stable while the other device handles the load current.

For example, some transistor parameters vary based on the output voltage which causes small nonlinearities in the output. But if the setting transistor has a fixed voltage across it, that won’t be a problem. The only problem with mirror schemes is that the transistors involved all have to match in key characteristics. For that reason, mirrors are usually better on ICs where the transistors are all more or less the same. You can get discrete transistors that have multiple devices built on a single substrate, but these are not very common.

Continue reading “Circuit VR: Current Mirrors”

Optocouplers: Defending Your Microcontroller, MIDI, And A Hot Tip For Speed

Deep in the heart of your latest project lies a little silicon brain. Much like the brain inside your own bone-plated noggin, your microcontroller needs protection from the outside world from time to time. When it comes to isolating your microcontroller’s sensitive little pins from high voltages, ground loops, or general noise, nothing beats an optocoupler. And while simple on-off control of a device through an optocoupler can be as simple as hooking up an LED, they are not perfect digital devices.

But first a step back. What is an optocoupler anyway? The prototype is an LED and a light-sensitive transistor stuck together in a lightproof case. But there are many choices for the receiver side: photodiodes, BJT phototransistors, MOSFETs, photo-triacs, photo-Darlingtons, and more.

So while implementation details vary, the crux is that your microcontroller turns on an LED, and it’s the light from that LED that activates the other side of the circuit. The only connection between the LED side and the transistor side is non-electrical — light across a small gap — and that provides the rock-solid, one-way isolation.

Continue reading “Optocouplers: Defending Your Microcontroller, MIDI, And A Hot Tip For Speed”

Biasing That Transistor: The Common Emitter Amplifier

If you open up the perennial favourite electronics textbook The Art Of Electronics and turn to the section on transistors, you will see a little cartoon. A transistor is shown as a room in which “transistor man” stands watching a dial showing the base current, while adjusting a potentiometer that limits the collector current. If you apply a little more base current, he pushes up the collector a bit. If you wind back the base current, he drops it back. It’s a simple but effective way of explaining the basic operation of a transistor, but it stops short of some of the nuances of how a transistor works.

Of course the base-emitter junction is a diode and it is not a simple potentiometer that sits between collector and emitter. The “better” description of these aspects of the device fills the heads of first-year electronic engineering students until they never want to hear about an h-paramater or the Ebers-Moll model of transistor function again in their entire lives. Fortunately it is possible to work with transistors without such an in-depth understanding of their operation, but before selecting the components surrounding a device it is still necessary to go a little way beyond transistor man.

Continue reading “Biasing That Transistor: The Common Emitter Amplifier”

The One-Transistor Flip-Flop

A flip-flop is one of the most basic digital electronic circuits. It can most easily be built from just two transistors, although they can and have been built out of vacuum tubes, NAND and NOR gates, and Minecraft redstone. Conventional wisdom says you can’t build a flip-flop with just one transistor, but here we are. [roelh] has built a flip-flop circuit using only one transistor and some bizarre logic that’s been slowly developing over on hackaday.io.

[roelh]’s single transistor flip-flop is heavily inspired by a few of the strange logic projects we’ve seen over the years. The weirdest, by far, is [Ted Yapo]’s Diode Clock, a digital clock made with diode-diode logic. This is the large-scale proof of concept for the unique family of logic circuits [Ted] came up with that only uses bog-standard diodes to construct arbitrary digital logic.

The single-transistor flip-flop works just like any other flip-flop — there are set and reset pulses, and a feedback loop to keep the whatever state the output is in alive. The key difference here is the addition of a clock signal. This clock, along with a few capacitors and a pair of diodes, give this single transistor the ability to store a single bit of information, just like any other flip-flop.

This is, without a doubt, a really, really weird circuit but falls well into territory that is easily understood despite being completely unfamiliar. The key question here is, ‘why?’. [roelh] says this could be used for homebrew CPUs, although this circuit is trading two transistors for a single transistor, two diodes, and a few more support components. For vacuum tube-based computation, this could be a very interesting idea that someone at IBM in the 40s had, then forgot to write down. Either way, it’s a clever application of diodes and an amazing expression of the creativity that can be found on a breadboard.

How the 555 timer IC works

Learning The 555 From The Inside

One way to understand how the 555 timer works and how to use it is by learning what the pins mean and what to connect to them. A far more enjoyable, and arguably a more useful way to learn is by looking at what’s going on inside during each of its modes of operation. [Dejan Nedelkovski] has put together just such a video where he walks through how the 555 timer IC works from the inside.

We especially like how he immediately removes the fear factor by first showing a schematic with all the individual components but then grouping them into what they make up: two comparators, a voltage divider, a flip-flop, a discharge transistor, and an output stage. Having lifted the internals to a higher level, he then walks through examples, with external components attached, for each of the three operating modes: bistable, monostable and astable. If you’re already familiar with the 555 then you’ll enjoy the trip down memory lane. If you’re not familiar with it, then you soon will be. Check out his video below.

Continue reading “Learning The 555 From The Inside”

Circuit Challenge: Two Transistor 3.3V Regulator

[Kevin Darrah] wanted to make a simple 3.3V regulator without using an integrated circuit. He wound up using two common NPN transistors and 4 1K resistors. The circuit isn’t going to beat out a cheap linear regulator IC, but for the low component count, it is actually pretty good.

In all fairness, though, [Kevin] may have two transistors, but he’s only using one of them as a proper transistor. That one is a conventional pass regulator like you might find in any regulator circuit. The other transistor only has two connections. The design reverse biases the base-emitter junction which results in a roughly 8V breakdown voltage. Essentially, this transistor is being used as a poor-quality Zener diode.

Continue reading “Circuit Challenge: Two Transistor 3.3V Regulator”

Current Sink Keeps The Smoke In

One of the most versatile tools on anyone’s work bench, at least as far as electrical projects are concerned, is a power supply. Often we build our own, but after we’ve cobbled together some banana jacks with a computer’s PSU or dead-bug soldered a LM317 voltage regulator to a wall wart, how will that power supply perform? Since it’s not desirable to use a power supply that’ll let the smoke out of everything it powers (or itself, for that matter) a constant current sink, or load, can help determine the operating limits of the power supply.

[electrobob] built this particular current sink from parts he had lying around. The theory of a constant current sink is relatively straightforward so it’s easily possible to build one from parts out of the junk drawer, provided you can find a few transistors, fuses, an op amp, and some heat sinks. The full set of schematics that [electrobob] designed can be found on his main project page. He’s also gone a step further with this build as well, since he shorted out his first prototype and destroyed some of the transistors. But, using a few extra transistors in his design also improves the safety and performance of the load, so it’s a win-win.

This constant current load also has the added feature of being able to interface with a waveform generator (an Analog Discovery, specifically) and as a result can connect and disconnect the load quickly. If you aren’t in need of an industrial-grade constant current sink and you have some spare parts lying around, this would be a great one to have around the work bench.