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”

Ask Hackaday: Whatever Happened To Wire Wrapping?

Back in the 70s when I started getting interested in electronics, tons of magazines catered to the hobbyist market. Popular Electronics was my favorite, and I think I remember the advertisements more than anything, probably because they outnumbered articles by a large margin. Looking back, it seemed like a lot of ad space was sold to companies hawking the tools and materials needed for wire wrapping, which was very popular for prototyping in the days before solderless breadboards were readily available. I remember beauty shots of neat rows of small, gold posts, with stripped wires wrapped evenly around them.

To the budding hobbyist, wire wrapping looked like the skill to have. With a huge selection of posts, terminals, and sockets for ICs and discrete components, as well as a wide range of manual and powered wrapping tools, it seemed like you could build anything with wire wrapping. But fast forward just a decade or so, and wire wrapping seemed to drop out of favor. And today — well, does anyone even wire wrap anymore?

Continue reading “Ask Hackaday: Whatever Happened To Wire Wrapping?”

Directly Executing Chunks Of Memory: Function Pointers In C

In the first part of this series, we covered the basics of pointers in C, and went on to more complex arrangements and pointer arithmetic in the second part. Both times, we focused solely on pointers representing data in memory.

But data isn’t the only thing residing in memory. All the program code is accessible through either the RAM or some other executable type of memory, giving each function a specific address inside that memory as entry point. Once again, pointers are simply memory addresses, and to fully utilize this similarity, C provides the concept of function pointers. Function pointers provide us with ways to make conditional code execution faster, implement callbacks to make code more modular, and even provide a foothold into the running machine code itself for reverse engineering or exploitation. So read on!

Function Pointers

In general, function pointers aren’t any more mysterious than data pointers: the main difference is that one references variables and the other references functions. If you recall from last time how arrays decay into pointers to their first element, a function equally decays into a pointer to the address of its entry point, with the () operator executing whatever is at that address. As a result, we can declare a function pointer variable fptr and assign a function func() to it: fptr = func;. Calling fptr(); will then resolve to the entry point of function func() and execute it.

Admittedly, the idea of turning a function into a variable may seem strange at first and might require some getting used to, but it gets easier with time and it can be a very useful idiom. The same is true for the function pointer syntax, which can be intimidating and confusing in the beginning. But let’s have a look at that ourselves.

Continue reading “Directly Executing Chunks Of Memory: Function Pointers In C”

Scotty Allen Builds A USB Drive From An IPhone

What happens when you come across a mysterious, partially populated circuit board in the Huaqiangbei electronics market in Shenzhen? If you’re [Scotty Allen], the only answer is to make your own USB drive from iPhone parts.

[Scotty] made a name for himself through his YouTube channel Strange Parts where he built his own iPhone from scratch, added a headphone jack to an iPhone, and other various exploits involving hot air in Shenzhen. This latest build is no different. It begins with a random PCB [Scotty] found at the electronics market. It has a USB port on one end, it has pads for an iPhone memory chip, and it has an IC that looks like a USB to Flash converter.

The build involved finding a few broken iPhones, desoldering and reballing their Flash chips, and when those didn’t work, finding the correct Flash chips for this tiny little USB adapter board. Here, [Scotty] ran into trouble. The first Flash chip didn’t have the right pins, there was blue smoke, and the toolchain for initializing the USB to Flash IC was a mess.

In the end, [Scotty] managed to create a USB Flash drive after five or six visits to the electronics market, two stencils to reball Flash chips, and finding the OEM software for the USB to Flash chip on this very special PCB. That, itself, required Windows (the horror!), and finding the right version of the software.

Is this technically building a Flash drive purely from disposed iPhone components? We’d quibble. But is it a cool build, regardless? Absolutely. And the real story here is how quickly [Scotty] could iterate on his engineering. When the greatest electronics market is right around the corner, you can do anything with a microscope and a hot air gun.

The Anxiety Of Open Source: Why We Struggle With Putting It Out There

You’ve just finished your project. Well, not finished, but it works and you’ve solved all the problems worth solving, and you have a thing that works for you. Then you think about sharing your creation with the world. “This is cool” you think. “Other people might think it’s cool, too.” So you have to take pictures and video, and you wish you had documented some more of the assembly steps, and you have to do a writeup, and comment your code, and create a repository for it, maybe think about licensing. All of a sudden, the actual project was only the beginning, and now you’re stressing out about all the other things involved in telling other people about your project, because you know from past experience that there are a lot of haters out there who are going to tear it down unless it’s perfect, or even if it is, and even if people like it they are going to ask you for help or to make one for them, and now it’s 7 years later and people are STILL asking you for the source code for some quick little thing you did and threw up on YouTube when you were just out of college, and of course it won’t work anymore because that was on Windows XP when people still used Java.

Take a deep breath. We’ve all been there. This is an article about finding a good solution to sharing your work without dealing with the hassle. If you read the previous paragraph and finished with a heart rate twice what you started, you know the problem. You just want to share something with the world, but you don’t want to support that project for the rest of your life; you want to move on to new and better and more interesting projects. Here are some tips.

Continue reading “The Anxiety Of Open Source: Why We Struggle With Putting It Out There”

Inside Mechanical Calculators

For as busy as things can get at the grocery store on a typical afternoon just before the dinner hour, at least the modern experience has one thing going for it: it’s relatively quiet. Aside from the mumbled greetings and “Paper or plastic?” questions from the cashier, and the occasional screaming baby in the next aisle, the only sound you tend to hear is the beeping of the barcode scanner as your purchase is tallied up.

Jump back just 40 years and the same scene was raucous, with cashiers reading price tags and pounding numbers into behemoth electromechanical cash registers. Back then, if you wanted help with any arithmetic with more than just a few operations, some kind of mechanical calculator was your only choice. From simple “one-banger” adding machines to complex analog computers, mechanical devices were surprisingly capable data processing tools. Here’s a brief look at how some of the simpler ones worked.

Continue reading “Inside Mechanical Calculators”

Decellularization: Apples To Earlobes

Our bodies are not like LEGO blocks or computers because we cannot swap out our parts in the living room while watching television. Organ transplants and cosmetic surgery are currently our options for upgrades, repairs, and augments, but post-transplant therapy can be a lifelong commitment because of rejection. Elective surgery costs more than a NIB Millenium Falcon LEGO set. Laboratories have been improving the processes and associated treatments for decades but experimental labs and even home laboratories are getting in on the action as some creative minds take the stage. These folks aren’t performing surgeries, but they are expanding what is possible to for people to do and learn without a medical license.

One promising gateway to human building blocks is the decellularization and recellularization of organic material. Commercial scaffolds exist but they are expensive, so the average tinkerer isn’t going to be buying a few to play with over a holiday weekend.

Let’s explore what all this means. When something is decellularized, it means that the cells are removed, but the structure holding the cells in place remains. Recellularizing is the process where new cells are grown in that area. Decellularizing is like stripping a Hilton hotel down to the girders. The remaining structures are the ECM or the Extra Cellular Matrix, usually referred to as scaffolding. The structure has a shape but no functionality, like a stripped hotel. The scaffolding can be repopulated with new cells in the same way that our gutted hotel can be rebuilt as a factory, office building, or a hospital.

Continue reading “Decellularization: Apples To Earlobes”