Monday, March 16, 2009

A boring one... but whatever.

So I used to be a Windows user in my lesser days. Any way, two years have gone by since I switched full-time to Ubuntu, I haven't found a replacement for Quicken until now. (I was listening to the Moody Blues and it just came to me... Online banking! Yippie!) So here's what I did to install GNUCash in case I forget later.

first of all, (can I put code tags in this? I'm going to try.)


sudo apt-get install gnucash


We'll see if that worked later. But you get the idea. Any way, this is what I came up with. Here's a screenshot of the first thing the program did after I opened it! Almost nothing. About par for the course for an open-source program though.

Not even a wizard to show me the ropes. After some Googling, I found the wizard, which wasn't actually much help.

So yeah. The wizard wasn't very self-explanatory. I used this Wiki and this blog of all necessary banking information and numbers and such to find the necessary information on my bank, because apparently BB&T isn't a large enough bank to be listed on that wiki, and because this program isn't as intuative as Quicken and has all the monotonous banking numbers built in already. Whatever. Google helps.

After plugging all the numbers in and then hitting the "Get Accounts" button on the "User Configuration" tab of the setup wizard, I think I'm good to go.

--

I'm not good to go yet. Something isn't jiving and it's too late to fix. Peace out.

Thursday, March 12, 2009

$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.

Saturday, March 7, 2009

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.