10kHz to 225MHz VFO/RF Generator with Si5351 - Version 2

For use in DIY homebrew radio equipment such superheterodyne single/double conversion receiver, SDR, HAM QRP transceivers or RF generator.

Feb 28, 2021

186535 views

70 respects

Components and supplies

1

Capacitor 10 µF

1

Inductor 100 uH

2

Toggle Switch, SPDT

2

RCA JACK FOR RF OUTPUT CONECTION

3

Capacitor 100 nF

1

Adafruit SSD1306 128X64 OLED DISPLAY

2

Capacitor 10 nF

1

Breadboard (generic)

1

Adafruit SI5351 CLOCK GEN MODULE

1

Resistor 1k ohm

1

Arduino Nano R3

1

Rotary Encoder with Push-Button

Apps and platforms

1

Arduino IDE

Project description

Code

Sketch SI5351_VFO_RF_GEN_OLED_JCR_V2

c_cpp

Load it to Arduino.

Sketch SI5351_VFO_RF_GEN_OLED_JCR_V2

c_cpp

Load it to Arduino.

Downloadable files

Schematics wiring

Wiring the circuit

Schematics wiring

Comments

Only logged in users can leave comments

lordhex

6 months ago

Here is another code I've found that can be used to calibrate the Si5351. You need a frequency counter with as many digits as possible. It will give you the constant to use here: 68570 is the number that worked for me, but your might be different. //User preferences //----------------------------- . . #define XT_CAL_F 68570 //Si5351 calibration factor, adjust to get exatcly 10MHz. Increasing this value will decreases the frequency and vice versa. . . Copy code from here to end (not the ++++), put it in a sketch, save it with a name i.e. 'si5351_calibration.ino': ++++++++++++++++++++++++++++++++++++++++++ /* * si5351_calibration.ino - Simple calibration routine for the Si5351 * breakout board. * * Copyright 2015 - 2018 Paul Warren <pwarren@pwarren.id.au> * Jason Milldrum <milldrum@gmail.com> * * Uses code from https://github.com/darksidelemm/open_radio_miniconf_2015 * and the old version of the calibration sketch * * This sketch is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * Foobar is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License. * If not, see <http://www.gnu.org/licenses/>. */ #include "si5351.h" #include "Wire.h" Si5351 si5351; int32_t cal_factor = 0; int32_t old_cal = 0; uint64_t rx_freq; uint64_t target_freq = 1000000000ULL; // 10 MHz, in hundredths of hertz void setup() { // Start serial and initialize the Si5351 Serial.begin(57600); // The crystal load value needs to match in order to have an accurate calibration si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0); // Start on target frequency si5351.set_correction(cal_factor, SI5351_PLL_INPUT_XO); si5351.set_pll(SI5351_PLL_FIXED, SI5351_PLLA); si5351.set_freq(target_freq, SI5351_CLK0); } void loop() { si5351.update_status(); if (si5351.dev_status.SYS_INIT == 1) { Serial.println(F("Initialising Si5351, you shouldn't see many of these!")); delay(500); } else { Serial.println(); Serial.println(F("Adjust until your frequency counter reads as close to 10 MHz as possible.")); Serial.println(F("Press 'q' when complete.")); vfo_interface(); } } static void flush_input(void) { while (Serial.available() > 0) Serial.read(); } static void vfo_interface(void) { rx_freq = target_freq; cal_factor = old_cal; Serial.println(F(" Up: r t y u i o p")); Serial.println(F(" Down: f g h j k l ;")); Serial.println(F(" Hz: 0.01 0.1 1 10 100 1K 10k")); while (1) { if (Serial.available() > 0) { char c = Serial.read(); switch (c) { case 'q': flush_input(); Serial.println(); Serial.print(F("Calibration factor is ")); Serial.println(cal_factor); Serial.println(F("Setting calibration factor")); si5351.set_correction(cal_factor, SI5351_PLL_INPUT_XO); si5351.set_pll(SI5351_PLL_FIXED, SI5351_PLLA); Serial.println(F("Resetting target frequency")); si5351.set_freq(target_freq, SI5351_CLK0); old_cal = cal_factor; return; case 'r': rx_freq += 1; break; case 'f': rx_freq -= 1; break; case 't': rx_freq += 10; break; case 'g': rx_freq -= 10; break; case 'y': rx_freq += 100; break; case 'h': rx_freq -= 100; break; case 'u': rx_freq += 1000; break; case 'j': rx_freq -= 1000; break; case 'i': rx_freq += 10000; break; case 'k': rx_freq -= 10000; break; case 'o': rx_freq += 100000; break; case 'l': rx_freq -= 100000; break; case 'p': rx_freq += 1000000; break; case ';': rx_freq -= 1000000; break; default: // Do nothing continue; } cal_factor = (int32_t)(target_freq - rx_freq) + old_cal; si5351.set_correction(cal_factor, SI5351_PLL_INPUT_XO); si5351.set_pll(SI5351_PLL_FIXED, SI5351_PLLA); si5351.pll_reset(SI5351_PLLA); si5351.set_freq(target_freq, SI5351_CLK0); Serial.print(F("Current difference:")); Serial.println(cal_factor); } } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

curvedair

6 months ago

I've noticed a bug in the code. If a frequency of less than 1MHz is selected, then a step of 1MHz is selected, then rotating the encoder anticlockwise to decrease the frequency will corrupt the frequency readout display. The same happens if a frequency of less than 100kHz is selected, and the step is set to either 100kHz or 1MHz.

lordhex

6 months ago

I noticed a strange value here: #define XT_CAL_F 505b 00 <<<< it should be: #define XT_CAL_F 68570 maybe that was causing the issue?

curvedair

6 months ago

I noticed that strange value in your SH1106 sketch. The value in the original sketch was 33000, which I changed to 118800 to get my unit on frequency. So I don't think it's that causing the problem.

lordhex

6 months ago

Here is the code that worked for me. Made a few changes to work with bigger OLED display SH1106 Copy everything below (not the +++), put it in a text file, rename it to .ino: ++++++++++++++++++++++++++ /********************************************************************************************************** 10kHz to 225MHz VFO / RF Generator with Si5351 and Arduino Nano, with Intermediate Frequency (IF) offset (+ or -), RX/TX Selector for QRP Transceivers, Band Presets and Bargraph S-Meter. See the schematics for wiring and README.txt for details. By J. CesarSound - ver 2.0 - Feb/2021. - Cat$oft Jul 2023 - few changes to make it work with SH1106, changes to rotary encoder, added 100Khz step ***********************************************************************************************************/ //Libraries #include <Wire.h> //IDE Standard #include <Rotary.h> //Ben Buxton https://github.com/brianlow/Rotary #include <si5351.h> //Etherkit https://github.com/etherkit/Si5351Arduino #include <Adafruit_GFX.h> //Adafruit GFX https://github.com/adafruit/Adafruit-GFX-Library //#include <Adafruit_SSD1306.h> //Adafruit SSD1306 https://github.com/adafruit/Adafruit_SSD1306 #include <Adafruit_SH1106.h> //Adafruit SH1106 https://github.com/adafruit/Adafruit_SH110x #define OLED_RESET 4 // QT-PY / XIAO #define i2c_Address 0x3c //initialize with the I2C addr 0x3C Typically eBay OLED's //User preferences //------------------------------------------------------------------------------------------------------------ #define IF 0 //Enter your IF frequency, ex: 455 = 455kHz, 10700 = 10.7MHz, 0 = to direct convert receiver or RF generator, + will add and - will subtract IF offfset. #define BAND_INIT 1 //Enter your initial Band (1-21) at startup, ex: 1 = Freq Generator, 2 = 800kHz (MW), 7 = 7.2MHz (40m), 11 = 14.1MHz (20m). #define XT_CAL_F 505b 00 //Si5351 calibration factor, adjust to get exatcly 10MHz. Increasing this value will decreases the frequency and vice versa. #define S_GAIN 303 //Adjust the sensitivity of Signal Meter A/D input: 101 = 500mv; 202 = 1v; 303 = 1.5v; 404 = 2v; 505 = 2.5v; 1010 = 5v (max). #define tunestep A0 //The pin used by tune step push button. #define band A1 //The pin used by band selector push button. #define rx_tx A2 //The pin used by RX / TX selector switch, RX = switch open, TX = switch closed to GND. When in TX, the IF value is not considered. #define adc A3 //The pin used by Signal Meter A/D input. //------------------------------------------------------------------------------------------------------------ Rotary r = Rotary(2, 3); //Changed values to have frequency increase when rotating clockwise and decrease when counter-clockwise //Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire); //uncomment this if you use the 0.96" OLED display SSD1306, comment the line below Adafruit_SH1106 display(OLED_RESET); Si5351 si5351; unsigned long freq, freqold, fstep; long interfreq = IF, interfreqold = 0; long cal = XT_CAL_F; unsigned int smval; byte encoder = 1; byte stp, n = 1; byte count, x, xo; bool sts = 0; unsigned int period = 100; unsigned long time_now = 0; ISR(PCINT2_vect) { char result = r.process(); if (result == DIR_CW) set_frequency(1); else if (result == DIR_CCW) set_frequency(-1); } void set_frequency(short dir) { if (encoder == 1) { //Up/Down frequency if (dir == 1) freq = freq + fstep; if (freq >= 225000000) freq = 225000000; if (dir == -1) freq = freq - fstep; if (fstep == 1000000 && freq <= 1000000) freq = 1000000; else if (freq < 8000) freq = 8000; } if (encoder == 1) { //Up/Down graph tune pointer if (dir == 1) n = n + 1; if (n > 42) n = 1; if (dir == -1) n = n - 1; if (n < 1) n = 42; } } void setup() { Wire.begin(); //display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //un-comment for SSD1306, comment the line below display.begin(SH1106_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64) display.clearDisplay(); display.setTextColor(WHITE); display.display(); pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); pinMode(tunestep, INPUT_PULLUP); pinMode(band, INPUT_PULLUP); pinMode(rx_tx, INPUT_PULLUP); //statup_text(); si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0); si5351.set_correction(cal, SI5351_PLL_INPUT_XO); si5351.drive_strength(SI5351_CLK0, SI5351_DRIVE_8MA); si5351.output_enable(SI5351_CLK0, 1); //1 - Enable / 0 - Disable CLK si5351.output_enable(SI5351_CLK1, 0); si5351.output_enable(SI5351_CLK2, 0); PCICR |= (1 << PCIE2); PCMSK2 |= (1 << PCINT18) | (1 << PCINT19); sei(); count = BAND_INIT; bandpresets(); stp = 4; setstep(); } void loop() { if (freqold != freq) { time_now = millis(); tunegen(); freqold = freq; } if (interfreqold != interfreq) { time_now = millis(); tunegen(); interfreqold = interfreq; } if (xo != x) { time_now = millis(); xo = x; } if (digitalRead(tunestep) == LOW) { time_now = (millis() + 300); setstep(); delay(300); } if (digitalRead(band) == LOW) { time_now = (millis() + 300); inc_preset(); delay(300); } if (digitalRead(rx_tx) == LOW) { time_now = (millis() + 300); sts = 1; } else sts = 0; if ((time_now + period) > millis()) { displayfreq(); layout(); } sgnalread(); } void tunegen() { si5351.set_freq((freq + (interfreq * 1000ULL)) * 100ULL, SI5351_CLK0); } void displayfreq() { unsigned int m = freq / 1000000; unsigned int k = (freq % 1000000) / 1000; unsigned int h = (freq % 1000) / 1; display.clearDisplay(); display.setTextSize(2); char buffer[15] = ""; if (m < 1) { display.setCursor(41, 1); sprintf(buffer, "%003d.%003d", k, h); } else if (m < 100) { display.setCursor(5, 1); sprintf(buffer, "%2d.%003d.%003d", m, k, h); } else if (m >= 100) { unsigned int h = (freq % 1000) / 10; display.setCursor(5, 1); sprintf(buffer, "%2d.%003d.%02d", m, k, h); } display.print(buffer); } void setstep() { switch (stp) { case 1: stp = 2; fstep = 1; break; //1Hz case 2: stp = 3; fstep = 10; break; //10Hz case 3: stp = 4; fstep = 1000; break; //1Khz case 4: stp = 5; fstep = 5000; break; //5khz case 5: stp = 6; fstep = 10000; break; //10khz case 6: stp = 7; fstep = 100000; break; //100khz case 7: stp = 1; fstep = 1000000; break; //1Mhz } } void inc_preset() { count++; if (count > 21) count = 1; bandpresets(); delay(50); } void bandpresets() { switch (count) { case 1: freq = 100000; tunegen(); break; case 2: freq = 800000; break; case 3: freq = 1800000; break; case 4: freq = 3650000; break; case 5: freq = 4985000; break; case 6: freq = 6180000; break; case 7: freq = 7200000; break; case 8: freq = 10000000; break; case 9: freq = 11780000; break; case 10: freq = 13630000; break; case 11: freq = 14100000; break; case 12: freq = 15000000; break; case 13: freq = 17655000; break; case 14: freq = 21525000; break; case 15: freq = 27015000; break; case 16: freq = 28400000; break; case 17: freq = 50000000; break; case 18: freq = 100000000; break; case 19: freq = 130000000; break; case 20: freq = 144000000; break; case 21: freq = 220000000; break; } si5351.pll_reset(SI5351_PLLA); stp = 4; setstep(); } void layout() { //SSD1306 display.setTextColor(WHITE); display.drawLine(0, 20, 127, 20, WHITE); display.drawLine(0, 43, 127, 43, WHITE); display.drawLine(105, 24, 105, 39, WHITE); display.drawLine(87, 24, 87, 39, WHITE); display.drawLine(87, 48, 87, 63, WHITE); display.drawLine(15, 55, 82, 55, WHITE); display.setTextSize(1); display.setCursor(59, 23); display.print("STEP"); display.setCursor(54, 33); if (stp == 2) display.print(" 1Hz"); if (stp == 3) display.print(" 10Hz"); if (stp == 4) display.print(" 1kHz"); if (stp == 5) display.print(" 5kHz"); if (stp == 6) display.print("10kHz"); if (stp == 7) display.print("100kHz"); if (stp == 1) display.print(" 1MHz"); display.setTextSize(1); display.setCursor(92, 48); display.print("IF:"); display.setCursor(92, 57); display.print(interfreq); display.print("k"); display.setTextSize(1); display.setCursor(110, 23); if (freq < 1000000) display.print("kHz"); if (freq >= 1000000) display.print("MHz"); display.setCursor(110, 33); if (interfreq == 0) display.print("VFO"); if (interfreq != 0) display.print("L O"); display.setCursor(91, 28); if (!sts) display.print("RX"); if (!sts) interfreq = IF; if (sts) display.print("TX"); if (sts) interfreq = 0; bandlist(); drawbargraph(); display.display(); } void bandlist() { display.setTextSize(2); display.setCursor(0, 25); if (count == 1) display.print("GEN"); if (count == 2) display.print("MW"); if (count == 3) display.print("160m"); if (count == 4) display.print("80m"); if (count == 5) display.print("60m"); if (count == 6) display.print("49m"); if (count == 7) display.print("40m"); if (count == 8) display.print("31m"); if (count == 9) display.print("25m"); if (count == 10) display.print("22m"); if (count == 11) display.print("20m"); if (count == 12) display.print("19m"); if (count == 13) display.print("16m"); if (count == 14) display.print("13m"); if (count == 15) display.print("11m"); if (count == 16) display.print("10m"); if (count == 17) display.print("6m"); if (count == 18) display.print("WFM"); if (count == 19) display.print("AIR"); if (count == 20) display.print("2m"); if (count == 21) display.print("1m"); if (count == 1) interfreq = 0; else if (!sts) interfreq = IF; } void sgnalread() { smval = analogRead(adc); x = map(smval, 0, S_GAIN, 1, 14); if (x > 14) x = 14; } void drawbargraph() { byte y = map(n, 1, 42, 1, 14); display.setTextSize(1); //Pointer display.setCursor(0, 48); display.print("TU"); switch (y) { case 1: display.fillRect(15, 48, 2, 6, WHITE); break; case 2: display.fillRect(20, 48, 2, 6, WHITE); break; case 3: display.fillRect(25, 48, 2, 6, WHITE); break; case 4: display.fillRect(30, 48, 2, 6, WHITE); break; case 5: display.fillRect(35, 48, 2, 6, WHITE); break; case 6: display.fillRect(40, 48, 2, 6, WHITE); break; case 7: display.fillRect(45, 48, 2, 6, WHITE); break; case 8: display.fillRect(50, 48, 2, 6, WHITE); break; case 9: display.fillRect(55, 48, 2, 6, WHITE); break; case 10: display.fillRect(60, 48, 2, 6, WHITE); break; case 11: display.fillRect(65, 48, 2, 6, WHITE); break; case 12: display.fillRect(70, 48, 2, 6, WHITE); break; case 13: display.fillRect(75, 48, 2, 6, WHITE); break; case 14: display.fillRect(80, 48, 2, 6, WHITE); break; } //Bargraph display.setCursor(0, 57); display.print("SM"); switch (x) { case 14: display.fillRect(80, 58, 2, 6, WHITE); case 13: display.fillRect(75, 58, 2, 6, WHITE); case 12: display.fillRect(70, 58, 2, 6, WHITE); case 11: display.fillRect(65, 58, 2, 6, WHITE); case 10: display.fillRect(60, 58, 2, 6, WHITE); case 9: display.fillRect(55, 58, 2, 6, WHITE); case 8: display.fillRect(50, 58, 2, 6, WHITE); case 7: display.fillRect(45, 58, 2, 6, WHITE); case 6: display.fillRect(40, 58, 2, 6, WHITE); case 5: display.fillRect(35, 58, 2, 6, WHITE); case 4: display.fillRect(30, 58, 2, 6, WHITE); case 3: display.fillRect(25, 58, 2, 6, WHITE); case 2: display.fillRect(20, 58, 2, 6, WHITE); case 1: display.fillRect(15, 58, 2, 6, WHITE); } } void statup_text() { display.setTextSize(1); display.setCursor(13, 18); display.print("Si5351 VFO/RF GEN"); display.setCursor(6, 40); display.print("JCR RADIO - Ver 2.0"); display.display(); delay(2000); } ++++++++++++++++++++++++++++++++++

curvedair

6 months ago

Thanks for the updated sketch. I've built the original with the 0.96" display (modified to perform as a sig gen only, deleting all the RX stuff & making room on the display for larger text for the step display). I'm Just waiting for my 1.3" display to arrive before trying out your sketch.

curvedair

6 months ago

I get an error when I try to compile your sketch "Adafruit_SH110X.h: No such file or directory"

curvedair

6 months ago

I swapped the SH1106 library for this one:- Adafruit_SH1106 https://www.electroniclinic.com/wp-content/uploads/2020/02/Adafruit_SH1106.zip It now works for me (after changing the weird XT_CAL_F value). I notice that where you have added the 100kHz step, it causes the right hand side of the 100kHz display to overlap the vertical line. To prevent this I changed "display.setCursor(54,33);" to "display.setCursor(48,33);" & added an extra leading space to "display.print(" 1Hz");" and all the other steps (except 100kHz of course). This keeps all the frequency steps aligned to the right hand side.

sv1iyb

6 months ago

The two 2 sketch given above make a different result. My 1st gets this result: C: \ Users \ User \ Appdata \ Local \ Temp \ .arduinoide-Unsaved202464-16356-HYXSR.8BBJ \ SKETCH_JUL4C \ SKETCH_JUL4C.INO: 12: 9: Error: #include Expects "Filename" or <Filename> #include ^ C: \ Users \ User \ Appdata \ Local \ Temp \ .arduinoide-Unsaved202464-16356-HYXSR.8BBJ \ SKETCH_JUL4C \ SKETCH_JUL4C.INO: 26: 8: Error: No Macro Name Given in #Define Directive #define ^ C: \ Users \ User \ Appdata \ Local \ Temp \ .arduinoide-Unsaved202464-16356-HYXSR.8BBJ \ SKETCH_JUL4C \ SKETCH_JUL4C.INO: 32: 8: Error: No Macro Name Given in #Define Directive Directive #define ^ exit status 1 Compilation Error: #include Expects "Filename" or <Filename> And my 2nd gets this result: C \ Users \ User \ Documents \ Arduino \ Libraries \ Adafruit_GFX \ GLCDFONT.C: 9: 23: Error: Variable 'Font' Must Be Constin to Be Puto Into Read-Only Section by Means of ' ) ' STATIC UNSIGNED CHAR FONT [] PROGMEM = { ^~~~ In File Included from fromc \ Users \ User \ Documents \ arduino \ libraries \ adafruit_gfx \ adafruit_gfx.h: 20, Fromc \ Users \ User \ Documents \ Arduino \ Libraries \ Adafruit_GFX \ Adafruit_GFX.CPP: 16: C \ Users \ User \ Documents \ Arduino \ Libraries \ Adafruit_GFX \ GLCDFONT.C: 9: 30: Error: Variable 'Font' Must Be Constin to Be Puto Into ) ' STATIC UNSIGNED CHAR FONT [] PROGMEM = { ^ exit status 1 Compilation Error: Exit Status 1 Please tell me if there is a solution and what can I do ??? Very much Yours sincerely sv1iyb Vangelis

jucelavi

6 months ago

JUCELAVI soy muy nuevo en esto y he visto en los comentarios problemas relacionados al que paso a comentar: Cuando compilo si bien no me da error ni al cargar el código en la practica si! Todo funciona menos el encoder rotatorio cuando lo giro lo único que hace es apagar la pantalla lo gire en el sentido que lo haga, aun cargando la biblioteca que recomiendan en el Código. A claro que no domino la programación pero si todo lo de mas funciona y le he colocado los capacitores de 10 recomendados también probé con las resistencias de descarga o sea ya no se para donde debo seguir alguien puede asesorarme. Desde ya muy agradecido….

hahn890

7 months ago

hola gente tengo un problema con el SI5351_VFO_RF_GEN_OLED_SH1106_V2_JCR_PW, cargo la programación en el Arduino uno y cuando prendo el vfo se queda en transmisión TX y sin tener ningún botón solo el si5351 alguien me puede pasar el programa ya configurado porfavor! Muchas gracias 73 Alfredo Lu7ddh

rs2509

7 months ago

this sketch is functional but gives errors when compiling

hipower1989

8 months ago

I am interested in this project and am considering making one. So I have a question. If I power off the VFO RF GEN, will the VFO remember the last frequency selected? Thanks.

curvedair

6 months ago

No. At power-on it starts up on the band that's selected in BAND_INIT.

nkaraiskos1

8 months ago

Thank you CesarSound for your contributions!

triod909

9 months ago

Hi, I need help. I tried to install sketch but I get this error message: Compilation error. "class Rotary has no member named process Thanks! Kornél (telex909@gmail.com)

standm

a year ago

I apologise for my ignorance, but can I use this to transmit fm signal to align fm radios, usually between 88 - 108Mhz.

jebielefeld

a year ago

KevinTW I will send the code changes when soon when I get a break from the holidays.

rcv7893

a year ago

hola cesar sound saludos desde méxico. he copiado y pegado los archivos en el IDE pero me envia algunos errores en el sketch agradeceria mucho tu ayuda como puedo conseguir el archivo ino del Si5351 para hacer funcionar con arduino nano y pantalla OLED Muchas gracias

jebielefeld

a year ago

My appology I thought the host of this site was ClearSound my bad. It's CesarSound.

jebielefeld

a year ago

I'm making the China VFO unit emulate the EICO 722 pictured above on this site. Note the band switch. it has two positions. 80, on one position and then 40, 20, 15, 10 all on one positon. That is because the transmitter multiplies 40 meters to upper harmonic frequencies to produce 20, 15 and 10. Note that the display has all the bands on it yet 20, 15, 10 are only harmonics of the 40 band. So far I have completed evrithing I mentioned here. So far it's working! I built a buffer amplifier to boost the 3V p-p output to 20V p-p output which then plugs into the crystal socket on the EICO 720. The last step is to build a power supply with 13.8VDC for the buffer amplifier and the 5VDC to power the China VFO unit via the USB-C port.

jebielefeld

a year ago

Update: I modified ClearSound's code so I can use the Chineese version of the 10K-220Mhz VFO/Generator to work with my Ham Radio Eico 720 CW Transmitter. I needed a VFO to be an accurate and stable replacement for using Crystals on the Ham Bands. I also will be using the Eico 730 AM Modulator with the Eico 720 Transmitter so I can transmit in the AM Mode. The Chineese version of the 10K-220Mhz VFO/Generator as shown above by ClearSound can be purchased for $40 from various vendors on-line even Amazon. But, the way it is configuired is not compatible as transmitter VFO. But with some simple modifications of ClearSound's code and some hardware changes to the PCB and its cabinet box I can make it comaptible for my requirements: Change the code to only use the HF/VHF Ham Band like, 160 meters through 2 meters Bands only. The output from this VFO will drive a Vaccum Tube buffer amplifier requiring a 20V p-p output needed to drive a tube transmitter instead of a crystal. The SI5351 only delivers 3V p-p output. The STEP button will become the Band Sellect. and the TX/RX Button will be used for receiver Spotting. The Rotor Encoder Switch will be the Step Sellect. The current rotor encoder is wired backwards so increasing frequency is CCW and the vise versa. So the two rotary encoder output leads need to be reversed. The S-meter analog input will be used to tune the VFO buffer's tuned circuit for maximum output. Also the TX/RX switch needs to be wired to an RCA jack which will need to be installed at the rear panel of the China unit. This will become the PTT (Push-to-Talk) input. This way during transmit the Si5351 output is ON and the transmitter will be on frequency. When in receive the output of the Si5351 is turned off. This will keep the VFO from being herd in the receiver speaker. The next problem to solve if the frequency that is diplayed on the VFO. The transmitter Used to use crystals on 80 meter band that wer cut to frquencies Between 3.5 Mhz and 4.0 Mhz and on 40 meter band between 7.0 Mhz and 7.3 Mhz. However, on the higher frequency bands the transmitter will doublethe 40 meter crytals's frequency. So on 20 meter band the 7 Mhz crystal frequency will be doubled and on 15 meter band the 40 meter crystal frequency would be trippled. for the 10 meter band the 40 meter crystal will be quadrupled. The VFO will be tuning on the 40 meter band but will be multiplied by the transmitter. So the code will again need to be modified to display the doubled, trippled and quadrupled frequency the transmitter is actually transmitting. So if I sellect the 20 meter band on the China VFO unit I will need to display frequencies beteen 14.0 Mhz to 14.4 Mhz even tough the Si5351 is operating from 7.0 Mhz to 7.2 Mhz. and so on. That should be all the changes I need to make. John Bielefeld

jebielefeld

a year ago

I forgot to mention that Atmeg328P on the China unit has the Arduino NANO Bootloader alredy installed. So you have basicaly most of the hardware installed on the PCB.

jebielefeld

a year ago

I purchased the Chineese version of this project that is mentioned above. It is avilable at a cheap price and is quite stable and accurate. However, I needed to modify the code for this unit and I spent some time analyzing and reverse engineer some of the circuit. There are circut differences like some of the pin assigments are different: 1. tunestep is still mapped to pin A0 but it maps out to the encoder switch and not to a push button switch. 2. band is mapped to digital pin 9 instead of A1. 3. rs_tx is mapped out to pin 10 instead of A2. 4. adc is mapped out to pin A1 instead of A3 So the #defines are now: #define tunestep A0 #define band 9 #define rx_tx 10 #define adc A1 Then set the following on the Arduino IDE in the Tools Tab: Board "Arduino Nano" -> "Arduino AVR Boards" -> "Arduino NANO" PORT Comx (Set you COM port) Processor Atmega328P -> Atmega328P Do not sellect Atmega328 (Old Boot Loader) Make sure you have a USB-C cable from your USB port on the PC and to the rear of the China unit. Make sure the battery is connected or the China Unit or it will no BootUp. The China unit will get it's power from the USB port. Turn ON the power switch on the back of the China unit. Now you can compile and load the code onto the China unit. If you want to use additonal pins for your customization you are lucky that there are soldering pads surrounding the Ameg328 chip. The China unit uses the CH340B USB interface chip common to most cloned Aduino boards. So when you plug in the China unit look at the Device Manager to make sure that the CH340 driver is automatically installed. It will be displayed as USB-SERIAL CH340 (COMx). I write this so you don't need to purchase a bunch of hardware which will cost more than this cheap VFO. I hope this helps.

dd1mr

a year ago

help, when i switch on power, TX is activated immediately. A2 is open and can not switch from TX to RX. I have tried it with the Arduino Nano and arduino Uno both the same. Thank you, Mike

skaatz

a year ago

Hello, is there a sketch or the double conversion radio? thanks

ik0vaq

a year ago

Hi, I've built the VFO for general coverage receiver with 45.000 khz first IF, it is avery good project; I'd like to add a band controller for the input BPF for 5 portions of HF frequencies, is it possible to do that? I was thinking about a something connected to the main Arduino Nano board with I2C network. Any idea. Many thanks 73 Alex IK0VAQ

amienoel

a year ago

I have finally gotten this done and it is working per my needs, BUT is there a way to have the frequency read out to match the actual radio, I have a 5MHZ vfo input, I have the encoder direction correct, clock wise the frequency goes down, which in turn the radio tunes up, but, I want to have this little oled read out the actual real frequency and count up as turn the encoder clockwise. everything else is pretty much working how I want it to. Thanks. Amie N9OXO

nobcha48

a year ago

Mant thanks. I finished to transfer your sketch on my PCB. https://nobcha23.hatenadiary.com/entry/2023/08/30/205506 And I'm wondering how to combine PU2CLR library with it. Bye, NOB

nobcha48

a year ago

Hi, thanks a lot for providing a valuable sketch. On the way to make up the receiver I tried to assemble 5351a VFO PCB and I diverted your sketch on that. It' s nice to work easily. And to remodel your one there are issues of memory short so estimated. You meamed startup MES command shall be a comment when stalled. I estimate that ADAFruits's library share so much memory to interfare the other library starting up. Are there any countermeasure for that. I reduced memory usage by using F() and utilizing arrays, and I could recover STARTUP MES but serial would not work. Bye, NOB

vk4abz

a year ago

Hi, thanks for a fantastic sketch. I’m using it to modify a 27mHz SSB CB to a low power 10m radio by removing the PLL and associated circuit and injecting the output of this VFO. I have had excellent results so far. But have a question (I’m new to Arduino so please bear with me) Would it be possible to a a “Mode” type switch? IE to add 2.5kHz for USB and subtract 2.5kHz for LSB? The system works great if I set the VFO frequencies manually but it would be great to add a switch. 73s, Paddy VK4ABZ

eferso

2 years ago

Excellent, but when I went to reinstall an error appeared on the line " char result = r.process();" featuring "'class Rotary' has no member named 'process'". I've tried everything but without any success. I even reinstalled Arduino and its libraries, but I can't get rid of this error. What can it be?

wilbert61b

a year ago

I had the same problem. If you use the libarymanager in the IDE you get the libary Rotary.h from KAthiR. You can't use that one. You have to download it from github. Link is in the sketch.

m0fmt

2 years ago

It worked.... brilliant ...... many thanks Cesar Sound

ddex

2 years ago

Dear Friend, Awesome project! Can you please make version for ST7735 display? I'm interesting for using this project in my transceiver, but kind of dumb in coding...

HectorHugo3h

2 years ago

GRACIAS, CESAR.. POR COMPARTIR, TODA ESTA INFO.. YA TENGO LOS PROYECTOS FUNCIONANDO.. AL 100%..73&Dx.

Anonymous user

2 years ago

hello, ur job are really great and i'm grateful to have found this project, i have a question for u, now i'm on my project to transmit vlf radio signal approximately transmit 10kHz RF. After we generate RF are u have option how to transmit the RF? thank u in advance

CesarSound

2 years ago

Hello, thanks for using the project. 10kHz is not proper to transmitt signals, usually a transmitter uses high freq above 500kHz.

Anonymous user

2 years ago

Hello, I really like your project, but I have a problem loading the code into the chip. I use Arduino Nano. Can you help me with that? The Arduino IDE reports a compilation error. In file included from C: \\ Users \\ Kugler \\ Documents \\ Arduino \\ sketch_sep03a \\ sketch_sep03a.ino: 5: 0: C: \\ Users \\ Kugler \\ Documents \\ Arduino \\ libraries \\ Adafruit-GFX-Library-master / Adafruit_GrayOLED.h: 30: 10: fatal error: Adafruit_I2CDevice.h: No such file or directory #include <Adafruit_I2CDevice.h> ^ ~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. exit status 1 An error occurred while compiling on the Arduino Nano board. thank you very much for your help

CesarSound

2 years ago

Hello, thanks for the comments! Maybe there are conflicts with others libraries installed in your IDE. I recommend installing the IDE and necessary libraries on another computer and trying to compile again.

idealist

2 years ago

I had the same problem until downloaded "Adafruit BusIO" library and installed it.....now the circuit works fine I hope it helps you and anyone else who has such a problem

Anonymous user

2 years ago

Ola Cesar, Muito interessante o seu projeto. Uma pergunta: Seria possivel escolher um frequencia diferente para TX? quero usar um radio antigo a cristal com o seu seu VFO, as frequencias de TX e RX sao diferentes. o radio usa cristais de over tone. Obrigado Flavio VE2ZFP

sp9wfh

2 years ago

Exelente Cesar, I want to use this VFO on a 2m TRX. How to additionally add 12.5kHz tuning step?

sp9wfh

2 years ago

Excellent Cesar! Chcę wykorzystać to VFO do TRX na 2m. Jak dodatkowo dodać krok przestrajania 12.5kHz?

CesarSound

2 years ago

Olá Flavio. obrigado pelos comentários. É possível adicionar ou subtrair (off set) um valor em relação frequência de TX. Por exemplo, se a frequência de TX estiver em 7000kHz e definir o valor de IF (frequência intermediária) no sketch para 455kHz, a frequência de RX será de 7455kHz e RX 7000kHz. Se colocar -455kHz a freq de RX será 6545kHz e a TX será de 7000kHz. Importante dizer que em RX a indicação no display será de 7000kHz, porem a saída do VFO será de 7455kHz, para possibilitar o uso em receptores supeheterodinos. Espero ter ajudado. 73! Julio.

Anonymous user

2 years ago

Ola Cesar, Entendido quanto as frequencias de TX e RX. Só mais uma coisa. Uma vez definidos RX e TX o que faço para mudar o valor de frequência no LCD, nao quero que ele mostre a frequência de oscilação do cristal e sim a frequência final do radio. Para adicionar um offset de repetidora  No display seria dificil?  Obrigado e desculpe me por perguntar tanta coisa de uma vez. Grende abraco Flavio Get Outlook for Android (https://aka.ms/ghei36) -------------------------------

Anonymous user

2 years ago

thilak 4s7ma it is a very nice project , very versatile and user user friendly one . lots of thanks to you 73.

CesarSound

2 years ago

Hello thilak, thank you!

Anonymous user

2 years ago

One of the best dds projects I've played with i have changed a few things to suit my needs but i have a problem .I'm trying to add a rx only clarifier using a potentiometer but i cant seem to figure how to do it in the code would anyone on here be able point me in the right direction . I'm kind of new to Arduino stuff last time i did any code was on a bbc master computer 30+ years ago im a little rusty

CesarSound

2 years ago

Hello, thanks for the comments! One suggestion (which I haven't tested) would be to use the analog input A6 as follows: Declare the new variable: int freq_pot; Include the function below: void pot_tune() { freq_pot = analogRead(A6); freq_pot = map(freq_pot, 0, 1010, -100, 100); freq = freq + freq_pot; } Calling the function pot_tune(); inside the loop() Connect a potentiometer of 10kOHMS between 5v and GND and the central pin of the potentiometer is connected to pin A6 of the arduino. This way it would have a fine adjustment from -100 to +100Hz

Anonymous user

2 years ago

Just got round to testing the code it sort of works but when it turn the pot from the center position it starts counting up or down frequency till i return it back to center position . I will keep playing around to see if i can make it work it may be something I'm doing wrong .

Anonymous user

2 years ago

Many thanks for your reply i will give that a test and let you know how it goes

Anonymous user

2 years ago

pot_tune(); inside the loop() esta linha tenho que escrever tambem no codigo ou nao fiz desta forma .int freq_pot; void pot_tune() { freq_pot = analogRead(A6); freq_pot = map(freq_pot, 0, 1010, -100, 100); freq = freq + freq_pot; } obrigado att 73

G8INL

2 years ago

A really well thought out and executed project, very versatile and user friendly. Many Thanks.

CesarSound

2 years ago

Hi G8INL, thanks for the comments!

Anonymous user

2 years ago

Great project, worked 1st time it was switched on! Cannot find info on how to subtract IF on 20m, 15m, 10m - and add IF on 40m, 80m & 160m. Do not understand the description. HELP CesarSound! I have also only included the Ham bands, and added a 100kHz step. Look forward to your response. Bob.........ZS6RZ

CesarSound

2 years ago

Hello Bob, thanks for the comments. To subtract the IF, edit the sketch on line 17 #define IF and then save it and then load it again to arduino. For example, if you want do add to IF of 455kHz, just type 455. But if you want to subtract to IF jut type -455 (minus 455) on line 17 #define IF.

Anonymous user

2 years ago

Hola julio cesar . La salida del Si5351 lleva alguna atenuación para entrar en el NE 602 ? o va directo ? Leí el datasheet pero no encuentro la información

CesarSound

2 years ago

Usé un atenuador eso sí, con una resistencia de 470 OHMS para el GND y una resistencia de 2.2kOHMS para la entrada NE602 (pin 6). Antes de la resistencia de 470 OHMS, la salida del Si5351 debe tener un condensador de desacoplamiento de 100 nF. Pronto prepararé el esquema y lo publicaré aquí.

Anonymous user

2 years ago

hola Julio cesar . Hice tu vfo es perfecto deseo hacer un Receptor banda aerea con tu vfo . No se como conectarlo al oscilador local De un TA 2003 o un TA7358 También vi que sugerís dos dsp Si4735 y Si4732 . Estos dsp solo actuarian como demoduladores ? entiendo que el Dsp seleciona su frecuencia por softwarte y son solo broadcasting o ham . se puede usar un dsp para banda aerea . Saludos desde Argentina . 73´s

CesarSound

2 years ago

Gracias!

CesarSound

2 years ago

Hola Herman, gracias por comentar. É possivel fazer um receptor de dupla conversão com este VFO, usando uma primeira conversão de 10.7MHz e a segunda de 455kHz. Veja este diagrama de bolcos de um receptor de dupla conversão com o SI4735 que eu projetei: https://www.dropbox.com/s/ovwxsnwu18a14fa/JCR_SI4735_SI5351_DOUBLE_CONV_RECEIVER_BLOCK_DIAGRAM.jpg?dl=0

Anonymous user

2 years ago

Muchas gracias julio cesar. El vfo es mejor que perfecto. Gracias por compartirlo !!

babaksaeedi

2 years ago

hello my friend and thanks for this nice project . si 5351 have 3 out of signal . can you build software for that ?? 3 signal generator with one module

CesarSound

2 years ago

Hello friend, I could try to include your idea on next update. Thank you!

Anonymous user

2 years ago

Wow - Well done. I particularly liked the attention paid to the design of the display contents. A quick look through the code suggests you may be re-drawing the entire screen each update - is that correct? I wondered if there was any flicker but I didn't see any in the video! I know that this can be tricky as I made a similar project. https://www.youtube.com/watch?v=Yeszaxtg2pM Differences: 1) Range 10kHz up to 200MHz 2) Uses an ESP32 processor with integral colour display (TTGO T-Display). Highly recommended. 3) Designed and 3D-printed a custom box. It also caters for an in-built LiPoly battery that is served by an on-board charger. 4) The software: I copied several ideas from across the Internet and weaved them together via Arduino IDE. There were initially some problems getting the standard 5351 libraries to work with the ESP32 - including a conflict with both the Wire library and the Etherkit library that is used in your design. For anyone else wanting to use the ESP32 processor, I would recommend the library that John Price modified - it's on github (search for WA2FZW). 5) For my design I enjoyed going for a minimalist user experience - i.e. as few controls as possible. I found a button library (Brian Low / Ben Buxton) that allowed reliable operation for short medium and long button presses, so this plus a single encoder and software control allowed removal of several switches in the earlier version. My video reference above contains links to the ESP32c microprocessor supplier, and to the 3D print file for the box design, if anyone wants to have a go.

CesarSound

2 years ago

Hi bob, thanks for the comments! And congratulations on your project, it is very interesting! I update the display only when there is a change in some value, such as frequency and there is absolutely no flickering on the display. Another advantage of this method is the reduction of the electromagnetic interference generated by the arduino / display at the radio reception.

Cathprotech

2 years ago

Hi, Not tried it yet but looks a great project. I just wonder if there is a reason you are using A0 to A2 for the pushbuttons rather than digital inputs? I will post how I get on. Thanks Martin

CesarSound

2 years ago

Hello, thanks for the comment! I used these pins for my convenience, I usually use them in other projects too and they were free on this project. Anyway they can be changed freely. PS: Analog pins can be used as digital input without any problem.

Anonymous user

2 years ago

I have a compilation problem\\Arduino\\libraries\\Adafruit-GFX-Library-master\\Adafruit_GrayOLED.h:30:10: fatal error: Adafruit_I2CDevice.h: No such file or directory please, give me an advice

idealist

2 years ago

Hi 1DWK..... I had exactly the same problem until downloaded "Adafruit BusIO" library and installed it...Now everything is fine I hope it works for you too.

Anonymous user

2 years ago

buenos dias...y para obtener el audio?....GRACIAS!!!

Anonymous user

2 years ago

Hello and thank you for an excellent project. I built one and it works flawlessly. I am building a second one that I would like to use for a 3 band vhf transceiver. I am new to arduino and coding and would appreciate it a lot if you can possibly assist. I need 3 bands, 50 - 54Mhz, 70 - 70.5Mhz and 144 - 146Mhz. Will it be possible to add digital outputs for each band to use for filter selection? Regards Paul

Anonymous user

2 years ago

For me, this is very interesting and useful information. [dordle](https://dordle.online/) I enjoy reading your posts. [word hurdle](https://wordhurdle.co/) Thanks

Anonymous user

2 years ago

Hola arme el vfo pero cuando subo el programa no enciende la pantalla oled alguno pudo corregir el software para que funcione y me ko puede pasar gracias

Anonymous user

2 years ago

Hola cesar feliz año nuevo luego de tanto provar cometi un error y tuve que cargar el sketch de nuevo y cuando lo prove no tiro error lo subi al arduino y salio funcionando bien Felicitaciones por el proyecto que funciona ahora a probarlo en el equipo gracias por tu ayuda

Anonymous user

2 years ago

Hola cesar gracias por responderme es extraño la pantalla es 0.96 oled ssd1306 azul iic llc revise la linea 66 y esta correcto cuando doy verificar no hay errores pero lo cargo carga todo pero sigue la pantalla sin prender con otro programa similar prende o sea la pantalla no es

CesarSound

2 years ago

Hola Jose, me alegro de saber que VFO funcionó y ¡te gustó! Gracias por las palabras, les deseo un feliz año nuevo con mucha salud y paz. ¡Un abrazo!

CesarSound

2 years ago

Hola Jose, gracias por los comentarios. ¿Está utilizando la pantalla OLED SSD1306? Recuerdo que este proyecto no fue hecho para trabajar con OLED SH1106. También puede verificar que la dirección I2C de su pantalla OLED sea correcta y cambiarla en la línea 66 (display.begin (SSD1306_SWITCHCAPVCC, 0x3C); ) si es necesario. Tenga en cuenta que utilizo la dirección 0x3C para la pantalla.

Anonymous user

2 years ago

A beautiful and elegant piece of software. Thanks for sharing.

CesarSound

2 years ago

Hi Shafik, thank you for kind words!

Anonymous user

2 years ago

Hi Cesar Sound Love your project I built a few of these, used one together with a simple SWR bridge to measure antenna's, could you give a little idea for creating a frequenty ofset during TX, this is most handy for qrp CW mostly it is about -600 or -700 Hz. Much gratefull! Regards

Anonymous user

2 years ago

Hey Eddo! can you tell me wich swr bridge you used? I want to do the same... ;) Thanks!

Anonymous user

2 years ago

Hi Cesar, your project has been copied by the Chinese and is now being sold on eBay and Aliexpress! https://www.ebay.com/itm/324937605544?_trkparms=amclksrc%3DITM%26aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20160908105057%26meid%3D92abb5aa253d4adcacf0d34459f005cb%26pid%3D100675%26rk%3D2%26rkt%3D15%26sd%3D124573392976%26itm%3D324937605544%26pmt%3D1%26noa%3D1%26pg%3D2380057%26brand%3DUnbranded&_trksid=p2380057.c100675.m4236&_trkparms=pageci%3Ab893f559-7d51-11ec-b5ab-822b25259f4d%7Cparentrq%3A8db6669317e0a9f5db95db13fff56e0c%7Ciid%3A1 Joel N6ALT

CesarSound

2 years ago

Hello Joel, wow, I didn't even know that, apparently my idea is getting popular. Thank you for letting me know! Cheers. Julio.

Anonymous user

2 years ago

Julio, I ordered one of these, I will let you know what I think when I get it. Thanks. Joel N6ALT

Anonymous user

2 years ago

Julio, I received the Chinese version of your project. It is packaged very nicely but required a lot of help to make it usable. I found the SMA connector for the ADC input not soldered at all, and all buttons were mapped to the wrong pins on the MCU for your Sketch making it necessary to change all the pin assignments in the code. I was able to set the calibration routine to get it right on frequency. I had to un-solder the display to remove the protective film from the screen and had to re-map the encoder pins to get the tuning to go the right direction. Now that all of that is done it is a very nice tool for my bench. Anyone who buys the Chinese version be prepared to make some changes before being able to use it. Thanks Julio for the project. Joel N6ALT

CesarSound

2 years ago

Hello Joel, thanks for the review and for detailing the problems found and the solution you adopted to solve them. Unfortunately these clones currently lack a lot of quality control and it is common to present gross errors. I take this opportunity to point out that I have no connection with the manufacturers of these Chinese clones. I am happy to know that in the end the equipment is working and is being useful to you. Cheers, Julio.

Anonymous user

2 years ago

How would I connect this to a Cobra LTD 29 Radio? Thank in advance

CesarSound

2 years ago

Hi George, I wouldn't know how to do it, but from what I've seen on Youtube videos, it's possible to do it, with some knowledge of electronics and RF. Thanks.

Anonymous user

2 years ago

Great project! I’m new to arduino , so pls bear with me. I want to create 2 rf beacons for testing 2 antennas simultaneously. I would like to have each signal shift 500hz in frequency about once per second. I would think a several stage band pass filter on each output would be necessary. I’m ok doing the hardware part, but could you steer me in the code. Also I’m guessing that a milliwatt would be achievable without any amplification. Thanks for all your ideas!

Anonymous user

2 years ago

Excelente Cesar, me funciona muy bien. Gracias por compartir. LU1EG Alberto

CesarSound

2 years ago

Hola Alberto, fico feliz de saber! Abraço.

Anonymous user

2 years ago

congratulations for the really functional project. I wanted to ask if it was possible to modify the project to modify the IF value to use the system also to transmit on radio links with different shifts. Many thanks and congratulations again

Anonymous user

2 years ago

Hi sir i'm from indonesia do you have schematic and sketch for bitx or usdx thanks 73

CesarSound

2 years ago

Hello dedenz, thanks for comments. I do no know the bitx, but it is not possible to use with the usdx. For SI4735 double conversion receiver, follow this block diagram to have an idea: https://www.dropbox.com/s/ovwxsnwu18a14fa/JCR_SI4735_SI5351_DOUBLE_CONV_RECEIVER_BLOCK_DIAGRAM.jpg?dl=0

Anonymous user

2 years ago

ok sir and thanks

Anonymous user

2 years ago

Cesar: I can't find the Rotary library (encoder) for arduino uno or nano. Please give me the link to download it ?. Thank you

Anonymous user

2 years ago

Ho realizzato il progetto, senza nessun problema, ma all'accensione mi rimane la schermata iniziale bloccata e non da segni di vita, cosa può essere?

CesarSound

2 years ago

Although this problem did not occur to me, a user reported it. To solve it simply try to comment (//) the line 77 statup_text (); I am investigating what may be causing this on only a few platforms. Thanks.

Anonymous user

2 years ago

Mam podobny problem, projekt uruchamia się i nie daje się nic dalej z nim zrobić. Będę wdzięczny za pomoc.

Anonymous user

2 years ago

ok adesso funziona , grazie.

Anonymous user

2 years ago

Funziona molto bene , sarebbe perfetto se si potesse modificare la IF da i tasti

CesarSound

2 years ago

I am glad to know that it worked for you.

CesarSound

2 years ago

Thanks for the comments!

Anonymous user

2 years ago

i uncommented line 76 (startup test) now the display is ok

Anonymous user

2 years ago

I downloaded the sketch, it compiles but I only get the start screen "Si5351 VFO/RF GEN" "JCR RADIO - Ver 2.0" nothing else! I chekced the I2C adresses twith a I2C checker, 0x60 for the SI5351 and 0x3C for the display . So what is wrong?

enrique-10

2 years ago

Me too, I wish you could change the I.F. (430-460kHz) to regulate old tube radios. Thanks for your effort CesarSound !!!!

Anonymous user

2 years ago

MOLTO BELLO , CREDO CHE LO REALIZZERò

CesarSound

2 years ago

Hi iw2knj, thanks for the comments!

Anonymous user

2 years ago

Hi, I only saw your second version will ask here also ) Maybe you can recommand simple radio transmitter for 27Mhz want try OOK modulation or maybe for short range simple wire will work. Thanks

Anonymous user

2 years ago

Hello everybody! I'd need a help. I build it the vfo from start to end three times, every time everything runs flowelessly. So modified the step by choosing a 100 Hz step, i set the gain on smeter port... it was ok... i connected it to my radio to a diode ring mixer and yet it was ok. All the three building after a while, stop workin by switchin off the display, and after while si 5351 adafruit board stop the same. Arduino nano stop as well and no sign of life came in even by tring to upload sketch again....chip was terribli hot. All three times with different boards different vfo board and different display...I'm very sad, because all three version worked wonderfully for 30 minutes or so....where am i wrong? Thanks for your precious suggestions! Antonio

CesarSound

2 years ago

Hello antonio, thanks for the comments. The electrical circuit of this project is very simple and it does not have protections against over voltage or against high levels of radio frequency. So you must be careful with these points, you must not exceed 5 volts on the analog input of the Signal Meter, the Arduino power supply (applied to the VIN pin) must not exceed 9 volts (must be between 6.5 and 9 volts) and the the entire VFO circuit must be shielded in a grounded metallic case if used in a transmitter of more than 30 Watts, as the RF can burn the Arduino as well.

Anonymous user

2 years ago

Hello Julio Cesar, I've strange error: expected unqualified-id before string constant and point to line 42 of the code: ISR(PCINT2_vect) { can anyone help figure out where am I wrong? thanks in advance

CesarSound

2 years ago

Hello, thanks for using the project. This interruption "ISR(PCINT2_vect) {" works only with Arduino, be sure that you are using the Arduinio UNO/NANO with the ATMEGA328P. Others kind of microcontrollers do not support this kind of interruption.

CesarSound

2 years ago

To avoid use the ISR: void rotary_encoder() { unsigned char result = r.process(); if (result == DIR_CW) set_frequency(1); else if (result == DIR_CCW) set_frequency(-1); } void setup() { //Encoder Interrupt pinMode(interruptPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(2), rotary_encoder, CHANGE); attachInterrupt(digitalPinToInterrupt(3), rotary_encoder, CHANGE); }

Anonymous user

2 years ago

Nothing to do to me, isn't working. Is it possible to change this command: "ISR(PCINT2_vect) {" with another ? Arduino IDE 1.8.13 blocks me already in the verification phase. In which version of IDE work for you? Thanks to everyone who will help me

Anonymous user

2 years ago

I've Arduino Nano with Atmega328p and IDE 1.8.13. However, the error is already present in the verification phase before loading. Thanks

Anonymous user

2 years ago

Hola César , excelente projecto ,gracias por compartirlo ! lo hice y me funcionó sin problemas , pero quisiera agregarle la posibilidad de sumar o restar la IF para poder usarlo en equipos SSB , LSB y USB , se podrá implementar ? y otra cosa , lo probé con un Oled de 0,96 pulgadas y me anduvo perfecto , pero lo pruebo con uno de 1,3 pulgadas y la pantalla dibuja cualquier cosa , alguna idea al respecto? Muchas gracias ! Saludos ! LU1JIS

CesarSound

2 years ago

Hola Pablo, gracias por crear esta nueva opción para usar la pantalla de 1.3" SSH1106. ¡Gracias 73!

CesarSound

2 years ago

Hola, gracias por los comentarios. Tengo la intención de lanzar una actualización de este proyecto e incluir esta solicitud tuya y algunas otras, pero no sé exactamente cuándo podré hacerlo. En cuanto a la pantalla de 1,3 pulgadas, esta pantalla utiliza el controlador SSH1106 y requiere otra biblioteca específica para ello. La que uso en este proyecto es la biblioteca para SSD1306 y no es compatible con SSH1106. Por el momento no tengo esta pantalla aquí para probar. ¡Abrazo!

gerardolu5fe

2 years ago

bien Pablo muchas gracias voy a probar, saludos.

gerardolu5fe

2 years ago

Hola, estoy aprendiendo , y este comentario me sirbio para darme cuenta donde tengo el problema, la pantalla que tengo es la ssh1106, agradeseria informacion pa ver si puedo conseguir hacer funcionar este proyecto muy interesante, desde ya muchas gracias. saludos cordiales LU5FE Gerardo.

Anonymous user

2 years ago

Hola Gerardo, yo lo adapte a esa pantalla proba con este sketch To download this alternative version click here. (https://www.dropbox.com/s/ou92aqmmqcecluh/SI5351_VFO_RF_GEN_OLED_SH1106_V2_JCR_PW.zip?dl=0) un abrazo Pablo Pablo Woiz pablowoi@gmail.com www.pablowoiz.com https://www.youtube.com/pablowoiz https://www.instagram.com/pablo.woiz/ https://www.facebook.com/woizmusic https://open.spotify.com/artist/3CtvHcoLcCatN5Jl5L7CQF

Anonymous user

2 years ago

HOla!** hice una adaptacion para usarlo con pantallas de 1,3 pulgadas con el chip ssh1106, y funciona bien. Si quieres te la paso. Soy nuevo aqui y no se donde meter los archivos. Gracias por el proyecto!!! Saludos, Pablo LU1AGH

Anonymous user

2 years ago

Hi Julio! Thanks for the great construction! I have a question: is it possible for IF to be a fractional number, for example 9001.5 KHz.

CesarSound

2 years ago

Hi George, Yes, I have plans to do an upgrade including your request and maybe the implementation of using the EEPROM memory to retain the values when the arduino is turned off. But it will depend on time availability. Thanks!

CesarSound

2 years ago

Thank you!

CesarSound

2 years ago

Hello George, thanks for the comment! Maybe you can do this: On line 138: change to: void tunegen() { si5351.set_freq((freq + (interfreq * 1000ULL + 500)) * 100ULL, SI5351_CLK0); } That is, adding +500 in the expression (interfreq * 1000ULL + 500)) and them set the IF = 9001 This is a suggestion, simplest way I imagined, to avoid more complex code changes.

Anonymous user

2 years ago

Thanks Julio! I look forward to the V3 of your magnificent construction. I and many radio amateurs will be grateful to you.

Anonymous user

2 years ago

Thanks Julio! Indeed, this is the easiest way. And let me ask one more thing: do you envisage V3, in which CLK 1 (2) of si5351 will be used as a BFO in order to be able to receive SSB signals?

Anonymous user

2 years ago

How can i add a push button to activate / deactivate the vfo, like use it as cw key inputsl, for example? Thanks

CesarSound

2 years ago

Hello Pablo, I am working in an update of code that will include a new push button (or switch) to activate / deactivate output signal of the vfo. I should post the updated version here soon. 73!

Anonymous user

2 years ago

Hi, Thank you very much! can you a little help me in order to make this without "Adafruit SI5351 CLOCK GEN MODULE" and by onboard 16MHz clock of Arduino? Regard

CesarSound

2 years ago

Hi, this project works only with the Si5351 in order to generate a frequency signal. To generate directly from arduino maybe the Tone library can do it.

g3ba

2 years ago

I have built this project which works brilliantly, thank you! However, I'm new to coding and want to just use this as a VFO for a CW transmitter, not a transceiver. The functionality I need is 'Tune' with the VFO on its own to net onto the received signal on a separate receiver, and 'Transmit' with the VFO keyed and driving an external amplifier. Can you suggest the simplest way to achieve this? I have already set the VFO offset to 0kHz - that wasn't too challenging!

Anonymous user

2 years ago

Great Project! Thanks for sharing!! Has anyone tried this unit (or the similar one available on Ebay) with a tube type transmitter. I have recently purchased a TX-62 and this looks like a great solution of adding a VFO.

Anonymous user

2 years ago

excelente iniciativa, parabéns César. 73

CesarSound

2 years ago

Olá py4lmc, obrigado!

Anonymous user

2 years ago

When I compile, it has error, can anyone tell me how to solve it? I have installed all the library. the message as below: Arduino: 1.8.19 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)" D:\\Downloads\\si5351 VFO\\VFO\\VFO.ino: In function 'void __vector_5()': VFO:42:19: error: 'class Rotary' has no member named 'process' char result = r.process(); ^~~~~~~ VFO:43:17: error: 'DIR_CW' was not declared in this scope if (result == DIR_CW) set_frequency(1); ^~~~~~ D:\\Downloads\\si5351 VFO\\VFO\\VFO.ino:43:17: note: suggested alternative: 'DDRC' if (result == DIR_CW) set_frequency(1); ^~~~~~ DDRC VFO:44:22: error: 'DIR_CCW' was not declared in this scope else if (result == DIR_CCW) set_frequency(-1); ^~~~~~~ exit status 1 'class Rotary' has no member named 'process' This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Anonymous user

2 years ago

I had problems when using (Old Bootloader)

CesarSound

2 years ago

Please double check if the Rotary library Rotary.h is correctly installed in your IDE. Try to run a sketch example of Rotary library to see it it works.

Anonymous user

2 years ago

I tried, still same error

Anonymous user

2 years ago

I had download and unzip all the file from here //Ben Buxton https://github.com/brianlow/Rotary ......... it is ok now, thx

Anonymous user

2 years ago

you mean if i change not use Old Bootloader, it will be solve the error?

Anonymous user

2 years ago

Thanks, by the way, I managed to get the radio to work 100%, the problem with the LCD lines, the culprit was the solder bridge behind the LCD, I hadn't put it together and that's why when I powered it looked bad, for the rest 100% project, I have to solder the ferrite bar with a 300uh coil and that's it.

CesarSound

2 years ago

Hi Miguel, I am glad to know that it worked. Thank you!

Anonymous user

2 years ago

Hola Cesar. Un proyecto realmente interesante y útil, así como muy bien estructurado. Me gustaría contactar contigo. Me llamo Javier Solans, soy radioaficionado EA3GCY, puedes encontrarme en google. Muchas gracias.

CesarSound

2 years ago

Hola ea3gcy, gracias por los comentarios. Puedes contactarme aquí mismo o si lo prefieres enviándome un mensaje privado aquí mismo a través del hacksterio. Gracias - Julio,

pautax

2 years ago

Hi, good job!!! I like to know if somebody has connect it to a spectrum analyzer. What about spurios and phantom frequency? Need to filter output of oscillator before use it on a receiver ? Some info?

Anonymous user

2 years ago

Ciao, scusa se ti scrivo in italiano. Quando vado a compilare lo sketch mi da questo errore. Non sono molto pratico con arduino, ma me la cavo. Grazie Arduino:1.8.10 (Windows 10), Scheda:"Arduino Nano, ATmega328P" sketch_si5351_vfo_rf_gen_oled_jcr_v2:3:1: error: expected unqualified-id before '/' token / ************************************************* ************************************************** ******* ^ In file included from C:\\Users\\Gianpietro\\Desktop\\SKETCH ARDUINO\\sketch_si5351_vfo_rf_gen_oled_jcr_v2\\sketch_si5351_vfo_rf_gen_oled_jcr_v2.ino:11:0: C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src/Wire.h:82:8: error: 'TwoWire' does not name a type; did you mean 'TwoWire_h'? extern TwoWire Wire; ^~~~~~~ TwoWire_h In file included from C:\\Users\\Gianpietro\\Desktop\\SKETCH ARDUINO\\sketch_si5351_vfo_rf_gen_oled_jcr_v2\\sketch_si5351_vfo_rf_gen_oled_jcr_v2.ino:15:0: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master/Adafruit_SSD1306.h:129:42: error: 'TwoWire' has not been declared Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi = &Wire, ^~~~~~~ C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master/Adafruit_SSD1306.h:171:3: error: 'TwoWire' does not name a type; did you mean 'TwoWire_h'? TwoWire *wire; ^~~~~~~ TwoWire_h C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master/Adafruit_SSD1306.h:129:58: error: 'Wire' was not declared in this scope Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi = &Wire, ^~~~ sketch_si5351_vfo_rf_gen_oled_jcr_v2:30:55: error: 'Wire' was not declared in this scope Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire); ^~~~ C:\\Users\\Gianpietro\\Desktop\\SKETCH ARDUINO\\sketch_si5351_vfo_rf_gen_oled_jcr_v2\\sketch_si5351_vfo_rf_gen_oled_jcr_v2.ino: In function 'void setup()': sketch_si5351_vfo_rf_gen_oled_jcr_v2:67:3: error: 'Wire' was not declared in this scope Wire.begin(); ^~~~ Più di una libreria trovata per "Adafruit_SSD1306.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master Più di una libreria trovata per "SPI.h" Usata: C:\\Program Più di una libreria trovata per "Adafruit_I2CDevice.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_BusIO Più di una libreria trovata per "Rotary.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Rotary-master Più di una libreria trovata per "Wire.h" Usata: C:\\Program Più di una libreria trovata per "si5351.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Si5351Arduino-master Più di una libreria trovata per "Adafruit_GFX.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit-GFX-Library-master exit status 1 expected unqualified-id before '/' token

CesarSound

2 years ago

Olá Gianpietro, deve estar havendo conflito entre as bibliotecas que você tem instaladas. Experimente instalar o Arduino IDE mais recente em outro computador e instale também apenas as bibliotecas mencionadas no sketch deste projeto e faça a compilação. Boa sorte!

Anonymous user

2 years ago

Great realisation! Congratulations! I have modified your code to use it with a color Oled display ssd1331. It works fine as local oscillator for a direct conversion receiver. Thanks again for your work. Dominique

CesarSound

2 years ago

Hi Dominique, I am glad to know, thanks!

Anonymous user

2 years ago

Hi. I need a help. I'm trying to generate the second clock output (clk2 pinout RF Si5351a) and generate 4(four) preset frequencies, like this: on an analog input (A7) of the Arduino nano board I put a voltage divider... when it is approximately 1Volts in A7 frequency is clk2=14MHz, and when it is approximately 2 Volts in A7 frequency is clk2=28MHz, when voltage is at 3V then clk2=32MHz and at 4V is clk2=48MHZ. In other words, it is the frequency preset in clk2 selected through voltages from 1 to 4 Volts applied to A7 input. If you can help me with this code and post I will be immensely grateful. Thank you very much in advance.

Anonymous user

2 years ago

Bel progetto, ma potresti spiegarmi come risolvere questo problema? In file included from C:\\Users\\Alessando\\Documents\\Arduino\\libraries\\Adafruit-GFX-Library-master\\Adafruit_GrayOLED.cpp:20:0: C:\\Users\\Alessando\\Documents\\Arduino\\libraries\\Adafruit-GFX-Library-master\\Adafruit_GrayOLED.h:30:10: fatal error: Adafruit_I2CDevice.h: No such file or directory #include <Adafruit_I2CDevice.h> ^vvvvvvvvvvvvvvvvvvvv

lw9dbu-fer

2 years ago

Hi Giacomo. Mucho gusto. Te cuento que me ha pasado el mismo problema y lo he resuelto de esta manera. He entrado a este link: https://github.com/adafruit/Adafruit_BusIO He bajado ese ZIP. Y luego desde el IDE lo he incorporado a la libreria. El proyecto a partir de ahi, lo he podido compilar y me ha funcionado correctamente. Que tengas suerte!! Un cordial saludo Fernando- Argentina

Anonymous user

2 years ago

Hello Buddy Julio! I did all your generator designs and they all worked ok. Now I did the version with Jun / 2022, Colleague Pablo LU1AGH. I have a problem. I know my question is not for you, but I have no contact with Pablo. I cannot start PTT Rx / Tx. A2 and A6 do not work. Maybe you can help me with this problem? Thank you Maciek sp9wfh

Anonymous user

2 years ago

Hola Cesar! Exelent project. Me gustaría incluir un teclado 4x3 en su proyecto para poder seleccionar la frecuencia de él. ¿Es posible en este proyecto?

Anonymous user

2 years ago

Greetings. My first time playing with SI5351 and oled display. Pleasing and functional implementation. I have been trying to modify to add RIT feature but my C++ skills is zero. It would be a bonus to have that and maybe a BFO from the other CLK output. Looking forward to more of your projects. 73. DU7ZIP.

Anonymous user

2 years ago

Hello, Cesar, I was able to enable the other CLKs from your instructions to Gustav. I am trying Rob Engberts PA0RWE sketch for RIT. It’s working now but I still like your layout. I have managed to mimic your layout except for the SMeter. I have added #define S_GAIN and #define adc. and the bargraph. I’ll keep working on it and I would appreciate any suggestions. Thanks, again. Nez

CesarSound

2 years ago

Hello friend, I could try to include your ideas on next update. Thank you!

Anonymous user

2 years ago

Hello, is possible to use CLK1 with CLK0, where the signal on CLK1 would be shifted by 90° ? I think it would be better for use with sdr, or not ? How I can make it? Can we help me with code?

Anonymous user

2 years ago

I'm glad I found this. I ordered a completed unit from AliExpress. I'm restoring an old Drake novice ham radio station (2-NT / 2-C) and I want to learn about VFOs to replace the crystal. I've been planning to get into Arduino too, so here goes.

Anonymous user

2 years ago

Incidentally, there's an error on line 249. if (count == 14) display.print("**13m**"); _should be "15m"_

Anonymous user

2 years ago

Perfect! Now grounding A2 puts it in receive and opening it puts it in transmit. Thank you! I also got rid of all the bands except the five my vintage radio supports, and saved the presets to go to the CW portion of each band. Now it's time to dig in and learn how to set up the multipliers. I will report back.

Anonymous user

2 years ago

The clone version arrived and seems to put out a decent signal. I connected it to the crystal socket of my Drake 2-NT novice transmitter and was pleasantly surprised that the signal was sufficient to drive the transmit on the transmitter. I may still need a buffer amp in higher bands, but that will not be difficult. The clone comes with a momentary T/R switch, so I need to add a connection to the back panel to facilitate external switching from the transmitter. I'm hopeful that the keying will not lag or get chirpy. I also need to isolate the VFO Key circuit on my 2-NT, which may have significant voltage from the vacuum tube. This transmitter requires 3.5 MHz for the 80 meter band and 7.0 MHz for 40 meters and up. It doubles the crystal for 20 meters, triples it for 15 meters, and quadruples it for 10 meters. I'm curious if I could program the VFO to display the x2, x3, and x4 frequencies when sending the 7 MHz signal to the rig. This is a fun project. Thanks for making it available!

Anonymous user

2 years ago

I went ahead and built one on a breadboard and after struggling with elementary Arduino issues I have it running! I wonder if it's possible to reverse the rx_tx so it does the opposite. If not, I will try an inverter. My Drake radio has a connection that is grounded in receive and open during transmit. I would also appreciate guidance or advice on the changes I will need to do the previously mentioned x1 on 80M and 40M plus the x2,x3, and x4 for the other bands. I have some work to do!

CesarSound

2 years ago

Thanks for details of your clone and usage. With some trial and error tantative It is possible to change the code to do the indications you want (x2, x3, and x4 frequencies when sending the 7 MHz). The code is flexible. 73!

CesarSound

2 years ago

I am happy to know that it worked! keep reporting the results.

CesarSound

2 years ago

Hello, thanks for the comments and use of this project, good luck!

CesarSound

2 years ago

Hi, try the followings changes: Line 38: bool sts = 1; //was 0 Line 126 if (digitalRead(rx_tx) == LOW) { time_now = (millis() + 300); sts = 0; //was 1 } else sts = 1; //was 0

Anonymous user

2 years ago

Hello. Congratulations to the author! Could the lcd ili9341 be added? best regards

Anonymous user

2 years ago

Hi Julio, I really love this project, i have it running as a RF generator for the moment, modified the code for 10 bands only but i would like to use it on my YAESU FT-301 radio and cannot figure out how to set it up for 5-5.5Mhz bandwidth on all bands, as i have close to no knowledge of C++ maybe you can point me in the right direction. Thank you very much for this great project.

Anonymous user

2 years ago

Hello Julio, thank you very much for your support. The vfo is for 10 bands, my goal is to be able to select the band in my FT-301 and use the 500 khz segment to tune the radio with a stable device (FT-301 drifts really bad). The external vfo VF-301 (https://www.rigpix.com/accessories/yaesu_fv301.htm) apparently is no big improvement and is almost impossible to find. PH2LB has the perfect example (https://github.com/ph2lb/FT301VFO/) but unfortunately i cannot get it running, In an email the author recommended using components from a US company which i don't have in my goodies box. Thank you in advance.

Anonymous user

2 years ago

Hi, Julio, No problem Sir, thank you very much for looking into it. I will try to work with Lex PH2LB to solve the problem. The positive side is i will continue to use your project as a universal RF generator in my radioshack :-)

CesarSound

2 years ago

Hi Martin, I took a look at the links but I couldn't understand how this VFO should operate. I am not radio amateur and have never operated such equipment. I don't know how to help you.

CesarSound

2 years ago

Hi Martin, thanks for the comments and testing the project. Do you want that a band has a limit of 5 to 5.5MHz? Or all bands? Give me an example. Tks.

Anonymous user

2 years ago

This was really easy to duplicate project. Thank you for sharing such simple but well designed project. I made it on a breadboard and it worked in just first attempt. I have one small request. I am planning to use this in direct conversion receiver and i set IF to 0. Now I need some way to implement the Full-break-In or there should be some option to shift the RX LO frequency few hundred Hz above or below the TX frequency. This should happen when i release the CW Key. Can you give me some tips on this. What changes in code required to achieve this ?

CesarSound

2 years ago

Hello vu3kfk, thanks for your comments! 73!

Anonymous user

2 years ago

Or rather should I say is it possible to set IF frequency between 100 Hz and 1000 Hz ?

CesarSound

2 years ago

Hello vu3kfk, thanks for the comment! Maybe you can do this: On line 138: change to: void tunegen() { si5351.set_freq((freq + (interfreq * 1000ULL + 100)) * 100ULL, SI5351_CLK0); } That is, adding +100 in the expression (interfreq * 1000ULL + 100)) and them offset the IF by +100Hz, for exemple. This is a suggestion, simplest way I imagined, to avoid more complex code changes.

Anonymous user

2 years ago

Hi Julio I have been using your code for some time now in homemade ham transciever and very impressed by it. Look forward to v3 particularly to add cw ofsett c700Hz between tx and rx frequency and memory store, both of which have I think already been suggested. Many thanks G3VAJ

CesarSound

2 years ago

Olá Miguel, saludo, gracias!, é possível sim, basicamente teria que fazer as ligações conforme este diagrama de blocos: https://www.dropbox.com/s/ovwxsnwu18a14fa/JCR_SI4735_SI5351_DOUBLE_CONV_RECEIVER_BLOCK_DIAGRAM.jpg?dl=0

CesarSound

2 years ago

Hi G3VAJ, thank you for using the VFO and comments! I am taking notes of your ideas for future upgrade in this code. 73! Cheers, Julio.

Anonymous user

2 years ago

julio,seria posible conectar este proyecto a la radio multibanda de tu otro post y como se conectaria?.un saludo.

Anonymous user

2 years ago

hi CesarSound please add shematic and scatch for Double Conversion Receiver I am interested in trying this project thanks

Anonymous user

2 years ago

thanks

CesarSound

2 years ago

Hello, I don't have the schematic ready to share at the moment, as I was putting it together in parts and a lot is in my head. I intend to document everything so I can share it soon. Thanks.

Anonymous user

2 years ago

Hola Cesar! Será posible habilitar 3 de los pines que quedan libres en el arduino para que presenten 1 lógicos en dependencia de la frecuencia del display? La idea es poder activar filtros pasabanda.

Anonymous user

2 years ago

I have a thought of giving different frequencies to products in a warehouse and using receiver for every single product. I want to find the desired product with my variable frequency control device. Is it possible with this project?

Anonymous user

2 years ago

hi folks put all together with an UNO-board. dds works only when keyed. no rx shift when IF is defined... so whats happens?

Anonymous user

2 years ago

Hello, I cannot compile because I have an error from line 41 to line 45 message error: exit state 1 'class Rotary' has no member named 'process' 41 ISR(PCINT2_vect) { 42 characters result = r.process(); 43 if (result == DIR_CW) set_frequency(1); 44 else if (result == DIR_CCW) set_frequency(-1); 45 } my libraries seem to be good. if every line from 41 to 45 i start with "//" i get to a compiler, assembly works but no rotary. Can you help me, I am not a programming expert. can these lines be replaced? Thank you Best regards

Anonymous user

2 years ago

Formerly i did ask whether somebody knows on how to reprogram the chinese clone versions. Meanwhile this successfully has been done by using settings like needed for NANO. At least with my version now tunestep selection was via #9 and RX/TX control via #10. Correct port for band selection still has to be found out. Amazingly the calibration factor had to be set to quite low value ( -1000);

Anonymous user

2 years ago

Hi CesarSound! Great work. I use it to build a RX converter for using old police radio. But the frequency is up 15 kHz against Display in TX mode. I tried to change the correction value but it has no effekt to the output. for example: I tuned to 86,415 MHz.....Output is about 86,430 Mhz. How can i resolve it? Jochen DH1BDU

Anonymous user

2 years ago

Jochen, change value after "#define XT_CAL_F" in "User preferences". Higher values will give lower frequencies and vice versa. You simply must try out. 73 Klaus

salvo51

2 years ago

Congratulazioni per il tuo progetto, è molto interessante e vorrei costruire questo VFO, ho acquistato tutti i pezzi, ho scaricato lo sketch, e non riesco a compilarlo, mi da errore 'class Rotary' has no member named 'process'. ISR(PCINT2_vect) { char result = r.process(); if (result == DIR_CW) set_frequency(1); else if (result == DIR_CCW) set_frequency(-1); } L'errore si verifica nella riga: char result = r.process(); Non so se il problema è in qualche libreria. Grazie

Paalb

2 years ago

Thank you for sharing your work. This is the one I've been looking for.

jackmar

2 years ago

This is a very good design, I think. The screen is pretty busy and it would be useful to use OLED libraries that support the 1.3 inch OLED. There are a few that support both the SS1306 and the SH11?? I use a VFO that does this. A 1.3 inch OLED is much easier to use.

Anonymous user

2 years ago

thilak 4s7ma it is a very nice project , very versatile and user user friendly one . lots of thanks to you 73.

sp9wfh

2 years ago

Hello Buddy Julio! I did all your generator designs and they all worked ok. Now I did the version with Jun / 2022, Colleague Pablo LU1AGH. I have a problem. I know my question is not for you, but I have no contact with Pablo. I cannot start PTT Rx / Tx. A2 and A6 do not work. Maybe you can help me with this problem? Thank you Maciek sp9wfh

pautax

2 years ago

Hi, good job!!! I like to know if somebody has connect it to a spectrum analyzer. What about spurios and phantom frequency? Need to filter output of oscillator before use it on a receiver ? Some info?

Anonymous user

2 years ago

When I compile, it has error, can anyone tell me how to solve it? I have installed all the library. the message as below: Arduino: 1.8.19 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)" D:\\Downloads\\si5351 VFO\\VFO\\VFO.ino: In function 'void __vector_5()': VFO:42:19: error: 'class Rotary' has no member named 'process' char result = r.process(); ^~~~~~~ VFO:43:17: error: 'DIR_CW' was not declared in this scope if (result == DIR_CW) set_frequency(1); ^~~~~~ D:\\Downloads\\si5351 VFO\\VFO\\VFO.ino:43:17: note: suggested alternative: 'DDRC' if (result == DIR_CW) set_frequency(1); ^~~~~~ DDRC VFO:44:22: error: 'DIR_CCW' was not declared in this scope else if (result == DIR_CCW) set_frequency(-1); ^~~~~~~ exit status 1 'class Rotary' has no member named 'process' This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Anonymous user

2 years ago

I had problems when using (Old Bootloader)

Anonymous user

2 years ago

you mean if i change not use Old Bootloader, it will be solve the error?

Anonymous user

2 years ago

I tried, still same error

Anonymous user

2 years ago

I had download and unzip all the file from here //Ben Buxton https://github.com/brianlow/Rotary ......... it is ok now, thx

CesarSound

2 years ago

Please double check if the Rotary library Rotary.h is correctly installed in your IDE. Try to run a sketch example of Rotary library to see it it works.

Anonymous user

2 years ago

hi CesarSound please add shematic and scatch for Double Conversion Receiver I am interested in trying this project thanks

Anonymous user

2 years ago

thanks

CesarSound

2 years ago

Hello, I don't have the schematic ready to share at the moment, as I was putting it together in parts and a lot is in my head. I intend to document everything so I can share it soon. Thanks.

Anonymous user

2 years ago

Hello and thank you for an excellent project. I built one and it works flawlessly. I am building a second one that I would like to use for a 3 band vhf transceiver. I am new to arduino and coding and would appreciate it a lot if you can possibly assist. I need 3 bands, 50 - 54Mhz, 70 - 70.5Mhz and 144 - 146Mhz. Will it be possible to add digital outputs for each band to use for filter selection? Regards Paul

Anonymous user

3 years ago

I'm glad I found this. I ordered a completed unit from AliExpress. I'm restoring an old Drake novice ham radio station (2-NT / 2-C) and I want to learn about VFOs to replace the crystal. I've been planning to get into Arduino too, so here goes.

Anonymous user

2 years ago

The clone version arrived and seems to put out a decent signal. I connected it to the crystal socket of my Drake 2-NT novice transmitter and was pleasantly surprised that the signal was sufficient to drive the transmit on the transmitter. I may still need a buffer amp in higher bands, but that will not be difficult. The clone comes with a momentary T/R switch, so I need to add a connection to the back panel to facilitate external switching from the transmitter. I'm hopeful that the keying will not lag or get chirpy. I also need to isolate the VFO Key circuit on my 2-NT, which may have significant voltage from the vacuum tube. This transmitter requires 3.5 MHz for the 80 meter band and 7.0 MHz for 40 meters and up. It doubles the crystal for 20 meters, triples it for 15 meters, and quadruples it for 10 meters. I'm curious if I could program the VFO to display the x2, x3, and x4 frequencies when sending the 7 MHz signal to the rig. This is a fun project. Thanks for making it available!

Anonymous user

2 years ago

Incidentally, there's an error on line 249. if (count == 14) display.print("**13m**"); _should be "15m"_

Anonymous user

2 years ago

I went ahead and built one on a breadboard and after struggling with elementary Arduino issues I have it running! I wonder if it's possible to reverse the rx_tx so it does the opposite. If not, I will try an inverter. My Drake radio has a connection that is grounded in receive and open during transmit. I would also appreciate guidance or advice on the changes I will need to do the previously mentioned x1 on 80M and 40M plus the x2,x3, and x4 for the other bands. I have some work to do!

Anonymous user

2 years ago

Perfect! Now grounding A2 puts it in receive and opening it puts it in transmit. Thank you! I also got rid of all the bands except the five my vintage radio supports, and saved the presets to go to the CW portion of each band. Now it's time to dig in and learn how to set up the multipliers. I will report back.

Anonymous user

2 years ago

Hello. Congratulations to the author! Could the lcd ili9341 be added? best regards

CesarSound

2 years ago

I am happy to know that it worked! keep reporting the results.

CesarSound

2 years ago

Hello, thanks for the comments and use of this project, good luck!

CesarSound

2 years ago

Thanks for details of your clone and usage. With some trial and error tantative It is possible to change the code to do the indications you want (x2, x3, and x4 frequencies when sending the 7 MHz). The code is flexible. 73!

CesarSound

2 years ago

Hi, try the followings changes: Line 38: bool sts = 1; //was 0 Line 126 if (digitalRead(rx_tx) == LOW) { time_now = (millis() + 300); sts = 0; //was 1 } else sts = 1; //was 0

Anonymous user

3 years ago

Hello Julio Cesar, I've strange error: expected unqualified-id before string constant and point to line 42 of the code: ISR(PCINT2_vect) { can anyone help figure out where am I wrong? thanks in advance

CesarSound

2 years ago

Hello, thanks for using the project. This interruption "ISR(PCINT2_vect) {" works only with Arduino, be sure that you are using the Arduinio UNO/NANO with the ATMEGA328P. Others kind of microcontrollers do not support this kind of interruption.

CesarSound

2 years ago

To avoid use the ISR: void rotary_encoder() { unsigned char result = r.process(); if (result == DIR_CW) set_frequency(1); else if (result == DIR_CCW) set_frequency(-1); } void setup() { //Encoder Interrupt pinMode(interruptPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(2), rotary_encoder, CHANGE); attachInterrupt(digitalPinToInterrupt(3), rotary_encoder, CHANGE); }

Anonymous user

2 years ago

Nothing to do to me, isn't working. Is it possible to change this command: "ISR(PCINT2_vect) {" with another ? Arduino IDE 1.8.13 blocks me already in the verification phase. In which version of IDE work for you? Thanks to everyone who will help me

Anonymous user

2 years ago

I've Arduino Nano with Atmega328p and IDE 1.8.13. However, the error is already present in the verification phase before loading. Thanks

Anonymous user

3 years ago

hello, ur job are really great and i'm grateful to have found this project, i have a question for u, now i'm on my project to transmit vlf radio signal approximately transmit 10kHz RF. After we generate RF are u have option how to transmit the RF? thank u in advance

CesarSound

2 years ago

Hello, thanks for using the project. 10kHz is not proper to transmitt signals, usually a transmitter uses high freq above 500kHz.

Anonymous user

3 years ago

How can i add a push button to activate / deactivate the vfo, like use it as cw key inputsl, for example? Thanks

CesarSound

2 years ago

Hello Pablo, I am working in an update of code that will include a new push button (or switch) to activate / deactivate output signal of the vfo. I should post the updated version here soon. 73!

Anonymous user

3 years ago

For me, this is very interesting and useful information. [dordle](https://dordle.online/) I enjoy reading your posts. [word hurdle](https://wordhurdle.co/) Thanks

Anonymous user

3 years ago

Ola Cesar, Muito interessante o seu projeto. Uma pergunta: Seria possivel escolher um frequencia diferente para TX? quero usar um radio antigo a cristal com o seu seu VFO, as frequencias de TX e RX sao diferentes. o radio usa cristais de over tone. Obrigado Flavio VE2ZFP

CesarSound

2 years ago

Olá Flavio. obrigado pelos comentários. É possível adicionar ou subtrair (off set) um valor em relação frequência de TX. Por exemplo, se a frequência de TX estiver em 7000kHz e definir o valor de IF (frequência intermediária) no sketch para 455kHz, a frequência de RX será de 7455kHz e RX 7000kHz. Se colocar -455kHz a freq de RX será 6545kHz e a TX será de 7000kHz. Importante dizer que em RX a indicação no display será de 7000kHz, porem a saída do VFO será de 7455kHz, para possibilitar o uso em receptores supeheterodinos. Espero ter ajudado. 73! Julio.

Anonymous user

2 years ago

Exelente Cesar, I want to use this VFO on a 2m TRX. How to additionally add 12.5kHz tuning step?

Anonymous user

2 years ago

Excellent Cesar! Chcę wykorzystać to VFO do TRX na 2m. Jak dodatkowo dodać krok przestrajania 12.5kHz?

Anonymous user

2 years ago

Ola Cesar, Entendido quanto as frequencias de TX e RX. Só mais uma coisa. Uma vez definidos RX e TX o que faço para mudar o valor de frequência no LCD, nao quero que ele mostre a frequência de oscilação do cristal e sim a frequência final do radio. Para adicionar um offset de repetidora  No display seria dificil?  Obrigado e desculpe me por perguntar tanta coisa de uma vez. Grende abraco Flavio Get Outlook for Android (https://aka.ms/ghei36) -------------------------------

sp9wfh

3 years ago

Hola Cesar! Exelent project. Me gustaría incluir un teclado 4x3 en su proyecto para poder seleccionar la frecuencia de él. ¿Es posible en este proyecto?

urbantech

3 years ago

Hola César , excelente projecto ,gracias por compartirlo ! lo hice y me funcionó sin problemas , pero quisiera agregarle la posibilidad de sumar o restar la IF para poder usarlo en equipos SSB , LSB y USB , se podrá implementar ? y otra cosa , lo probé con un Oled de 0,96 pulgadas y me anduvo perfecto , pero lo pruebo con uno de 1,3 pulgadas y la pantalla dibuja cualquier cosa , alguna idea al respecto? Muchas gracias ! Saludos ! LU1JIS

CesarSound

2 years ago

Hola Pablo, gracias por crear esta nueva opción para usar la pantalla de 1.3" SSH1106. ¡Gracias 73!

Anonymous user

2 years ago

Hola Gerardo, yo lo adapte a esa pantalla proba con este sketch To download this alternative version click here. (https://www.dropbox.com/s/ou92aqmmqcecluh/SI5351_VFO_RF_GEN_OLED_SH1106_V2_JCR_PW.zip?dl=0) un abrazo Pablo Pablo Woiz pablowoi@gmail.com www.pablowoiz.com https://www.youtube.com/pablowoiz https://www.instagram.com/pablo.woiz/ https://www.facebook.com/woizmusic https://open.spotify.com/artist/3CtvHcoLcCatN5Jl5L7CQF

Anonymous user

2 years ago

HOla!** hice una adaptacion para usarlo con pantallas de 1,3 pulgadas con el chip ssh1106, y funciona bien. Si quieres te la paso. Soy nuevo aqui y no se donde meter los archivos. Gracias por el proyecto!!! Saludos, Pablo LU1AGH

gerardolu5fe

2 years ago

Hola, estoy aprendiendo , y este comentario me sirbio para darme cuenta donde tengo el problema, la pantalla que tengo es la ssh1106, agradeseria informacion pa ver si puedo conseguir hacer funcionar este proyecto muy interesante, desde ya muchas gracias. saludos cordiales LU5FE Gerardo.

gerardolu5fe

2 years ago

bien Pablo muchas gracias voy a probar, saludos.

CesarSound

2 years ago

Hola, gracias por los comentarios. Tengo la intención de lanzar una actualización de este proyecto e incluir esta solicitud tuya y algunas otras, pero no sé exactamente cuándo podré hacerlo. En cuanto a la pantalla de 1,3 pulgadas, esta pantalla utiliza el controlador SSH1106 y requiere otra biblioteca específica para ello. La que uso en este proyecto es la biblioteca para SSD1306 y no es compatible con SSH1106. Por el momento no tengo esta pantalla aquí para probar. ¡Abrazo!

fredribt

3 years ago

Great Project! Thanks for sharing!! Has anyone tried this unit (or the similar one available on Ebay) with a tube type transmitter. I have recently purchased a TX-62 and this looks like a great solution of adding a VFO.

Anonymous user

3 years ago

Great project! I’m new to arduino , so pls bear with me. I want to create 2 rf beacons for testing 2 antennas simultaneously. I would like to have each signal shift 500hz in frequency about once per second. I would think a several stage band pass filter on each output would be necessary. I’m ok doing the hardware part, but could you steer me in the code. Also I’m guessing that a milliwatt would be achievable without any amplification. Thanks for all your ideas!

Anonymous user

3 years ago

Hola julio cesar . La salida del Si5351 lleva alguna atenuación para entrar en el NE 602 ? o va directo ? Leí el datasheet pero no encuentro la información

CesarSound

2 years ago

Usé un atenuador eso sí, con una resistencia de 470 OHMS para el GND y una resistencia de 2.2kOHMS para la entrada NE602 (pin 6). Antes de la resistencia de 470 OHMS, la salida del Si5351 debe tener un condensador de desacoplamiento de 100 nF. Pronto prepararé el esquema y lo publicaré aquí.

Anonymous user

3 years ago

Thanks, by the way, I managed to get the radio to work 100%, the problem with the LCD lines, the culprit was the solder bridge behind the LCD, I hadn't put it together and that's why when I powered it looked bad, for the rest 100% project, I have to solder the ferrite bar with a 300uh coil and that's it.

CesarSound

2 years ago

Hi Miguel, I am glad to know that it worked. Thank you!

dedenz

3 years ago

Hi sir i'm from indonesia do you have schematic and sketch for bitx or usdx thanks 73

dedenz

2 years ago

ok sir and thanks

CesarSound

2 years ago

Hello dedenz, thanks for comments. I do no know the bitx, but it is not possible to use with the usdx. For SI4735 double conversion receiver, follow this block diagram to have an idea: https://www.dropbox.com/s/ovwxsnwu18a14fa/JCR_SI4735_SI5351_DOUBLE_CONV_RECEIVER_BLOCK_DIAGRAM.jpg?dl=0

Anonymous user

3 years ago

hola Julio cesar . Hice tu vfo es perfecto deseo hacer un Receptor banda aerea con tu vfo . No se como conectarlo al oscilador local De un TA 2003 o un TA7358 También vi que sugerís dos dsp Si4735 y Si4732 . Estos dsp solo actuarian como demoduladores ? entiendo que el Dsp seleciona su frecuencia por softwarte y son solo broadcasting o ham . se puede usar un dsp para banda aerea . Saludos desde Argentina . 73´s

Anonymous user

2 years ago

Muchas gracias julio cesar. El vfo es mejor que perfecto. Gracias por compartirlo !!

CesarSound

2 years ago

Hola Herman, gracias por comentar. É possivel fazer um receptor de dupla conversão com este VFO, usando uma primeira conversão de 10.7MHz e a segunda de 455kHz. Veja este diagrama de bolcos de um receptor de dupla conversão com o SI4735 que eu projetei: https://www.dropbox.com/s/ovwxsnwu18a14fa/JCR_SI4735_SI5351_DOUBLE_CONV_RECEIVER_BLOCK_DIAGRAM.jpg?dl=0

CesarSound

2 years ago

Gracias!

g3ba

3 years ago

I have built this project which works brilliantly, thank you! However, I'm new to coding and want to just use this as a VFO for a CW transmitter, not a transceiver. The functionality I need is 'Tune' with the VFO on its own to net onto the received signal on a separate receiver, and 'Transmit' with the VFO keyed and driving an external amplifier. Can you suggest the simplest way to achieve this? I have already set the VFO offset to 0kHz - that wasn't too challenging!

Anonymous user

3 years ago

Hi Julio I have been using your code for some time now in homemade ham transciever and very impressed by it. Look forward to v3 particularly to add cw ofsett c700Hz between tx and rx frequency and memory store, both of which have I think already been suggested. Many thanks G3VAJ

Anonymous user

2 years ago

julio,seria posible conectar este proyecto a la radio multibanda de tu otro post y como se conectaria?.un saludo.

CesarSound

2 years ago

Olá Miguel, saludo, gracias!, é possível sim, basicamente teria que fazer as ligações conforme este diagrama de blocos: https://www.dropbox.com/s/ovwxsnwu18a14fa/JCR_SI4735_SI5351_DOUBLE_CONV_RECEIVER_BLOCK_DIAGRAM.jpg?dl=0

CesarSound

2 years ago

Hi G3VAJ, thank you for using the VFO and comments! I am taking notes of your ideas for future upgrade in this code. 73! Cheers, Julio.

Anonymous user

3 years ago

Julio, I received the Chinese version of your project. It is packaged very nicely but required a lot of help to make it usable. I found the SMA connector for the ADC input not soldered at all, and all buttons were mapped to the wrong pins on the MCU for your Sketch making it necessary to change all the pin assignments in the code. I was able to set the calibration routine to get it right on frequency. I had to un-solder the display to remove the protective film from the screen and had to re-map the encoder pins to get the tuning to go the right direction. Now that all of that is done it is a very nice tool for my bench. Anyone who buys the Chinese version be prepared to make some changes before being able to use it. Thanks Julio for the project. Joel N6ALT

CesarSound

2 years ago

Hello Joel, thanks for the review and for detailing the problems found and the solution you adopted to solve them. Unfortunately these clones currently lack a lot of quality control and it is common to present gross errors. I take this opportunity to point out that I have no connection with the manufacturers of these Chinese clones. I am happy to know that in the end the equipment is working and is being useful to you. Cheers, Julio.

Anonymous user

3 years ago

Hi Julio, I really love this project, i have it running as a RF generator for the moment, modified the code for 10 bands only but i would like to use it on my YAESU FT-301 radio and cannot figure out how to set it up for 5-5.5Mhz bandwidth on all bands, as i have close to no knowledge of C++ maybe you can point me in the right direction. Thank you very much for this great project.

CesarSound

2 years ago

Hi Martin, thanks for the comments and testing the project. Do you want that a band has a limit of 5 to 5.5MHz? Or all bands? Give me an example. Tks.

CesarSound

2 years ago

Hi Martin, I took a look at the links but I couldn't understand how this VFO should operate. I am not radio amateur and have never operated such equipment. I don't know how to help you.

Anonymous user

2 years ago

Hi, Julio, No problem Sir, thank you very much for looking into it. I will try to work with Lex PH2LB to solve the problem. The positive side is i will continue to use your project as a universal RF generator in my radioshack :-)

Anonymous user

2 years ago

Hello Julio, thank you very much for your support. The vfo is for 10 bands, my goal is to be able to select the band in my FT-301 and use the 500 khz segment to tune the radio with a stable device (FT-301 drifts really bad). The external vfo VF-301 (https://www.rigpix.com/accessories/yaesu_fv301.htm) apparently is no big improvement and is almost impossible to find. PH2LB has the perfect example (https://github.com/ph2lb/FT301VFO/) but unfortunately i cannot get it running, In an email the author recommended using components from a US company which i don't have in my goodies box. Thank you in advance.

ea3gcy

3 years ago

Hola Cesar. Un proyecto realmente interesante y útil, así como muy bien estructurado. Me gustaría contactar contigo. Me llamo Javier Solans, soy radioaficionado EA3GCY, puedes encontrarme en google. Muchas gracias.

CesarSound

2 years ago

Hola ea3gcy, gracias por los comentarios. Puedes contactarme aquí mismo o si lo prefieres enviándome un mensaje privado aquí mismo a través del hacksterio. Gracias - Julio,

Anonymous user

3 years ago

Hi Cesar, your project has been copied by the Chinese and is now being sold on eBay and Aliexpress! https://www.ebay.com/itm/324937605544?_trkparms=amclksrc%3DITM%26aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20160908105057%26meid%3D92abb5aa253d4adcacf0d34459f005cb%26pid%3D100675%26rk%3D2%26rkt%3D15%26sd%3D124573392976%26itm%3D324937605544%26pmt%3D1%26noa%3D1%26pg%3D2380057%26brand%3DUnbranded&_trksid=p2380057.c100675.m4236&_trkparms=pageci%3Ab893f559-7d51-11ec-b5ab-822b25259f4d%7Cparentrq%3A8db6669317e0a9f5db95db13fff56e0c%7Ciid%3A1 Joel N6ALT

CesarSound

2 years ago

Hello Joel, wow, I didn't even know that, apparently my idea is getting popular. Thank you for letting me know! Cheers. Julio.

Anonymous user

2 years ago

Julio, I ordered one of these, I will let you know what I think when I get it. Thanks. Joel N6ALT

Anonymous user

3 years ago

buenos dias...y para obtener el audio?....GRACIAS!!!

mauriciounb

3 years ago

Hi. I need a help. I'm trying to generate the second clock output (clk2 pinout RF Si5351a) and generate 4(four) preset frequencies, like this: on an analog input (A7) of the Arduino nano board I put a voltage divider... when it is approximately 1Volts in A7 frequency is clk2=14MHz, and when it is approximately 2 Volts in A7 frequency is clk2=28MHz, when voltage is at 3V then clk2=32MHz and at 4V is clk2=48MHZ. In other words, it is the frequency preset in clk2 selected through voltages from 1 to 4 Volts applied to A7 input. If you can help me with this code and post I will be immensely grateful. Thank you very much in advance.

Anonymous user

3 years ago

Hola arme el vfo pero cuando subo el programa no enciende la pantalla oled alguno pudo corregir el software para que funcione y me ko puede pasar gracias

CesarSound

2 years ago

Hola Jose, gracias por los comentarios. ¿Está utilizando la pantalla OLED SSD1306? Recuerdo que este proyecto no fue hecho para trabajar con OLED SH1106. También puede verificar que la dirección I2C de su pantalla OLED sea correcta y cambiarla en la línea 66 (display.begin (SSD1306_SWITCHCAPVCC, 0x3C); ) si es necesario. Tenga en cuenta que utilizo la dirección 0x3C para la pantalla.

CesarSound

2 years ago

Hola Jose, me alegro de saber que VFO funcionó y ¡te gustó! Gracias por las palabras, les deseo un feliz año nuevo con mucha salud y paz. ¡Un abrazo!

Anonymous user

2 years ago

Hola cesar feliz año nuevo luego de tanto provar cometi un error y tuve que cargar el sketch de nuevo y cuando lo prove no tiro error lo subi al arduino y salio funcionando bien Felicitaciones por el proyecto que funciona ahora a probarlo en el equipo gracias por tu ayuda

Anonymous user

2 years ago

Hola cesar gracias por responderme es extraño la pantalla es 0.96 oled ssd1306 azul iic llc revise la linea 66 y esta correcto cuando doy verificar no hay errores pero lo cargo carga todo pero sigue la pantalla sin prender con otro programa similar prende o sea la pantalla no es

antoniobertezzolo

3 years ago

Hello everybody! I'd need a help. I build it the vfo from start to end three times, every time everything runs flowelessly. So modified the step by choosing a 100 Hz step, i set the gain on smeter port... it was ok... i connected it to my radio to a diode ring mixer and yet it was ok. All the three building after a while, stop workin by switchin off the display, and after while si 5351 adafruit board stop the same. Arduino nano stop as well and no sign of life came in even by tring to upload sketch again....chip was terribli hot. All three times with different boards different vfo board and different display...I'm very sad, because all three version worked wonderfully for 30 minutes or so....where am i wrong? Thanks for your precious suggestions! Antonio

CesarSound

2 years ago

Hello antonio, thanks for the comments. The electrical circuit of this project is very simple and it does not have protections against over voltage or against high levels of radio frequency. So you must be careful with these points, you must not exceed 5 volts on the analog input of the Signal Meter, the Arduino power supply (applied to the VIN pin) must not exceed 9 volts (must be between 6.5 and 9 volts) and the the entire VFO circuit must be shielded in a grounded metallic case if used in a transmitter of more than 30 Watts, as the RF can burn the Arduino as well.

Anonymous user

3 years ago

Great project, worked 1st time it was switched on! Cannot find info on how to subtract IF on 20m, 15m, 10m - and add IF on 40m, 80m & 160m. Do not understand the description. HELP CesarSound! I have also only included the Ham bands, and added a 100kHz step. Look forward to your response. Bob.........ZS6RZ

CesarSound

2 years ago

Hello Bob, thanks for the comments. To subtract the IF, edit the sketch on line 17 #define IF and then save it and then load it again to arduino. For example, if you want do add to IF of 455kHz, just type 455. But if you want to subtract to IF jut type -455 (minus 455) on line 17 #define IF.

Anonymous user

3 years ago

I have a compilation problem\\Arduino\\libraries\\Adafruit-GFX-Library-master\\Adafruit_GrayOLED.h:30:10: fatal error: Adafruit_I2CDevice.h: No such file or directory please, give me an advice

idealist

2 years ago

Hi 1DWK..... I had exactly the same problem until downloaded "Adafruit BusIO" library and installed it...Now everything is fine I hope it works for you too.

Anonymous user

3 years ago

Hi Cesar Sound Love your project I built a few of these, used one together with a simple SWR bridge to measure antenna's, could you give a little idea for creating a frequenty ofset during TX, this is most handy for qrp CW mostly it is about -600 or -700 Hz. Much gratefull! Regards

Anonymous user

2 years ago

Hey Eddo! can you tell me wich swr bridge you used? I want to do the same... ;) Thanks!

vu3kfk

3 years ago

Or rather should I say is it possible to set IF frequency between 100 Hz and 1000 Hz ?

CesarSound

2 years ago

Hello vu3kfk, thanks for the comment! Maybe you can do this: On line 138: change to: void tunegen() { si5351.set_freq((freq + (interfreq * 1000ULL + 100)) * 100ULL, SI5351_CLK0); } That is, adding +100 in the expression (interfreq * 1000ULL + 100)) and them offset the IF by +100Hz, for exemple. This is a suggestion, simplest way I imagined, to avoid more complex code changes.

vu3kfk

3 years ago

This was really easy to duplicate project. Thank you for sharing such simple but well designed project. I made it on a breadboard and it worked in just first attempt. I have one small request. I am planning to use this in direct conversion receiver and i set IF to 0. Now I need some way to implement the Full-break-In or there should be some option to shift the RX LO frequency few hundred Hz above or below the TX frequency. This should happen when i release the CW Key. Can you give me some tips on this. What changes in code required to achieve this ?

CesarSound

2 years ago

Hello vu3kfk, thanks for your comments! 73!

Anonymous user

3 years ago

Hello, is possible to use CLK1 with CLK0, where the signal on CLK1 would be shifted by 90° ? I think it would be better for use with sdr, or not ? How I can make it? Can we help me with code?

Anonymous user

3 years ago

Cesar: I can't find the Rotary library (encoder) for arduino uno or nano. Please give me the link to download it ?. Thank you

Anonymous user

3 years ago

How would I connect this to a Cobra LTD 29 Radio? Thank in advance

CesarSound

2 years ago

Hi George, I wouldn't know how to do it, but from what I've seen on Youtube videos, it's possible to do it, with some knowledge of electronics and RF. Thanks.

Anonymous user

3 years ago

Hi Julio! Thanks for the great construction! I have a question: is it possible for IF to be a fractional number, for example 9001.5 KHz.

Anonymous user

2 years ago

Thanks Julio! I look forward to the V3 of your magnificent construction. I and many radio amateurs will be grateful to you.

Anonymous user

2 years ago

Thanks Julio! Indeed, this is the easiest way. And let me ask one more thing: do you envisage V3, in which CLK 1 (2) of si5351 will be used as a BFO in order to be able to receive SSB signals?

CesarSound

2 years ago

Hello George, thanks for the comment! Maybe you can do this: On line 138: change to: void tunegen() { si5351.set_freq((freq + (interfreq * 1000ULL + 500)) * 100ULL, SI5351_CLK0); } That is, adding +500 in the expression (interfreq * 1000ULL + 500)) and them set the IF = 9001 This is a suggestion, simplest way I imagined, to avoid more complex code changes.

CesarSound

2 years ago

Thank you!

CesarSound

2 years ago

Hi George, Yes, I have plans to do an upgrade including your request and maybe the implementation of using the EEPROM memory to retain the values when the arduino is turned off. But it will depend on time availability. Thanks!

Cathprotech

3 years ago

Hi, Not tried it yet but looks a great project. I just wonder if there is a reason you are using A0 to A2 for the pushbuttons rather than digital inputs? I will post how I get on. Thanks Martin

CesarSound

2 years ago

Hello, thanks for the comment! I used these pins for my convenience, I usually use them in other projects too and they were free on this project. Anyway they can be changed freely. PS: Analog pins can be used as digital input without any problem.

Anonymous user

3 years ago

One of the best dds projects I've played with i have changed a few things to suit my needs but i have a problem .I'm trying to add a rx only clarifier using a potentiometer but i cant seem to figure how to do it in the code would anyone on here be able point me in the right direction . I'm kind of new to Arduino stuff last time i did any code was on a bbc master computer 30+ years ago im a little rusty

CesarSound

2 years ago

Hello, thanks for the comments! One suggestion (which I haven't tested) would be to use the analog input A6 as follows: Declare the new variable: int freq_pot; Include the function below: void pot_tune() { freq_pot = analogRead(A6); freq_pot = map(freq_pot, 0, 1010, -100, 100); freq = freq + freq_pot; } Calling the function pot_tune(); inside the loop() Connect a potentiometer of 10kOHMS between 5v and GND and the central pin of the potentiometer is connected to pin A6 of the arduino. This way it would have a fine adjustment from -100 to +100Hz

Anonymous user

2 years ago

pot_tune(); inside the loop() esta linha tenho que escrever tambem no codigo ou nao fiz desta forma .int freq_pot; void pot_tune() { freq_pot = analogRead(A6); freq_pot = map(freq_pot, 0, 1010, -100, 100); freq = freq + freq_pot; } obrigado att 73

Anonymous user

2 years ago

Just got round to testing the code it sort of works but when it turn the pot from the center position it starts counting up or down frequency till i return it back to center position . I will keep playing around to see if i can make it work it may be something I'm doing wrong .

Anonymous user

2 years ago

Many thanks for your reply i will give that a test and let you know how it goes

Anonymous user

3 years ago

Hello, I really like your project, but I have a problem loading the code into the chip. I use Arduino Nano. Can you help me with that? The Arduino IDE reports a compilation error. In file included from C: \\ Users \\ Kugler \\ Documents \\ Arduino \\ sketch_sep03a \\ sketch_sep03a.ino: 5: 0: C: \\ Users \\ Kugler \\ Documents \\ Arduino \\ libraries \\ Adafruit-GFX-Library-master / Adafruit_GrayOLED.h: 30: 10: fatal error: Adafruit_I2CDevice.h: No such file or directory #include <Adafruit_I2CDevice.h> ^ ~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. exit status 1 An error occurred while compiling on the Arduino Nano board. thank you very much for your help

CesarSound

2 years ago

Hello, thanks for the comments! Maybe there are conflicts with others libraries installed in your IDE. I recommend installing the IDE and necessary libraries on another computer and trying to compile again.

idealist

2 years ago

I had the same problem until downloaded "Adafruit BusIO" library and installed it.....now the circuit works fine I hope it helps you and anyone else who has such a problem

Anonymous user

3 years ago

A beautiful and elegant piece of software. Thanks for sharing.

CesarSound

2 years ago

Hi Shafik, thank you for kind words!

pagkaogok

3 years ago

Greetings. My first time playing with SI5351 and oled display. Pleasing and functional implementation. I have been trying to modify to add RIT feature but my C++ skills is zero. It would be a bonus to have that and maybe a BFO from the other CLK output. Looking forward to more of your projects. 73. DU7ZIP.

pagkaogok

2 years ago

Hello, Cesar, I was able to enable the other CLKs from your instructions to Gustav. I am trying Rob Engberts PA0RWE sketch for RIT. It’s working now but I still like your layout. I have managed to mimic your layout except for the SMeter. I have added #define S_GAIN and #define adc. and the bargraph. I’ll keep working on it and I would appreciate any suggestions. Thanks, again. Nez

CesarSound

2 years ago

Hello friend, I could try to include your ideas on next update. Thank you!

babaksaeedi

3 years ago

hello my friend and thanks for this nice project . si 5351 have 3 out of signal . can you build software for that ?? 3 signal generator with one module

CesarSound

2 years ago

Hello friend, I could try to include your idea on next update. Thank you!

Anonymous user

4 years ago

Funciona pero no logra bajjar de frecuencia. El encoder solo sube de frecuencia .que podra ser.

Anonymous user

2 years ago

Muchas gracias por responder probare esto y le aviso gracias.

Anonymous user

2 years ago

Cesar gracias por compartir , Funciona muy bien .Me gustaría agregar un BFO por la salida (SI5351_CLK1) ..con una frecuencia para LSB y otra para USB , ud podria ayudarme con esto. Exelente trabajo , Gracias LU4AET Gustavo

CesarSound

2 years ago

Gracias, pode ser o rotary encoder, experimente usar outro tipo de encoder, de preferencia aquele modelo genérico chines comum, como este: https://pt.aliexpress.com/item/32873198060.html?spm=a2g0o.productlist.0.0.3923567ck6SCIU&algo_pvid=957d6312-75d6-4c4c-b9ef-422a052d8cde&algo_expid=957d6312-75d6-4c4c-b9ef-422a052d8cde-1&btsid=0bb0624316233647971415050e75d5&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

CesarSound

2 years ago

Hello Gustavo, thanks for the interest and for the comments. Do the following: Let's activate the CLK1 (the CLK is count 0, 1 and 2, the CLK0 is used by VFO) to generate 455kHz: Inside the void setup(): Line 83 change it to: si5351.output_enable(SI5351_CLK1, 1); and add this line: si5351.drive_strength(SI5351_CLK1, SI5351_DRIVE_2MA); In the line 138 void tunegen() add: si5351.set_freq((455 * 1000ULL) * 100ULL, SI5351_CLK1); The value 455 corresponds to 455kHz, but you can change it to other frequency of your choice. Note that the CLK1 will output a fixed signal of 455kHz. Good luck!

Anonymous user

4 years ago

excelente iniciativa, parabéns César. 73

CesarSound

2 years ago

Olá py4lmc, obrigado!

f4fei

4 years ago

Great realisation! Congratulations! I have modified your code to use it with a color Oled display ssd1331. It works fine as local oscillator for a direct conversion receiver. Thanks again for your work. Dominique

CesarSound

2 years ago

Hi Dominique, I am glad to know, thanks!

Anonymous user

4 years ago

Hi, I only saw your second version will ask here also ) Maybe you can recommand simple radio transmitter for 27Mhz want try OOK modulation or maybe for short range simple wire will work. Thanks

Anonymous user

4 years ago

Excelente Cesar, me funciona muy bien. Gracias por compartir. LU1EG Alberto

CesarSound

2 years ago

Hola Alberto, fico feliz de saber! Abraço.

Anonymous user

4 years ago

Ciao, scusa se ti scrivo in italiano. Quando vado a compilare lo sketch mi da questo errore. Non sono molto pratico con arduino, ma me la cavo. Grazie Arduino:1.8.10 (Windows 10), Scheda:"Arduino Nano, ATmega328P" sketch_si5351_vfo_rf_gen_oled_jcr_v2:3:1: error: expected unqualified-id before '/' token / ************************************************* ************************************************** ******* ^ In file included from C:\\Users\\Gianpietro\\Desktop\\SKETCH ARDUINO\\sketch_si5351_vfo_rf_gen_oled_jcr_v2\\sketch_si5351_vfo_rf_gen_oled_jcr_v2.ino:11:0: C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\Wire\\src/Wire.h:82:8: error: 'TwoWire' does not name a type; did you mean 'TwoWire_h'? extern TwoWire Wire; ^~~~~~~ TwoWire_h In file included from C:\\Users\\Gianpietro\\Desktop\\SKETCH ARDUINO\\sketch_si5351_vfo_rf_gen_oled_jcr_v2\\sketch_si5351_vfo_rf_gen_oled_jcr_v2.ino:15:0: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master/Adafruit_SSD1306.h:129:42: error: 'TwoWire' has not been declared Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi = &Wire, ^~~~~~~ C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master/Adafruit_SSD1306.h:171:3: error: 'TwoWire' does not name a type; did you mean 'TwoWire_h'? TwoWire *wire; ^~~~~~~ TwoWire_h C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master/Adafruit_SSD1306.h:129:58: error: 'Wire' was not declared in this scope Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi = &Wire, ^~~~ sketch_si5351_vfo_rf_gen_oled_jcr_v2:30:55: error: 'Wire' was not declared in this scope Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire); ^~~~ C:\\Users\\Gianpietro\\Desktop\\SKETCH ARDUINO\\sketch_si5351_vfo_rf_gen_oled_jcr_v2\\sketch_si5351_vfo_rf_gen_oled_jcr_v2.ino: In function 'void setup()': sketch_si5351_vfo_rf_gen_oled_jcr_v2:67:3: error: 'Wire' was not declared in this scope Wire.begin(); ^~~~ Più di una libreria trovata per "Adafruit_SSD1306.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_SSD1306-master Più di una libreria trovata per "SPI.h" Usata: C:\\Program Più di una libreria trovata per "Adafruit_I2CDevice.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit_BusIO Più di una libreria trovata per "Rotary.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Rotary-master Più di una libreria trovata per "Wire.h" Usata: C:\\Program Più di una libreria trovata per "si5351.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Si5351Arduino-master Più di una libreria trovata per "Adafruit_GFX.h" Usata: C:\\Users\\Gianpietro\\Documents\\Arduino\\libraries\\Adafruit-GFX-Library-master exit status 1 expected unqualified-id before '/' token

CesarSound

2 years ago

Olá Gianpietro, deve estar havendo conflito entre as bibliotecas que você tem instaladas. Experimente instalar o Arduino IDE mais recente em outro computador e instale também apenas as bibliotecas mencionadas no sketch deste projeto e faça a compilação. Boa sorte!

giacomomarinelli

4 years ago

Bel progetto, ma potresti spiegarmi come risolvere questo problema? In file included from C:\\Users\\Alessando\\Documents\\Arduino\\libraries\\Adafruit-GFX-Library-master\\Adafruit_GrayOLED.cpp:20:0: C:\\Users\\Alessando\\Documents\\Arduino\\libraries\\Adafruit-GFX-Library-master\\Adafruit_GrayOLED.h:30:10: fatal error: Adafruit_I2CDevice.h: No such file or directory #include <Adafruit_I2CDevice.h> ^vvvvvvvvvvvvvvvvvvvv

lw9dbu-fer

2 years ago

Hi Giacomo. Mucho gusto. Te cuento que me ha pasado el mismo problema y lo he resuelto de esta manera. He entrado a este link: https://github.com/adafruit/Adafruit_BusIO He bajado ese ZIP. Y luego desde el IDE lo he incorporado a la libreria. El proyecto a partir de ahi, lo he podido compilar y me ha funcionado correctamente. Que tengas suerte!! Un cordial saludo Fernando- Argentina

alibagherii

4 years ago

Hi, Thank you very much! can you a little help me in order to make this without "Adafruit SI5351 CLOCK GEN MODULE" and by onboard 16MHz clock of Arduino? Regard

CesarSound

2 years ago

Hi, this project works only with the Si5351 in order to generate a frequency signal. To generate directly from arduino maybe the Tone library can do it.

iw2knj

4 years ago

Funziona molto bene , sarebbe perfetto se si potesse modificare la IF da i tasti

enrique-10

2 years ago

Me too, I wish you could change the I.F. (430-460kHz) to regulate old tube radios. Thanks for your effort CesarSound !!!!

CesarSound

2 years ago

I am glad to know that it worked for you.

CesarSound

2 years ago

Thanks for the comments!

Anonymous user

2 years ago

I downloaded the sketch, it compiles but I only get the start screen "Si5351 VFO/RF GEN" "JCR RADIO - Ver 2.0" nothing else! I chekced the I2C adresses twith a I2C checker, 0x60 for the SI5351 and 0x3C for the display . So what is wrong?

Anonymous user

2 years ago

i uncommented line 76 (startup test) now the display is ok

iw2knj

4 years ago

Ho realizzato il progetto, senza nessun problema, ma all'accensione mi rimane la schermata iniziale bloccata e non da segni di vita, cosa può essere?

iw2knj

2 years ago

ok adesso funziona , grazie.

CesarSound

2 years ago

Although this problem did not occur to me, a user reported it. To solve it simply try to comment (//) the line 77 statup_text (); I am investigating what may be causing this on only a few platforms. Thanks.

Anonymous user

2 years ago

Mam podobny problem, projekt uruchamia się i nie daje się nic dalej z nim zrobić. Będę wdzięczny za pomoc.

Anonymous user

4 years ago

Wow - Well done. I particularly liked the attention paid to the design of the display contents. A quick look through the code suggests you may be re-drawing the entire screen each update - is that correct? I wondered if there was any flicker but I didn't see any in the video! I know that this can be tricky as I made a similar project. https://www.youtube.com/watch?v=Yeszaxtg2pM Differences: 1) Range 10kHz up to 200MHz 2) Uses an ESP32 processor with integral colour display (TTGO T-Display). Highly recommended. 3) Designed and 3D-printed a custom box. It also caters for an in-built LiPoly battery that is served by an on-board charger. 4) The software: I copied several ideas from across the Internet and weaved them together via Arduino IDE. There were initially some problems getting the standard 5351 libraries to work with the ESP32 - including a conflict with both the Wire library and the Etherkit library that is used in your design. For anyone else wanting to use the ESP32 processor, I would recommend the library that John Price modified - it's on github (search for WA2FZW). 5) For my design I enjoyed going for a minimalist user experience - i.e. as few controls as possible. I found a button library (Brian Low / Ben Buxton) that allowed reliable operation for short medium and long button presses, so this plus a single encoder and software control allowed removal of several switches in the earlier version. My video reference above contains links to the ESP32c microprocessor supplier, and to the 3D print file for the box design, if anyone wants to have a go.

CesarSound

2 years ago

Hi bob, thanks for the comments! And congratulations on your project, it is very interesting! I update the display only when there is a change in some value, such as frequency and there is absolutely no flickering on the display. Another advantage of this method is the reduction of the electromagnetic interference generated by the arduino / display at the radio reception.

iw2knj

4 years ago

MOLTO BELLO , CREDO CHE LO REALIZZERò

CesarSound

2 years ago

Hi iw2knj, thanks for the comments!

G8INL

4 years ago

A really well thought out and executed project, very versatile and user friendly. Many Thanks.

CesarSound

2 years ago

Hi G8INL, thanks for the comments!