Monday, August 20, 2012

Bits versus bytes

Time for another computer rant.  In computers the amount or size of data is often times measured as either bits or bytes.  A "bit" is a single piece of data - either a 0 or a 1, binary, on or off, true or false, etc.  It is the smallest size of data you can have.  But it's not very useful as you can only store 2 values, 0 or 1.  But if you string multiple bits together you can store increasingly larger pieces of data.  A "byte" is 8 bits together.  Whereas a bit is 2 values, a byte is 256 values.  Bytes, just like bits, can be strung together to store larger blocks of data.

What really annoys me is when companies insist on using bits instead of bytes.  And they do it for one simple reason, it makes there product/service sound better.  After all what sounds better, DSL at 200 Kbps or DSL at 1600 KBps?  USB at 480 Mbps or 5000 Mbps?

So why does this bother me so much?  Simple, a bit might be the smallest representation of data, but in modern computers everything is byte orientated.  It is impossible to have anything other than even number of bytes.  You cannot have a file that is 1 bit in size.  You cannot transmit 8001 bits of data over the network.  Everything MUST be an even number of bytes - period.  So anytime you see something expressed in bits they are doing it for one reason - someone in marketing is trying to trick you into thinking you're getting more than you really are.  So the next time you see something represented in bits, someone in marketing just insulted your intelligence and you should be offended.

Tuesday, August 14, 2012

Project TG-16 - Modding part 2

In addition to the previously discussed audio/video mod, I also added a reset switch and power LED mod to the TurboGrafx-16.  Much to my amazement, the TurboGrafx-16 did not come with either a reset switch or a power light.

Reset Switch
Adding a reset switch is fairly easy, all you need is the switch and two pieces of wire.  Again, here's the pinout of the back connector of the TurboGrafc-16.
In column 22 is a "/RST" switch.  We need to solder one wire onto this point.  The second wire gets soldered onto any ground potential point in the system.  This can be any of the large copper traces around the edge.  You connect these two wires to your switch - but you can't use any old switch.  You need what's called an "off-mom" switch.  This means the switch is off by default, but momentarily the switch is on while you press it.  But as soon as you let go, the switch goes back to off.  I used Digikey part number 509PB-ND.

To mount the switch I drilled a single hole in the side of the case.  The switch works as you'd expect, press the switch and the system resets.  Here's a picture of the final product.


Power LED
I've seen a number of power LED mods for the TG-16.  But I think my favorite was one that lights up the logo on the top.  Since the logo has color in it, the best would be a white LED mounted behind it.

For this mod we need 1) a power source, 2) the LED, 3) a resistor, and 4) some wires.  Most LEDs take between 2 and 3.5 volts to light up, so we need to find a power source that is at least a volt or two above that.  Although ideally not too much higher.  Fortunately the TG-16 has a 5 volt regulator (highlighted below).

Turn the TG-16 on, and using a multimeter identify which pins are ground and 5V.  Then solder a wire onto each.  Here's a closeup of the voltage regulator after attaching the wires.

Next you need to solder the LED and resistor onto these wires to make one big loop (don't forget about LED polarity).  It is true the LED will run off of 5V without the resistor, so why add the resistor?  If you run an LED off of more volts than it was designed for, the LED will 1) generate more heat, 2) burn out much quicker, and 3) may even shine at a different color.  But what value resistor do we need?

To calculate the resistor value we need 3 pieces of info.  First we need to know the total volts being used to power the LED (let's call it Vt).  Second we need to know the voltage of the LED, usually called the Forward Voltage (let's call it Vf).  And finally we need to know the current in amps of the LED (let's call it I).  Using my multimeter I tested the 5 volt regulator and got a value of 5.03V, so this is my Vt value.  For my LED, I chose Digikey part number 1080-1006-ND.  According to the datasheet on this LED, it has a forward voltage of 3.2 (Vf) and a current of 20 milliamps (I).

Our total voltage is 5.03, but we only want 3.2 for the LED,   So we need to "burn off" 1.83V in the resistor (let's call that Vr).  We only need one formula, V=IR (volts equal amps * resistance).  Vr = I * R.  We know Vr and I, so the formula becomes 1.83 = .02 * R.  When you divide that out you end up with 91.5 ohms.  So you need to use a resistor close to that value.  I used a 91 ohm resistor.

Next solder it all up.  Be sure and cover the exposed LED and resistor leads with heat shrink or electrical tape to prevent shorts.  I then taped the LED onto the top of the metal RF shield around the circuit board.

The final step is to enlarge the hole for the light to illuminate the underside of the logo.  If you use a razor blade you can very easily remove the TG-16 logo.  I then used both a Dremel and razor blades to cut a square hole in the case.  Be sure to leave a lip around the opening so you can glue the logo back down.  Here is a picture of the opening.  Notice the LED inside the hole.

The last thing to do is glue the logo back down.  It looks pretty cool when you turn the system on.

This was a fun project to work on.  I have a nicely modded TG-16, and with the exception of the reset switch in the side it looks completely stock.  Now it's time to turn it on and enjoy some great retro games!

Saturday, August 4, 2012

Project TG-16 - Modding

The final step with this project is to mod the system, to make it better than it was originally.  I decided on 3 mods for this system; 1) audio/video mod, 2) power LED mod, and 3) reset switch mod.  For the audio/video mod, the TG-16 natively spits out composite video and stereo audio.  The problem is it's from a proprietary connector which means you can't just connect it to your TV.  But if you add standard audio and video connectors you can easily connect to your TV.  Here's a pinout of the TG-16 rear connector.

From column 1 we want "SNDR" and "SNDL" for right and left audio.  And from column 22 we want "Vid" for the composite video.  Here's a picture with the wires attached.  I soldered onto the bottom side of the board then fed them through the holes to the top side.  The orange and orange/white stripe are for audio, and the green is for the video.  Ignore the other wires for now.


The last thing we need is a place to mount the video and audio connectors.  I've seen a lot of similar mods on the Internet and they usually drill holes in the side or rear of the case.  I decided to go a different route.  Since I'm no longer using the RF output, I'll remove the RF box and mount the connectors there.  Here's a picture with the RF box desoldered.

Next I took a video connector (digikey part number CP-1403-ND).  I bent the center pin aft, and I bent one side pin out flat.  Lastly I bent the video pin straight back.  When I was done the connector looked like this.

On the TG-16 motherboard, I scraped some of the solder mask off where I removed the RF unit from.

Now I can place the connector onto the motherboard and solder it up.  One leg of the connector goes through the existing hole, plus the two bent pins can be soldered onto where I removed the solder mask on the circuit board.  This gives me 3 solid solder points so I doubt this connector will ever break off.

To mount the audio connector, I first needed to raise the connector up.  If I mounted it flush on the board it did not line up with the existing hole in the side of the case.  I found a hex nut that was just the perfect thickness.  I used epoxy to attach the nut to the board.

Next I used epoxy to attach the stereo audio connector (CP1-3513-ND).  I soldered up the audio and video cables.  For the video cable I soldered a 220uF/16V bi-polar cap inline, and for the audio I soldered a 10uF/16V bi-polar cap inline.  Lastly, I soldered the ground connector onto the motherboard.

When the system is put back together, this is what it looks like from the outside.  I think it has a very clean and professional appearance.

But more importantly, what does the video quality look like?  It's pretty darn sharp, especially compared to the RF (before I removed it).  This picture doesn't do it justice, I was having a hard time getting good pictures of the TV screen.  But the image is sharp and crisp.

In the final post I'll cover the additional mods to the system.

Wednesday, August 1, 2012

Project TG-16 - Recap

The next phase in Project TG-16 is to "recap," or replace all the electrolytic capacitors in the system.  Electrolytic capacitors tend to go bad over time, they are one of the biggest causes of electronics failure.  If you're trying to extend the life of a system then replacing the caps is a good thing to do.  And it's fairly inexpensive given that high-quality caps cost only about 75 cents each delivered - soldering skill not included.

The TG-16 contains 16 electrolytic capacitors inside.  Here is a picture of the motherboard with all cap locations identified.

And here's a list of capacitor values for each location (for now ignore the last 4 columns):

For the replacement caps I used all Panasonic brand FC series caps.  This brand and series is regarded as being very high quality and long life.  Another benefit is most audiophiles consider Panasonic FC series caps to be the best "general purpose" caps for audio applications.  Some audio purists use different brand caps for audio applications.  But by sticking with Panasonic FC series I avoid the need to worry about audio caps versus other use.

The next step is to bust out the soldering iron and get to work.  This was relatively easy for me, but then I have a lot of experience recapping circuit boards.

One of the biggest questions is, was this worth all the effort?  Before I recapped the system I knew it worked, so why bother.  Well this system is 20+ years old, it may work now but for how much longer?  So recapping it helps to ensure a long useful life.  As it turns out, I can quantify how good/bad the existing caps are.  There are two main ways to test a capacitor - capacitance and ESR.  Capacitance is the number rating on the cap - so a 100uf capacitor should have a capacitance at or near 100.  The second method is ESR or equivalent series resistance.  This is a measure of how freely a capacitor gives up the electrical charge stored in the capacitor - the lower the ESR the better.  As it turns out, ESR is a much better way of testing caps than capacitance.  But I went ahead and tested capacitance and ESR for both the old caps coming out of the system as well as the replacement caps.  If you look at the table above, I include the capacitance of the old cap (existing uf), ESR of the old cap (existing ESR), capacitance of the new cap (new uf), and ESR of the new cap (new ESR).

In all cases the capacitance was fine, both old and new.  And in almost every instance the ESR of the new cap was significantly lower than the old cap - on average half as much.  The one exception were the 10uf/16v caps.  Much to my surprise the original caps had a lower ESR value even after 20 years.  Those must have been an excellent batch from the factory.

I didn't stop at recapping the system either.  I also have two controllers and a turbo tap which I also recapped.  These were easy - each controller and the turbo tap contained a single 10uf/35v capacitor.  The capacitance and ESR values were in line with what I saw in the system; the capacitance numbers were fine and the ESR of the new cap was about half that of the old cap.




Next we'll begin modding the system.