Skip to main content

February 26, 2024. A Simple Arduino SSB Transceiver Sketch.

 
Seeed Xiao RP2040 Digital LO/BFO 2/26/2024


In my email this morning was that very question concerning my providing to the sender a simple Arduino SSB Sketch. This is a landmine underfoot just waiting for me to step off the plunger.

The very way the question is stated suggests the sender is looking for a quick fix and likely lacks a rudimentary knowledge of the Arduino. Fact one there are no simple SSB sketches! 

His question is better characterized as a no-frills version to one you would find on Rodeo Drive in Beverly Hills. No Frills = one band, 16X2 LCD, no VFO memory, no S Meter, no Tune Tone or Splash Screen. The Beverly Hills version would have all of those features less the LCD but sports a 3.5 Inch Color TFT Touch screen to boot. 

That said about 80 to 90% of both sketches would have common elements. These common statements include identifying libraries, and which display type. Other statements would identify pins that would be used and various statements identifying the startup frequencies, BFO frequencies, and lest I forget which pins are the Encoder Pins. 

The Setup Section of the sketch would do just that by setting up the Si5351 (PLL and the clocks for LO and BFO) and setting the Pin Mode (which pin and whether an OUTPUT or INPUT). 

Then comes the Loop section where everything in the loop is where the actionable items are included such as has the frequency changed, have you called for a USB/LSB change or have you put the rig in a Tune Mode and things like using the 2nd VFO or changing bands?

A real learning experience similar to setting up directories on your computer to collect stuff versus loading everything as individual files on the C Drive is to keep the Loop to a minimum. Simple statements in the Loop such as Checksideband(); with a separate call program void Checksideband() {} has the change of sideband being checked without cluttering the main loop with that action. Another would be CheckTune(); to see if you placed the rig in the Tune Mode. Still another would be CheckCoffeePot(); is it still hot. 

I have not responded as yet to the email as I foresee a huge time sink (my time is limited) when he gets the sketch and then the problems start. Several years ago, I supplied a sketch for a similar request. That individual had little knowledge of Arduino and made significant changes to the supplied code. When that didn't work, he sent his code to me and literally said fix this. He got irate when I wouldn't fix it. 

My advice is to spend about $15 and get Banzi's book Getting started with Arduino and perform every little program in the book and then look to simple SSB sketches. ARRL has some publications as does W8TEE, Jack Purdum. One of my most complex, entirely built by me program was the LDMOS amp controller. All of that extensive programming started with examples in Banzi's book.




In giving about a second's worth of thought to the email perhaps the answer is in the 1st photo which took the Seeed Xiao RP2040 from the prototype board to a wired assembly. The code is minimalist and about the only thing it will do is tune the frequencies and change the sideband. The display is a 16x2 and there is a step tuning adjustment on the encoder. It is a single band 20M. 

In the same path, yesterday I received an email about limiting the tuning range to just the ham bands. In many of my sketches there is code to do that where a minimum and maximum value for the LO can be set. I typically say 2 to 30 MHz. Thus, most of my code will boot up to a specific band but can tune way above and below that band. The request came from offshore as evidently it was a legal issue in that country that you could only have ham radios that tune the ham bands. 

In my response back I showed the lines of code in the sketch and to use these two values versus what was in the code: 14002000L and 14348000L. This simply says no lower than 14.002 MHz or no higher than 14.348 Mhz. You can crank the encoder all day long, but the LO will be frequency limited. The email back to me -- I don't understand. Big clue -- he has no clue!

So there are no get Arduino quick schemes and if you abhor reading and learning, friend you are SOL!

73's
Pete N6QW

Popular posts from this blog

2019 ~ What is the simplest homebrew SSB Transceiver that can be built?

4/27/2019 The Future of our Hobby is Here! Forget those simple rigs with homebrew crystal filters, cranky IRF510's and the analog VFO's. SDR is the wave that is building strength just like a Tsunami. With the Soft Rock V6.3 SMD Version + RRPi2 With the Omnia SDR and RPi2 Pete N6QW How Simple & How Cheap can you  build a Homebrew SSB Transceiver? 4/26/2019 --- I just converted my websites from an obsolete Windows Based Server with GoDaddy to their cPanel (Linux). This was a cost issue as a one year renewal of the Windows Server would buy three years on the cPanel. GoDaddy is discouraging the use of what they call the Obsolete Windows System. So I had to migrate and reload the whole pastapete.com, jessystems.com and the n6qw.com sites to the Linux based servers. Some files and links got lost in the translation --so you might not be able to see everything! Essentially I have  to open every link to verify that it works --that may take some time

New Technology for 2020 ~ The Hermes Lite 2.0 SDR Transceiver

  The Hermes Lite 2.0 SDR Transceiver. November 7th, 2020 ~ It's Settled! It is done! The stain of the Trump era is soon to be removed! Thanks to all who voted. The Voice of the People has been heard.  Congratulations to President Elect Biden and Vice President Elect Harris. Pete N6QW November 3rd, 2020 -- IT WAS THE MOUSE   We all know this is Dump Trump  Day. Go out and vote! It was the mouse! Back in 1999 I stupidly was one of the very first to purchase a Ten Tec Pegasus. Never buy the first batch of a new model.  Touted as the world's first computer controlled radio , actually I think the Kachina 505 was really the first. But the Pegasus was fraught with problems including a trip back to the Smokey Mountains. I was using an older Windows 95 machine to control the Pegasus and that may be a co-conspirator. Well after many calls to TT -- finally someone who has some smarts told me: Fix your station ground, Make all leads short and Buy stock in a ferrite bead company. I did all

The Next Project Updated 10/10/2022! The rubber has hit the pavement!

The Next Project... A 2022 Transceiver. 10/10/2022 My Apologies. It is with regret that I will be terminating any further work on this project. My caregiver duties have over time become a greater time sink and it is almost impossible to build something working only 10-15 minutes at a time spread out over a day. I apologize for not getting it from design ideas to complete hardware. Most likely I have built the last transceiver I will ever build. Thanks for riding along. My website https://www.n6qw.com/  has the pdf of the postings and I will leave this blog page as is. 73's Pete N6QW 10/05/2022 Still Alive! Regrettably my caregiver duties have overtaken any free time so not much progress. But I am hopeful yet this week I will cut at least one board. A PSA from N6QW.  Think of it like Mary Jo has a "crink" in her back and unable to get in the backseat of the 57 VW Beetle. A bit of a setback but not forever.  Seems like the hired caregiver had a small emergency and not able