Finished: Metal Gear Solid 5 - The Phantom Pain

2016-02-04 20:32 - Gaming

I've spent the vast majority of my free time since Thanksgiving, save some time traveling, on my PS4 playing MGS5. Last night I finished hitting 100% completion in game, and tonight I finished creating and then destroying a nuke, for the final trophy in the game to also earn the "earned all trophies" trophy. Two hundred and twenty seven hours played. I enjoyed this one quite a lot.

Sink Repair

2015-12-28 18:16 - General

Sink and vanity top removed.

Helping my mom replace the bathroom sink. The lifter for the drain went, so the plumbing needed to come undone, so she wanted to replace the old rising sink, so we ended up getting a new top with integrated one piece sink.

The replacement is in.

It's not 100% done but it looks nice.

Watch Mania

2015-11-01 22:22 - General

A short while back something made me wonder what a Rolex really costs. It's a lot. But despite not wanting to spend thousands, I was still left with a hankering for a different wristwatch. Long story short, now I've got a collection. Today I had to fix them all thanks to daylight savings, so I decided it was a decent time to take a picture.

Left to right: a Casio with a camera built in, a Casio which can record voice memos, a Highgear with thermometer and barometer built in (I wore this before the one I regularly wore before this collection exploded), a Casio calculator watch, a Nike with several workout-tracking features, and a really big display, a TI ez430 programmable, a Seiko (a very old gift) analog quartz, a Seiko UC-2000 (an awesome vintage dot-matrix watch with external keyboard for note taking), the Citizen Skyhawk (solar powered, no winding, no batteries!) I wore just before building this collection, and a Casio AW80D.

And there's what ended up being a few purely mechanical watches still in the slow-boat mail from India. But I'm done buying watches now, I swear. Except a couple quirky ones I'm watching on eBay, but only if they stay cheap, I swear!

Assembled: DSO 130 Oscilloscope Kit

2015-10-25 11:45 - Making

First, the surface mount parts are installed Next some of the through hole parts: here resistors, chokes, and diodes. Fully assembled and working DSO 138 kit.

I ordered a DSO 138 kit recently, and it arrived yesterday. Much of my evening was consumed with assembling it. This is a simple digital oscilloscope with a 2.4" LCD display, and only a 200kHz bandwidth. That's too low to be of much use, but I have an audio range (only up to 20kHz!) task to put it towards, and it was only $20.

The cheap kit I got came with lots of small parts, and basically none of them labeled, so it took a few hours to put everything together. That went mostly without issue, besides being tiring to lean over the work for that long. Once it was together, it didn't work! Oh no! I stopped for dinner and long story short a few hours later I realized the issue: I used my "proper" electronics power supply, with current limiting. This saves electronics from blowing up if there's problems, by not providing enough power to cause damage. I still had it set too low, so it wasn't providing enough power for correct operation! A twist of the right knob made it all work, and showed that there were no shorts anywhere: current draw stopped at right around the expected value.

All that's left is a bit of the calibration procedure. I just need to find a tiny screwdriver small enough to fit into the tiny adjustable capacitors, the round little green things near the top left of the final picture, between the display and the switches. I got rid of my cheap "jewelers screwdrivers" set when I got a much better iFixit set of drivers, but this is at least the second time that I've found it doesn't have the right thing. When it's the right size they're great drivers, but it's only got one flat head, too wide for this purpose.

Other than that, a nice way to spend a long afternoon!

Project: VFD Clock

2015-08-08 18:00 - Making

My past two posts have hinted at the project that I've just "finished" (final notes on that towards the end). It was the confluence of a few things. Besides, of course, generally enjoying my recent work in electronics projects, first I wanted to try a new microcontroller. I've used Arduino, and designed projects directly around the ATMega microcontroller it's based on. While it's great within its sweet spot, there's very little room to grow past its maximum limits (32 kB flash, 2 kB ram, 23 GPIO pins, 20MHz). Its maker, Atmel, has some bigger chips, but if you're going to switch from the Arduino world, why not go far afield? I picked the STM32 line, which has one especially nice feature: hardware supported interactive step-through debugging.

But I needed a practical project to apply it to. When I discovered the "IV-22" VFD (vacuum fluorescent display), I had it picked: a clock. Not a super complicated project, but I've had fun with it, and I'll end up with a curious looking thing to leave on my desk at work. These tubes are unusual in their shape and look, which I like.

Both sides of the PCB I designed for this VFD Clock project. Solder paste applied to the PCB.

Here's the PCB I designed for this project. It's the biggest I've ever had made, but much of that space is taken up to hold the tubes across the top and little else. There's lots of surface-mount parts covering the rest of the front of the board. Step one is to apply solder paste to attach them. I laser cut a stencil out of plastic, and squeegeed the paste over it with an old credit card. If you look closely, you can see a few spots I missed, like the far pads of chip U5 near the middle. These were touched up by applying a bit more paste with a toothpick. There were only a small handful of these errors.

Surface mount parts populated on the PCB. After soldering the surface mount parts.

Solder paste is quite a bit like toothpaste, except it's toxic and grey. It's just sticky enough that the parts can simply be placed onto it, and they stay put where they need to be. The first picture shows after this step is completed. A good set of tweezers helps you lift each of the parts (some being very tiny!) into place correctly. The picture on the right is after the soldering process, which in this case just meant putting the whole thing in a skillet on the stove. Look closely again at U5 and you can see that the spots I needed to touch up by hand leave just a bit of solder residue scattered around, but otherwise everything is tight and clean, looking quite professional. After this was a lot of work to solder in the rest of the through hole components one by one.

My VFD clock, powered on and operational.

Finally, here it is turned on and working. It's very difficult to photograph. On screen the digits look washed out, but in person they're clear and easy to read.

It's not truly done yet though. The plastic stand is not the right shape to both support it and also not be placed in the middle of something else, so that needs tweaking. I currently can't fit the power cord into the jack with the legs installed. I'm also only mostly done with the software part of it. While the new STM32 chip is much more powerful, with lots of great features, it's also very hard to work with. Documentation is often dense and difficult to comprehend clearly. I've worked through several little things where I felt stuck for a while, then after several tries and several returns to the internet to discover new information, finally I figure it out. Right now I'm stuck on getting the time data to work from the battery backup while power is disconnected. I should be able to do this, and I think it should be easy. But it's not. It will take time to figure out the secret detail that I don't quite know yet.

Mini PCB Fab Comparison Review: Osh Park, DirtyPCBs, Elecrow

2015-08-03 22:05 - Making

In the past several months I've designed and had fabbed several different PCBs for three separate projects. I also happened to use three different PCB fab houses for each project, for reasons I'll describe below. I decided it might be worth going into a mini review for comparison of the three. I've got no better order than when I happened to use them, chronologically, so first up is OSH Park.

The NES receiver board for my nesRF project, fabbed by OSH Park.

This board was for my nesRF project. It's not a wonderful example (very simple, especially for the size), but I still had two unused ones which were easy to scan side-by-side. I had specifically selected OSH Park for this project because part of it involved designing pads for conductive rubber pill buttons. OSH Park is a slightly more premium shop, they include ENIG (gold plating) by default in their base price, and I figured that could be valuable for the high physical stress those pads might be exposed to. I stuck with them for the four different boards in the project.

The feature and cost balance is OSH Park's high point in my opinion. They charge purely by the square inch, which is great for small (e.g. many hobbyist) boards. I re-spun the smallest board in this project to add an external crystal for the AVR, and it only cost me $4 and change to do so, including shipping. They're also in the USA, which is generally nice (if you are as well), plus helps with the shipping times. OSH Park's primary downside for me is that they're a panelizing service, and what you're left with is arbitrarily positioned mousebite connectors, half still hanging to your board (as you can see above). I got really unlucky with one board from them, they happened to leave that rough edge in a spot I really needed to be flat as designed, so I got to very carefully Dremel it back down to flat. There's also the purple board issue. It's a nice premium/unusual color, but you get no choice in the matter. Because they panelize, everyone gets the same options: 1.6mm, purple, ENIG. Period. Finally, you always get a multiple of three from them. This can be good or bad depending, but is fewer than the other two suppliers I'll get into, so you're paying for less wastage if you don't need many copies. Overall I consider them to be premium quality, but still very affordable.

The TE-1509 memory expansion board, fabbed by DirtyPCBs.

Next up is a little board I had made at DirtyPCBs. I had learned of their existence only shortly before starting this project and was interested in giving them a shot. For this one, I absolutely had to have a 1.0mm thick board, and I knew DirtyPCBs could do that. These PCBs are indeed "dirty" though. Their "protopack" option (the cheapest, which I selected) gives you about ten copies, which was far more than I needed. Several of them had scuffs and scrapes when they arrived, but these were just cosmetic issues. The picture isn't fine enough to show it, but in person I can clearly see fine marks on every pad: evidence of flying-lead electrical testing. I like that I know it was done; this must be where the "about ten" number comes in. Unlike OSH Park, these boards are made individually, so you get choice of finish, color, and thickness. They're also individually routed, which is great. Mine came with an obvious little bit of flash left, consistently in the same spot. A little nub a quarter of the way down one of the long sides. Dirty. But also very affordable.

The PCBs for the VFD clock project I Detail view of the micro vias in this board fabbed by Elecrow.

Finally we've got my latest project, these boards just arrived today. This one is what made me decide to put this review together. I learned about PCB Shopper between this project and the last. A wonderful service that allows you to input your parameters, and automatically compare providers capable of those parameters, by price. That's how I selected Elecrow to fab these boards. They're exactly 5x15cm, which fits right into the sort of size range that some services base their prices on. One thing I have to mention up front which made me very happy with Elecrow: I left a design mistake in this board. I custom built the footprint for the display tubes, and I clicked a box wrong, neglecting to pull the solder mask back from the bottom layer. They noticed this, produced an image pointing it out, and asked me if it was intentional. It was not, I fixed it and sent them an updated design, and they produced that instead. Saving me either a lot of hassle trying to solder those connections, or time and money re-spinning the boards. I was very impressed.

As for the boards themselves, it's the first where I really pushed any boundaries. The previous projects I mostly used KiCAD's default settings, picking tolerances and clearances that I knew to be well within all fabs' abilities. In this case though, I desperately wanted to squeeze in the data bus which spans the bottom layer (which is on the top of this image) into the spot it is there: down the middle of the chips. I had to create tiny vias, only 12 mil (thousandth of an inch) diameter holes, drilled into pads only 20 mil diameter. The second picture shows a detail view of a cluster of these vias, which is right down at the minimum tolerances Elecrow claims to support. (This compared to the default size vias, the one in the lower left of this detail picture, at 25 mil holes in 35 mil pads.) I've only electrically tested one board, but it's got all of these 24 data pins connected together correctly.

There's also plated slots in the power connector, and non-plated mechanical holes. Both of these are a bit rare and/or added expense, and they're done correctly as specified. For this size Elecrow was also the cheapest provider I could find, which makes me very happy with this array of features and customer support.

Unfortunately I don't have specific times from order to receipt of these boards anymore, so I can't compare complete delivery time. This would be unfair anyway, as I selected different options. My email records show that the OSH Park order was placed on April 17th, with shipment notification on the 28th, or an 11 day/7 business day turnaround. DirtyPCBs' email records show order to shipment notification of May 11th to 17th, or seven days/five business days. Finally Elecrow was July 25th to the 31st, or the same seven days/five business days. (And I already have the boards now because I sprung for the "2-3 day DHL" shipping option this time).

The Case of the Wrong Resistor

2015-08-03 17:52 - Making

My very incorrect set of resistors.  Dime for scale.  They

Phooey. The PCBs for my clock project arrived today. The silver lining is that I caught this issue early, by diligently preparing all of my the components I would need into a convenient arrangement before I got started. But the issue is that I've got a set of 54.9 ohm resistors, where I need 54.9k ohm resistors. Only off by a factor of a thousand ...

This is totally my mistake, a hasty mis-entry when ordering. But you can also see (from the date at the top of the label) that I placed the order just over a month ago, and didn't catch it until now. I could be assembling right now, but I didn't check until the last minute. Now I've probably got to place another order (where could I get these locally, in just the right value?) and pay shipping and the delay again. And if I've gotta place another order and pay shipping anyway, I'll probably end up buying extra components. I've got six PCBs (PCB fab houses have strange minimum orders), but only enough components to assemble two of them.

Teardown: Leader LPS-152 Power Supply

2015-07-31 21:13 - Making

If you browse the recent archive of my making topic posts, you'll see I've been having lots of fun on various electronics projects for several months. A short while ago I managed to pop the (expensive HRC) fuse in my meter and let the magic smoke out of (thankfully only) a resistor when I probed the wrong current path in the circuit I was testing. Why? Because I was using the wrong power supply, and when I did so, the full eighty watts or so that the (laptop brick) supply in use managed to pump through the two watt resistor in question, not to mention sending almost 4 amps through the 0.44 amp limit current range I was using in my meter, before I saw and reacted.

A "proper" electronics bench power supply supports not only setting which voltage but also which current (limit) to provide. If I had been using one, knowing that I only expected a couple dozen mA to be consumed, I would have set an appropriate limit and never applied enough power to damage anything. I've been getting away with simple fixed-voltage supplies like USB ports, 5V USB adapters, and these laptop power bricks for too long. So I started scanning eBay for a power supply that would let me limit both the voltage and current to an arbitrary level. It took a while, since these things are very expensive (relative to my expectations for such a "simple" device), for me to pick one I was willing to pay for. I ended up with this, a vintage Leader LPS-152 power supply.

The Leader LPS-152 front panel.

Here's the front panel. A couple minor scratches and scuffs, but quite good overall. Analog meters, but they're fine for the purpose. This is a triple output supply: it has one output that goes from 0V to 6V, and up to 5A, plus one each that goes from 0 to +/- 25V, and up to 1A. I'll rarely if ever use the negative supply rail, but it's possible to combine them to produce up to 50V safely. The first thing I did was test all three, and they work great, both to set the voltage and to limit the current.

I managed to find a copy of the instruction manual online (the internet is great!), which has not only a complete set of operating instructions, but detailed testing and calibration procedures as well. Plus a full parts list, PCB layout diagram, and schematic! There's a ton of passives and discrete diodes and transistors. And only four ICs, all opamps. The design dates this item a bit. So let's open her up and take a peek inside!

Overall view of the inside of the Leader LPS-152, from the top. The back of the meter board, from the inside. The adjustment knobs on the other side ("outside") of the meter board.

First we've got an overall view, from above. The front of the supply is at the left, with the giant heat sink at the rear is on the right side of the image. The giant transformer dominates the image at the top middle, with a black metal bracket bolting it to a support crossing the width of the supply. I like the attention to detail in here. Most everything is attached to the PCB that fills the background of the image. Next we see the smaller "meter board" first from the back, and then the front/outside, where several pot's knobs are accessible through a cutout in the body of the supply. This is how you perform the calibration procedure from the manual.

Three test points are clearly visible at the bottom right, with another hidden up and to the left in a shadow. Four beefy transistors are bolted to the huge heat sink at the back of the unit.

Test points are liberally sprinkled across the board, with voltages clearly marked on the silkscreen. I'll certainly be able to repair things if that ever proves necessary. And I had to take note of the four huge transistors across the back. They're obviously doing the bulk of the regulation work. I looked into the schematics of various supplies for a bit as I was shopping around, trying to understand why they are so expensive. It didn't help; several schematics fit easily on a single page, and (at least for the basic models) are virtually all just a beefy linear regulator tied to an opamp or to to control regulation. The same goes here except that the circuit is all discrete parts. Not a linear regulator IC, but discrete components set up to do the same job.

There are only four ICs in this product.  This one seems to show a date code: 24th week of 1988. The capacitors are Nippon Chemicon, a top quality brand. Note the metal rod carrying the control of the power button from the front panel all the way to the switch at the back.

Finally let's wind down with some fun smaller points. As I said above there are only four ICs. Two of them (one smack dab in the center, one nearly hidden by shadow in the top right) show a likely date code: 24th week of 1988, which if correct means this is a twenty seven year old unit, and still working great. The capacitors are mostly very hard to see, but as best I can tell, like this one that is clearly visible, they're all Nippon Chemicon, which is a top quality brand. Probably helps explain why this thing still works great after almost three decades. Also a fun product design note: the power button is (appropriately) on the front panel, but the actual switch is all the way in the back. A metal rod carries the force all the way along the body. Look carefully and you can see a tiny set screw holding things together. Another indicator of quality design; a price-optimized unit would probably have done something cheaper like a friction fit, more likely to wear out, possibly beyond repair, over time.

So, overall I'm quite pleased with my purchase. It was a steal at only $30 (plus $22 shipping). Hopefully I won't blow up any more things now that I have it!

VFD Clock Prototype

2015-07-20 18:34 - Making

Some time around early May I discovered the IV-22 (NB-22, ИB-22) Vacuum Fluorescent Display tube. This is an old Russian technology from (I think) the 1960s. It's a standard seven-segment digit display like in modern electronics, but it's a vacuum tube, and it's a fluorescent display. I'd been interested in a big enough project to experiment with the STM32 processor as well, so I decided to make a clock out of them. I've only been trying off-and-on, including some waiting for the mail, but it has taken me since May, it's not a small project.

The first working prototype of my VFD clock, wide angle.  Including messy project table! The first working prototype of my VFD clock, close angle.

And here's where I've gotten: the first working, though very simple, prototype. VFD tubes are a cousin of the (slightly) more famous Nixie tubes. Nixies can require up to 150 or 200 volts to illuminate. VFDs are not so demanding, they can light up with as little as 12 volts, but really "want" 20 to 30. The only truly complicated bit is that you also need a very low voltage (just over one volt) to power another part of it. Both very low and middling high means you have to design carefully.

Here I'm running it from just shy of 20, with two chips. The chip on the bottom (a CD4504) translates low voltage input signals (3.3 V) to that high level (20 V). The top chip is a decoder/driver (a CD4056); each digit needs one, but it shares the input signals and keeps the right segments displayed the whole time. You can see I've got it displaying a 5, with the decimal point on too. The bluish glow of the fluorescent phosphor is pretty unique. And the VFD technology is also very interesting.

Just by plugging the four wires in the very bottom right into a low-(logic-)level high or low I could easily get the driver chip to display all the digits. Ironic enough though this is the first tangible result, I'm actually almost done! All along I've been designing (and re-designing) the circuit, and the PCB to hold all the parts. Once I was convinced I had a working design, I ordered the parts, waited for the mail, and tried a test. That's when I realized that while the CD4056 has level shifting built in, it's not compatible with the specific kind I need to do. So I placed another order including the CD4504 chips, waited for the mail again, and then performed this successful test.

Now all I've got to do is relax, double check everything, make sure ... Then order the PCB, the most expensive part. And wait for it in the mail. And put it together. And finish writing the software that will actually make it a clock, rather than a complicated paper weight. Maybe I'm not almost done.