You are on page 1of 3

Doing lt By Design

C D

3,3V

Si5351A module
R
3,3V 2.2k

ESP32-DevKitC
GND 3.3V

vcc 1

TFT LCD
ST7735 (128"160)

3,3V

R
3.3V 150

OLED
R R
2,2.k 2,2k

Rotary Enc. 1-'s~ ------ - ~


40p/rev GND

NHD-l.69-160128UGC3

Steve Macdonald G4AQB


practicalwireless@warnersgroup.co.uk Building an Analogue
W
e have come a lang way since the tim es
when building a VFO for a receiver or
transmitter required careful coil winding,
variable capacitors, silver mica capacitors and
Display Digital VFO
frequency drift. 1spent many happy hours align- Steve Macdonald G4AQB describes how to build an
ing VFOs, trying to get them stable and to tune in analogue VFO using modern techniques and components.
a linear fashion for use with a mechanical drive.
Nowadays accurate multiband VFOs can be built did later find a couple of sites, one from Australia In the past I have built Arduino Nano VFOs and
easily using an Arduino or similar microcontroller and one from the USA, by other amateurs who am fam iliar with the Arduino IDE, but have never
and programmable clock generator. have built and developed one of these VFOs. used an ESP32 for this purpose. The Arduino
There are two versions of the VFO, the first is for IDE can be used to edit and upload the sketch to
Digital VFOs Basic Tuning and the second uses Adaptive Step the ESP32, but it is important that you download
While searching for information about an Arduino Control. The hardware is the same for both ver- and install the board drivers first for the different
Nano based VFO, 1 stumbled across a video by sions . versions of ESP32 processors. 1 used the 38-pin
JF3HZB of a wonderful digital VFO with an ana- 1decided to build the Adaptive Step Control ver- ESP32 DevKitC as shown in the original diagram,
logue display. This display looks very much like a sion because thi s enables tuning without having but it is possible to use the smaller 30-pin ESP32
traditional mechanical VFO that would have been to add a separate frequency step and bands- microcontrollers with adjustments to the pin
used in older transceivers. witch . connections.
This whet my appetite to find out more and have The JF3HZB VFO uses an ESP32 DevKitC mi-
a go at building one of these VFOs. After further crocontroller along with an Si5351 a programma- Construction
searching for more information about this project ble clock generator. The display gives a choice Construction requires an ESP32 DevKitC
1 found very little apart from a link to JF3HZB giv- of 1.Bin TFT (ST7735 Type) or OLED (see circuit Microcontroller, Si5351 a Clock Generator, TFT
ing the circuit and software sketch downloads. 1 diagram, Fig. 1). or OLED Display and a suitable Rotary Encoder.

Sign up to our FREE email newsletter at www.radioenthusiast. eo .uk


56 PRACTICAL WIRELESS October 2022
Doing lt By Design

VFOsys_ntep I Arduino 1.3..16 □ X


Fil, Edit Sketch fo ols Help_
-- -

~ C- -_"! rc-;i ~: D
~~~2

#sl!: :'. i::e 1oi t_!req 110.JOO0 : ::i::.eul f ::, ~-1.-:e:,·[B=J


~.:J:_: o!!ut_!:cq • BS.SfSOO ; :=-! ! s et F:e~..:e~y [:'l::J
:.::-:J:_::. car_!rq • ess,~soo; /J C•:r:.e:: !'::e:ri!l:;.y{ E.: !
~i;r.;a::1 ct-A: ! _carOH ,. !; ::-U 'C!!" : a: 9:.T,141

f;ie ! i.ce fr.u: 150000000 !'.u: !:e:t11e ney [B..: J


Ue!!:-.e ! u.-: 100000 Mi.-: !'::e"Nen,;:y{E: J
i1e :'. :.::e !req_step 10 / Mm SU► [ fi : j
1
Fig. 1: Circuit of the JF3HZB VFO. https://tinyurl.com/ynzsts7a
II Fig. 2: Wiring the modules using DuPont You now need to open the Sketch that you have
Connectors. Fig. 3: Lines from the sketch for saved an your computer into Arduino IDE. The
changing. Fig. 4: Working display of the VFO. Sketch file is the one ending with .ino. When it is
Fig. 5: Mounting the modules into the box. loaded, you may want to make some changes to
Fig. 6: View of the inside of the box. the code in order toset the offset frequency and
Fig. 7: Completed JF3HZB VFO. initial start-up frequency, Fig. 3.
When you are ready, select 'Sketch', 'Verify/
tab on the protective film. The one that I used had Compile'. The code will now be compiled and
a Green protective tab. show up any errors. This may take a few minutes.
Once the hardware has been constructed, the Once compiled, connect a suitable USB lead
next step is to program the ESP32 by uploading from your computer to the ESP32 board USB
the Sketch. socket.
Go to 'Tools' and select 'Ports', choose the port
Programming that you are using. lf you are not sure which port
Although using a breadboard may be preferred 1 found that programming was the trickiest part is in use, disconnect the USB lead and look again
by some, 1 chose to wire the mod ules by using of the VFO project. Here are the steps that I took at the listed ports . The active port will not show.
female-to-female DuPont connectors. As the wir- to upload the software required to complete the Plug the USB in again and it will reappear.
ing is fairly simple, it is easy to see and follow the working VFO. Go to 'Sketch' and 'Upload' (This will take a few
connections as weil as making later adjustments First, you will need to have installed a copy of minutes to first compile again and then upload).
easy if required . The DuPont connectors used are Arduin o IDE and libraries an your computer. You lf everything is correct, the VFO Dial should
20mm lang, later I reduced the size of these to can fi nd it here: burst into life when upload has completed, Fig. 4.
10mm so that the project would fit neatly into a www.arduino.cc/en/software lf you find that the display is not working
diecast box, Fig. 2. Arduino IDE is used to upload the software correctly or that the display is showing incorrect
When wiring the boards, check carefully the pin that you need to the ESP32. You will also need colours, it may be because of the type of TFT
numbers and labels on each module as you con- to install the ESP32 library of boards. Ta da this, you are using. 1have read an one of the websites
nect them and always recheck before powering start up Arduino IDE and select 'Tools', 'Boards', that if this happens, you may need to make some
up. The ESP32 board provides 3.3V VCC, which 'Board Manager'. Search for ESP32 and install. changes to the software. Detailsare an this
is the same as the Si5351 a and OLED. lf using a When installed go back to 'Boards' and select website:
1.Bin TFT, there is usually a link on the board for ESP32 Arduino. Vou will see a list of boards, https://tinyurl.com/mryjk54w
5V or 3.3V. This needs tobe set to 3.3V. lnitially, select the board that you are using, in my case
1used a cheap 24-pulse Rotary Encoder Board, ESP32 Dev Module. Testing
which was adequate for test purposes. Next, go to github.com (URL below), select the First of all check that the display is working
lf you are using a TFT display, make sure that version that you want to make, either VFOsys or correctly and the Rotary Encoder moves the
you are using an SPI ST7735 (12Bx160) type. VFOsys-astep. Click the 'Code' button on the left, display frequency up and down. Connect an
Unfortunately, there are many variations of TFT. this takes you to another screen . Select the Green oscilloscope/frequency counter to each of
The most common way of identifying the differ- 'Code' button on the right and select 'Download the outputs of the si5351 a clock generator
ent types seems tobe by the colour of the plastic zip'. Unzip and save the file on your computer. board (CLKO, CLK1 , CLK2) . Make sure that the

Read more radio news and reviews at www.radioenthusiast.eo .uk/news


October 2022 PRACTICAL WIRELESS 57
Doing lt By Design

Parts List
• ESP32 OevKitC(38 Pin) Microcontroller
• Si 5351aClock Generator
• TFTType SPI ST7735 1.Bin 12Bx160 or OLEO
• CNC RotaryEncoder 100pulse
• 4x2.2k0 1/4W Resistors
• DuPont Female·to-FemaleConnectors(20mm and10mm)
• SMA Sockets
• Power Socket
• StandardDiecast Box 120x95x57mm
• Single sidedCopper Cladboardapprox. 70x50mm
• 12V to SVBuckConverter (if required)

frequencies correspond to those in the software


taking account of any offsets. 1only used the
CLK2 (Local Oscillator) signal for my project.

Rotary Encoder
On the circuit diagram, it is recommended that a
40-pulse rotary encoder is used as a minimum.
1tested mine with a 24-pulse encoder and
found that it is too slow. 1 decided to look for
an alternative and came across some very nice
100-pulse CNC Rotary Encoders. These are
available in two sizes, 60mm and 80mm, either
Black or Silver and are very reasonably priced .
They are made of solid aluminium and are quite connectors where they connected to each of ming can further develop and customise this pro-
heavy, ideal for a VFO project. Connecting to the the ESP32 and si5351 a boards. Later, spots of ject and add other useful features such as band
CNC Rotary Encoder is straightforward, simply hot glue were applied to hold everything still. switching . lt can be used to drive an SDR receiver
connect to A, B, VCC and GND marked on the The loops are soldered to the underside of the or transceiver by using the clock outputs (CLKO
encoder. 1 connected the VCC to 3.3V and found copper-clad board, Fig. 5. and CLKl) for I and Q. 1 have tried to keep thi s
that it does not require the two pull-up resistors 1 reduced the length of the DuPont connectors project as simple as possible so as not to put off
shown on the circuit. lt is also easy to remove the to 10mm and also added a buck converter to anyone wish ing to try building one of these. My
detents (clicks) making the drive very smooth . provide the SV to the ESP32 USB from a 12V thanks to Ross G6GVI for helping me out with the
This link shows a video of how it is done: supply. The TFT Display and Bezel is mounted to software.
https://tinyurl.com/26mssbww the front panel using spots of hot glue, Fig. 6. On
The CNC Encoder works a treat and really the back is a si ngle SMA socket for the LO output References
shows how useful the adaptive step control can and a 12V power socket. T.J. Uebo JF3HCB, Main Project Software and
be, especially when changing bands. Circuit:
Conclusion https://tinyurl.com/ynzsts7a
Mountingthe VFO The JF3HZB VFO provides a very smooth and ac- SADARC (Australia):
Now that we have a working VFO it needs tobe curate digital/analogue display. The VFO works https://tinyurl.com/mryjk54w
mounted in a screened box. 1 used a standard at frequencies up to 150MHz. The CNC Rotary WA2FZW - lt's not just another Digital VFO :
diecast box size 115 x 90 x 55mm. To mount the Encoder looks and feel s like that used on an ex- https://tinyurl.com/mpmb67rh
modules I used a piece of single-sided copper pensive transceiver, Fig. 7. The VFO could also Removing the detent (clicks) on the CNC Encoder:
clad board bolted to the base of the box (copper be integrated into a larger project such as a multi- https://tinyurl.com/26mssbww
side underneath). Small holes were drilled in band receiver or transceiver. JF3HZB Video of the VFO:
order to make wire loops to hold the DuPont l'm sure that anyone with skills in program- https://tinyurl.com/2p847vhw

Sign up to our FREE email newsletter at www.radioenthusiast.co.uk


58 PRllCTICllL WIRELESS October 2022

You might also like