Monday, April 24, 2017

"Telrad" board to work


Just spent part of the weekend populating the "gig" with auxiliary circuits for the "Telrad" board testing, following previous posts.

Nothing special, a 9.000 Mhz BFO an LM386 audio amplifier and the power circuit, vfo is external. Not using the +12/0/-12 for supply, only +/- 9V from small batteries.

VFO is from a si5351 controled by the Arduino, signal level from the VFO is reduced to show around 100mV on the mixer carrier input pin (10)

BFO is from the Bitx and other designs directly connected to the board BFO input #11:

No provision with serial inductance or capacitance, at the moment, to "tune" the frequency.

Audio amplifier is a stock LM386 design and interestingly got some audio oscillation from the circuit that I will fix on latter experiments, probably with a RC low pass filter on the supply voltage. Connection was made at the audio output of the board and now is at the isolation transformer out.

Test signal is injected from my S9 signal generator to the front end and I do get audio ! Success...but only with injection bypassing the inboard front end filter and directly to pin 1 of the first MC1496 mixer.
Signal level injected from the signal generator even without proper measurement and calibration is probably around S4.
Audio is on the low side so more testing is needed.
I didn't managed to get LSB, only USB, have to check why (proably switching circuit) although if injecting 9Mhz directly on the LSB filter output I could be ear the signal with low level.

Another view of the first success:

I chosed 3.6Mhz since, apparently, that's around the front end filter center frequency...I start to suspect it's not, still need to bypass the filter to get audio out.
Probably in the future will remove the filter components from the board (last resource) and use a pre-amp also.
Injecting 9 Mhz on the front end is also audible as an audio tone, that's expected and is also a confirmation the board is working.

Will post more info as soon as more experiments are made.

Have a nice week!

Sunday, April 09, 2017

More filters III - "Telrad" board".

Just another update to these filters and boards as on More filters I and update II

Found the page of GW4SAE/ZL4SAE with an updated schematic of the board, no question, Will made an excellent work.

Basically just confirms the schematic from here as referenced on the previous post about this boards.

Also in regards to the filters in the board, some time ago I found the following: (From here and here)

XF-9 S 44
XF-9 S 42
XF-9 S 43

S42: bande passante=+/- 3k6 à -3db : fréquence centrale 9.000000 MHZ
S43: +/-1K55 à -3db : 8.998200 MHZ
S44: +/-1K55 à -3db : 9.001800 MHZ

Capa d'entrée et de sortie: 25 pF
Z entrée/sortie 560 ohms (mesurés)  ..."

In the mean time I started to prepare the board to make also some experiments, maybe a future receiver.

Backside of board:

Removing the extra hardware:

Have a nice week!

P.S. Just made a small jig to take on the underside the audio amp, bfo and vfo for further testing, time permits:

Sunday, April 02, 2017

S9 signal generator, another one.

This is not my first one, anyhow since the other is 1600Km away and I needed to tune a receiver, here's the "new" one:

 Allready helping tunning IF coils of a transceiver in kit form (will write more on that latter):

Here's the schematic:

It's similar to the Elecrat signal generator ( and the Norcal one.

The schematic I loosely followed is from here: KV4QB has a nice write-up on the generator.

I didn't placed the capacitor in series with the crystals and the attenuators are both in line since I'm interested on the lowest possible signal.

Construction and boxing, an house electrical junction box and some pcb made the trick:

The power clip for the 9V battery was made reusing one old battery terminal and then glued for rigidity:

Testing connected to the FT-707 it displays around S1 but since I calibrate the s-meter by ear, guess might be getting wrong results, If time permits will test with the AD8307 ...anyhow that one needs calibration also.

Here's level to s-meter table:

Have a nice week!

Thursday, March 30, 2017

Boxing the LC meter

Got one of those "cheap" LC meters from the usual online shopping site:
The unit reference as advertized is:
"LC100-A High Precision Digital inductance Capacitance L/C power Meter module"
I might add: just doesn't make toasts but better than sliced bread...

Quality of the meter is not bad and looks quite accurate, at least I measured some marked capacitors and inductors and was in the specified values/range.
The only lower construction quality part was the alligator cable that was delivered with the meter, it was not soldered, just crimped, that's been fixed already:

So far it has helped me to identify some cap's that lost marking and confirming inductors for filters.

The box used is a box for housing electrical stuf with water projection protection (not needed) and was used mainly because it's plastic, relatively cheap and I could make all the holes with a knife.

It ended up like this:

I used very short cabling for the leads so it does not influenciate much the measure.

Before every measure or changing ranges a calibration/zeroing is needed, here's the procedure:

* Inductance: Short the terminals, press the reset (red button), insert the inductor and then measure

* Capacitance: Open the terminals, press the reset (red button), insert the component and measure


Power is provided by an usb cable directly to the board. The power switch was set to always on.

Another view:

In the mean time I wrote the knobs function directly on the plastic cover since I kept forgetting.
After the multimeter this is probably the second most used test equipment here, really handy.

Have a nice day!

Thursday, February 02, 2017

More filters II

Some long time ago I bough a board with some SSB/AM filters atached, the idea was to remove and use the filters for some receiver. Upon receiving it, thought it would be nice to use the board itelf since it cointained what looks like an IF chain of a receiver. Never had the time to reverse engineering it.

The board is this one as on the original post:

Some other sellers on the "eb/seller" site are just advertizing the filters, I have another filter kit that got already in separated state from the mainboard.

Today I got an email from Szilard - HA6VSR that kindly provided links, that he found, to the diagram and description. The diagram looks like what I was expecting (even better) except I tough the AM filter was for AM, in fact is used as a first filter in chain for the 9Mhz SSB ones as per the diagram from the link bellow:

I think it will be easy to make a receiver with this, time permits...

The links, courtesy of Szilard:


Have a nice day!

Friday, January 20, 2017

Bubble display QDSP-6064 and MAX7219

Last year got some small "calculator" bubble shaped 4 * 7 seg. led displays thinking it could be nice for a frequency display or some other stuff.

I was just missing the IC for serial connection/display driver since the Arduino has not enough pin's for the job.

The MAX7219 display driver arrived this week and without further I did the needed connections according to data sheet, sort of, it worked first time with only two switched segments, promptly corrected.

Each DIL display has set of 4 digits so bellow I'm using two set's.

The outcome of the software/hardware combination:

The display connection/aka "rats nest":

Full picture with Arduino:

MAX7219 pin-out and connection example:

QDSP-6064 display pin-out:


The resistor for current limiting on the MAX IC (38K) was placed without any calculation only to be conservative. Setting the bright to "4" on the code (lc.setIntensity(0,4);) is more than enough for good readability.

Additional lecture:



Arduino code for display testing:

// test code for bubble display HP QDSP-6064 and max7219
#include "LedControl.h"
#include "Wire.h"

#define PIN_DIN          12 // pin 1  on MAX72XX
#define PIN_CLK          11 // pin 13 on MAX72XX
#define PIN_LOAD         10 // pin 12 on MAX72XX

int di1=0; // first digit from Right to left is DIG0 on max7219
int di2=1;
int di3=2;
int di4=3;
int di5=4;
int di6=5;
int di7=6;
int di8=7; // left most digit is DIG7 on max7219

LedControl lc = LedControl(PIN_DIN, PIN_CLK, PIN_LOAD, 1);

void setup()
  // MAX72XX is in power-saving mode on startup, we have to do a wakeup call;

  lc.setDigit(0,di1,0,true);   // if true then show the decimal point  / DIG0
  lc.setDigit(0,di2,1,true);   // digit number 2 / "address" 1 / DIG1

void loop()
// do nothing here, the display was on during setup...


In the mean time I loaded code for a frequency counter. That will be part of another project.

Have a nice weekend!

Sunday, December 04, 2016

Arduino Scalar Network Analyser - boxed and DDS/power meter mode code.

I jut boxed the Arduino "network analyser" following previous post and also changed the code so it can also double as a standalone power meter and VFO.

Here's measuring the output from the AD9850 in "DDS/meter" mode. DDS out on the left BNC and AD8307 input on the right, labels will be placed!

Still need to calibrate the power meter in the code, it's not correct, the scope was showing more output power than the -52 dBm on display.

Here's the noise floor of the AD8307:
 the value is more in-line with the IC spec's, in any case still needs calibration.
Frequency can be change by means of the rotary encoder (red on the right) and the mode between the VNA and DDS/power meter is changed by the black press button. Default mode on start-up is VNA/computer control mode like bellow:

Inside during first stages boxing, AD8307 is inside the screened box:

Code is bellow:
// AD9850 and AD8307 VNA
// for manual control and computer control with
// direct link for python software here:
// for the ad8307 and buffer amp, here:
// with LCD code and dds code from my vlf_receiver with ad9850
// From the original code and description bellow:
// Ricardo / CT2GQV / 2016

#include   // Comes with Arduino IDE
LiquidCrystal_I2C lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
// 0x3f the yellow lcd  
int AD8307 = A0;  // for the Uno
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 BUTTON_MODE 7 // digital pin 7 to change from computer control to manual control.
int mode=0; // starts on mode 0, VNA then if mode 1 will be manual control for power meter and dds oscillator
int val=1; // keeps the mode value of the button, starts high due to pull up resistor
int lastmode = 0;

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

// encoder addon
 // from
 int encoderPin1 = 3; // D3 nano
 int encoderPin2 = 2; // D2 nano
 int encoderSwitchPin = 4; //push button switch // D4
 volatile int lastEncoded = 0;
 volatile long encoderValue = 0;
 long lastencoderValue = 0;
 int lastMSB = 0;
 int lastLSB = 0;

int station_number = 0; // start station from the stations array... code from vlf receiver
int maxstations = 11;
// pre populated common test frequencies
double stations[11]={ 1000000,   10101000, 9000000 ,  455000,  8000000,     18160000,   77500,      14200000,   4000000,   666000 ,  518000,};
//                    wwv         rtty      9Mhz IF    455 IF    IF vlf        17m         dcf         20m         IF 4Mhz   rdp        navtex
int fstep = 5; // frequency step Hertz
int last_station = station_number;  // last station equals startup station number

 double Freq = 10000000;
 double BFO = 0;       // needs calibration 2.3Khz to be in freq // 249.73 - 252 AM
 double fcomp = 2390; //  2.3 frequency diff for sideband and ad9850 offset from real.
 double lastFreq = 0; // keeps the last freque for not refreshing constantly the display

float dbmvalue=0; // to update on the LCD

 void updateEncoder(){
  int MSB = digitalRead(encoderPin1); //MSB = most significant bit
  int LSB = digitalRead(encoderPin2); //LSB = least significant bit
  int encoded = (MSB << 1) |LSB; //converting the 2 pin value to single number
  int sum  = (lastEncoded << 2) | encoded; //adding it to the previous encoded value
  // update frequency, + or - depending on BFO side + or - 8 Mhz injection so allways increment to the same side // reverse in the last if statement
  if(sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011) {encoderValue ++; Freq+=fstep;};
  if(sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000) {encoderValue --; Freq-=fstep;};
  lastEncoded = encoded; //store this value for next time
  newfreqtoad9850(); // update the ad9850 with the new frequency 

void newfreqtoad9850() // sets new f on ad9850 and add-s remove the compensation for the offset
 // sendFrequency(Freq-fcomp);  // fcomp is the error of the ad9850 and also compensates the filter. can be calculated if removed and beat agains a know freq.
  // here we use the setfrequency of the original code and not the vlf code.

void dBm_power()
  // needs calibration.....
  float dBm=0;
  int i;
  for (i=0;i<20 analogread="" average="" br="" dbm="" float="" i="" nbsp="">  dBm=dBm/i;
  // dBm = dBm - 869; // original code
  dBm = dBm - 869;
  dBm = ( dBm * 0.1014342 ) - 6.6 ;   
  Serial.print(" "); // may help Python parser
  Serial.println(" "); // may help Python parser
  dbmvalue = dBm; // we need to pass this value to an outside variable to update lcd when mode = 1
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(encoderPin1, INPUT);
 pinMode(encoderPin2, INPUT);
 pinMode(encoderSwitchPin, INPUT);
 digitalWrite(encoderPin1, HIGH); //turn pullup resistor on
 digitalWrite(encoderPin2, HIGH); //turn pullup resistor on
 digitalWrite(encoderSwitchPin, HIGH); //turn pullup resistor on  
 attachInterrupt(0, updateEncoder, CHANGE);
 attachInterrupt(1, updateEncoder, CHANGE);
 pinMode(FQ_UD, OUTPUT);
 pinMode(W_CLK, OUTPUT);
 pinMode(DATA, OUTPUT);
 pinMode(RESET, OUTPUT);
 pinMode(BUTTON_MODE, INPUT); // mode button connected to digital 7
 pulseHigh(FQ_UD);  // this pulse enables serial mode - Datasheet page 12 figure 10
 //SetFrequency(1000000); // 1 MHz default using the original code, wen mode is dds it will start on 10Mhz
lcd.print("VNA    CT2GQV");
lcd.print("USB    2016");

void loop()   // Arduino superloop - where everything gets done
  char ch;
long int temp;
// VNA computer control
if (mode == 0) {
   if (lastmode==0) { // we need to print mode again on lcd
   lcd.begin(16,2); lcd.setCursor(0,0);lcd.print("VNA    CT2GQV");
   lcd.setCursor(0,1);  lcd.print("USB    2016"); }
   lastmode=1;  // no need to update the previous info on display
// 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     
  } // end while
}; // end mode 0 VNA
// end VNA computer control

// read the digital button for going down (to change mode)
  val = digitalRead(BUTTON_MODE);  // read input value
  if (val == LOW) { // button press so lets change mode
   temp = mode; // just dummy variable that keeps mode so we can change it..
   lastmode = 0; // keeps the last mode just to help if something needs to be updated on the lcd to save cycles.
    if (mode == 1) { temp=0; };  // we switch temp so then we can switch mode to be equal to mode, if not next line will reverse.
    if (mode == 0) { temp=1; };
    mode = temp; // now we can switch mode safely
    if (mode == 1) {  Serial.println(" -60 "); } // this will give a -60 spike on the DIYVNA need since the lcd will show also
    if (mode == 0) {  Serial.println(" -40 "); }
    delay(250); // software debounce...

// DDS control and power meter
if (mode == 1) { // read the power and print on lcd and serial
  delay(90); // let's not refresh to fast...
  dBm_power(); // outputs to serial the ad8307 meter and keeps dbmvalue variable

  //if frequency "channel"  is called
    //button is not being pushed
    station_number++; if (station_number > maxstations)station_number=0;
    delay(250); // software debounce...
 // if mode change on last iteraction then print the following, if not, no need.
 if (lastmode == 0) {    // neans last mode was VNA so we need to put everything in lcd
   lcd.print("f:              "); lcd.setCursor(3,0); lcd.print((Freq/1000),3);// change latter to show the frequency
   lcd.print("dBm: ");
  } // end if
 // this what we need allways to print if frequency changed
 if (lastFreq != Freq) {   lcd.setCursor(3,0); lcd.print((Freq/1000),3); lastFreq=Freq; }
 // we can print dbm value all the time, flicker is not noticable
  lcd.setCursor(5,1); lcd.print(dbmvalue);
  lastmode = 1; // now that previously we cleared the display no need to do again on next time.
// end DDS control and power meter

} // end main loop... that's it!

LCD connected as bellow:

Have a nice week!