Help Solve The Single-Transistor Latch Mystery

If you’ve spent any time on hackaday.io, you may have noticed that more than a few denizens of the site are fans of “alternative” electronic logic. Aiming to create digital circuits from such things as relays, vacuum tubes, discrete transistors, and occasionally diodes, they come up with designs that use these components in either antiquated or occasionally new and unexpected ways. This is exactly what [Mark Sherman] has done with his latest project, a single-transistor latch.

If you think every design has to compete with cutting-edge integrated circuits, or even must have an immediate practical application, you might as well stop reading now — and to play on the famous Louis Armstrong quip about jazz, if you have to ask why someone would do such a thing, you’ll never know.

Given that you’ve come this far, you’ll appreciate what [Mark] has come up with. It’s semi-well-known that the collector-emitter junction of a bipolar junction transistor (BJT) can exhibit a negative resistance characteristic when reverse-biased into avalanche breakdown. It’s this principle that allows a single BJT to be used as an ultra-simple LED flasher. [Mark] took this concept and ran with it, creating a single-transistor latch that can store one bit of information. As a bonus — or is it a requirement? — the transistor also drives an LED, so that you can visualize the state. We’ve seen a one-transistor flip-flop before, but that one also required diodes and an AC bias supply. In this new device, none of this is necessary, so it’s a step up according to the unwritten, unspoken, and generally agreed upon rules of the game.

In true hacker fashion, [Mark] came up with a working device without fully understanding exactly how it works.  We, too, are a little mystified at first glance. So, [Mark] is asking for your help in replicating and/or analyzing the circuit. He explains what he has found so far in the video after the break, but the main questions seem to revolve around why the base resistor is required, and why it works with 2N4401s but not 2N2222s.

So, Hackaday, what’s going on here? Sound off in the comments below.

Continue reading “Help Solve The Single-Transistor Latch Mystery”

Fun With Negative Resistance: Jellybean Transistors

The concept of negative resistance has always fascinated me. Of course, a true negative resistance is not possible, and what is meant is a negative differential resistance (NDR). But of course knowing the correct term doesn’t do anything to demystify the topic. Negative resistance sounds like an unusual effect, but it turns out to be relatively common, showing up in places like neon lamps and a number of semiconductor structures. Now’s as good a time as any to dig in and learn more about this common principle.

NDR means a portion of a device’s I/V curve where the current falls with increasing applied voltage. The best-known semiconductor device exhibiting negative resistance is the tunnel diode, also known as the Esaki diode after one of the Nobel-Prize-winning discoverers of the quantum tunneling effect responsible for its operation. These diodes can perform at tremendous speeds; the fastest oscilloscope designs relied on them for many years. As the transistor and other technologies improved, however, these diodes were sidelined for many applications, and new-production models aren’t widely available — a sad state for would-be NDR hackers. But, all hope is not lost.

Rummaging through some old notebooks, I rediscovered an NDR design I came up with in 2002 using two common NPN transistors and a handful of resistors; many readers will already have the components necessary to experiment with similar circuits. In this article, we’ll have a look at what you can do with junkbox-class parts, and in a future article we’ll explore the topic with some real tunnel diodes.

So, let’s see what you can do with a couple of jellybean transistors!

Continue reading “Fun With Negative Resistance: Jellybean Transistors”

A Function Generator In Its Purest Form

If you have a modern function generator on your bench it is quite likely to contain a direct-digital synthesis circuit that creates arbitrary waveforms using a microprocessor controlled DAC. If you have a cheap function generator it’s likely to contain a one-chip solution that generates approximations to sine and triangle waveforms through modifying a square wave with a set of filters.

These methods both produce adequate waveforms for most of your function generator needs, but they are both far from perfect for the purist. Both methods introduce some distortion, and to address this [michal777] has produced a generator that takes the process back to basics with all stages implemented using building block ICs and transistors. The circuit follows the same square-wave-modifying path as the cheaper integrated devices, but with significant attention paid to the design to ensure that it does as good a job as possible. It also makes for a fascinating dive into function generator design.

The generator hardware has been neatly fitted onto a PCB with a riser for a set of front panel controls. He shares a few pictures of previous designs. We particularly like one that appears to have been fitted into a redundant cooking pot.

We’ve brought you a few function generators over the years. If you’ve got one of the cheaper examples, we’ve even covered how you might improve it a little.

Ask Hackaday: Is USB Robust Enough?

Earlier this month a single person pleaded guilty to taking down some computer labs at a college in New York. This was not done by hacking into them remotely, but by plugging a USB Killer in one machine at a time. This malicious act caused around $58,000 in damage to 66 machines, using a device designed to overload the data pins on the USB ports with high-voltage. Similar damage could have been done with a ball-peen hammer (albeit much less discreetly), and we’re not here to debate the merits of the USB Killer devices. If you destroy property you don’t own you should be held accountable.

But the event did bring an interesting question to mind. How robust are USB ports? The USB Killer — which we’ve covered off and on through the years —  is billed as a “surge testing” device and operates by injecting -200 volts DC on the data lines of the USB connection. Many USB ports are not protected against this and the result is permanent damage to the computer hardware. Is protection for these levels of abuse necessary or would it needlessly add cost to our machines?

A chip like the TPD4S014 has ESD protection on the data lines that is rated up to +/- 1500 volts, clamping to ground to dissipate the energy. It’s a solution that should protect against repeated spikes on the data lines, as well as short circuits on the power lines and over/undervoltage situations.

ADUM4160 Functional Diagram

The ADuM4160 is an interesting step up from this. It’s designed to provide isolation between a USB host and the device connected to it. Rather than relying on clamping, this chip implements isolation through air core transformers. Certainly this would be overkill to install in every product, but for those of use building and testing USB devices this would save you from “Oops, wrong USB cable” moments at the work bench.

Speaking of accidents at the bench, there is certainly a demand for USB isolation outside of what’s built into our computers. Earlier this year we saw a fantastic take on a properly-designed USB power strip. Among the goals were current limiting, undervoltage protection, and a proper power disconnect switch for each port. The very need to design your own reminds us that consumer manufacturers are often lazy in their USB design. “Use a USB hub” is bad advice for protection at the workbench since quality of design varies so wildly.

We would be interested in hearing from anyone who has insight on standards applying to equipment continuing to survive over current or over voltage events and remain functional. There are standards like UL-60950 that should apply to USB. But that standard includes language about failing safe for the operator, not necessarily remaining functional:

After abnormal operation or a single fault (see 1.4.14), the equipment shall remain safe for an OPERATOR in the meaning of this standard, but it is not required that the equipment should still be in full working order. It is permitted to use fusible links, THERMAL CUT-OUTS, overcurrent  protection devices and the like to provide adequate protection.

So, we’re here to ask you, the readers of Hackaday. Are our USB devices robust enough? Do you have a go-to USB protection chip, part, or other circuit you like to use? Have you ever accidentally killed a USB host device (if so, how)? Do you have special equipment that you depend on when developing projects involving USB? Let us know what you think in the comments below.

Driving A 16×2 LCD With Voltage Modulation

The basic 16×2 LCD is an extremely popular component that we’ve seen used in more projects than we could possibly count. Part of that is because modern microcontrollers make it so easy to work with; if you’ve got an I2C variant of the display, it only takes four wires to drive it. That puts printing a line of text on one of these LCDs a step or two above blinking an LED on a digital pin on the hierarchy of beginner’s electronics projects.

What’s that? Even four wires is too many? In that case, you might be interested in this hack from [Vinod] which shows how you can drive the classic 16×2 with data and power on the same pair of wires. You’ll still need a microcontroller “backpack” for the LCD to interpret the modulated voltage, but if you’ve got an application for a simple remote display, this is definitely worth checking out.

The basic idea is to “blink” the 5 V line so quick that a capacitor on the LCD side can float the electronics over the dips in voltage. As long as one of the pins of the microcontroller is connected to the 5 V line before the capacitor, it will be able to pick up when the line goes low. With a high enough data rate and a large enough capacitor as a buffer, you’re well on the way to encoding your data to be displayed.

For the transmitting side, [Vinod] is using a Python script on his computer that’s sending out the text for the LCD over a standard USB to UART converter. That’s fed into a small circuit put together on a scrap of perfboard that triggers a MOSFET off of the UART TX line.

We actually covered the theory behind this technique years ago, but it’s always interesting to see somebody put together a real-world example. There might not be too many practical uses for this trick in the era of dirt-cheap microcontrollers bristling with I/O, but it might make a fun gag at your hackerspace.

Continue reading “Driving A 16×2 LCD With Voltage Modulation”

Make That Special Cup Of Coffee By Completely Tweaking The Coffee Machine

An interesting part of working on the Building Management and Control (BMaC) project – as previously covered on this site – was the reverse-engineering and ultimately the gaining of full control over the coffee machines at the office. Not the boring filter coffee machines, mind you, but the fully automatic espresso machine type that grinds beans, makes coffee, adds milk, and much more. Depending on one’s budget, naturally.

These little marvels of engineering contain meters of tubing, dozens of sensors, valves, ceramic grinders, and heating elements. The complexity of this machinery made us think that maybe there was more that we could do with these machines beyond what their existing programming and predefined products would allow. Naturally, there was.

Continue reading “Make That Special Cup Of Coffee By Completely Tweaking The Coffee Machine”

Charge All Your Batteries With USB PD

USB-C has been around for a while, and now that it can charge phones and Macbooks and Thinkpads, the hackers are starting to take note of power adapters that can supply lots of current. [Alex] was turned on to USB-C after he charged a laptop, Nintendo Switch, and phone with one power adapter. This led him to create a USB-C battery charger for all your LiPos.

The high-level design of this project is simply a board with a USB C port on one end, an XT60 plug on the other, and some support for balance leads. Plug this board into a USB C adapter, plug a battery in, and the battery will charge automagically. The only UI is an RGB LED. It’s difficult to imagine a battery charger that’s easier to use.

For the electronics, [Alex] is using an STM32G0 for the smarts of the device, which includes handling the USB PD spec. This gives the charger 20 Volts to play with, and this is then regulated and sent into the battery. Right now, this board will charge 2-4c batteries. That’s a good enough proof of concept to charge some quadcopter batteries, or just as a really simple way to charge some LiPo cells.