Sunday, April 29, 2012

Swan 270

This is one of the radios that I own, bought it some years ago just because I thought it was fun to be on air with a tube rig, it is, but problem is: I have to many radios for the QSO's I make, 1 or 2 a year, so I was selling it on the local ham forums, unfortunately no one was interest in investing a fair price for the rig so my idea even before placing the advertize, was, to dismantle to get some components, namely the output variable cap's for an antenna tuner project. There are other interesting bits like the IF filter and the BFO crystals that can be reused on transistor transceiver, of course the VFO is a nice candidate to be on the same project. Some tubes can run on 12V and there's a 100Khz crystal to be used on a marker generator.

 I have mixed feeling on doing this because the radio is operational but on the other hand I can get a lot of components for free that will give me also a lot of fun and new projects to do.

The schematic is here: have a look, and let me know what would you use the components for?

Saturday, April 28, 2012

LoTW Processing

Some time ago saw some news about LoTW (Log book of the world) having problems processing the incoming QSO log's. It seems that their system was receiving a lot of log's and had issues processing them.

I've been thinking about this for some time but yesterday decided to make some tests on log processing to see and learn what could be the pitfalls on such a system. Not that I wanted to build such a system but because I burn my brains out doing some rather boring algorithm and needed to cool my ideas :)

Let's see what time it would take to create 500K (500000) QSO's on file then to look for uniq callsign's and finally to search for the position of a specific callsign and qso in the same file.

 Not bad... 52 seconds on my slow machine...
QSO's and call signs randomly create in this format:

Now let's find the uniq callsigns from the QSO list, since they were random generated and due also their long size (2 leters, 1 number and 3 letters) almost none (in percentage) were duplicate, for 1Million (500K * 2) callsigns, 993864 were uniq:

 OK, now we start to see that searching is fast and file creation is slow and that alone starts to explain the slow log processing (or not, since I have no clue on the type of system used), especially if they come by network, although multiple concurrent connections and process can speed it up....I'm sure DOS is not used :)

Also fast is searching 1 callsign QSO's position in file:

...Specially after buffering (file read, in this case done by the OS)... see the difference in the first iteration of the program an the subsequent ones... I am sure that looking for all call signs qso's position in the file after buffering would take less than 20 hours...

I didn't tried different algorithms to optimize the system nor I used a database something I hope LoTW uses. Also the language chosen is not the most blazing fast for this type of operation.

Here's the code used in case you need it for something...

Create 500k random qso's
 // create random qso contacts bettwen random call signs and write on file... just for testing matching qso's
 // by CT2GQV 2012
 // Licence: use and abuse, it's free
 // if you don't change the settings it will create 500K records...
 // settings
 set_time_limit(120); // 2 minutes... instead of 30s... only with safe mode disabled.. or change php.ini..
 $contacts_file = './contacts.qsl';
 // may not be possible in all systems...
 // one stupid way of generating rando chars...
 $characters = array("A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z");
 // let's create
 // let's open the file before...
 $fh = fopen($contacts_file, 'a') or die("ERROR: can't open contacts");
 while ($a<$create_how_many) {
  // 2 leters.... 1 number, 3 letters... for simplifity
  // minimum signal is 233 :)
  // just the creation date...
  // just for fun...
  // remove next line if no echo is needed
  //  echo "$call1:$call2:$utc:$rst:Just a comment\n";  

///// create file contacts.qsl beforeand and chmod to writable...
//    $fh = fopen($contacts_file, 'a') or die("ERROR: can't open contacts");
    fwrite($fh, $data_to_apend);
//    fclose($fh);
  // add the counter...
// closed only after the loop to save some time...
$time = $end_time - $start_time;
echo "\n\nDone $create_how_many contacts in $time secounds and $rst_count QSO's were 599...\n\n";

Find uniq call
 // some settings
 // the file with the QSO's
 $qsl_file = './500kcontacts.qsl';
 $uniq_call_file =  './uniq-call.qsl';
 // let's loop the QSO's file
 $file_handle = fopen($qsl_file, "r") or die("ERROR: can't open the QSO's file");
 // were we are going to store the uniq callsigns
 $file_handle2 = fopen($uniq_call_file, 'a') or die("ERROR: can't open uniq callsign file");
 while (!feof($file_handle)) {
  $lines = fgets($file_handle);
  $pieces=explode(":", $lines);
  if($pieces[0]!="" || $pieces[1]!=""){ // if one or the other are not empty callsigns then save... 
  // the only issue is an empty callsign, but rand on the creation doesn't allow :)
     $temp[]=$pieces[0]; $temp[]=$pieces[1];
 }; // end loop reading the QSO's file

   // it's good to free before another mem request...
   $uniq_call_array = array_unique($temp);

   foreach ($uniq_call_array as $value) {
     // echo "$value\n";
     fwrite($file_handle2, $add_to_file);
  $time = $end_time - $start_time;
  echo "\n$count Uniq callsigns list:\n";
  echo "In $time secounds\n";
Find a contact from a call in the file

 $file = file_get_contents("./500kcontacts.qsl");
 $offset = 0;
 $counter = 0;

    if(strpos($file, $search_call) == 0){
        echo "\nQSO #$counter at pos: 0";

    while($offset = strpos($file, $search_call, $offset + 1)){
        echo "\nQSO #$counter at pos: $offset";

$time = $end_time - $start_time;
echo "\nFound $counter QSO's in $time secounds";
echo "\nFor 993864 call's that should be more or less: $time Secounds... or $hour hours";

Simple hum?

For now I will continue to use paper and a pen for log processing...

Wednesday, April 25, 2012

25 Abril 1974

38 years passed since the fall of the dictatorship regimen that ruled Portugal, now the 25 of April is the "Freedom Day".

A poster I had in my bedroom when I was a kid.

Mostly good things emerged from the April revolution, for instance, now to become a radio amateur one doesn't have to be screened by the political police...and freedom of speech of course, etc, etc...the bad: we continue to be governed by "ass...h..les".

I was a kid back then but I still remember some years after 1974 to see guard towers to look for the political prisoners when they were working outside prision....

This is a "political" post, I'll be back with more electronics...

have a nice day.

Lead-free solder

Honestly I consider myself an average capacity solder, as you can see bellow I used already a fair amount of solder during my life...

...the lower one was bough by my father around 1990 and I recall he saying that it should last till next century, it did :), before that I used bits that I found on my father stuff an some offerings from the school lab....

Now with my ecological conscience I decided to try the lead-free solder you can see on top of the image, well, honestly I tough I was losing my ability to solder, besides the higher melting point than the "normal" stuff, components have to have cleaner surfaces for the solder to get a good grip. Another side issue is I have more burns in fingers since I have to keep components more time on hand on the same position or the solder will break....

Conclusion: I will finish this roll and get back to the environment unfriendly solder (so they say), else I will risk loosing or my fingers or patience to solder...

have fun!  

Tuesday, April 10, 2012

Low voltage oscillator experiments

No rocket science here, I just wanted to see how low can we go on voltage for a simple crystal oscillator.... following the idea of a possible solar cell powered beacon....

Schematic (from BITX transceiver):

Crystal connected directly to ground and I used 390pf capacitors...just run out of 220pf :) and the 120K replaced by an 100K resistor.
Transistor is the incredible 2N3904... what else!

And the lousy photo on the assembly, I used the AM modulator part from my laser experiments (an LM317 regulator)... without modulation of course...

Here the consumption at 1.78V:
..That's mA...

Didn't tried any lower voltage...

And with another voltages...

Emitter is connected to the high impedance input of the frequency counter

Just tested an 10Mhz crystal.

Have fun....

Monday, April 02, 2012

Last post...

Unfortunately last post was my little April 1 prank... but I promise I will try the experiment....who knows if it doesn't work... just have to go out and dig some rocks :)

The frequency shown was from a little UHF oscillator I tried some posts ago...

Have fun!

Sunday, April 01, 2012


O.C.P.: Oscilador Calçada Portuguesa (Portuguese pavement oscillator)

Portuguese pavement (Calçada Portuguesa) is a traditional style of pavement made with stones and its used mostly for pedestrian areas.

Today walking in the sidewalk I started made associations, rock on the sidewalk, rock stable oscillator and then I was "struck" by light, eg: had another "stupid idea".
What if I can use the mini quartz crystal formations on the stone for an oscillator, heck, someone made it's own transistors, diodes and valves, why can't I build a was the day!
I went to a nearby street were they were placing "calçada Portuguesa" and borough one stone....

I have a technical notion on how to break a stone: just it her with the hammer!

Got a small piece and then made a support and hoke it up to the test oscillator...'s the result:

....Initialy it didn't started to oscillate because the crystal part on the rock was not making contact with the copper foil. I then grinder a little bit the piece of rock and incredible it started to oscillate, this one was near the UHF band, bigger pieces give lower frequencies.
After some more tests, discovered that I got around 10Khz higer on frequency by each time the stone was reduced. The frequency is as stable as a normal crystal but also depends on the force applied. So a screw can be placed to fix the rock and make a simple vfo.... cool!

Have fun today!