ESP32 With Dual VFO’s

Hey look, its a home brew radio post. HAHAHA. So i have settled into this whole locked down for corona virus nightmare and have sorted out most things and have a game plan for how life will go on for the next 6 months of lock down and no work. And because i have everything in order, i have slowly been getting the enthusiasm to get into building some of the stuff i have in the pipeline and seeing if it works.

I have shelved the tuner for now, i really am not sure about it and it or how to correct its problems, which are both design and code and have started on the second iteration of the universal control board. First time round all the audio stuff worked just fine, more or less, but there were some design issues in the micro controller side of things. Namely, i screwed up things pretty bad and destroyed the 2 older ESP32 Dev Boards i had here which meant redoing footprints and all the other exciting things.

Obviously not everything has gone smoothly this time either, turns out that i laid out the board with to use an L7833 3.3v regulator as I am using a L7805 5v regulator as well, you know bog standard parts everyone uses. But guess what, the TO220 3.3v regulators I had were 1117A’s and they have a different pinout. Turns out, getting an L7833 regulator in Australia is not as simple as it seems, I had to order them from Element 14 for way to much plus way to much in postage. But, it got the parts and well got to getting this thing working. Lesson learned.

On the board, we have an ESP32 micro controller, the little red daughter board is a shift register module, ESP32 is 3.3v logic and most of the crap hanging off it is 5V logic, thus the need for shift registers on the I2C lines. The fuse is there from another lesson learned from the previous version of this board where I turned the solder on the micro into lava HAHAHA. We also have 2 headers for LCD screens, 2 rotary encoders, SI3531A module, yeah still using modules because the 2 times i have tried to roll my own using bare components, they never worked, and finally a real time clock. There is also footprints for 5 buttons, one of which is a reset button for the micro, 2 banks of 5 pins for band switching and pads for a thermocouple for monitoring heatsink temp of the final PA.

A bit blurry, but this is the initial fire up to make sure that I had things working right. Not much use spending hours writing code if there is an issue on the board.

Here I am starting to make some progress on the software, which is pretty much a ground up rewrite of one of the basic VFO codes out there, I think if i recall right was a very early version of a VFO by Jason Mildrum NT7S https://nt7s.com/

And finally, this is where I am at with this. All the buttons work, the rotary encoders work and both the displays work. The one thing i do not like about just about all the VFO codes out there is that they all follow the radix math method for setting the vfo increment value. I want to have a 500hz increment, and actually, when i start to build things for 2m FM i will want an 12.5Khz increment and the like. Now using radix math you only get to have things go up in orders of magnitude, 1, 10, 100 etc. So I changed how that all works and simplified things alot, by combining the increment and displaying into the one function that gets checks once per loop. I can now set my increments to whatever value I like to suit my purpose.

Finally before i close down this epic post, on Jason Mildrums etherkit github https://github.com/etherkit/Si5351Arduino/issues/66 some people have reported issues with ESP32 and the SI5351A library. I am not having any problems at all here. Everything works as expected and there are no I2C glitches. Well, that was a manuscript, thanks for reading and I will catch you next time.

Rob.

 

Facebooktwitterredditpinterestlinkedin

2 thoughts on “ESP32 With Dual VFO’s

  1. Hi Rob, The ESP32 is really popular. I also build my incarnation of a si5351 VFO. Did had issues with the library but fixed them. The other problem I had was with the use of interrupts. If I used them for rotary control or other things it went wrong when I put the HF amp on. So I removed all my interrupt code and made it polling. Anyway the ESP32 is fast enough and this was more easy than debugging the interrup code. Happy to hear your surving the Covid pandamic. Also here in NL everything is in lockdown. Now I have some more time, other wise I was locked up anny way in traffice jams. Regards Paul

    1. Hey Paul, yeah i just did polling for the encoders rather than interupts as well, there is not much to be gained by using interupts anyway unless you have something that hogs the loop. I have a real time clock on the board as well and its functions are a loop hog, so i wrapped it up in a millis timer and only let it update once every 60 seconds and then the loop is always free for the encoders and buttons, which mostly do nothing all the time.

      Stay safe and dont catch corona virus.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.