Thursday, December 6, 2018

The Trans-Oceanic Project

If you're reading this, there's a pretty good chance that you've got a soft spot for Commander MacDonald's baby: The Zenith Trans-Oceanic.  I certainly do: When I was about eight years old, my family took holiday at a cabin on Hubbard Lake in rural Northern Michigan.  At that time, there were no TV stations covering that portion of the state, but the cabin came equipped with a glorious model G500 Trans-Oceanic, and the sounds that came from it made enough of an impression on my pre-adolescent psyche that I became obsessed by all things electronic.  Eventually, this hobby became a career in radio from which I recently retired after close to 40 years.  Soft spot indeed.

Earlier this month, while on vacation in Florida with my wife and friends, I came across this very neglected model G500 at an antique festival.  The picture above really doesn't do it justice - this thing was totally trashed; the famed "Black Stag" covering was torn in several places and appeared to have been gnawed on by mice, as had some of the wiring.  The hinges for the rear panel had rusted completely through, the cover being held in place only by the rusted spring clips.  And the smell... Trans-Oceanics have a unique, friendly aroma, but this was a different fragrance: Mildew, rotted wood and mouse pee. 

But, the set appeared complete, including the coveted 1L6 converter tube, and the seller was willing to deal, so we agreed on a very low price (a fraction of what the airline charged me to check it as baggage) and the derelict became mine.

Things didn't get any better when I returned home and got the set on the bench and found that someone who should not be allowed anywhere near a soldering iron had attempted to repair the radio.  The underside was covered in soot; the power-supply section had lost its magic smoke in a big way.  My heart sank thinking about the rather delicate 1.5v tube filaments.  Had they also been damaged?    If so, my equity in this set would be in the red.


Fortunately, when I measured across the filament string, I got a nice, low resistance.  Holy crap, had the tubes survived?  I had to know!  So, I started undoing the previous work to see what all was wrong.  

My theory is that someone attacked the set based on "internet knowledge" that says selenium rectifiers are ticking time bombs, but without the understanding of what the rectifier does or how to replace it.  Equipped with this lack of knowledge, they bypassed the selenium with a silicon diode.  That probably went OK, but things went awry when they got to the filter capacitors... I'm not sure exactly what went wrong, but it's obvious that something was dead-shorted to ground at the input to the "candohm" resistor, vaporizing the diode and dropping resistor but not damaging anything else.  So, while it must've gone up in a glorious shower of sparks and smoke, the carnage was surprisingly minor.

Ironically, the selenium rectifier checked good, so the carnage was totally unnecessary.

Carnage removed.

New parts, including 1N4007 diode, mounted to added terminal strip.
Once the damage had been, um, rectified, the rest of the electrical restoration was uneventful.  The electrolytic and "Bumble Bee" capacitors were all replaced, as was the 3V4 audio tube, and the set roared to life.  Success!

But, cosmetically, the radio was a mess, and the only way to deal with it was going to be to strip it of it's upholstery, repair the damage, and recover it with new Tolex.  I wasn't looking forward to this part; I've seen reupholstered TOs before and you could immediately tell that they weren't original by the grain of the Tolex.  So, I scoured the web until I found a pattern that, at least in the photos, looked passable, so I ordered a couple of yards of "Black Bronco" from Parts Express.  When it arrived (in a very large box!), I was stunned - it was nearly a perfect match!

Thus, I set about the task at hand, photo-documenting every flap and fold of the old material as I removed it, and using each piece as a pattern from which the new pieces were cut.  Then, each piece was reinstalled exactly as the original had been by the factory.  Well, all but one - I goofed.  Still, it looks OK so I may leave it.

In addition to replacing the fabric, I polished and relacquered all the brass bits and installed a replacement dial lens (from Mark Palmquist - Excellent!), gave the set a final alignment and buttoned it all up.  


 Was it worth the effort?  Not economically, but I can't put a price on the rewarding feeling I got from bringing this beauty back from the brink. 

I'm still as enamored by these radios as I was back in 1970, they really are fantastic pieces of radio history.  It's unfortunate that so many international broadcasters have abandoned shortwave, but there's still a lot to tune in and nothing better to do it with than a Zenith Trans-Oceanic.

For anyone interested in learning about these sets, I highly recommend Bryant and Cones' book The Zenith Trans-Oceanic: The Royalty of Radios  from Schiffer Publishing.  It may be out of print, I don't know, but used copies are readily available through Amazon.  But please, don't be like the previous owner and attempt to service your TO without understanding what you're doing!


Monday, October 29, 2018

Philco 42-327T: Closure

It's been a couple of busy months, but the old Philco is done.  Once I repaired the damage I inflicted on it by foolishly lifting the cabinet by one of the grille bars, everything went together rather smoothly and it turned out quite nice.

I don't think I mentioned the chassis in any of my earlier posts, but it's rehab was relatively uneventful, mainly because nobody'd tried to fix it before I got my meat hooks on it.  So, it was simply a matter of replacing the electrolytic and paper caps, cleaning and lubricating the controls and tube sockets, and a final touch-up on the alignment.  The only thing that put up any sort of fight was the pushbutton presets, but that was just because they were full of crud and took some extra cleaning before they worked reliably and noise-free.

Performance wise, it's competent but not spectacular, as one would expect from a mid-low end radio.  The internal loop antenna works OK for the local stations, but it really comes alive when connected to an outdoor wire antenna, particularly on the shortwave bands. 

So, was it worth the effort?  Probably not from the financial perspective, though I don't have but maybe $50 invested in the thing and shouldn't have much trouble breaking even.  From the standpoint of personal entertainment, though, it was more than worth it.  Breathing life into a radio that's been neglected and dormant for decades is almost as much fun as building one from scratch!

Friday, August 17, 2018

One more time...

I made a stupid, bone headed move shortly after the last entry in this saga:  I was cleaning up and, rather than make multiple trips, carrying stuff from the garage to my basement workshop, tried to take it all at once.  So, I had my arms pretty well full, and grabbed the newly finished, nearly perfect cabinet by one of the grill bars (removed in the above photo) and it broke off.  Of course, it couldn't have broken off cleanly at a glue joint.  No - the glue bond holding that bar to the veneer was stronger than the veneer was bonded to its substrate, so about a three inch section of veneer peeled away and remained attached to the bar.  Crap!

I made a couple of failed attempts at "spot repair" before stripping it down to what you see above.  The good news is that the veneer patch turned out great - probably the best I've ever done.  The bad news is that I'm back to ground zero and into the second week of a project that should've taken just a couple days.  Oh well.

Haste makes waste.  The good news is that, this time, my lazieness only cost me some time; the damage is repairable and it's not a total loss.  The bad news is that, once this project is a memory, I'll probably make the same mistake again.  That's how I roll.

Thursday, August 9, 2018

Almost Instant Gratification


Once the grain filler has cured, I give it a wet sanding with #400 grit.  After cleanup, the cabinet is nearly perfectly smooth.  If this were a more valuable set, I'd probably repeat this step until it was absolutely perfect, but this is a pretty common radio and the law of diminishing returns applies.

This set had what I'd call a 2 1/2 tone finish; the dial escutcheon and grille bars look to be neary black, while the trim along the bottom was a very dark brown.  I don't know if that was intentional or the result of nearly 80 years, but I'm going to stay as true as I can to that.  So, after sanding, I mask all of the cabinet that isn't going to be black or dark brown:

Then, before I apply the "color", I give everything a quick blast with clear.  I discovered, by accident, that this will seal the masking lines and helps avoid the color leaking in to where I don't want it.  

Being a low-budget operation, I don't use any sort of computer to match colors, I just have a variety of dyes in shades of brown, red, yellow and black, and match by experimenting, noting the how many drops of which go in to how many ounces of lacquer and the ratio of the lacquer to thinner.   Once I get a test spray in the tone I want, I note the "formula" for the next time, but I have to admit that I don't often refer to my notes anymore; I've done enough to where I "kinda" know what'll work.

Since this has the two dark colors, I first mix six ounces in the dark brown and spray away, two coats gets me to the color I want.  That barely uses an ounce, so not being one to waste material, I add black dye to the mix until it's, well, black, and spray the escutcheon only, being careful not to spray the black on to the fresh dark brown. 

Lacquer dries quickly, so it isn't long before I'm able to remove the masking and start adding color to the rest of the cabinet.  I mix the dye with the lacquer as before, but not adding so much dye that it becomes opaque, I go for a sort of weak coffee looking mix that takes a few coats to get to the final color.  This is where the instant gratification sets in, because as soon as that first coat goes on, the thing starts looking more like an old radio and less like a pile of junk.


And that's enough for tonight; clean the tools and put 'em away.  

It's amazing, with these projects, how much time you spend waiting for things to dry.  Actual work time spent so far?  Maybe a couple hours, but it's spread out over five or six days.  Anyway, I suppose I'm commited deep enough into this radio that I HAVE to fix the chassis... That'll be another installment in this saga.



Sunday, August 5, 2018

More Cabinet Work

Work on the Zenith continues, and I'll detail that in the future.  For now, I thought I'd take a diversion and go through the steps of refinishing something less ambitious: A derilict Philco 42-327T that's been in my way since the spring.

Unfortunately, I didn't start the project with the intention of "blogging" about it, so I didn't take any "before" pics, nor any of it being stripped.  I think I can describe that, though:

The finish on the cabinet was quite rough, appearing as though it had been left out in the rain and then dragged, face down, across concrete.  Fortunately, the grille bars took most of the damage and the veneer was largely spared; other than a few chips and a bubble or two, it was pretty much intact.

So, to start, I carefully removed the grille bars, stripped them, then sanded the damaged sections while trying to maintain their original radius.  At the same time, I chemically stripped the cabinet, patched the damaged veneer and glued-up a couple of loose joints, clamping everything and allowing it to dry overnight.

This morning, I gave everything a "scuff" with 220 grit paper, then took it out to the garage and shot it with sanding sealer.  The pic below shows the cabinet and grille bars with the sealer just starting to dry.  The white portions are where I shot the sealer thicker than I should have, some of which was intentional.  These will become transparent as the sealer cures.

I'll let this dry overnight.  Tomorrow I'll tackle the fun-filled process of filling the pores in the wood and prepping for it's lacquer finish, which, once completed, will be as near to glass-smooth as I can make it.


Part II: Filling the grain

Well, normally I'd have let the sealer dry overnight, but with the temperature in the garage hovering around 100 degrees F, it dried very quickly and was ready for the next step in just a few hours.

At this point, the grain and pores have been sealed, which basically means that the wood isn't going to drink the lacquer that I'll eventually be applying, but the wood still is far from smooth, and if the top coat were applied at this point, each pore would "sparkle" as light reflected from the tiny pond of lacquer within it, making the surface appear rougher than it actually is.  The easiest way to avoid this is to use a commercial grain filler.

Now, grain filler is NOT the same as the wood filler sold at the big box stores - that stuff is to patch gouges and larger blemishes.  Grain filler is a bit different, it has a consistency that's a bit thicker than pancake batter, and is actually rubbed into the surface of the wood rather than brushed on to it.  Generally, you apply it against the grain with a plastic scraper, I find old credit cards work great for this.  Some people will rub it in with something like burlap.  I don't know about you, but I'm not exactly swimming in burlap, but have a seemingly endless supply of expired charge cards.  Like they say in amateur racing: Run what'cha brung.

Before I apply the grain filler, though, I sand the cabinet again using 220 grit to remove any excess sealer.  Since we're ONLY sanding the sealer and not the wood, I usually go across the grain at this point; I think it works better, but your mileage may vary.

After sanding across the grain with 220 grit.
After sanding, I scoop a glop of the grain filler from the container and push it across the grain with the aforementioned credit card.  In this case, I used a Discover that expired in 2005, but I don't think that matters.  What does matter is making sure that you actually press the filler into the pores rather than dragging it across them.  Think of buttering toast, where you're not so much spreading it across the surface as filling the voids with artery-clogging goodness.  Same basic idea, but with one difference: You don't want to leave any excess - the stuff dries like iron - so the motion is  a push and a scrape... Hard to describe, easy to do.

After filling the grain.  Notice that the surface has become reflective, it'll be more so after I wet sand it later.  The tub in the foreground is the grain filler, and, of course, my long expired Discover card.
A couple of comments about grain filler:  There are basically two types: Oil based and water based.  Some folks say that oil based is easier to work with due to it's longer drying time, but I've used both and haven't noticed a difference.  Expirement.  Also, I'm using a transparent filler here (Acqua Coat), but I've also used tinted and tinted my own to suit the type of wood I'm working with.  Again, expirement and see what works for you.

Also, I can't mention enough that you want to scrape off as much excess as possible before the filler dries. We're not going to be using any more coarse sandpaper, and you can develop tendonitis trying to sand smooth filler boogers with 400 grit...

So, now we're back to the exciting practice of waiting for stuff to dry.  Don't rush this step, else you'll have a mess on your hands when you start wet sanding, which is the next step.  Riveting stuff.  Stay tuned!






Sunday, July 29, 2018

Zenith Chairside: On to the cabinet repairs


 Since it's nice outside today, rather than hole-up in the basement, I dragged the chairside cabinet out to the deck to start on the cabinet repairs.  The cabinet overall is in fair condition; structurally sound but with some minor damage.  The greatest damage is to the front of the speaker grille, where, somewhere in it's life, this radio got whacked hard enough to crack the horizontal bars and chip-out a chunk of veneer.  To start, I'll repair the structural damage by injecting glue into the cracks.


I inject the glue into the crack until it oozes out from everywhere along the crack where it can ooze.  Then, I'll pull it back into shape by clamping the damage between two flat planks of scrap wood.  This will force more glue out of the cracks, but I'm not going to worry about that now...



 I try to get as many clamps around the damage as will fit. Since I don't have many with jaws narrow enough to fit through the grille slats, I augmented my bar-clamps with a carriage bolt/nut threaded through the slats and clamping blocks.  Everything is synched-up tight and will be allowed to dry overnight. With any luck, by this time tomorrow, I'll have s straight grille panel needing only a small repair to replace the missing chunk of veneer.

While waiting for the glue to dry, I put the finishing touches on a Detrola 101 that I've been refurbishing at the same time as the Zenith.  This one also had minor veneer damage but without missing pieces, so it went through a similar repair: using a razor, I enlarged a pore in the veneer above the blister, injected it with glue and clamped between flat blocks.  After sealing/grain filling and spraying with toned lacquer, the repair is completely invisible.


Before: Presentable, but tired.

After.  Came out nice, no?


Tuesday, July 24, 2018

Zenith Chairside - Capacitor Madness!


Look at that flywheel!  That's what gives these old Zeniths their smooth as silk tuning. 
Normally, I follow a logical troubleshooting process rather than simply replacing parts wholesale, but not when it comes to the paper caps in old radios.  Why?  Experience has taught me that, if they're not bad now, one is bound to fail shortly after putting the set back into service.  It really stinks when you have to reopen a freshly completed radio to replace a $0.25 part, so I prefer to just change them all and be done with it.

As you can see in the picture above, this chassis has quite a few of those little turds.  Fortunately, they're readily accessible for the most part, and things aren't as cramped on this chassis as they are on many others.  Should be an easy job.

Even though this is more a matter of just replacing parts than it is troubleshooting, I still have an order in which I tackle these things - one circuit at a time, beginning with the audio power amp, just as I do in my homebrew projects.  The shot above shows the new capacitors installed in the push-pull output amp and phase inverter circuits.  Before moving onward, I tested the radio after replacing the caps to make sure I didn't accidentally introduce any new problems. 


Something to be aware of about radios produced between about 1939 and the start of WWII is that the rubber insulation on the wiring often will crumble when you move it the slightest little bit.  This usually means carefully rewiring the entire set, not something I particularly enjoy doing.  Fortunately, this set doesn't have much of that sort of wire, so I'll just have to rewire the harness for the eye-tube (shown below the volume control in the picture above) and a few other circuits, not that big of a deal.  Last year, I worked on a '41 Zenith and had almost 40 hours into rewiring the thing.  That's why I usually avoid radios built during that time frame, but this one is so damn cool that I had to have it!


Here's a tip:  I use welding clamps to secure the chassis to the bench while working on it.  The heavy power transformer is at the top of the chassis in this position, and if you don't secure it, the chassis is going to want to roll over and break some tubes.  A chassis stand might be a better idea, there's a fellow in Alaska that makes some nice ones, but I'm cheap and the welding clamps work well enough for me.

You can probably tell that I'm struggling to find something interesting to say about this stage in the process.  Changing capacitors isn't the most exciting thing in the world, but to me, it's cathartic:  I put on some music, pour a cold beverage and relax while plugging away at it.  

Here are some common questions that I'm asked:

"I can't find .05 uF capacitors anywhere.  What do I do?" 
  • Use the nearest modern standard value:  For a .05, a .047 will be fine.  Likewise, .022 and .033 can be used to replace .02 and .03 uF.   
"This radio uses capacitors rated at 200 Volts, can I replace them with 630 volt caps?"
  • Yes, you can always go to a higher voltage rating, but never go lower.  In most cases, modern capacitors will be smaller than the originals, even when the working voltage is much higher
 "Where do you get your capacitors?"
  • The film caps that I use to replace papers are from Sal Brisindi at Sal's Capacitor Corner (www.tuberadios.com/capacitors.)  What I like about Sal's caps is that the leads are longer than others, so you don't need to do a bunch of splicing to get them to fit.  Don't ask me where they're made - the guy's name is Sal and he's from New Jersey. I don't ask questions, Capisce?
  • I use Nichicon electrolytics that I order through Mouser.  
That's about all that I can muster to say about this topic.  See you next time!

Sunday, July 22, 2018

New Project: Zenith 10-S-442 Chair-Side Console

I imagine that I'm like most people in that my radio production drops off during the summer.  In the winter, it's easier to hole-up in the basement building and repairing things, but I can't help but feel guilty doing so when it's nice outside.  So, summertime tends to be more of a time for acquiring things than it is working on them.  It also seems to be when the best shows and auctions take place, so I'm OK with that.

Last weekend, my wife and I attended the Michigan Antique Radio Club's Vintage Electronics Extravaganza, where I was able to add a couple more projects to the queue, including this 1940 Zenith Chairside.  I've been looking for one for about 15 years, and this is the first one that I've found that wasn't trashed or out of my price range, so I jumped on it.

This set appears to be basement fresh, still with all of its original tubes except for the notorious 6X5 rectifiers, which have been replaced with the later GT style.  The cabinet is solid, but in need of some veneer repairs that I'll cover in a future post.   For today, I'm going to go into how and where to start on something like this.

First, I'll start by removing the chassis and speaker from the cabinet so that I can get this thing from the garage to the basement without wrecking my back.  The next two pictures show the chassis, as found, from the front and rear.  It's surprisingly clean for something that probably hasn't been dusted in almost 80 years!



So, where do I start?  Well, in the past, I've found that some Zeniths from this era tend to eat power transformers, so before I get too far along, I ought to check this one to see if I need to source a replacement.  We'll start by replacing the power cord, since this one's has been cut-off - something I love to see because, in my experience, most of the cut-cord sets that I've come across didn't have any serious problems and, better yet, haven't been boogered-up by someone who tried to repair it without the requisite knowledge and skills.

The above picture shows the new cord and power-line filter capacitor.  The domino-shaped capacitor on the bench in front of the chassis is NOT a reliable mica, but what's called a Micamold - a paper cap disguised as a mica.  The give away is the value: .005 uF; generally, real mica caps will be .001 (1000 pF) or less.  The replacement is a .01 uF disk rated to be used safely across the power line, or, as in this set, from line to ground.  In this application, there is no benefit to sourcing a .005 (.0047 in today's parlance), a .01 will work fine and I've got them on-hand.

Next step is to pull the rectifier tubes.  This disconnects the transformer's high-voltage secondaries from the rest of the chassis for the next test - apply power to see if the transformer is transforming.

So, with the transformer effectively isolated, we can fire up the chassis using a current-limited, isolated supply.  This is a low-tech bit of test equipment; an isolation transformer with a 40 watt incandescent bulb in series with the chassis.  If there were a short in the chassis, the bulb would glow, dropping the bulk of the supply voltage and hopefully limiting further damage.

When measuring an unknown, potentially high voltage, I use my disposable Harbor Freight digital meter.  I've smoked two expensive meters doing this in the past, so now I use one of these until I'm certain that the voltage being measured can be handled by my Fluke or Simpson.  I also connect the meter, using insulated jumper leads, before applying power.  Why?  That's 607 Volts, kids.  Respect it, it can kill you.

Great news!  I've got the expected voltage on the secondaries - the transformer is good, the bullet's been dodged.

So, moving on, it's a virtual guarantee that the power supply filter capacitors have failed, so we'll disconnect power and change those.  Now, on models where the filters are mounted above the chassis, I'll remove the filter "can", remove it's guts, replace them with modern caps, reseal the can and reinstall it for an invisible repair.  In this case, the filters are in a cardboard tube below the chassis, so I'll remove this and replace it with modern capacitors mounted to a terminal strip.

The filter "can" is riveted to the chassis, here I'm carefully drilling-out the rivet.



I drill the rivet to the point where I can drift it through the bracket/chassis with a small punch.
Here, I've attached the new capacitors to the terminal strip before installation - it's easier to do it now than after it's been installed in the crowded chassis.  Teflon tubing insulates the flying HV lead.
Here they are in their happy new home.  I used the hole from the original "can" to mount the terminal strip, using #6 hardware - including lockwashers - you don't want this thing to move!

So, at this point, the smart thing to do would be to remove all of the remaining tubes, reinstall the 6X5s, apply power and test to see if you've got the expected DC voltages.  But, I'm a gambler, so I plugged the 6X5s in and fired the thing up, watching for smoke.  I must be living right, because the damned thing came to life, sounding great!  But, I didn't leave it powered on for long because it still has all of its original waxed/paper capacitors, some of which are likely to be bad or on the verge of failing.  So, the test was a brief two or three minutes of glory.

After the successful test, I started looking for potential signs of problems, and found two:  The RadioOrgan board was cracked and the insulation on the wiring at the base of the eye tube was starting to disintegrate.

Cracked RadioOrgan board.



Disintegrated wiring at eye tube base.

I'm not in the mood to deal with the wiring today, so I'll finish up for the day with the easy fix:  The RadioOrgan board.  This gets cleaned and reattached using "super glue".  The key is clamping it and leaving it alone for at least an hour or two so that it can fully cure.  Don't rush this and it'll turn out fine!


That's all for today.   Next time, we'll tackle the eye tube, including the pesky 1 megohm resistor, located in the socket, that's always bad. I haven't had much luck with eye-tubes themselves, they always seem to need replacement.  Fortunately, this set uses the fairly common 6U5 and not the rare and insanely expensive 6T5!

Thursday, May 24, 2018

More Arduino: A Simple Iambic CW Keyer

I've been using the homebrew "TO" style keyer that I described in earlier posts for several months now, and I have to admit that I don't very much like it.  It also reminds me of why I ditched my Hallicrafters TO keyer over 30 years ago:  They don't support iambic mode and are a bit "fiddly" when compared to Curtis-based keyers.  So, I'm working on a replacement that uses the cheap (<$5.00) Arduino Pro-Mini board.

While scouring the web in search of ideas, I came across Ernest, PA3HCM's Simple Arduino Keyer project and was quite impressed, not only by how well it works but by how short and simple his code is.  Bravo, Ernest!

Of course, not being able to leave well enough alone, I had to add a few creature comforts: Adjustable weighting and sidetone frequency.  Ernest's code made that easy enough to do - the timing is based on the value read from the speed pot and the frequency of the sidetone, so with a little bit of manipulation, I was able to modify the code to add a "correction factor" that allows the weight or tone frequency to be changed without affecting the code speed.  It works well, and unlike the old-school "TO" based design, is very forgiving of operator induced timing errors.

Here's the code:

// Simple Iambic Keyer Mod0b3 by N8NM
// Based on the excellent work of Ernest PA3HCM
// May 23, 2018

/*
   Revision History:
   Mod0b0 - Initial build by Ernest PA3HCM with Arduino Pull-up resistors enabled
   Mod0b1 - Added PTT output functionality
   Mod0b2 - Added WEIGHT control, range: 2.25:1-3.75:1
   Mod0b3 - Added TONE control to adjust sidetone freq. Strap to 3.3V line if not using this feature.

   Controls:
   Speed: Sets element length (determines words per minute)
   Weight:Varies dash/dah ratio +/- 25%
   Tone: Adjusts sidetone frequency

*/

#define P_DOT     2                   // Connects to the dot lever of the paddle
#define P_DASH    3                   // Connects to the dash lever of the paddle
#define P_PTT    11                   // PTT output to radio
#define P_AUDIO  12                   // Audio output
#define P_CW     13                   // Output of the keyer, connect to your radio
#define P_SPEED  A0                   // Center pin of SPEED pot
#define P_WEIGHT A1                   // Center pin of WEIGHT pot
#define P_TONE   A2                   // Center pin of TONE pot (strap to 3.3V for fixed freq.)

int speed;                           // Declare variable used in reading speed pot
float weight;                        // Declare variable used in reading weight pot
int tone_val;                        // Declare variable used in reading tone pot
float loop_delay;                    // Declare variable used to calculate audio tone loop delay
unsigned long startMillis;           // Declare variable used to determine PTT delay
unsigned long currentMillis;         // Declare variable used to determine PTT delay
byte PTTSTATE = 0;                   // Declare variable used as PTT status flag

// Initializing the Arduino
void setup()
{
  Serial.begin(115200);               // open UART serial port at 115200 bps
  pinMode(P_DOT, INPUT_PULLUP);       // Enable DIT input with internal pull-up
  pinMode(P_DASH, INPUT_PULLUP);      // Enable DAH input with internal pull-up
  pinMode(P_AUDIO, OUTPUT);           // Enable output for sidetone audio
  pinMode(P_CW, OUTPUT);              // Enable output used to key radio's CW line
  digitalWrite(P_CW, LOW);            // Start with key up
  pinMode(P_PTT, OUTPUT);             // Enable output used to key radio's PTT line
  digitalWrite(P_PTT, LOW);           // Start with PTT off
}

// Main routine
void loop()
{
  speed = analogRead(P_SPEED) / 2;                     // Read the keying speed from potmeter
  weight = (analogRead(P_WEIGHT) * .001465) + 2.25;    // Read the character weight from potentiometer
  tone_val = analogRead(P_TONE) + 330;                 // Read the tone value from potentiometer
  if (!digitalRead(P_DOT))                             // If the dot lever is presssed..
  {
    keyAndBeep(speed);                                 // ... send a dot at the given speed
    delay(speed);                                      //     and add a space following the dit
  }
  if (!digitalRead(P_DASH))                            // If the dash lever is pressed...
  {
    keyAndBeep(speed * weight);                        // ... send a dash at the given speed
    delay(speed);                                      //     and add a space following the dah
  }
  if (PTTSTATE == 1)                                   // If PTT is active...
  {
    currentMillis = millis();                          // ... get the current time
    if (currentMillis - startMillis >= 1000)           // ... and if more than 1000ms has elapsed since last element was sent
    {
      PTTSTATE = 0;                                    // ... clear the PTT flag
      digitalWrite(P_PTT, LOW);                        // ... and release PTT
    }
  }
}

// Key the transmitter and sound a beep
void keyAndBeep(int speed)
{
  PTTSTATE = 1;                         // Set PTT flag
  digitalWrite(P_PTT, HIGH);            // Activate PTT
  digitalWrite(P_CW, HIGH);             // Key down
  for (float i = 0; i < (speed / (tone_val * .002)); i++) // Beep loop
  {
    digitalWrite(P_AUDIO, HIGH);        // Set audio pin HIGH for 1ms
    delayMicroseconds(tone_val);
    digitalWrite(P_AUDIO, LOW);         // Set audio pin LOW for 1ms
    delayMicroseconds(tone_val);
  }
  digitalWrite(P_CW, LOW);             // Key up
  startMillis = millis();              // Start PTT "hang timer"
}


And here's the circuit diagram:
The pot values aren't critical, though linear taper pots should be used for the speed and weight controls and audio (log) taper for the tone and volume.  I'm using 1K, since that's the first thing I grabbed.

Presently, I've got the keyer built on a solderless breadboard, and other than the occasional intermittent connection, it's been a joy to operate.  My Irish/Polish/Catholic ancestry has left me with no natural sense of rhythm, and it's able to mask most of my sending errors!

73 - Steve N8NM

Sunday, April 8, 2018

Arduino - writing and reading a string to/from EEPROM



In my rigs that use an Arduino for control, I like to take advantage of the on-board EEPROM to save the last-used frequency (and other info) so that it's retained over a power cycle.  I didn't do this on my first couple of rigs, and having them power-up to "default" settings bothered me; we're well into the second decade of the 21st century, so why build something that acts like it's from 1980? 

With rigs using the Si5351, this was fairly simple because the frequency data is in long integer format.  With the NiceRF 818 modules I'm using in the Shack in the Box, however, the data is stored as string variables that get passed from the Arduino to the modules as part of a longer AT command string thats sent over a serial connection.

So, what I did was write functions to break each string up, byte by byte, and store the integer value of each byte (they're in ASCII otherwise) to EEPROM. Likewise, reading is done one byte at a time, and each byte is concatenated (fancy way to say appended) to a string holding the "reassembled" data word.

Since others may find this helpful, below is a sketch that writes the string "0123" to the first four slots in EEPROM, then reads and reassembles it back into another string, displaying each step in the Arduino IDE's Serial Monitor as it progresses.

One thing worth mentioning is that the EEPROM has a finite number of write cycles before it gives-up the ghost.  In a rig where you only write to it at power down (or, in the case of the SITB, when storing a VFO to memory), this should never be an issue, but you have to be careful when writing your sketch not to put EEPROM.writes in a loop, else you could burn it up fairly rapidly.  That's the purpose of the "flag" variable in my example sketch:  After one write/read cycle, the flag is set and the loop won't call to the write function until the next reboot.

Anyway, here's the sketch:

/*
   Sketch writing and reading a 4 byte STRING of numerals to/from EEPROM, then printing them in the serial monitor.
*/

#include<EEPROM.h>                                                      // Include EEPROM library

String TestString = "0123";                                             // Declare string variable to be input to sketch.
int addr;                                                               // Declare variable to store EEPROM address.
int flag = 0;                                                           // Declare variable used as a flag to signal loop after write/read cycle completes
String OutputString = "";                                               // Declare string variable to store output from sketch.

void writeeeprom()                                                      // Function to write 4 bytes to EEPROM:
{
  Serial.print(F("TestString = "));                                     // Print input string (TestString) to serial monitor
  Serial.println(TestString);
  for (addr = 0; addr <= 3; addr++)                                     // While addr = 0 to 3, incrementing by 1 each iteration...
  {
    Serial.print(F("In Loop, writing "));                               // ...Print byte being written to serial monitor...
    Serial.print(TestString.charAt(addr));                              //
    Serial.print(F(" To EEPROM Address "));                             // ...Print the address being written to to the serial monitor...
    Serial.println(addr);
    EEPROM.write(addr, (TestString.charAt(addr) - 48));                 // ...The byte will be the ASCII value of the number, convert it to its integer
  }//                                                                   // ...value and write it to the EEPROM.
  Serial.println(F("String written to EEPROM"));                        // Write message to serial monitor when loop completes.
}

void readeeprom()                                                       // Function to read 4 bytes from EEPROM:
{
  for (addr = 0; addr <= 3; addr++)                                     // While addr = 0 to 3, incrementing by 1 each iteration...
  {
    OutputString += EEPROM.read(addr);                                  // Read byte at 'addr' and append it to OutputString...
    Serial.print(F("In Loop, reading "));                               // ...print the byte being read to the serial monitor...
    Serial.print(EEPROM.read(addr));                                    //
    Serial.print(F(" From EEPROM Address "));                           // ...print the address being read to the serial monitor.
    Serial.println(addr);
  }
  flag = 1;                                                             // Set the flag to indicate that we've written and read all four bytes.
  Serial.print(F("OutputString = "));                                   // Print the reassembled string to the serial monitor.
  Serial.println(OutputString);
}

void setup()
{
  Serial.begin(9600);                                                   // open UART serial port at 9600 bps
}

void loop()
{
  if (flag == 0)                                                        // While the flag = 0
  {
    writeeeprom();                                                      //... write to EEPROM...
    readeeprom();                                                       //... then read from EEPROM
  }
}


And here's what is output to the Serial Monitor:

TestString = 0123
In Loop, writing 0 To EEPROM Address 0
In Loop, writing 1 To EEPROM Address 1
In Loop, writing 2 To EEPROM Address 2
In Loop, writing 3 To EEPROM Address 3
String written to EEPROM
In Loop, reading 0 From EEPROM Address 0
In Loop, reading 1 From EEPROM Address 1
In Loop, reading 2 From EEPROM Address 2
In Loop, reading 3 From EEPROM Address 3
OutputString = 0123
 

 

Saturday, March 31, 2018

Shack in the Box: A 2m/70cm FM transceiver

This is a project that I started last year and, after a few weeks, lost interest in it until recently.

During my usual web snooping for interesting parts, I came across these VHF and UHF modules being sold by Nice RF in China.  About the size of three side-by-side postage stamps, each is a complete (except for the low-pass filter and audio power amp) transceiver for the VHF (136-174 MHz) and UHF (400-470 MHz) bands.  The modules are good for about a Watt output, and are programmed serially via a series of AT commands - perfect for interfacing to an Arduino!

The modules are the ultimate black-boxes and contain all of the RF, switching, demodulating, and CTCSS/DCS circuitry, so building this rig has been much more of an effort in programming than it has in building hardware, which is partly the reason that I lost interest in it last May; I had gotten stuck in how to program a few functions and temporarily burned-out.  But, after taking a break from it, I've been making good progress over the past few days.

One of my peeves about many 2m/70cm rigs is that they're not at all intuitive to operate.  My ancient Kenwood TR-7950, on the other hand, is a breeze; even someone unfamiliar with the radio could easily figure out how everything works on it, so I used that as my "model" for the user interface.

Basically, one can either enter the desired frequency via the keypad (VFO mode) or recall it from one of 16 memory channels, selected using the pot to the right of the display.  The display shows the frequency, repeater offset, tone frequency and mode, and also indicates whether the selected memory is in, or locked-out of, the scan list.

The keypad itself is a 16 switch matrix that I purchased from Ebay.  To conserve I/O, I've interfaced it to the Arduino via a resistor divider network, allowing it to be read using only one analog I/O pin.  Likewise, the memory selection is done using a pot and another analog I/O pin.

Serial communication between the Arduino and VHF/UHF modules is done using the "Soft Serial" libraries, which allows using other I/O pins for serial comms and keeps the UART free for programming/debugging.  

Not shown on the VERY INCOMPLETE schematic below is the LCD module, which talks to the Arduino over the I2C buss. 

Cosmetically, I've long been intrigued by the Paraset tranceivers that were provided to the resistance during WWII, so the vague resemblance isn't coincidental.

Obviously, this is still very much a work in progress, so I'll be posting a few follow-ups as things progress.  I just got this to the point to where I've made a few QSOs with it, so I wanted to share it in its raw, al fresco state.

Preliminary (very!) and incomplete schematic - for inspirational purposes only, do not duplicate!!!
 One may wonder why anyone would go through the trouble of building something like this when you can order something like a Baofeng for $30.  That's a valid question, and my answer is simple: Because I can!


Monday, March 19, 2018

Giving A Voice to the $20 Bill - In CW.

It's been said many times that there's nothing like the sound of a direct conversion receiver, and a couple of weeks using the $20 Bill has certainly affirmed that for me, the direct-to-audio experience with a competent DC rig is indeed something special.

But, I didn't get into this hobby just to listen, so it didn't take long (maybe two days) before I started noodling and doodling a transmitter board to install inside the rig.


Being true to the theme of the original rig, I used all common and inexpensive transistors: 2N3904, 2N3906 and a pair of BD-139s in push-pull to deliver roughly 5 Watts when using a 13.8V supply.  Nothing fancy and nothing being pushed very hard makes for a predictable and stable QRP transmitter.

"Splicing" it in to the rig was simple: The VFO from the receiver is "hard wired" to the input of the transmitter, meaning that it is always connected to both circuits rather than switched between RX and TX.  At the other end, I connected a relay at the junction of the mixer and bandpass filter to switch the filter/antenna circuit between the two modes.  Similarly, a relay is inserted between the audio driver and power amps, allowing switching between receiver audio and transmitter sidetone.

A few hundred Hz of VFO shift is needed when transmitting, else people will reply at your zero-beat frequency.  To accomplish this, one set of relay contacts switches a gimmick capacitor in parallel with the main tuning capacitor.  The gimmick is simply a pair of insulated wires twisted together, the number of twists was determined experimentally.

To use the rig as a transceiver, you simply tune stations to the lower side of zero beat, flip the T/R switch and pump the key.  It doesn't get much easier.

Since building the transmitter board, I've made several QSOs and, other than my signal being weak, the reports are that the tone is pure and free of annoying clicks and/or chirp - everything I look for in a CW transmitter.

Simple rigs like this are a blast to operate.  The appliance guys don't know what they're missing!


 

Thursday, March 1, 2018

Cheap and Easy Audio Filter For DC Receivers

I've been having a lot of fun with the $20 Bill rig, it works great, but, as with anything, there's always room for improvement.

When I designed the thing, I was going for simplicity, so the audio bandpass filtering was very rudimentary, basically consisting of the coupling capacitors to limit the lows and a couple of shunt capacitors to roll-off the highs.  I like a wide receiver, but after a few days, even I thought it was a bit too wide. 

My first few efforts used discreet components, but these either proved marginally effective or used more parts than the rest of the rig, so, alas, I broke down and resorted to the magic black boxes.  But, rather than use a modern DSP subsystem, I went somewhat old-school and used an IC that's been around pretty much forever: The LM324.  The '324 is a quad op-amp that's very common and dirt cheap; yeah, there are better parts, but the ol' '724 is good enough for this application.

 There are excellent active filter tutorials elsewhere on the web, so I'll just describe the circuit at a very high level:

Each stage is comprised of a high-pass filter (3.3K in series with .01uF) on it's input, and a high-cut filter (68K paralleled by .01uF) in it's feedback loop.  By cascading eight stages, I was able to get very decent stop-band attenuation; four stages probably would have been perfectly adequate, but more is always better, right? 

Here's what LTSpice says the passband should look like:


Built in the physical realm, it's a bit tighter than that, likely due to the loose tolerances of the parts I used, which is to be expected when the resistors and capacitors cost less than a penny each when bought in bulk.  But, it's good enough!

With any filter, the real test is in listening to it: What's it sound like?  Actually, very nice - it reminds me a lot of the 3KC filter in my SX-101A, very pleasant when listening to SSB signals and more than adequate for casual CW.  My only gripe is that it's a bit noisy, but that may be due to where I have it tacked into the $20 Bill - I inserted it after the volume control, and a better place for it may be at the input to the power amplifier stage.  Maybe I'll try that tomorrow, or maybe I'll do something else.

I'll close with this teaser:  There's another hardware defined transceiver on my drawing board (screen?) and it'll have a very unique architecture - something I haven't seen anyone do before, and there may be a very good reason for that (like, it doesn't work!)