Tuesday, November 08, 2016

Arduino Scalar Network Analyser - proof of concept

Got this idea since needed to check the low-pass filter performance of the Bitx on LF

Basically followed the projects from the following links:


Here's a quick deployment for testing:

Didn't implemented all the parts and according to schematics shown in the previous url's since it was just a proof of concept.
Basically what I did was the AD9850 DDS without buffer and the AD8307 log detector connected to the Arduino running the code changed to conform my AD9850 connection and the Python aplication running on PC.

On the previous image one AM 9Mhz crystal filter is placed between the DDS output and the log detector input. The software running on PC takes care of setting the sweep on the DDS and collection of power level from the AD8307, generating the power to frequency graph (or vice-versa).

So without correct termination and calibration you can get an idea of the filter bandwith.

Tested with an 8 Mhz  crystal in series and this is the result:

If on a full sweep sometimes it's not perceptible where where the "peak" is:

 Just for fun a 47 Ohm resistor in series betwen the DDS and Log detector:

As refered I had to change the Arduino code to fit my DDS connections and the way dds set frequency.
In addition to that since the Python code on the PC is using a fixed com port I setup the arduino to come up allways as /dev/ttyArduino.
In the future I might box it up and tighten the loose ends, that is; include the buffer amp on the DDS, probably changing the code to allow also a manual sweep...

In the mean time my changed code on the python script (DIY60MhzSNA.py) bellow:

# change this to the appropriate serial port for your setup
SERIALPORT = "/dev/ttyArduino"

Link to download: http://www.changpuak.ch/electronics/Arduino/NWA-DUE/DIY60MHzSNA.zip

Since I use Linux (didn't tested the code on win...that is; on legacy OS :)
and for it to come up allways on /dev/ttyArduino if you use recent kernels/distro you might want to add a file on your /etc/udev/rules.d/ with the following contents:

SUBSYSTEM=="tty",ENV{ID_SERIAL}=="1a86_USB2.0-Serial", SYMLINK+="ttyArduino"

Change your serial to whatever you have (look for dmesg output) or look for the documentation on udev, otherwise look for the port when Arduino is connected and change the Python code.
To run the code just: python DIY60MHzSNA.py

Arduino connection to DDS (re-used from other projects):

...output of AD8307 is going to Arduino A 7

Arduino code bellow (watch out on copy past since blogger tends to break formatting):

// AD9850 and AD8307 VNA
// for manual control and computer control with DIY60MHzSNA.py
// direct link for python software here: http://www.changpuak.ch/electronics/Arduino/NWA-DUE/DIY60MHzSNA.zip
// for the ad8307 and buffer amp, here: http://rheslip.blogspot.ie/2015/08/the-simple-scalar-network-analyser.html
// Code changed by Ricardo - CT2GQV - 2016
// From the original code and description bellow:
// AD9851 DDS and AD8307 power meter
// sept 2013 RH
// small adjustments to match this project:
// http://www.changpuak.ch/electronics/Arduino-Shield-TOBI.php
// 02.11.2015 Alexander Frank
int AD8307 = A7;
char inputcmd[100];  // serial data input
int cmdindex=0;

#define W_CLK 8       // Pin 8 - connect to AD9850 module word load clock pin (CLK)
#define FQ_UD 9       // Pin 9 - connect to freq update pin (FQ)
#define DATA 10       // Pin 10 - connect to serial data load pin (DATA)
#define RESET 11      // Pin 11 - connect to reset pin (RST).

#define pulseHigh(pin) {digitalWrite(pin, HIGH); digitalWrite(pin, LOW); }

void dBm_power()
  float dBm=0;
  int i;
  for (i=0;i<20 analogread="" average="" br="" dbm="" float="" i="" nbsp="">  dBm=dBm/i;
  dBm = dBm - 869;
  dBm = ( dBm * 0.1014342 ) - 6.6 ;   
  Serial.print(" "); // may help Python parser
  Serial.println(" "); // may help Python parser
void raw_power()
  Serial.print(" "); // may help Python parser
  Serial.println(" "); // may help Python parser
  // transfers a byte, a bit at a time, LSB first to the 9850 via serial DATA line
void tfr_byte(byte data)
  for (int i=0; i<8 data="" i="">>=1) {
    digitalWrite(DATA, data & 0x01);
    pulseHigh(W_CLK);   //after each bit sent, CLK is pulsed high

// frequency calc from datasheet page 8 = * /2^32
// my original code was senfrequency();
void SetFrequency(double frequency) {
  int32_t freq = frequency * 4294967295/125000000;  // note 125 MHz clock on 9850
  for (int b=0; b<4 b="" freq="">>=8) {
    tfr_byte(freq & 0xFF);
  tfr_byte(0x000);   // Final control byte, all 0 for 9850 chip
  pulseHigh(FQ_UD);  // Done!  Should see output

void setup()
  pinMode(FQ_UD, OUTPUT);
  pinMode(W_CLK, OUTPUT);
  pinMode(DATA, OUTPUT);
  pinMode(RESET, OUTPUT);

  pulseHigh(FQ_UD);  // this pulse enables serial mode - Datasheet page 12 figure 10
  SetFrequency(1000000); // 1 MHz default

void loop()   // Arduino superloop - where everything gets done
  char ch;
  long int temp;

// serial command interpreter
// enter a number to set the frequency, anything else shows power
  while (Serial.available()) {
    if (((ch >= '0') && (ch <= '9')) || ((ch >= 'A') &&
            (ch <= 'Z'))) inputcmd[cmdindex++]=ch;
    if (ch == '\n') {    // parse command if its a newline
      inputcmd[cmdindex]=0; // terminate the string
      if ((temp=atol(inputcmd)) > 0) SetFrequency(temp);
      else dBm_power(); 
      //else raw_power();  // python has trouble with floats
      cmdindex=0; // reset command line     

-- That's it, a nice little project for some tracing fun! I would prefer a "R&S" but there's no budget :)

Have a nice week!

Sunday, October 23, 2016


Nothing special, just me, never learn...

Some time ago I got an Yaesu FT-7 from a friend to repair/check along with an FL-110 companion amp.

I swapped something for the FL-110, fixed the FT-7 and handed it to is owner.

3 weeks ago saw one for sale and in good condition... so why not..I already have the RF amp for it (the amp was intended for the Speaky transceiver)!

Here's what arrived in the post office:

With mic, manual and power cable:
 ...but not the tuner.

And bellow the FL-110 amp I have in Portugal along with my friend's FT-7:

 That's it... another radio in the shack...

...In the mean time started another project:

When finish will post more details... hopefully still this year.

Have a nice week!

Sunday, October 16, 2016

Bitx on Low Frequency / Long Wave receiver

    The number of LF receivers (mainly for NAVTEX on 518) I made only has parallel with the number of Airband ones.
This receiver originally was made in a breadboard but I was having some reception problems and didn't like the appearance, so, ordered a Bitx 20 PCB from India and reused the components. Basically it's very similar to the Bitx design with only small changes.
After completly built I discovered the reception problem I was having, on the prototype board was one of those pesky CFL lamps. Discovered that already on testing phase of this new one after one day when my daughter turned on the lamp from the hallway, which was allways on when I did the tests on the previous board. This "new" one was having the exact same issue, lots of noise. Live and learn. Never mind, I think this one is much more "clean" inside.

Well, has I was saying is a Bitx 20 PCB and schematic (without the TX part) but using ADE-1 mixer and with an AD9850 DDS as VFO.
Input filter is a 500Khz low pass (or arround that, still needs validation) and the RF input is on the mixer IF port because is the only input/output on the ADE-1 that can go to 0 Khz and less than 1Mhz.
In practice 0 Khz is not obtained since it will beat against the VFO and BFO, also noticed that bellow 20Khz it starts to appear a lot of "artefacts" (so it looks like) due to being close of the BFO

I have been having some fun receiving time signal stations, LW stations and even stations on the 500Khz fringe. That include 60Khz MSF from UK, 77.5 Khz DCF 77 from Germany, on the LW: RTE from Ireland, BBC UK, RTF France, and MW: RNE from Spain on 558Khz. Also allready received NAVTEX on 518 Khz.

(here still in prototype tests showing VFO frequency for DCF 77 station)
"IF" is also different from the original Bitx, I used 8Mhz as my IF after selecting crystals for the filter.

On to more details:

The input filter:
After the filter it will go to the 2SC2570 preamp and only then to the mixer as on Bitx, I also tested with an 2N3904 replacing the 2SC and it also worked. Next step will also include a switch to bypass the preamp and a switch to use an active antenna injecting 12 V on the line.

The ADE-1 placement as per original design:
Note: pin 2 and 3 of the ADE-1 should swapped from the original schematic if you want LF range or the "normal" range/arrangement of the mixer.

Schematic with the mixer part:
Ignore the circuit outside the green box's since I used the original Bitx on the other parts, it's just to show the ADE-1 connection on the VFO and BFO side.

The inside of the "rig":
..still a proper antenna connector needs to be placed.

The Arduino code used for control of the VFO is just an adaptation of other code I made for other project. Basically navigates by press of the encoder betwen fixed channels and then you can fine tune the frequency of that channel. No provision for saving, also will not post code, if needed ask, I can provide.

The DDS connection to Arduino is like this, just use the "green" part, I'm to lazy to draw, so I reused AD7C nice schematic for display purposes:

The channels I programed so far in code are:

double stations[9]={ 8518000,        8490000,        8077000,     8018000,   8059300,      8198000,   8252000,   8162000 ,  8558000,};
 String ids[9] = {    "Navtex 518",   "Navtex 490",   "DCF 77.5",  "18Khz",   "MSF60",      "BBC",     "RTE",    "TDFrance" ,"RNEsp   "};

Note, I programmed directly the VFO frequency on the stations array.

Antenna I used so far is just a indoor single loop with 70 x 70 cm and no matching directly to the input filter.
Volume is a litle on the low side, I think mainly due to low gain of the antenna and low noise of the Bitx design.

Have a nice week!

Sunday, September 18, 2016

22 pin Extension/Edge/Riser adapter for the FT-107, FT-307

It's possible that this could work for other Yaesu equipments using edge adapters but for the Yaesu FT-107 / Sommerkamp FT-307 on the 22 pin connector it works.

I was looking around for the possibility of creating a riser/extension card for troubleshooting the memory unit (DMS unit) on the FT-307, acquired recently, (it's not working 100%) and all seemed too much expensive for one time use (so I hope)

Looking around on what would be the references for the edge adapters used in the Yaesu and not finding it, decide to take my change on less than 2 Eur (1.71 inc shipping) and got one adapter from the far east, it was advertised as 805 series 3.96mm pitch card edge connector for PCI, AGP connections, this image:

Without having the exact details but after measuring the DMS unit pin spacing I decided it should be ok. Here's what I got in front of the DMS slot.

It fits, a little sluggish, that is; a tight fit, but workable, I had to lever a bit to remove after initial testing. Probably with more use will loosen up.

 I'm not going to make the riser card instead will use a stand alone simulator card as the radio where I can fit the DMS unit, this card basically will output to the DMS the external VFO output, Will also mimic the memory selector and the memory save function. It's the most workable solution since I decided to keep the FT-307 in Portugal and only bring the DMS unit for fixing.

 DMS unit opened:
 Yaesu slot for the DMS:

If I fail to fix the DMS unit I'm planing on build my own with an Arduino and a AD9850 or similar, for now it's just a backup plan.

Have a nice week!

Tuesday, August 30, 2016

5LO38I CRT test

Having this CRT for some time, never tested it, so last weekend with the new soldering iron was the right time for it.

Honestly can't remember for which project I got it, in any case it will be useful in the future.. so I hope,

Power supply was based on this diagram:

From this site:

Added some discharge resistors so it unloads faster, even so it would take around 10m to go to 0v.

The brightness and focus control diagram:

From this reference:

Didn't used any circuit for testing the deflection but touching with a long wire is enough to cause deflection, so it's working also.

I might need to tune the controls and power supply since the dot is a little too big, don't know exactly what is the relation between focus voltage differential from the electron gun and the dot size, sure it's related.

The box it's standard soap box in plastic so I'm not tempted to touch the circuit while it's operating. If I finish the project it will be for sure placed in a more attractive enclosure.


Didn't had an isolation transformer 230/230 so used an 230/12 connect to a 15/230v. I had my shares of electric shock's and will no risk touching a rectified point directly to mains.

The controls:
The rectifier board:

upside down on the box so the electrons can drop easily...

And the connection to the CRT pins, this is the best way found since I had no holder for it, no mess with solder and quite isolated:

For reference, additional sites with more information case you want to build  a scope based on this CRT tube:


The technical details of the tube:

Have a nice day!

Sunday, August 21, 2016

Replacing the Maplin N78AR solder station Iron

One of the first things I bough when got to Ireland, three years ago, was a soldering station.

...Well it's not technically a solder station it's more of a soldering iron stand with some control on the iron power. Similar to a light bulb dim circuit.

In last few weeks the soldering tip was getting completely destroyed, normal after 3 years of intense soldering, I went to replace just to find out the retaining nut was completely stuck and in the process I broke the internal heating element.

Since there was no spare irons on sale for the station model, went online and spoted a vey similar one, tough less powerfull, 30w, the standard is 50w.
My guess it's the same manufacturer and then re-branded.

On the left is the new one... by this time I had removed the cable from the old one to prevent any accidental connection since internally the heating element wire was broken.

Replacing was just a matter of connecting the new soldering iron cables.

I reused the stress release rubber from the old cable
 The station has a retaining slot for the stress rubber, nice build touch.

Since I only have one working soldering iron could not solder the contacts of itself (I could but not safe to do), so they were very well wrapped and isolated.

The internal control circuit is a very simple one so no change was needed.

To open the "station", remove the 4 screws bellow the rubber feet.
Overall I find it well build. For the price and if you don't need anything fancy it can't go wrong.

Now I can go back to melt some solder.

Have a nice week!

Monday, July 18, 2016

FT-307 / FT-107 Internal power supply connection to 230V

I'm now in holidays in Portugal and finally could see the Sommerkamp FT-307 (Yesu FT-107) I bough last time. If you don't know the story,  bough a non working unit/unknown status some time ago and asked a friend to collect and keep it until my return.

Well, the radio is as was advertised, non transmitting and not tested after some smoke left the equipment during transmit.

I powered it on as soon as received the equipment and it's OK receiving but no transmission. Here's the first pictures:

Now, the equipment was set up to use 220v on the internal power supply, currently mains is at 230V so I needed to make the changes before continuing testing.

I was surprised how easy was to make the change, that is working inside the radio, here's the process:

1- Remove the top cover (you need to remove the handle bolts also), no picture since I'm sure everybody already did this to a radio at some point in time.
This step is only needed as a helper to check the internal routing of the cables on re-assembly.

2- Remove the 6 bolts from the back cover:

3- After the cover removed, remove the 4 fixing bolts from the PSU unit to the chassis:

4 - ...then gently pull the PSU unit and remove the 4 bolts securing the gridded top cover to expose the connections:

 5- Previous picture shows the 220V connection... next one already with connection on 234/230:

... that's it, two solder points changed, one is the "jumper" and the other the "line" both from 110 to 117.

Additional notes: the diagram and the vcc as measured on the radio meter:

Have a nice week!