Why Won’t This Darn Thing Charge?

What is more fun than plugging in your phone and coming back to find your battery on empty? Stepping on a LEGO block with bare feet or arriving hungry at a restaurant after closing probably qualify. [Alex Sidorenko] won’t clean your floors or order you a pizza, but he can help you understand why cheap chargers won’t always power expensive devices. He also shows how to build an adapter to make them work despite themselves.

The cheapest smart device chargers take electricity from your home or car and convert it to five volts of direct current. That voltage sits on the power rails of a USB socket until you plug in a cable. If you’re fortunate, you might get a measly fuse.

Smart device manufacturers don’t make money when you buy an off-brand charger, and they can’t speak to the current protection of them, so they started to add features on their own chargers to protect their components and profit margins. In the case of dedicated chargers, a simple resistor across the data lines tells your phone it is acceptable power. Other devices are more finicky, but [Alex Sidorenko] shows how they work and provides Eagle files to build whatever flavor you want. Just be positive that your power supply is worthy of the reliability these boards promise to the device.

Now you know why connecting a homemade benchtop power supply to a USB cable seems good on paper but doesn’t always get the job done. Always be safe when you make your own power supplies.

How Current Shunts Work

Current. Too little of it, and you can’t get where you’re going, too much and your hardware’s on fire. In many projects, it’s desirable to know just how much current is being drawn, and even more desirable to limit it to avoid catastrophic destruction. The humble current shunt is an excellent way to do just that.

Ohm’s Law.

To understand current, it’s important to understand Ohm’s Law, which defines the relationship between current, voltage, and resistance. If we know two out of the three, we can calculate the unknown. This is the underlying principle behind the current shunt. A current flows through a resistor, and the voltage drop across the resistor is measured. If the resistance also is known, the current can be calculated with the equation I=V/R.

This simple fact can be used to great effect. As an example, consider a microcontroller used to control a DC motor with a transistor controlled by a PWM output. A known resistance is placed inline with the motor and, the voltage drop across it measured with the onboard analog-to-digital converter. With a few lines of code, it’s simple for the microcontroller to calculate the current flowing to the motor. Armed with this knowledge, code can be crafted to limit the motor current draw for such purposes as avoiding overheating the motor, or to protect the drive transistors from failure.

In fact, such strategies can be used in a wide variety of applications. In microcontroller projects you can measure as many currents as you have spare ADC channels and time. Whether you’re driving high power LEDs or trying to build protection into a power supply, current shunts are key to doing this.

Continue reading “How Current Shunts Work”

Error: LP0 On ????

You don’t need fancy ICs and DACs to build a sound card for a PC. As [serdef]’s build over on hackaday.io shows, all you really need is a bunch of resistors. [serdef] built a clone of a sound card released for PC in the 80s, but with a few improvements. This mess of resistors features the best 8-bit sound you can get with a low-pass filter, volume divider, and a handy DB-25 connector.

The design of this LPT0 sound card is pretty much the same as when it was introduced to the world as the Covox Speech Thing. This ‘sound card’ was designed to clip onto the parallel port of a computer and send the 8-bit I/O of this port through a resistor ladder. Plug a pair of speakers into this thing, and you have a sound card that is completely made out of resistors. It was cheap, and in the demoscene it was popular.

There are a lot of amazing demos out there using this resistor DAC thing, and [serdef] has videos of his project playing a lot of them. You can check that out below.

Continue reading “Error: LP0 On ????”

Hackaday Trims Its Own Resistors

There are times when you might want an odd-value resistor. Rather than run out to the store to buy a 3,140 Ω resistor, you can get there with a good ohmmeter and a willingness to solder things in series and parallel. But when you want a precise resistor value, and you want many of them, Frankensteining many resistors together over and over is a poor solution.

Something like an 8-bit R-2R resistor-ladder DAC, for instance, requires seventeen resistors of two values in better than 0.4% precision. That’s just not something I have on hand, and the series/parallel approach will get tiresome fast.

Ages ago, I had read about trimming resistors by hand, but had assumed that it was the domain of the madman. On the other hand, this is Hackaday; I had some time and a file. Could I trim and match resistors to within half a percent? Read on to find out.

Continue reading “Hackaday Trims Its Own Resistors”

Automatic Resistance: Resistors Controlled By The Environment

Resistors are one of the fundamental components used in electronic circuits. They do one thing: resist the flow of electrical current. There is more than one way to skin a cat, and there is more than one way for a resistor to work. In previous articles I talked about fixed value resistors as well as variable resistors.

There is one other major group of variable resistors which I didn’t get into: resistors which change value without human intervention. These change by environmental means: temperature, voltage, light, magnetic fields and physical strain. They’re commonly used for automation and without them our lives would be very different.

Continue reading “Automatic Resistance: Resistors Controlled By The Environment”

Resistance In Motion: What You Should Know About Variable Resistors

Adjusting the volume dial on a sound system, sensing your finger position on a touch screen, and knowing when someone’s in the car are just a few examples of where you encounter variable resistors in everyday life. The ability to change resistance means the ability to interact, and that’s why variable resistance devices are found in so many things.

The principles are the same, but there are so many ways to split a volt. Let’s take a look at what goes into rotary pots, rheostats, membrane potentiometers, resistive touchscreens, force sensitive resistors, as well as flex and stretch sensors.

Continue reading “Resistance In Motion: What You Should Know About Variable Resistors”

What Is There To Know About Resistors?

Resistor: A passive chunk of material that resists the flow of electrical current. A terminal is connected to each end you’re done. What could be simpler?

It turns out it’s not so simple at all. Temperature, capacitance, inductance and other factors all play a part in making the resistor a rather complex component after all. Even its uses in circuits are many, but here we’ll just focus on the different types of fixed-value resistors, how they’re made, and what makes them desirable for different applications.

Let’s start with a simple one, and one of the oldest.

Continue reading “What Is There To Know About Resistors?”