Imaginary AC Circuits Aren’t Really Complex

If you have ever read advanced textbooks or papers about electronics, you may have been surprised to see the use of complex numbers used in the analysis of AC circuits. A complex number has two parts: a real part and an imaginary part. I’ve often thought that a lot of books and classes just kind of gloss over what this really means. What part of electricity is imaginary? Why do we do this?

The short answer is phase angle: the time delay between a voltage and a current in a circuit. How can an angle be a time? That’s part of what I’ll need to explain.

First, consider a resistor. If you apply a voltage to it, a certain current will flow that you can determine by Ohm’s law. If you know the instantaneous voltage across the resistor, you can derive the current and you can find the power–how much work that electricity will do. That’s fine for DC current through resistors. But components like capacitors and inductors with an AC current don’t obey Ohm’s law. Take a capacitor. Current only flows when  the capacitor is charging or discharging, so the current through it relates to the rate of change of the voltage, not the instantaneous voltage level.

That means that if you plot the sine wave voltage against the current, the peak of the voltage will be where the current is minimal, and the peak current will be where the voltage is at zero. You can see that in this image, where the yellow wave is voltage (V) and the green wave is current (I). See how the green peak is where the yellow curve crosses zero? And the yellow peak is where the green curve crosses zero?

These linked sine and cosine waves might remind you of something — the X and Y coordinates of a point being swept around a circle at a constant rate, and that’s our connection to complex numbers. By the end of the post, you’ll see it isn’t all that complicated and the “imaginary” quantity isn’t imaginary at all.

Continue reading “Imaginary AC Circuits Aren’t Really Complex”

Designing Your Project To Scale: Crossing The Chasm

Hackaday is all about the neat hacks and the repurposing of old components into new projects, but many people then try to take those projects and turn them into businesses. We’ve seen lots of people offer their stuff as kits and sell them on Tindie, with the rare few going on to develop a consumer electronic product at scale.

The Hackaday Prize 2017 Best Product highlights this journey. “Scale” itself is a vague term, but essentially it means to be able to produce enough to meet market demand. We hope that market demand is roughly 7 billion units, purchasing yearly, but the reality is that it is somewhere between 1 and a few hundred thousand, with very big differences in manufacturing at each order of magnitude. So how do you start with a proof of concept and design your product from the very beginning to be optimized to scale to meet whatever demand you can handle?

Continue reading “Designing Your Project To Scale: Crossing The Chasm”

The Red Special: Brian May’s Handmade Guitar

Guitarists are a special breed, and many of them have a close connection with the instruments they play. It might be a specific brand of guitar, or a certain setup required to achieve the sound they’re looking for. No one has a closer bond with an instrument than Brian May to his Red Special. The guitar he toured with and played through his career with Queen and beyond had very humble beginnings. It was built from scratch by Brian and his father Harold May.

A young Brian May playing the brand new Red Special. Note the disk magnets of the original handmade pickups

It was the early 1960’s and a young teenaged Brian May wanted an electric guitar. The problem was that the relatively new instruments were still quite expensive — into the hundreds of dollars. Well beyond the means of the modest family’s budget. All was not lost though. Brian’s father Harold was an electrical engineer and a hacker of sorts. He built the family’s radio, TV, and even furniture around the house. Harold proposed the two build a new electric guitar from scratch as a father-son project. This was the beginning of a two-year odyssey that resulted in the creation of one of the world’s most famous musical instruments.

Brian was already an accomplished guitarist, learning first on his dad’s George Formby Banjo-ukulele, and graduating to an Egmond acoustic guitar. Brian’s first forays into electric guitars came from experimenting with that Egmond. If you look close, you can even see the influence it had on the final design of the Red Special.

Continue reading “The Red Special: Brian May’s Handmade Guitar”

How Smart Is The Grid?

Marketing and advertising groups often have a tendency to capitalize on technological trends faster than engineers and users can settle into the technology itself. Perhaps it’s no surprise that it is difficult to hold back the motivation to get a product to market and profit. Right now the most glaring example is the practice of carelessly putting WiFi in appliances and toys and putting them on the Internet of Things, but there is a similar type of fiasco playing out in the electric power industry as well. Known as the “smart grid”, an effort is underway to modernize the electric power grid in much the same way that the Internet of Things seeks to modernize household appliances, but to much greater and immediate benefit.

A Cutler-Hammer industrial breaker ominously predicts the coming confusion in the smart grid arena.
Photo by Bryan Cockfield

To that end, if there’s anything in need of modernization it’s the electric grid. Often still extensively using technology that was pioneered in the 1800s like synchronous generators and transformers (not to mention metering and billing techniques that were perfected before the invention of the transistor), there is a lot of opportunity to add oversight and connectivity to almost every part of the grid from the power plant to the customer. Additionally, most modern grids are aging rapidly at the same time that we are asking them to carry more and more electricity. Modernization can also help the aging infrastructure become more efficient at delivering energy.

While the term “smart grid” is as nebulous and as ill-defined as “Internet of Things” (even the US Government’s definition is muddied and vague), the smart grid actually has a unifying purpose behind it and, so far, has been an extremely useful way to bring needed improvements to the power grid despite the lack of a cohesive definition. While there’s no single thing that suddenly transforms a grid into a smart grid, there are a lot of things going on at once that each improve the grid’s performance and status reporting ability.

Continue reading “How Smart Is The Grid?”

NEETS: Electronics Education Courtesy Of The US Navy

Just about everything the US Government publishes is available to the public. Granted, browsing the GPO bookstore yields a lot of highly specialized documents like a book on how to perform pediatric surgery in hostile environments. However, there are some gems if you know where to look. If you ever wanted to have a comprehensive electronics course, the US Navy’s NEETS (Navy Electricity and Electronics Training Series) is freely available and has 24 modules that cover everything from electron flow through conductors, to tubes, to transistors and integrated circuits.

There are many places you can download these in one form or another. Some of them are in HTML format. Others are in PDF, which might be easier to put on a mobile device. The Internet Archive has them, although sorting by title isn’t quite in numerical order.

Some of the content is a bit dated — the computer section talks about magnetic core and bubble memory, for example, even though the latest revision we know of was in 1998. Of course, there are also references to bits of Navy gear that probably doesn’t mean much to most of us. However, things like the shift register (from module 13) you can see above haven’t changed in a few decades, so you can still learn a lot. The phase splitter in the top banner is even more timeless (you can find it in module 8).

Continue reading “NEETS: Electronics Education Courtesy Of The US Navy”

Nuts And Bolts: Keeping It Tight

It’s not much of a stretch to say that without nuts and bolts, the world would fall apart. Bolted connections are everywhere, from the frame of your DIY 3D printer to the lug nuts holding the wheels on your car. Though the penalty for failure is certainly higher in the latter than in the former, self-loosening of nuts and bolts is rarely a good thing. Engineers have come up with dozens of ways to make sure the world doesn’t fall apart, and some work better than others. Let’s explore a few of these methods and find out what works, what doesn’t work, and in the process maybe we’ll learn a little about how these fascinating fasteners work.

Continue reading “Nuts And Bolts: Keeping It Tight”

Reading Bingo Balls With Microcontrollers

Every once in a while a project comes along with that magical power to consume your time and attention for many months. When you finally complete it, you feel sorry that you don’t have to do anything more.

What is so special about this Bingo ball reader? It may seem like an ordinary OCR project at first glance; a camera captures the image and OCR software recognizes the number. Simple as that. And it works without problems, like every simple gadget should.

But then again, maybe it’s not that simple. Numbers are scattered all over the ball, so they have to be located first, and the best candidate for reading must be selected. Then, numbers are painted onto a sphere rather than a flat surface, sometimes making them deformed to the point where their shape has to be recovered first. Also, the angle of reading is not fixed but somewhere on a 360° scale. And then we have the glare problem to boot, as Bingo balls are so shiny that every light source reflects as a saturated bright spot.

So, is that all of it? Well, almost. The task is supposed to be performed by an embedded microcontroller, with limited speed and memory, yet the recognition process for one ball has to be fast — 500 ms at worst. But that’s just one part of the process. The project includes the pipelined mechanism which accepts the ball, transports it to be scanned by the OCR and then shot by the public broadcast camera before it gets dumped. And finally, if the reading was not reliable enough, the ball has to be subtly rotated so that the numbers would be repositioned for another reading attempt.

Despite these challenges I did manage to build this system. It’s fast and reliable, and I discovered some very interesting tricks along the way. Take a look at the quick demo video below to get a feel for the speed, and what the system “sees”. Then join me after the break to dive into the details of this interesting embedded build.

Continue reading “Reading Bingo Balls With Microcontrollers”