Friday, September 18, 2015


Everyone needs a project that gets them started with a new technology, but I'm a little late to the party on this one. It seems like everyone is throwing lithium batteries in their projects, but I've never really gotten around to playing with one. They have really finicky charging requirements, which can result in fire or explosion if they're not met. But the power density in them is great, and assuming the charging is going well, they last for a really long time. Anyway! I found this rechargeable flashlight laying around the house, but the battery wouldn't hold a charge for longer than a minute. Time to replace the battery!

After getting the case apart, I found this little guy in this great big enclosure:

It's a lithium ion battery, which I haven't ever worked with. But hey, how hard could it be? For this project I'll be soldering directly to some new batteries, and lithium batteries can get a little unstable so I took the necessary precautions.

It's great for use on electrical fires! Any way, the old battery was only 2200 mAh, which I decided (relatively arbitrarily) was too small. So I found some (slightly larger) 3500 mAh batteries on Amazon.

I had to solder leads directly to each terminal of the batteries. This is no joke, as overheating a lithium battery can result in fire and/or explosion. I used some tape rolls to keep the batteries upright for this delicate procedure.

Basically, I heated up a bunch of solder on the iron and let it drip onto the battery terminal. I sanded down the terminals so they were roughed up, and surprisingly this procedure worked without heating the cells and damaging them. With all the wires on the batteries taped down so they don't get loose, I tied them in to the flashlight and its internal charging circuit.

Oh, did I mention that the package from Amazon had two batteries in it? Might as well use both and get that weak, sad 2200 mAh up to 7200 mAh. I haven't tested the charging circuit on the increased capacity yet, but I assume it will work OK. If not, it'll be on my concrete patio for the first few charging cycles. Just in case.

Monday, June 8, 2015

Bluetooth in a 60s-era Record Player

My grandparents recently moved out of a five-bedroom split-level house into a two-bedroom apartment in a retirement community. When they moved they asked me if I wanted any furniture out of their house for my own house, and I immediately responded yes, I wanted their record player.

I know, you might be thinking "a record player isn't a piece of furniture" but wait! This one is:

These were called "consoles" I think. They're huge, and they're made to look like a piece of furniture during a time when a TV was also a giant piece of furniture. Growing up, my family would take trips up to Virginia to visit my grandparents, and about the time I was in middle school I realized how awesome this piece of furniture was. I used to play music on it all the time (although my dad and his sisters had already taken their awesome records, so the records that remained were slim pickins).

I picked it up in winter of 2013 right after I bought my first house, and it pretty much just sat around. I have a lot of records but I don't play them that often, so I started thinking I could get a little more utility out of it if I could modernize it a little bit. And wouldn't you know, I had a little Bluetooth receiver in my parts drawer just waiting to be used!

First of all, I had to take the back cover apart to see what I'm working with. While the woodworking on this antique is flawless, the electrical could use some modernizing as well, so in addition to adding Bluetooth I also decided to re-wire the speakers.

This block, I found out, was a set of filters. The cabinet has four speakers, two for each side of the stereo. One of those two plays higher frequency sounds (the "horn") and the other one plays low frequency sounds (the "woofer"). The speakers were still in good shape (surprisingly, for being about 50 years old) so I just replaced the old 18-gauge loose wire with new 12-gauge balanced speaker wire

Above is some of the old wiring, but it shows the woofer on the left and the horn in the middle.

This block was bolted to the underside of the electronics for the radio. I should also note here that I use the term "electronics" very loosely, since this was the 60s it still wasn't common to use integrated circuits or transistors for most things, so the radio is full of tubes and is very heavy, and the record player is largely controlled mechanically. This is even more of a feat, as the record player is automatic. I'm spoiled by having access to programmable, cheap microcontrollers and therefore am flabbergasted how they could do all of this without the tools that I have.

After rewiring everything, I decided that it would be a good idea to add a second amplifier (from a car) and switch the speakers into the new amplifier with a set of relays. This is much easier than trying to figure out where the audio pathways on this antique record player are, and trying to impedance-match all of today's modern audio electronics to it.

I took this board out and cut a hole for the new amplifier, then mounted its mounting bracket. I also re-wired the switch above to turn the new amplifier on and switch the speakers over to it. When the switch is off, the record player and old radio are wired to the speakers, and when the switch is on the new amplifier is wired to the speakers. I did this via a set of double-pole single-throw relays, one for each side of the stereo.

New head unit/amplifier and switch installed on the left side of the cabinet. The switch originally was for selecting between internal and external speakers.

At this point I could wire up the Bluetooth receiver. The new amplifier had a 1/8" stereo jack in the back that I plugged the receiver into. I installed a power strip inside the cabinet which powers the new amplifier and the Bluetooth receiver. The amplifier is plugged in using a 120V AC to 12V DC converter originally used for a printer, so it has an ampacity of around 5A, more than enough power for this old stereo. The Bluetooth receiver is powered by an old USB cell phone charger. The receiver also has a battery in it, but I just leave it on, plugged in, and charging all the time.

I completed this project back in January and it's still going strong! As I anticipated, once I can easily hook up modern technology to it (my phone), I've been listening to music a lot more with it. It's become my primary stereo in my house now, and it has a great antique look to boot! Also, it has a front auxiliary jack in case you have an old MP3 player or something, and a CD player too! I've used all of these new features, but I'm also happy the record player still works as well!

Wednesday, October 1, 2014

Sunrise Alarm Clock

I usually get pretty aggravated when I get asked if I'm bored by someone who sees me yawn, especially at work. There's a major difference between being bored and being tired! To that end, I decided I'd make a sunrise alarm clock to help improve my sleeping habits. The idea here is that a gradual increase in light helps one's body wake up more naturally, instead of being jarred awake by an audio cue.

The first step was to take an old Wal-Mart alarm clock I had lying around and cut all up into it! As Tim "The Tool Man" Taylor says, before there can be CONstruction there must be DEstruction. He was very wise.

There is clearly one pair of wires going to the speaker, so to keep from reinventing the wheel I used the alarm and timekeeping functionality of the clock and simply cut the speaker out of the circuit, and attached the speaker wires to some input pins on an ATtiny microcontroller. (The Arduino in the picture below is only being used to program the ATtiny.) I didn't want to program a whole clock from scratch if I didn't have to.

I really like this picture because it looks like that one scene in Contact when Ellie Arroway is about to drop through the extremely energetic center of the second machine:

Anyway! The theory seemed to work. When the buzzer sounds, the microcontroller in the clock would send a six volt square wave with a range of +12V to +6V. The ATtiny microcontroller I'm programming sees this signal instead and starts a PWM signal which drives an array of eight high-intensity LEDs. (The speaker is now disconnected.) The PWM increases a little less than half a percentage (1/256th to be exact) every eight seconds, which means that when the alarm starts, the LEDs gradually increase in brightness from off to full brightness over the course of about fifteen minutes. The time can be adjusted in the program if I find that this interval is too long or too short.

The clock had a 16VAC transformer in it, which I tapped off of (green wires) to get power for the ATtiny microcontroller. I built a full-wave bridge rectifier from scratch and regulated the output voltage down to +5VDC. The picture above is the rectifier part of the circuit before I soldered it all together. The red and black wires are from the speaker.

I used 8 LEDs. They draw a little over 100 mA when they're all on at full brightness. I wasn't sure if this extra current draw would overload the clock's transformer but so far everything seems to be OK.

I like the industrial look of exposed electrical components. My personal rule is anything over 40V is dangerous and anything under that is totally OK. (In my job I routinely work with 500 kV so this seems very reasonable!) Your mileage may vary however. Don't be an idiot. The picture above was taken with an extremely short shutter period, while the picture below I think more accurately represents how bright the LEDs are.

One problem I was having at first was that the LEDs would pulse very slightly. It seemed like they pulsed along with the square wave for the alarm which had about a 1 second duty cycle. It turned out that this was entirely coincidental, and they were pulsing because the rectifier I built didn't have a capacitor big enough to keep the voltage across the LEDs high enough. The LEDs would draw current, the voltage would drop, the LEDs would dim as a result, and then when the current dropped the voltage would increase again, and this cycle would repeat about every 1 second. Totally coincidence that this is how often the alarm would buzz, which had me pretty confused for a while. Once I realized they only pulsed when they got brighter (which means a higher current draw) I just threw a huge capacitor in the circuit, which is clearly visible in the picture. For the non-electrical engineers out there, it's that big cylinder on the top left. For the electrical engineers out there, this has the effect of increasing the RC time constant of the circuit. Remember college? Fun times.

This thing is crazy bright although it doesn't do a good job of uniformly illuminating the whole room. Mostly it just blinds me when I go to hit the snooze button. But it does work and it has succesfully woken me every time I've used it. I did wire the LEDs on the board in such a way that I could easily cut into the power wire for them and splice in more lights, though, which I could theoretically put anywhere. That'll be a project for the future though. 

Monday, September 15, 2014

FAA Light

A few weeks ago I got an FAA warning light to play around with. The light goes on top of tall poles or buildings to warn airplanes. As it happens I was looking for a red LED to go in my bathroom. The idea is that red won't confuse my brain into thinking it's daytime if it isn't. That's probably enough information, so here are some pictures! All I had to do was wire a three-prong plug to it so I could plug it into the wall. The only problem is that the FAA warning light is really, REALLY bright. For obvious reasons. Anyway!

Monday, August 11, 2014

Pictures from the Beetle's Carburetor Rebuild

A lot has been going on lately. I sold a house, moved to the city, started a second job, and just started studying for the Professional Engineering exam. So putting pictures of the Beetle's carburetor (34 PICT-3) has kind of taken a back seat, so to speak. Anyway, here are some of the highlights!

The freshly-removed carburetor, before I removed any of the bits. It's a little dirty.

I found out later that this solenoid is the "idle air cutoff". I don't really know what this means and I can't get anyone to tell me, but I found out later that the Beetle was stalling a lot when it would slow down, which was presumably caused by this little valve being loose. So after I screwed this in tightly it stopped stalling.

Automatic choke collar.

Removing the automatic choke. This had a little problem where it wasn't set properly. I had to turn the whole assembly clockwise after I reinstalled it to make sure it would actually choke the engine when it was cold.

Automatic choke parts

Removing the top half

I don't remember what this part is for.

Automatic choke housing.

Fuel inlet needle. (Controlled by the float)

Old float removed. I lost the pin when I put the new float in and ended up making a new one from a long screw. Then later on I found the pin right in the middle of my work bench. Murphy's Law of carburetor rebuilds.

Another valve I don't remember what it does off hand.

Replacement gaskets.

After I put it all back together it's pretty easy to see the color difference. The car ran amazingly after this, and even better once I figured out that that solenoid was making the car stall.

Don't worry, I put the air filter on after I flooded the engine and killed the battery. Learn by doing!

Thursday, May 22, 2014

The Beetle!

So I haven't been doing a whole lot of electronics projects lately because a few months ago I decided my mechanical skills could use some work, and my latest project has tested my limits in that field! It's...


What makes it "super" is that the front suspension is a MacPherson strut assembly rather than the old style torsion bar/kingpin setup which basically just saves some space in the "frunk" and makes replacing suspension parts a little harder, but improves ride quality and turning radius. Great!

There are some minor problems, what with the car being 42 years old at the time of this writing, namely the four-ish oil leaks in the engine. The pushrod tubes, valve guide seals, valve cover gaskets, and some other things leak a minuscule amount of oil each that adds up to me having to put a half quart of oil in about every 200 miles.

This is ok though because from what I can tell the piston rings are still in good shape so it's a ways off from REALLY needing an engine rebuild.

Also cool is that it was made in "West" Germany:

It has the Wolfsburg crest on the steering wheel too, for further proof of its authentic German-ness:

Apparently the Nazis built Wolfsburg to start building Volkswagens. Another brief history of that car was that Ferdinand Porsche needed to build the Beetle really quickly for Hitler, and so based a lot of it on the Tatra, a car Hitler liked from Czechoslovakia. Well, Tatra sued Volkswagen over that and Porshe asks Hitler what to do, to which he replied basically "Don't worry, I'll take care of it." Then he invaded that country and shut down the Tatra plant. Tatra eventually won a lawsuit in 1968 but not before the Beetle became world famous!

Also, my Beetle was made after Volkswagen acquired Audi, so it shares some of the same parts as Audis from that time:

All in all, this car is brilliant. It runs well but it needed to have the carburetor rebuilt (which I've done, that'll be the next post here). I've always wanted a Beetle but I was finally convinced to buy one because the ECU (computer) on my truck went bad and cost me a huge chunk of money to fix (plus the dealer had to program it), so I decided I needed a car that I could fix anything on. They're easily the simplest cars ever built. The air-cooled engine means no radiator, it's simple to remove from the engine from the car if I ever need to, plus there's no A/C or power steering or anything else to complicate things, and parts are everywhere. Plus it's just fun to drive and downright cool.

I was accidentally in a car show and might have been a little out of place though!