Buck converters

Low amperage converters

Are there more efficient ways than the standard voltage regulators such as the LM7805 and the LM317 that we use in most of our experiments? The answer to this rhetorical  question is of course yes, use the buck converter. This video explains how they work:

The following flashlight experiment is an example, in this case a buck converter is used to drive a bright white power led. What you end up with is the following schematic:

schematic
Both 10 Ohm resistors are there to be able to measure the currents I1 and I2.

I’ve put in a blue transparent acrylic case (I’m beginning to like them):

IMG_1582
Design in acrylic case

The DC converter VMA404 is made by Velleman and it is a marvel of simplicity. In this case example it helps to convert the voltage from a 9V 220 mAh battery to a lower voltage (around 3 Volt) for the LED. To compore the required powers I need I1 and I2,  and they are derived from voltages are measured over the resistors. In this way you can compute the efficiency of the converter; that is, if we replaced the buck converter by a resistor, then what power is lost over that resistor compared to the power now lost in the buck converter. I varied the potentiometer on the VMA404 over a considerable range, and this is what I got:

efficiency
Horizontal axis: voltage over the LED, left vertical axis, milliwatt dissipation from battery, or theoretically when the buck converter is replaced by resistors. Right vertical axis, the efficiency of this design in percent relative to the traditional current or voltage limiter.

 

The horizontal axis shows the voltage of the white led and the left vertical axis the power in mW consumed by the flashlight. Blue is what you measure, and red is what you theoretically get when the buck converter is replaced by a traditional voltage or current limiter (LM7805 or LM317). So for this design the buck converter is always more optimal than the traditional design, there is even an optimum near 2,950 volt over the LED, but, this LED can easily handle a higher voltage. Does the VMA404 cause a lot of QRM, the answer is no because the currents are relatively small. You can detect its presence within a meter, but beyond the 1 meter my metrovna with a detection loop didn’t notice it.

High amperage DC/DC converter

Also this is something I’m not going to make myself, the principle is the same except that the conversion goes both ways, DC input voltages within a certain range are converted into one fixed output voltage. For this I tested the Dometic Group DC20 converter, 8 to 16 volts in, and 14.2 volts out up to a maximum 20 Amperes. This is enough for the FT-991 and the FT-857 to produce 100W.

This DC/DC converter is ideal for in the car or in the field when you run on batteries, a LIPO or NiMH etc or a lead battery, as long as it is between 8 and 16 volt. The DC20 can also charge a regular battery, for this please read the manual (I didn’t test it). On the HF I could not directly detect any spurious noise as long as you run it from a battery. There is some leakage of the power switching towards the battery, so if you mount the DC20 behind a regular power supply then the HF switching blurp goes in the power grid, and this will cause spurious signals on the HF, in particular when the buck converter has no load on its output terminal, and the metal case is not grounded. So, to reduce the HF noise with this converter, 1) use a battery, and 2) ground the case of the converter.  I could not detect spurious signals on the HF (or VHF or UHF) when it is used in this way.

The DC20 has a battery low and an overload indicator, is supposedly fail-safe (didn’t test this), and can be put in remote switch-on switch-off mode so that you can install it in a boat, a truck, a car etc. It includes an automatic fan, and there are air inlets that must be kept free. Also, you don’t want to put converters in spaces where there are outgassing batteries, so when you mount it in a closed space the batteries need to be separated from the converter.

20amp buck converter

With the ft-857 (and the ft991) in the field I could oftentimes not make more than 30 to 50W because the voltage of a discharging battery was too low. The radios still work, but the HF power output rapidly goes down. With a DC/DC converter you can bring it back to the 100W we were used to in the shack, without carrying a linear in the field. Some transceivers such as the older icoms are quite critical about the input voltages, in this case a DC/DC converter is a must for mobile operations.

Last update: 31-Dec-2017

Digital voltmeter

IMG_1576
Made with the KT2578 digital panel meter, a 9 volt battery and a 1 to 100 voltage divider. Internal resistance 100k in series with a 1k resistor. Reverse polarity is handled by the KT2578, this gadget is good for checking batteries in the field up to 20 Volt, or measuring amperes over a low ohm resistor.

Last update: 24-dec-2017

Frequency synthesizer project

Model 1 was built to test the capabilities of the AD9851 chip, and to optimize the code. Model 2 is the miniaturized version so that it becomes an instrument in the shack.

Model 1

The design is based on the AD9851 chip including an atmel 328p with the Arduino bootloader. And of course I use the Arduino IDE:

IMG_1530

Top view: AD8951 with a 30 MHz oscillator, I turned the internal 6x multiplier on. There is a jumper for turning the LCD backlight on/off, perhaps I will replace this with a n-channel MOSFET switch.

IMG_1529

The rotary encoder includes a push button, the LCD lists the frequency and the increment setting.

IMG_1551

Attenuation of 30 dB is enough for direct input to the airspy/spyverter which I use as a calibrated spectum analyzer.

The design of this DDS mostly follows from the instructables website. There is a todo list for this project:

  • Find a case, right now it is half the size of a Velleman PCB.
  • Increase the output level to perhaps 5 Volt
  • Investigate whether I can turn this into a VNA

Model 2:

Miniaturize model 1 so that it fits in a Hammond case, the idea is the same, except that I use 3 mini voltage regulators and that I stack the LCD display on top of the atmel 328p chip.  Also I rewired everything because of the space restrictions. In the end I got this:

IMG_1567
The DDS in its mini Hammond box, the window in the lid is a bit critical, but it always turns out to fit. (Use tape and take your time to make the window.
IMG_1568
The only way to do this is to stack the components, below the LCD I’ve put the atmel 328p
IMG_1570
So this is what you get at the lowest level, mind the three mini 5V regulators. The board takes 100 mA from a 9V battery
IMG_1571
And this is the exploded view, not the piece of foam to keep the 9V battery in place.

Arduino IDE sketch for model 2

// Original design by Richard Visokey AD7C - www.ad7c.com
// Revision 2.0 - November 6th, 2013
//
// Ernst Schrama PA1EJO added some modifications in dec-2017
// the DDS board is a AD8951, see comments in code, this is 
// model 2 of the DDS, the pins assignments are different on 
// this board compared to model 1.
//
// The LCD and the DDS should be REMOVED from the board when
// you are programming, reason is that the power supply is 
// handled by three independent 7805 regulators.
//
// Includes that we need for LCD, rotary encoder and EEPROM
// Very first time use, set forcefreq=1 once and upload again.
// This is only needed when you change the atmel 328p
//
#include <LiquidCrystal.h>              // include the LCD library code:
#include <rotary.h>                     // 
#include <EEPROM.h>                     //
//
// define statements 
// 
#define AD9850_CLOCK 180000251         // What I have has a 180 MHz oscillator (added 251 Hz at 20C)
#define W_CLK 13                       // AD9851 Module pins.    
#define FQ_UD 12      
#define DATA  11       
#define RESET 10   
#define pulseHigh(pin) { digitalWrite(pin, HIGH); digitalWrite(pin, LOW); }
//
// objects in this code
//
Rotary r = Rotary(2,3); // sets the pins the rotary encoder uses.  Must be interrupt pins.
LiquidCrystal lcd(9, 5, 8, 7, 6, 4); 
//
// variables
//
int_fast32_t rx=7200000;         // Starting frequency of VFO
int_fast32_t rx2=1;              // variable to hold the updated frequency
int_fast32_t increment = 100000; // starting VFO update increment in HZ.
int buttonstate = 0;
String hertz = "100 KHz";
int  hertzPosition = 4;
byte ones,tens,hundreds,thousands,tenthousands,hundredthousands,millions ;  //Placeholders
String freq; // string to hold the frequency
int_fast32_t timepassed = millis(); // int to hold the arduino millis since startup
int memstatus = 1;  // value to notify if memory is current or old. 0=old, 1=current.
//
// The ForceFreq variable alters the EEPROM 
// Change this to 0 after you upload and run a working sketch to activate the EEPROM memory.  
// YOU MUST PUT THIS BACK TO 0 AND UPLOAD THE SKETCH AGAIN AFTER STARTING FREQUENCY IS SET!
//
int ForceFreq = 0;  // this is essential
//
// the order of the functions hereafter is somewhat different 
//
// transfers a byte, a bit at a time, LSB first to the AD9851 via serial DATA line
void tfr_byte(byte data) {
  for (int i = 0; i < 8; i++, data >>= 1) {
    digitalWrite(DATA, data & 0x01);
    pulseHigh(W_CLK);   //after each bit sent, CLK is pulsed high
  }
}
// handles increments of the rotary push button action
void setincrement(){
  if (increment == 1) {increment = 10; hertz = "10 Hz", hertzPosition=5;}  // added this
  else if (increment == 10) {increment = 50; hertz = "50 Hz"; hertzPosition=5;}
  else if (increment == 50){increment = 100;  hertz = "100 Hz"; hertzPosition=4;}
  else if (increment == 100){increment = 500; hertz="500 Hz"; hertzPosition=4;}
  else if (increment == 500){increment = 1000; hertz="1 Khz"; hertzPosition=6;}
  else if (increment == 1000){increment = 2500; hertz="2.5 Khz"; hertzPosition=4;}
  else if (increment == 2500){increment = 5000; hertz="5 Khz"; hertzPosition=6;}
  else if (increment == 5000){increment = 10000; hertz="10 Khz"; hertzPosition=5;}
  else if (increment == 10000){increment = 100000; hertz="100 Khz"; hertzPosition=4;}
  else if (increment == 100000){increment = 1000000; hertz="1 Mhz"; hertzPosition=6;}  
  else {
   increment = 1; hertz = "1 Hz"; hertzPosition=6; };  // changed this
   lcd.setCursor(0,1);
   lcd.print("                ");
   lcd.setCursor(hertzPosition,1); 
   lcd.print(hertz); 
   delay(250); // Adjust this delay to speed up/slow down the button menu scroll speed.
};
//
// set the frequency to the AD9851
void sendFrequency(double frequency) {
  int32_t freq1 = frequency * 4294967295/AD9850_CLOCK;  // note 125 MHz clock on 9850
  for (int b = 0; b < 4; b++, freq1 >>= 8) {
    tfr_byte(freq1 & 0xFF);
  }
  tfr_byte(0x01);                     // Final control byte, 0 for AD9850, 1 for AD9851 chip 
  pulseHigh(FQ_UD);                   // Done!  Should see output
}
//
// Show the frequency on the LCD
void showFreq(unsigned long int input) {
    millions = int(input/1000000);
    hundredthousands = ((input/100000)%10);
    tenthousands = ((input/10000)%10);
    thousands = ((input/1000)%10);
    hundreds = ((input/100)%10);
    tens = ((input/10)%10);
    ones = ((input/1)%10);
    lcd.setCursor(0,0);
    lcd.print(F("                    "));
   if (millions > 9){lcd.setCursor(1,0);}
   else{lcd.setCursor(2,0);}
    lcd.print(millions);
    lcd.print(".");
    lcd.print(hundredthousands);
    lcd.print(tenthousands);
    lcd.print(thousands);
    lcd.print(".");
    lcd.print(hundreds);
    lcd.print(tens);
    lcd.print(ones);
    lcd.print(" Mhz  ");
    timepassed = millis();
    memstatus = 0; // Trigger memory write
};
//
// Handles interrupts
ISR(PCINT2_vect) {
  unsigned char result = r.process();
  if (result) {    
    if (result == DIR_CW){rx=rx+increment;}
    else {rx=rx-increment;};       
      if (rx > 50000000){rx=rx2;};  // UPPER VFO LIMIT (Changed this to 50 MHz)
      if (rx < 10){rx=rx2;};        // LOWER VFO LIMIT (Changed this to 10 Hz)
  }
}
//
// Store stuff in memory
void storeMEM(){
  //Write each frequency section to a EPROM slot.  Yes, it's cheating but it works!
   EEPROM.write(0,millions);
   EEPROM.write(1,hundredthousands);
   EEPROM.write(2,tenthousands);
   EEPROM.write(3,thousands);
   EEPROM.write(4,hundreds);       
   EEPROM.write(5,tens);
   EEPROM.write(6,ones);   
   memstatus = 1;  // Let program know memory has been written
};
//
// the setup function runs once when you press reset or power the board
void setup() {
  pinMode(A0,INPUT); // Connect to a button that goes to GND on push
  digitalWrite(A0,HIGH);
  lcd.begin(16, 2);  // This is different because of the LCD that I use
  lcd.print(F("DDS PA1EJO 2017 "));
  lcd.setCursor(0,1); lcd.print(F("Cal +251Hz      "));
  delay(3000);
  PCICR |= (1 << PCIE2);
  PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);
  sei();
  pinMode(FQ_UD, OUTPUT);    // Configure pins for output to AD9850 module.
  pinMode(W_CLK, OUTPUT);
  pinMode(DATA, OUTPUT);
  pinMode(RESET, OUTPUT);
  pulseHigh(RESET);          // Initialise the AD9850 module. 
  pulseHigh(W_CLK);
  pulseHigh(FQ_UD);          // this pulse enables serial mode - Datasheet page 12 figure 10  
  sendFrequency(rx);
  showFreq(rx);
  lcd.setCursor(0,1); lcd.print(F("                "));
  lcd.setCursor(0,2); lcd.print(F("                "));
  lcd.setCursor(hertzPosition,1);    
  lcd.print(hertz);
   // Load the stored frequency  
  if (ForceFreq == 0) {
    freq = String(EEPROM.read(0))+String(EEPROM.read(1))+String(EEPROM.read(2))+String(EEPROM.read(3))+String(EEPROM.read(4))+String(EEPROM.read(5))+String(EEPROM.read(6));
    rx = freq.toInt();  
  }  
}
//
// check frequency and button state
void loop() {
  if (rx != rx2) {
    showFreq(rx);
    sendFrequency(rx);
    rx2 = rx;
  }
  buttonstate = digitalRead(A0);
  if (buttonstate == LOW) {
     setincrement();        
  };  
  // Write the frequency to memory if not stored and 2 seconds have passed since the last frequency change.
  if(memstatus == 0){   
    if(timepassed+2000 < millis()) { storeMEM(); }
  }  
}

 

If the above listing doesn’t help you then ask me in the comment box below.

Last update: 18-Mar-2019 6:17 AM

Upgrade my DIY antenna tuner

The DIY antenna tuner that I described earlier in this blog showed a few shortcomings, it lacked a counter for the roller coil and the variable capacitor range was often too limited. Yesterday and today I spend time on replacing the coil with one that I got from Frans PA0FMC. I used the same capacitors and added 168 pf addons that apply to C1 and C2, so this adds two switches to the rear side. For the rest the design is still as shown below where by C1 and C2 can now vary between roughly 40 pf and 400pf.

IMG_0465

In this schematic Q is the replacement for the output antenna, and L can vary up to 24 microhenry. This is what you see on the inside, note the new location of the balun in case you want to tune an open line directly, the white switches and 4 Russian high voltage capacitors. The L, C1 and C2 must be isolated from the case, except for the base of the inductor which is connected to the case in the lower left.

diy_tuner_inside

This new frontal look:

diy_tuner_front

The G5RVj in my garden can be tuned on 80m 40m and 20m, for the 20m band I have to switch on the addon-capacitors. This DIY tuner is good for field work and the WSPR beacon, furthermore it is always good to have a second tuner in the shack. and it was fun to make it.

Last update: 2-dec-2017