Circuit Design? Spread the Joy

Accountants and MBAs use spreadsheets to play “what if” scenarios with business and financial data. Can you do the same thing with electronic circuits? The answer–perhaps not surprisingly–is yes.

Consider this simple common emitter amplifier (I modeled it in PartSim, if you’d like to open it):

In this particular case, there are several key design parameters. The beta of the transistor (current gain) is 220. The amplifier has an overall voltage gain of about 3 (30/10). I say about, because unless the transistor is ideal, it won’t be quite that. The supply voltage (Vcc) is 12 volts and I wanted the collector voltage (VC) to idle at 6V to allow the maximum possible positive and negative swing. I wanted the collector current (IC) to be 200mA.

Continue reading “Circuit Design? Spread the Joy”

RGB LEDs: How to Master Gamma and Hue for Perfect Brightness

You would think that there’s nothing to know about RGB LEDs: just buy a (strip of) WS2812s with integrated 24-bit RGB drivers and start shuffling in your data. If you just want to make some shinies, and you don’t care about any sort of accurate color reproduction or consistent brightness, you’re all set.

But if you want to display video, encode data in colors, or just make some pretty art, you might want to think a little bit harder about those RGB values that you’re pushing down the wires. Any LED responds (almost) linearly to pulse-width modulation (PWM), putting out twice as much light when it’s on for twice as long, but the human eye is dramatically nonlinear. You might already know this from the one-LED case, but are you doing it right when you combine red, green, and blue?

It turns out that even getting a color-fade “right” is very tricky. Surprisingly, there’s been new science done on color perception in the last twenty years, even though both eyes and colors have been around approximately forever. In this shorty, I’ll work through just enough to get things 95% right: making yellows, magentas, and cyans about as bright as reds, greens, and blues. In the end, I’ll provide pointers to getting the last 5% right if you really want to geek out. If you’re ready to take your RGB blinkies to the next level, read on!

Continue reading “RGB LEDs: How to Master Gamma and Hue for Perfect Brightness”

Almost Fail of The Week: Doing Surface Mount Reflow Wrong In Every Possible Way and Still Succeeding

Sometimes the best way to learn is from the success of others. Sometimes failure is the best teacher. In this case we are learning from [Tim Trzepacz]’s successive failures in his attempt to solder one board to another using a reflow oven. They somehow cancelled each other out, and he ended up with a working board. For those of you who have used a reflow oven, there will be eye rolling.

[Tim]’s first mistake was to use regular solder instead of paste. We can see how he got there logically; if you hand solder an SMD you melt solder onto the pads first to make it easier. However, the result was that he had two boards that wouldn’t sit flat on each other thanks to the globs of solder on the pads.

Not to be deterred, he laid the boards on top of each other and warmed up the oven to a toasty 650 degrees. Well, not quite. The dang oven didn’t turn to eleven, so he figured 500 would probably work too. Missing the hint entirely, he let his board bake in a nearly 1000F oven until he noticed some smoke which, he intuitively knew, definitely shouldn’t be happening.

The board was blackening, the solder mask was literally bubbling off the substrate, people were coming over to see the show, and he decided success was still possible. He clamped the heated boards together with a binder clip until they cooled. Someone gave him a lesson on reflow, presumably listened to through reddening ears.

Ashamed and defeated, he went home. However, there was a question in his mind. Sure it looks bad, but is it possible that the board actually works? After a quick test, the answer was yes. It loaded some code and an time later he was happily hacking away. Go figure.

Tearing into Delta Sigma ADCs Part 2

In part one, I compared the different Analog to Digital Converters (ADC) and the roles and properties of Delta Sigma ADC’s. I covered a lot of the theory behind these devices, so in this installment, I set out to find a design or two that would help me demonstrate the important points like oversampling, noise shaping and the relationship between the signal-to-noise ratio and resolution.

Modulator Implementation

modulatorCheck out part one to see the block diagrams of what what got us to here. The schematics shown below are of a couple of implementations that I played with depicting a single-order and a dual-order Delta Sigma modulators.

schematicBasically I used a clock enabled, high speed comparator, with two polarities in case I got it the logic backwards in my current state of burn out to grey matter ratio. The video includes the actual schematic used.

Since I wasn’t designing for production I accepted the need for three voltages since my bench supply was capable of providing them and this widget is destined for the drawer with the other widgets made for just a few minutes of video time anyway. Continue reading “Tearing into Delta Sigma ADCs Part 2”

Metal Casting With Single Shelled PLA Masters

[3DTOPO] does a lot of metal casting (video link, embedded below). That’s obvious by the full and appropriate set of safety gear, a rarity on YouTube.

They had all the equipment to do it the normal way: craft or CNC out a master, produce a drag and a copy, make any necessary cores, and finally; pour the mold. This is a long and tedious process. It has a high rate of error, and there is a parting line.

Another set of methods are the lost ones. With these methods the master is produced out of a material like foam or wax. The master is surrounded by refractory and then melted, burned, or baked out of the mold. Finally the metal is poured in. Theoretically, a perfect reproduction is made without ever having to open the mold.
Continue reading “Metal Casting With Single Shelled PLA Masters”

[CNLohr]’s Glass PCB Fabrication Process

One of [CNLohr]’s bigger claims to fame is his process for making glass PCBs. They’re pretty much identical to regular, fiberglass-based PCBs, but [CNLohr] is building circuits on microscope slides. We’ve seen him build a glass PCB LED clock and a Linux Minecraft Ethernet thing, but until now, [CNLohr]’s process of building these glass PCBs hasn’t been covered in the depth required to duplicate these projects.

This last weekend, [CNLohr] put together a series of videos on how he turns tiny pieces of glass into functional circuits.

At the highest level of understanding, [CNLohr]’s glass PCBs really aren’t any different from traditional homebrew PCBs made on copper clad board. There’s a substrate, and a film of copper that is etched away to produce traces and circuits. The devil is in the details, and there are a lot of details for this build. Let’s dig deeper.

Continue reading “[CNLohr]’s Glass PCB Fabrication Process”

Baby Monitor Rebuild is also ESP8266 Audio Streaming How-To

[Sven337]’s rebuild of a cheap and terrible baby monitor isn’t super visual, but it has so much more going on than it first seems. It’s also a how-to for streaming audio via UDP over WiFi with a pair of ESP8266 units, and includes a frank sharing of things that went wrong in the process and how they were addressed. [Sven337] even experimented with a couple of different methods for real-time compression of the transmitted audio data, for no other reason than the sake of doing things as well as they can reasonably be done without adding parts or spending extra money.

receiverThe original baby monitor had audio and video but was utterly useless for a number of reasons (French).  The range and quality were terrible, and the audio was full of static and interference that was just as loud as anything the microphone actually picked up from the room. The user is left with two choices: either have white noise constantly coming through the receiver, or be unable to hear your child because you turned the volume down to get rid of the constant static. Our favorite part is the VOX “feature”: if the baby is quiet, it turns off the receiver’s screen; it has no effect whatsoever on the audio! As icing on the cake, the analog 2.4GHz transmitter interferes with the household WiFi when it transmits – which is all the time, because it’s always-on.

Small wonder [Sven337] decided to go the DIY route. Instead of getting dumped in the trash, the unit got rebuilt almost from the ground-up.

Continue reading “Baby Monitor Rebuild is also ESP8266 Audio Streaming How-To”