Difference between revisions of "VFO-001"

From Land Boards Wiki
Jump to navigation Jump to search
 
(111 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''This is a work in process - Gathering pieces.'''
+
[[File:VFO-001_P132-720px.jpg]]
 
 
[[File:HW-9.PNG]]
 
  
 
== Features ==
 
== Features ==
  
* DD1306 OLED Display
+
* [[SDD1306 OLED Display]]
 
** I2C Interface
 
** I2C Interface
* Blue Pill Microprocessor
+
** OLED runs from 3.3V (can run from 5V but this use has 3.3V)
 +
* [[RotaryEnc|Rotary Encoder Break Out Board]]
 +
* [[Arduino Pro Mini]]
 
** Arduino compatible
 
** Arduino compatible
 
** 3.3V
 
** 3.3V
* Understands band switch for MHz displayed
+
** 8 MHz
* Si5351 Oscillator
+
** Programmed via Arduino IDE
** 10 Hz steps
+
*** Download via serial
 +
** Store configuration in EEPROM
 +
* [[Si5351 Oscillator Breakout Board]]
 +
** 10 KHz - 40 MHz tuning range
 +
*** 1Hz/10Hz/100Hz/1KHz/10KHz/100KHz/1MHz/10MHz steps
 
** I2C Interface
 
** I2C Interface
 
** 3 Outputs
 
** 3 Outputs
 
** 27 MHz crystal
 
** 27 MHz crystal
 +
** 3.3V operation works without level shifters for I2C*
 +
** Si5351 can only run from 3.3V
 +
** Used right angle headers and Dupont cables for low profile
 +
* [[Mini360_Buck_Converter|Mini-360 Buck Regulator]]
 +
** 5V-23V input
 +
** 3.3V output
 +
* [https://www.adafruit.com/product/2230 Extruded Aluminum Enclosure Box - 94mm x 83mm x 30mm]
  
 
== Schematic ==
 
== Schematic ==
  
[[File:VFO-001-SCHEMATIC.PNG]]
+
[[File:VFO-001-SCHEMATIC-V2A.PNG]]
  
== Parts ==
+
* PWR* - connect only when no Mini-360 Buck Regulator is used
 +
* [[PD01]] - Power Distribution card (not shown)
  
=== Blue Pill Card ===
+
== Build ==
  
* [[STM32|Blue Pill Card]]
+
* [https://www.adafruit.com/product/2230 Extruded Aluminum Enclosure Box - 94mm x 83mm x 30mm] - Out of stock
  
[[File:STM32F103C8T6-Blue-Pill-Pin-Layout.gif]]
+
* BNC/Power Jack placement
  
* 3.3V operation work without level shifters for I2C
+
[[File:VFO-001-Nibbler-BNCs_Placement-720px.jpg]]
** OLED can run from 3.3V
+
 
** Si5351 can only run from 3.3V
+
* Rear panel BNCs and power jack
* Used right angle headers and Dupont cables
+
 
* Replaced BOOT 0,1 jumpers
+
[[File:VFO-001-Rear_Panel-720px.jpg]]
** Jumper on BOOT1
+
 
** Switch on BOOT0 - easier to download code
+
* Drill holes and nibble out for OLED cutout
* Download via serial
+
** A bit rough
* Arduino IDE
+
** Better to undercut nibble and file to size
 +
 
 +
[[File:VFO-001-Nibbler-01-720px.jpg]]
 +
 
 +
* OLED fitted
 +
 
 +
[[File:VFO-001-Nibbler-OLED-Fitted-720px.jpg]]
 +
 
 +
* Final
 +
 
 +
[[File:VFO-001_P132-720px.jpg]]
 +
 
 +
== Libraries/Example Code ==
  
=== 128x32 OLED ===
+
=== Land Boards Code ===
  
[[File:Si5351_003_720px.jpg]]
+
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/STM32/VFO_Si5351 Land Boards Application]
  
* [https://www.ebay.com/itm/2pcs-0-91-128x32-IIC-I2C-White-OLED-LCD-Display-DIY-Module-For-Arduino/293688288048?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 Ebay]
+
==== VFO Menu ====
  
[[File:OLED128x32.PNG]]
+
* Set Step Size
 +
** 1Hz, 10 Hz, 100 Hz, 1KHz, 10KHz, 100 KHz, 1 MHz, 10 MHz
 +
* Set frequency
 +
** 10 KHz to 40 MHz in step size steps
 +
* Select VFO
 +
** VFO0, VFO1, VFO2
 +
* VFO On/Off
 +
** On, Off
 +
* Drive Level
 +
** 2 mA, 4 mA, 6 mA, 8 mA
 +
* Set Calibration Value
 +
** In step size steps (down to 1 Hz)
 +
* Save (power-on) defaults
  
==== Arduino Library for OLED ====
+
=== Libraries used in this app ===
  
 
* [https://github.com/olikraus/u8g2 U8g2: Library for monochrome displays, version 2]
 
* [https://github.com/olikraus/u8g2 U8g2: Library for monochrome displays, version 2]
** [https://github.com/olikraus/u8g2/wiki/u8g2reference Reference library]
+
* [https://github.com/etherkit/Si5351Arduino Si5351 Library for Arduino]
** Constructor
+
* [https://www.best-microcontroller-projects.com/rotary-encoder.html Rotary Encoder] - Software debounced
<pre>
+
=== Other Si5351 Libraries ===
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);  // STM32, Ebay OLED
 
</pre>
 
* [https://github.com/olikraus/u8g2/wiki/fntlistall List of Fonts]
 
<pre>
 
  u8g2.setFont(u8g2_font_ncenB14_tr);
 
</pre>
 
  
===== Hello World Code =====
+
* [https://github.com/andrey-belokon/Syntez_Si5351_Si570 Universal Digital VFO Si570/Si5351]
 +
* [https://github.com/adafruit/Adafruit_Si5351_Library Adafruit_Si5351]
 +
* [https://github.com/NT7S/Si5351 Si5351 Library for avr-gcc]
 +
* [https://github.com/prt459/Arduino_si5351_VFO_Controller_Keyer vk3hn_VFO_controller]
 +
* [https://github.com/pu2clr/BFO Simple BFO with si5351 controlled by Arduino]
 +
* [https://github.com/pu2clr/VFO_BFO_OLED_ARDUINO VFO and BFO with Si5351A, OLED and Arduino]
 +
 
 +
== Calbration Using WWV ==
 +
 
 +
* Good method that doesn't require a frequency counter
 +
* Tune via ear and S meter
 +
* Requires shortwave (or ham) receiver that can receive 5/10/15 MHz
 +
* Rough tune calibration factor on scope or frequency counter
 +
* Fine tune to 1 Hz using WWV
 +
* 15 MHz WWV midday has better resolution
  
<pre>
+
<video type="youtube">QCJ4cQGOQLI</video>
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);  // STM32, Ebay OLED
 
  
void setup(void) {
+
== Output Drive Level ==
  u8g2.begin();
 
}
 
  
void loop(void) {
+
* First, calculate the "theoretical" drive level and then measure the actual drive level into a 50 ohm load
  u8g2.clearBuffer(); // clear the internal memory
 
  u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
 
  u8g2.drawStr(0,10,"Hello World!"); // write something to the internal memory
 
  u8g2.sendBuffer(); // transfer internal memory to the display
 
  delay(1000); 
 
}
 
</pre>
 
  
=== Rotary Encoder/Breakout Board ===
+
=== Si5351A Drive Level ===
  
[[File:RotaryEncoderCAD.PNG]]
+
* Si5351A drives  3.3V square waves
 +
* Si5351A datasheet lists 50 Ohm source impedance
 +
** Half of the power would be dissipated in the source and half in a 50 ohm load
 +
* The RMS value for square-wave voltages whose pulse duration (ti) and pause (tp) have the same length:
  
 +
[[file:RMS-SquareWave.PNG]]
  
[[File:Si5351_004_720px.jpg]]
+
* [https://www.redcrab-software.com/en/Calculator/Electrics/Rectangular-Voltage-RMS-Value#:~:text=The%20rms%20value%20is%20for%20square-wave%20voltages%20whose,rms%20value%20is%20equal%20to%20the%20peak%20value Square Wave Calculator]
  
* Includes pushbutton Switch
+
[[file:RMS-SquareWave-2.PNG]]
* Includes Pull-Up resistors
 
* Needs R/C filter on output for debounce
 
* [https://playground.arduino.cc/Main/RotaryEncoders/ Reading Rotary Encoders] - Arduino reference
 
* [https://github.com/mprograms/SimpleRotary Simple Rotary Encoder Arduino library]
 
* [http://www.mathertel.de/Arduino/RotaryEncoderLibrary.aspx Library for the Arduino environment for using a rotary encoder as an input]
 
  
=== Si5351 Frequency Generator ===
+
* Using a "theoretical" drive level of 3.3V
  
[[File:Si5351_001_720px.jpg]]
+
[[file:Si5351_Drive-Level_dBm.PNG]]
  
[[File:VFO3.PNG]]
+
* [https://www.calculatorology.com/mw-to-dbm-conversion/ 54 mW is 17.3 dBm total power]
 +
* Half delivered to load = 27 mW
 +
** 14.3 dBm "theoretical" drive level
 +
* [[Kits_and_Parts_Mixers#VFO-001_drive|ADE-1]] needs +7 dBm drive level
 +
* Would in theory need a 7 dB attenuator between the Si5351A and the [[Kits_and_Parts_Mixers#VFO-001_drive|ADE-1]]
 +
* Reality, the output drive in the Si5351A is controlled by the output drive control register
 +
* Si5351A outputs as measured with [[tinySA]]
 +
** Drive Level 2 mA = 0.2 dBm
 +
** Drive Level 4 mA = 6.2 dBm < Best choice for driving +7 dBm mixers like the [[Kits_and_Parts_Mixers#VFO-001_drive|ADE-1]]
 +
** Drive Level 6 mA = 9.7 dBm
 +
** Drive Level 8 mA = 11.7 dBm
  
* I2C Daisy-chain connector
+
=== Measured ===
* 3 outputs
 
** Tx
 
** Rx (may not need to use separate output)
 
** BFO - could be adjusted
 
  
[[File:Si5351_002_720px.jpg]]
+
* Channel CLK0
 +
* 10 Mhz
 +
* 30 dB external attenuator (gain set in tinySA to -30dB)
 +
* Output level at 2 mA
 +
* Scan 1MHz to 300MHz
  
==== Measurements ====
+
[[file:tinySA_VFO-001_10MHz-Signal_1MHz-to-300MHz.png]]
  
== Libraries/Example Code ==
+
* Zoom into 10 MHz fundamental
 +
* Approx. 1 dBm signal level
  
* [https://github.com/land-boards/lb-Arduino-Code/tree/master/STM32/VFO_Si5351 Land Boards Application]
+
[[file:tinySA_VFO-001_10MHz-Signal_Narrow-10MHz.png]]
* [https://github.com/pu2clr/VFO_BFO_OLED_ARDUINO VFO and BFO with Si5351A, OLED and Arduino]
 
* [https://github.com/olikraus/u8g2 U8g2: Library for monochrome displays, version 2]
 
* [https://github.com/etherkit/Si5351Arduino Si5351 Library for Arduino]
 
* [https://github.com/andrey-belokon/Syntez_Si5351_Si570 Universal Digital VFO Si570/Si5351]
 
* [https://github.com/adafruit/Adafruit_Si5351_Library Adafruit_Si5351]
 
* [https://github.com/NT7S/Si5351 Si5351 Library for avr-gcc]
 
* [https://github.com/prt459/Arduino_si5351_VFO_Controller_Keyer vk3hn_VFO_controller]
 
* [https://github.com/pu2clr/BFO Simple BFO with si5351 controlled by Arduino]
 
  
 
== Videos ==
 
== Videos ==

Latest revision as of 13:42, 1 November 2021

VFO-001 P132-720px.jpg

Features

Schematic

VFO-001-SCHEMATIC-V2A.PNG

  • PWR* - connect only when no Mini-360 Buck Regulator is used
  • PD01 - Power Distribution card (not shown)

Build

  • BNC/Power Jack placement

VFO-001-Nibbler-BNCs Placement-720px.jpg

  • Rear panel BNCs and power jack

VFO-001-Rear Panel-720px.jpg

  • Drill holes and nibble out for OLED cutout
    • A bit rough
    • Better to undercut nibble and file to size

VFO-001-Nibbler-01-720px.jpg

  • OLED fitted

VFO-001-Nibbler-OLED-Fitted-720px.jpg

  • Final

VFO-001 P132-720px.jpg

Libraries/Example Code

Land Boards Code

VFO Menu

  • Set Step Size
    • 1Hz, 10 Hz, 100 Hz, 1KHz, 10KHz, 100 KHz, 1 MHz, 10 MHz
  • Set frequency
    • 10 KHz to 40 MHz in step size steps
  • Select VFO
    • VFO0, VFO1, VFO2
  • VFO On/Off
    • On, Off
  • Drive Level
    • 2 mA, 4 mA, 6 mA, 8 mA
  • Set Calibration Value
    • In step size steps (down to 1 Hz)
  • Save (power-on) defaults

Libraries used in this app

Other Si5351 Libraries

Calbration Using WWV

  • Good method that doesn't require a frequency counter
  • Tune via ear and S meter
  • Requires shortwave (or ham) receiver that can receive 5/10/15 MHz
  • Rough tune calibration factor on scope or frequency counter
  • Fine tune to 1 Hz using WWV
  • 15 MHz WWV midday has better resolution

Output Drive Level

  • First, calculate the "theoretical" drive level and then measure the actual drive level into a 50 ohm load

Si5351A Drive Level

  • Si5351A drives 3.3V square waves
  • Si5351A datasheet lists 50 Ohm source impedance
    • Half of the power would be dissipated in the source and half in a 50 ohm load
  • The RMS value for square-wave voltages whose pulse duration (ti) and pause (tp) have the same length:

RMS-SquareWave.PNG

RMS-SquareWave-2.PNG

  • Using a "theoretical" drive level of 3.3V

Si5351 Drive-Level dBm.PNG

  • 54 mW is 17.3 dBm total power
  • Half delivered to load = 27 mW
    • 14.3 dBm "theoretical" drive level
  • ADE-1 needs +7 dBm drive level
  • Would in theory need a 7 dB attenuator between the Si5351A and the ADE-1
  • Reality, the output drive in the Si5351A is controlled by the output drive control register
  • Si5351A outputs as measured with tinySA
    • Drive Level 2 mA = 0.2 dBm
    • Drive Level 4 mA = 6.2 dBm < Best choice for driving +7 dBm mixers like the ADE-1
    • Drive Level 6 mA = 9.7 dBm
    • Drive Level 8 mA = 11.7 dBm

Measured

  • Channel CLK0
  • 10 Mhz
  • 30 dB external attenuator (gain set in tinySA to -30dB)
  • Output level at 2 mA
  • Scan 1MHz to 300MHz

TinySA VFO-001 10MHz-Signal 1MHz-to-300MHz.png

  • Zoom into 10 MHz fundamental
  • Approx. 1 dBm signal level

TinySA VFO-001 10MHz-Signal Narrow-10MHz.png

Videos