$5 Radio? Think Again.

My latest project has been unofficially going on for about four years now. When I was in high school I discovered that the Goodwill in the town I grew up in didn’t just have second-hand clothes, it had second-hand electronics. So I bought a Sega Genesis for $10 and an awesome purple tie for $2 before stumbling over this radio:

It is a Fisher Studio Standard AM/FM Stereo Synthesizer Tuner, FM-271A with 16-station (8FM/8AM) preset tuning system with electronic memory and a message on the back that says it is DESIGNED ONLY FOR USE WITH FISHER CA-270/CA-274.


I do not have a FISHER CA-270/CA-274, I only have this radio. At $5 it wasn’t like I was spending real money. Any way, this is apparently more of a problem than I realized at the time I bought it. When I got home and tried to turn it on, I noticed the following:


It only accepts 19V AC as input power AND it uses some weird, small, two-pronged thing to get it. The reason for this is that Fisher probably meant for it to be plugged into its partner amplifier only, so your average Joe couldn’t just go out and buy the radio without buying the accompanying $200 amplifier. Or however much it cost. You get the point.

But I’m not about to let some marketing scheme get me down. I’m going to build a power supply for it that will accept 120V AC and output 19V AC.

The solution for this problem isn’t as simple as it sounds. The problem is, in fact, many fold. (Many fold?) First of all, electronics like this nowadays generally want some sort of DC voltage as an input. The solution for this would be very simple: build a full-wave bridge rectifier and voltage regulator (the parts would cost about $5 all together, making this a $10 radio). The radio probably came out of the 80s before electronics like this got real big.

Secondly, I do not have the tools or materials to simply build a 120:19 step-down transformer. This would be the easiest solution provided I had those two key elements. The best I can do is a 120:25.2 step-down transformer from Radioshack (25.2V CT 2.0A Heavy-Duty Chassis-Mount Transformer with Lead), and then build a voltage divider out of resistors on the secondary of the transformer to drop the voltage down to the required 19V (the radio is considered the load).

Voltage Divider – Wikipedia

So the first step is to get the math straight. The sticker on the back of the radio says that the power specifications on the radio are 19V, 10W. The resistive component of the impedance of the radio is found to be 36.1 ohms because P=IV=I^2*R=V^2/R and 10=19^2/36.1. The current flowing through the radio is found to be 0.526A because V=IR and 19=0.526*36.1.

The supply voltage from the secondary of the transformer is 25.2V and the radio needs 19V, so using a voltage divider Vo = [R2/(R1+R2)]*Vi where Vo is output voltage (19V), Vi is input voltage (25.2V), R2 is the radio’s resistance (36.1), and R1 is the value of the resistance that must be found to build the voltage divider. This value is found to be 11.78 ohms, or, in engineering terms, about 12 ohms.

This is where another problem arose. The only place I could find any resistors with this small of a value was in a pack of 500 quarter-watt resistors from Radioshack. But just using a single 12-ohm, quarter-watt resistor as R1 in this voltage divider circuit would lead to a quarter-watt resistor absorbing about 3.32 watts, which would cause what we in the electric power industry call a “material failure.” So I had to dig through the rest of the 500 resistors to find a combination that would be equivalent to one 12-ohm resistor but also not let any single resistor dissipate any more than about .2 watts (to be on the safe side). This is the model that I determined to be the safest and best course:

Believe it or not, the first five rows of resistors make a 12-ohm equivalent resistor that dissipates the appropriate amount of power without overloading any single resistor. If I had had more resistors available to me that were of a particular value, I could have done a much simpler job, but that would have involved me buying more $12 packs of 500 resistors at Radioshack, most of which I will never use in the first place. Also, it is physically impossible to use less than fourteen quarter-watt resistors to dissipate 3.32 watts.

I’ve tested this model quite extensively in B2Spice and do not see any power dissipation issues and will hopefully get to work building the power supply for this radio this weekend.

NOTE TO SELF: FUSE THE CIRCUIT TO AVOID POTENTIAL FIRE.


OK I just built the resistor for my voltage divider. I built it according to the model and that came out a little on the high side (about 15 ohms) so I removed all of the 2.2 ohm resistors at the top of the circuit and added some more 100 ohm resistors in parallel on the bottom of the circuit which brought the resistance down to 12.4 ohms. Half an ohm is nothing, if the radio argues with this then I’ll do something more drastic.


Those ICs are just some operational amplifiers that I don’t have any place else to put. But yeah, there’s the circuit, and it should work fine once I buy the transformer and hook up a fuse in line with this. It’s coming together. And yeah, I also know it’s Friday night so I’m going to do something much, much less nerdy now, like go play football in the mud or head to a bar. Probably the bar.


PART 3!


So it’s late at night, and I finally got the radio working ( ! ) which is pretty exciting. After several jams on the staple gun, I got all the electrons going in the appropriate places.

I got the original voltage divider circuit working. In the picture you can see the transformer (the big, stainless-steel box on the left, screwed onto the board) attached to three much larger resistors than were in the previous post. These are specialty 10-watt resistors that Radioshack makes that I did not know about until I was in trying to find the transformer. There are two one-ohm resistors and one ten-ohm resistor, which makes life a LOT simpler than that array of resistors I had set up before. Much easier to wire up and I know the power ratings are good.

Once I had the circuit wired up I tested it and got about 13.4 volts, which seems high but is to be expected since the rating on the transformer is higher under no-load conditions. The voltage should drop a little bit once current flows through the circuit into the radio.

Any way, the radio works perfectly (from a power standpoint) so the next step is out of the scope of this blog: Hooking the whole thing up to some speakers and rockin’ to some tunes on the radio! Assuming the radio itself actually works…

UPDATE: The radio does work, and works surprisingly well. However, I have had to make some changes to the power supply design. First of all, when it is plugged in the transformer was always energized, and when transformers are energized from one side or the other they do use power. This transformer had a tendency to get significantly hot even if the radio wasn’t on. The solution for this was to add a switch to the primary side of the transformer. This lets me turn the transformer off without having to unplug it from the surge protector.

Sue!

One large ongoing project I have is my “old” car. Her name is Sue, and she is a 1989 Nissan Sentra that my dad purchased brand-new in 1988 when I was only a year old. My dad used this car as a daily commuter for about 14 years until he got a new Civic. A year later when I was 16 I started using this car as my primary vehicle, pretty much just driving to school and back and doing lots of teenager things.

My dad has been telling me about once every two years that “It’ll be great if this car gets you through a year of high school/through high school/through your first year of college/through college/a year or two longer.” Since she’s made it this far, I’ve decided that she’s not worth anything to anyone but me so I might as well turn her into a project car (even though I’m more or less the original owner). Sue is very, very reliable for being 20 years old, so the plan is to restore this car to how she was when she was driven off of the showroom floor.

This is Nissan’s famous GA16i engine. It’s a fuel-injected inline-four that develops around 90 horsepower and probably an insignificant amount of torque. It is a great engine for getting to and from work (I work in North Charleston, the seventh most dangerous city in America, on Ashley Phosphate road, a road that is one of the most dangerous roads to drive on in the country) and for getting surf boards to the beach. This engine has a timing chain, which means it’ll run forever as long as the valves and seals are kept up. This particular engine has around 170k, which actually isn’t a whole lot for a 20 year old car.

The two things that are not visible from these pictures are the wheels and the muffler. The wheels are the original wheels, but the original paint fell off sometime before I was 16. I painted them gray with Rustoleum but that’s starting to fall off now, too. It also dosen’t help that Sue has front disk brakes and rear drum brakes, which causes brake dust to accumulate on the front wheels but not on the rear wheels.

The muffler is not visible because it is non-existent. It fell off about eight months ago and just hasn’t been replaced. The lack of a muffler gives the GA16i quite the exhaust note, but it’s not so loud that its noticed by cops. And it helps to be in South Carolina where there are no state inspections of vehicles. Hooray!

You can see the amount of work that’ll need to be done to the interior. I’ve removed some of the front console and the entire center console, and you might be able to see the huge cracks on the dashboard that have come about from parking this car outside for about five or six years. That’ll need to be replaced too. Everything else is in pretty good shape except for the seats, which have some pretty big rips in them. If I can find some new seats to replace these, I’ll remove the seat covers.
I recently removed the back seat, partially because the rear deck and tail light assembly need to be replaced due to sun damage. The other part is that I will hopefully be able to fit my 8’2” surfboard in the car without putting it on the roof rack (I don’t like driving long distances, i.e. Florida, with what is pretty much a huge wing strapped to the top of the car). The rear seats are in good condition, but all of what is in this picture is incredibly dirty and some parts have started to rust. The trunk needs to be de-rusted as well because my dad drove it around for at least a few years with a leak in the trunk that allowed a large amount of water to collect in the spare tire bay.

Needless to say, this car has not been too popular with some of my friends who just happen to be girls. (On the opposite end of the spectrum, anyone who has ever driven this car and has helped me work on it loves Sue.) After I bought and (through no fault of my own) crashed a motorcycle (Ana Maria, an 07 Kawasaki Ninja 250R), I now have Felicity, which is my “new” 92 Nissan 300ZX that gets 16 miles to the gallon and goes from 0-60 in about five and a half seconds.

It has some kind of aesthetics.


Let me start by saying that this is an old and already completed project, but I felt like I needed something other than computers up here to sort-of dial back the “power nerd” thing I had going on. Then again, maybe building a lamp from scraps isn’t the most normal thing, but it’s at least better for you to read about than me messing around with UNIX. Eew.

Any way, my roommate and I moved into a place in Charleston a while back and were not prepared for the condition our apartment was in. It was in great shape, but didn’t have any lights in it except the kitchen. And maybe the bathrooms. There were light switches for the main rooms, but you needed to provide your own lamp. I had only brought one lamp because my parents wanted to throw it out (hooray cheap college-type furniture from the 80s) and that had to go in my room so I could get dressed and do other important “life” things. I don’t remember what my roomie did for a lamp, but we didn’t have any lights besides the kitchen and our TV in the living room. We talked about biting the bullet and spending money on a lamp from Wally World, but then I realized I could probably build a lamp for cheaper than I could buy one. (Plus, I like building stuff. I also really hate going to Wally World.)

First I found my trusty roll of electrical tape. Then I gathered spare building materials. I had just finished building a sort-of shelf for the trunk of my car (more on Sue later) and I had some spare wood left over. Toss in an old extension cord to connect all the bits, and the only parts I had to buy were the switch and the base for the lightbulb, and these ran me about $5.

From the top down: I electrical taped the base for the lightbulb to one end of the leftover wooden post I bought for the legs of the shelf I built. Sure, I could have glued it, or bolted it down, but times were rough, and we only had daylight available for a couple hours a day. No time to be dainty.


Also, I went with the classic incandescent bulb. It’s not a matter of light quality, or that I’m a huge fan of Thomas Edison (he was kind of a dick). It was just lying around so I used it. But once it burns out I’m totally going with the flourescent bulb. Those babys might not be real environmentally friendly, or great to have around pregnant women, or easy on the power grid, or safe in general, but they are real easy on the power bill, and what really counts is saving me money.

Next I cut up the extension cord and attached it to the various parts, making sure to run it through the light switch too. The switch has a neat feature where it illuminates when it’s off so you can tell where it is. I didn’t know that when I bought it, but it is quite handy.


Pretty much all that was left was making it appropriately tall, which was accomplished using some orange stakes and another piece of wooden post. And lots of electrical tape. The base I used at first involved wood, but it didn’t survive moving, so now I just have it zip-tied to a futon. It’s not the most attractive thing, but it works. And this current model has survived three moves, so even though the electrical tape might not look savory, it does the job without starting fires. And that’s always a bonus.


As a side note, I feel I should mention that you should NOT build the lamp in a place you don’t want it to stay, put a CFL (compact flourescent light) in it, then lift it up to move it without first noting available clearance between the lightbulb and the celing. Otherwise, a glass tube filled with mercury is liable to shatter on the celing and shower you with bits of glass and other unsavory things.

MythTV

So my MythTV computer has been down for a while, so I decided to go ahead and try and fix that computer for the thousandth time so I can do the whole DVR thing again. For those that don’t know, MythTV is a free and open-source software project for Linux platforms that lets the user do all the cool television things that you could do with a DVR (TiVo). Like any Linux software, though, it takes some fiddling. For me, it takes a lot of fiddling.

I started this project about three years ago with an Emachines computer (1.6 GHz Pentium 4) I bought from a friend for $150. I put in an nVidia GeForce 5500 FX graphics card in it (it had VGA, S-Video, and DVI out, so I had lots of options.) The card was state of the art at the time I bought it. I also bought a Hauppauge WinTV PVR 500 which has [unnecessarily] two TV tuners on it. What I didn’t realize, though, is that there’s only one coax input on it, so it makes the second tuner kind of useless for me, since the only video input it takes is component or S-video, and who uses that for TV?


Any way, the cooling fan on the graphics card was the first to go. I was young at the time, so when it started making buzzing noises, I took a paper clip and some electrical tape to physically stop the fan from turning. This actually caused more damage to the card, because when you stop a motor like that, and power is still applied to it, bad things happen. After THAT damage was done, I realized the power to the fan could simply unplugged from the card.

Next, the computer only came with 128 MB of RAM in two 64 MB sticks. But it’s not just any SD or DD RAM, it’s a very special type of RAM called RDRAM. Basically, if you bought a computer in the four months before DDRAM took hold, you might have this type of RAM. The only thing to know about it is that it’s slightly faster than SDRAM and generates an enormous amount of heat. Any way, back in the days of Ubuntu 5.10 Breezy Badger, 128 MB was just fine. I made the decision to upgrade when 7.10 came out two years later, and 128 MB wasn’t enough any more. So I upgraded the RAM to 1 GB using four 256 MB sticks.

To deal with all of these heat sources (the Pentium 4 was notorious for doubling as a space heater, the broken cooling fan on the graphics card didn’t help, and the four sticks of RDRAM pretty much put the computer over the edge as far as heat is concerned) I mounted a four-inch, 120V AC box fan to the side of the case which blows cool air into the computer. It’s a little bit noisy, but it works. Well, sometimes I think it causes a power surge to the computer if something gets in the way of the blades of the fan, which is not particularly healthy for the computer. But at this point, I’ve put too much work and money into the computer for me to give up on it. Kind of a catch-22. In a moment of frustration, I did try and move the hard drive and TV tuner card into this bottom-line Dell I got for free, but the tuner card was too long for the unusual enclosure that Dell decided to put around its PCI slots. I hate Dell.


Any way, the latest cause of failure for this computer is that MythTV simply locks the computer up when it starts. I’m not exactly sure how to deal with this, I think I’m going to try and reinstall Myth but that’s a last-ditch effort before reinstalling Ubuntu just to get a fresh start on everything. We’ll see what happens.

OK! Reinstalling actually worked, which is good because I had lots of episodes of South Park and Becker saved. Hopefully it lasts for a while before it breaks again.

Firewall

I’ve built network firewalls before, but this time I’m going to try and go all-out. The hardware I’ll be using to build my firewall on is an old Gateway 2000 with a 233-MHz Pentium II that a friend gave to me. (Yes, that’s a 5.25” floppy drive.) The old setup only had input from the internet (RED) and output to a GREEN zone (my LAN). This time I’d like to have it handle a wireless LAN, called the BLUE zone, my wired-only LAN which will be the former GREEN zone, and an ORANGE zone that will only have one computer on it, my server. All of the zones are separated by a DMZ within the firewall.

The reason for putting the wireless separate from the rest of my LAN is more security concerns. Someone can run a man-in-the-middle attack on a wireless network and sometimes can intercept not only wireless traffic, but traffic traveling through wired connections. It’s just another level of network security. Same for the ORANGE zone. Since this will be a server facing the outside world, it’s generally not a good idea to have it on the same network as computers with sensitive data. The firewall will do its best to keep all of these networks separate to make it harder for anyone to sniff around my network.

I use IPCop (http://www.ipcop.org/) for my firewall’s software. It runs exclusively on whatever computer you decide to use, but is not hardware intensive. This means that old, obsolete equipment like this is perfect to run IPCop on (hence the 12-year-old Gateway). My former install of IPCop worked well for a couple weeks and then randomly started restricting download speeds from 350 kb/s or so to 30 kb/s or so. That was really annoying, and I couldn’t figure out how to solve the problem, so as much as my paranoid self hates to have my cable modem plugged straight into the wireless router, I was forced to by circumstance.

To start, the computer has two NICs installed in it. One will be RED (the outside world) and the other GREEN. I should be able to install the BLUE and ORANGE NICs after the install. The reason for waiting is that I have several old NICs and sometimes IPCop won’t have the drivers for them. So, there’s a lot of trial and error that happens. But IPCop needs at least a GREEN interface for the installation procedure, and I know that IPCop has drivers for the cards in the computer now. (Yes, I know you can theoretically install drivers yourself, but I don’t know how/don’t want to mess with doing that.)

There are detailed step-by-step instructions for installing IPCop (http://www.ipcop.org/1.4.0/en/install/html/) so I won’t go into it here. I’ll be back after my initial install is finished.

Make sure that all of the cables are plugged into the right NICs. For example, if you try and plug the outside internets into the GREEN NIC then it’ll crash the DHCP server on the firewall. Just something to note.

Any way, now that I have the base install finished, I need to run a speed test to make sure that the firewall isn’t arbitrarily restricting my bandwidth again. The speed test showed about 6 M down and 1.8 M up, which is normal.

Now I can SSH into the firewall instead of having to hook my monitor up to it. This only takes some fiddling around with the web interface. The only thing I really need to do, though, is shut it down so I can install the other two NICs.

That was surprisingly successful. The “tulip” card I tried to install didn’t work last time because IPCop couldn’t find a driver. But if it’s working now, I’m not going to argue. Now the only thing left to do is to plug everything in to my firewall how I had planned for it to go before, only I’m missing a key piece of network hardware: a switch for the GREEN interface so I can plug more than one computer in to the protected LAN of the firewall. Oh well, I’ll make do, I suppose.

OK I finished my firewall. And it was working for a little bit but it seems to be doing it’s old thing where it restricts download bandwidth. I think it might be a bad hard drive. Any way, there were a couple of issues with the firewall which affect my Solaris project. First of all, my server operating in a DMZ didn’t work well because my desktop can’t see its Samba and DAAP shares, and DMZ pinholes don’t really work passively. So, the only thing keeping my server on that part of the firewall is my missing piece of network hardware. I’ll deal with it until I can get a new switch. But I’ll probably move my Web/SSH servers to Solaris and have that operate on ORANGE and then keep everything else on my server, which will eventually move back to my GREEN LAN. Any way, more later.

OK, I tried a new hard drive that I know is good. It’s not the hard drive. Download bandwidth went back to 1.5 M and upload is a normal 1.8 M. Don’t have any idea what’s wrong, but I don’t really torrent anything so I haven’t noticed any usability issues… yet.

Solaris 10

So I’ve been thinking about building some kind of server with Solaris 10. Solaris is a free operating system that’s built by Sun Microsystems and is based on Java. I used Solaris 9 in the first programming class that electrical engineers have to take at Clemson, and since then I’ve heard that the new version (10) is great for server-type things. Maybe I can get a web server going.

I have an old-ish Dell Dimension desktop with a Pentium 4 that should be good for the project (Solaris only runs on x86/64 and SPARC). My experience with Dell, though, has been that they put unusual proprietary hardware in their base-line desktops in order to save money, and you’ll never be able to find all the drivers you need unless you’re using Windows. And sometimes not even then. But any way, it’s the only computer I have around.

I realized that I need to get my firewall working first, before I mess with any new projects. So I’ll come back to this when I finish.

So the firewall is [more or less] working again, but I’m giving up on that for now. Solaris is installing itself on the Dell, so I’m going to get some samiches while it finishes.

So I’m usually right when it comes to Dell doing stupid things when they build computers. This time they built a computer with integrated graphics, then put a PCI video card in too, only the PCI card overrides onboard video by default and if you remove the card, the BIOS can’t tell and you have to put the card back in to change BIOS to use only the AGP onboard graphics. The kicker is that Solaris couldn’t recognize the PCI card after the install, because it’s some lame proprietary Dell card, so I have to do it all over using the generic AGP graphics card. Shoot me in the face.