Sunday, August 16, 2020

A little about the TinySA

I have received several questions about the  TinySA. So, just a little history and overview of the hardware of the TinySA before I get into the settings and actual use.  

TinySA Main Menu

After I joined  Home Brew Test Equipment in, I became interested in a series of posts by Erik Kaashoek detailing a SpectrumAnayzer he was building using mostly small modules that are available on E-Bay. The original version covered up to around 2GHz.  One of the hardest parts of this build was a simple to construct 1st IF filter.  Erik then came up with a simpler design that would cover up to a couple hundred Megahertz, using inexpensive, readly available parts.  It is based on a couple SI4432 wireless transceiver modules.

These are basically a complete SDR transceiver in an about 1 cm. square IC, and cover a frequency range of 240 to 960 Mhz. They are designed for digital data transmission in applications such as remote time pressure monitors, therefore very inexpensive.  There are several different modules, with support circuitry available for well under $5.  The other thing that simplifies the design, is using a 433 MHz. 1st. IF, where Erik could use readily available 433 MHz SAW filters to obtain required selectivity. I had attempted to copy portions of the design, but without much experience or equipment suitable for use above the HF range, I ran into several problems.  I decided to just wait and see what  others finally came up with.  And, I am really glad that I did.  When I saw the unit was prduced by Hugen, I jumped at the first production run.  Hugen has done a fantastic job with his several versions of the NanoVNA, and I am very satisfied with the units I have from him.

The easiest way to describe a Spectrum Analyzer is a wide band receiver with a visual diaplay of signal strength over a selected frequency range.  In most simpler designs, they use a 1st. IF higher than the range of the instruent to reduce problems with images.  In the case of the TinySA this is 433MHz.  The primary frequency response of the TinySA is .1 to 350MHz.  It also has an additional range of 240 to 960 Mhz. , but with several major limitations.  Here is a block diagram of the basic TinySA RF stages. In the description of operation, I am going to indicate  menu selections by using the format [MENU ITEM] .

For the default SA  [LOW input] mode the signal comes in the LOW connector and goes through a low pass filter and variable attenuator to a mixer.  The first SI-4432 is now configured as a transmitter and produces the correct local oscillator signal to produce the desired 433 MHz. IF. This signal to go to the band pass filter.  The second SI-4432 is configured as a receiver tuned to 433 MHz.  Its internal DSP can be configured to different bandwiths from around 2.6 kHz. to over 600 kHz. , this can be set through the Resolution Band Width [ RBW ] menu.  In receiver mode the SI-4432 also produces a Receiver Signal Strength Indicator value (RSSI) whcih is read by the microcontroller. This is converted to the proper value depending on the unit type selected and displayed.  The LO signal is also brought out to the HIGH connector for use with an external tracking generator.

Another mode is [HIGH input] , where the first SI-4432 is set to receiver mode and tuned across the selected frequency range.  This  can cover from 240 to 960 MHz.  Since this goes directly into the through the HIGH connector SI-4432, there is no filtering or attenuation.  This can lead to images and other unwanted signals showing up in the display.

The unit can also be used as a signal generator. In the [LOW output] mode the unit has a frequency range of .1 to 350 MHz. The signal goes through the low pass filter and out the LOW connector.  Using several different menu items, you can set frequency [FREQ], [SPAN] and [SWEEP TIME], adjust the output [LEVEL] from -76 to -6 dBm.  You can also select several types of [MODULATION],   [AM 1K],[ AM 10K], [NBFM], [WBFM]. You can get a 240 to 960 MHz. signal out the HIGH connector when in the[HIGH output] mode, but there is no filtering of the signal, so it is rich in harmonics.  The options are similar but[LEVEL] can  be set  from -38 to +13 dBm, and there is no AM modulation available.

There is also a [CAL output] mode that brings a calibration square wave selective in steps from 1 to 30 MHz. out to the HIGH connector.  This signal is used fr the self test mode.

There are quite a few menu options available, and I will not go through all of them.  I want to hit on some that I found to be useful or intersting.  More information on the menu tree and other information  can be found at

The menu structure is very similar to that of the NanoVNA, you can use the selection wheel. push button or the touch screen for most functions.  I prefer the touch screen for most things, but find the selection wheel seems to work a little easier for oving markers around.

One of handiest things I found are the presets, You can store up to 4 custom preset frequency ranges, then select the desired from a menu.  There is also the default full range to choose from.  Unfortunatly they are only listed as 1 through 4, can't do a custom label, but I guess you can't have everything.

Frequency [FREQ]  selection can be set by either setting a [START] and [STOP], or [CENTER] and [ SPAN].  Either one works, and it dependson on what you are doing for the best method to use. All of them bring up a on-screen display similar to a calculator, which makes it very easy to make the desired setting. Under the [FREQ] menu you can also set the [RBW] for the measurement.  There is also an option for [ZERO SPAN] which sets it to a single frequency and the unit functions somewhat like a Frequency Selective Voltmeter. 

There is also an option for [SPUR REMOVAL].  Since the PLLs in the SI-4432s  and mixer products can generate spurs. Multiple readings are taken with the IF and or LO frequencies moved around and combined to help remove them.  This will also increase the sweep time.

Well, I think that is enough for now.  I will continue next time with some of the options available for display of the data.

Tuesday, August 4, 2020

The New Toy is here

Well the new toy arrived today, and I have spent the last several hours just playing with it.  It came a fairly well packaged box within a box, with a layer of bubble wrap. I tried to get some pictures, but was having some problems with the camera, so going to use a couple from a post by Herb on the TinySA .IO group.  Overall packaging looks great with a custom printed box , and a molded holder for all the components inside.  This is much nicer than I have seen for most products of any type in this price range

After charging the battery, I ran the Touch screen calibration and the self-test. This self-test has you connect the included SMA cable between the High and Low connector. It uses an internally generated signal for inital testing. Several values can be calibrated later through dedicated menu items. I was able to get a picture of the self-test screen part way through the process.

After the self test, I connected the TinySA to my computer, running the TinySA.exe program.  This allowed my to take screen captures of the display, instead of trying to get a steady picture with a hand-held camera.

First test was to use my SI5351 signal generator as the signal source.  Conecting everything up I made several screen captures at 10,30,100 Mhz., and one at 50 Mhz with the waterfall display turned on.

The output of the 5351 is a square wave, so you can see the high harmonic content of the signal.  With the odd harmonics are much stronger than the even.  Power level is just about what I measured with my home-brew AD8307 power meter.  Any differency in frequency readout are due to the fact that my signal generator is not calibrated, and the step size of the TinySA.  In the stand alone mode the maximum number of steps is only 296.

Well I guess that is enough for now, so I can get back to playing with the new toy.  Just with the little while I have played with the TinySA, I can say that I am impressed with it.  The UI is very nice, but it will take a while to become really familiar with the menu structure and all the settings available.  

It does not have a tracking generator, but you can use the Low out put as a signal generator in the .1 to 350Mhz range.  When used in the SA mode this output is 433 MHz above the test frequency.  So with a 433 MHz signal source and a mixer it should not bee too difficult to make a tracking generator for the system.

Now to get back to playing.

0805 update
Just a quick update on what I  found when going through the menu options.  Since I had been looking at harmonics, under the Measure menu there is an option for Harmonics.  It allows you to enter the fundamental frequency, then it computes the start and stop frequencies to cover the fundamental and the first three harmonics.  After the sweep it marks and displays the fundamental frequency and amplitude, and the 3 harmonic values shown as dBc relative to the fundamental.

So. Back to playing and lets see what other things I can find.

Saturday, July 25, 2020

Impatiently waiting for a new toy

If you have been following my blog for a while, you know that I have made several starts on a simple Spectrum Analyzer.  In most cases, as I progressed in the project I came to the point where I needed to build some other project.  Little things, like when I needed to test a band-pass filter, I needed to build a SNA first.  Then I found I would probably need something with a higher frequency response  for working on a SA with the frequency range I wanted.

Over a year ago I found some information on a very small VNA for around $60.  Since this NanoVNA was  less than 1/10 the price of any other VNA with a built in display, I jumped at it.  It gave me an instrument that had the frequency response I would need to work on a SA.  

There was an IO group formed to support the little VNA.
Following that group I found another group about Home Brew Test Equipment.  One of the ongoing projects in that group was a Tiny SA. Several different versions of that were being developed and it looked very promising. Around the first of the year a TinySA group was started for several people who were testing a future commercial version of the TinySA.  Some of the info on this group looked very interesting, especially a short video on the nearly finished product.  Also a lot of information and specifications at

Just the other day I saw a post on the TinySA group, that the product was available for order.  The TinySa is being produced by the same person who originally produced the NanoVNA.  With that as a recommendation I quickly placed my order, since I understand there is only an initial production run of 300 being made.

The availability of a less than $100  SA with a range of 100kHz to 350MHz  (240- 950 MHz. without bandpass filter )will make the life of the home-builder a lot more fun if not easier.

Now all I have to do is wait #@*& !

Monday, June 15, 2020

VFO-BFO with ESP32

I made a circuit  board layout for the ESP 32 based VFO-BFO using the Wemos ESP 32 Mini controller module.  Sent Gerber files off to China and had 10 made up, they arrived in a little over a week with Express shipping. I built one up and found a few minotr errors I had made in some dimensions, but the boards still worked fine.  I decided I would use this with a Bitx 40 board I have laying around.  I think I will use Pete N6QWs method for doing Upper and Lower sideband selection.  That means adding or subtracting the desired frequency from the IF frequency . For the Bitx 40 that means setting the SI5351 frequency to 5 or 19 MHz range depending on the sideband selected. Only tricky part is getting the exact IF frequency, of the Bitx 40.

 The board layout has provisions for a up to 7 pushbutton switches that can be read by a single analog input pin.
I chose to use a double row header so I could add individual switches as desired or a switch array connected through a single ribbon cable.   I also brought out the connections, 3.3v, and ground for use by a rotary encoder with switch.. 

The connector for the SI5351 module is mounted on the bottom, so the boards can be stacked.  Also, a female header strip can be mounted on the bottom for a 1.8" TFT display which  then can also be stacked.  I have provision for an optional 5 volt regulator so you can power the  assembly form 7-12 volts if desired, instead of directly with 5 volts

One thing I like about the Wemos module is that I only have to make connections to the inside rows of header pins.  If I need additional control pins, I can put header pins in the outside rows of connections and just plug onto them.  This means I do not have to worry about those pins in the PCB layout.

After playing around with the options this gives me,I decided to modify the layout to make the small corections in layout positions I found. 
I am also going to bring out some of the pins I had not originally used , and add a couple connectors for additional connections to the I2C and SPI signals.  This will allow me to use the same board as display-controller for several other projects I have been slowly working on.  Now just need to send this off to a board house in China, then wait.

Tuesday, May 19, 2020

An updated version of my VFO-BFO

A couple of the projects I have been working on have been put on hold because of the shipping delays caused by the Covid shutdown in many places.  Looking around for something that only required what I knew I have on hand.   I rembered seeing a YouTube video of a SI5351 based VFO with a small TFT display that very nicely simulated a mechanical dial.  Going back I found the video, and there was a link to the website of JF3HZB, the schematic , and Arduino code for the project.  It uses the same 128 x 160 TFT display I have in my VFO-BFO, and a ESP-32 dev. board.  Looking at what pins are required, the small Wemos Mini I have should work nicely.
I downloaded the software, and got  it to compile without any problem. After looking at the code, I can see where having two 240 Mhz. cores doing the processing is nearly a necesity for something like this.  And also still has plenty of  room and power to addd other features.  I quickly built a simple board to see how it looks, and works . 
After getting the basic software running for the display, I did some modifications to add a couple things I want to have on the display. a LSB/USB indicator and I will probably add a T/R indiator light of some type.  The response of the display is really nice, except for some small jumping around that is coming from the really cheap rotary encoder I used.  I have  a couple better ones that I will use after I get a board designed, now I will see if I can correct with some filtering capacitors.

I plan on using one of the Adafruit SI5351 modules I have, so will have to see what if any changes I have to make to use them with 3.3 volt logic instead of 5 volt.  I have not looked at the 5351 library used with the original  software, so do not know if I will keep it or use the same library I have used before.

Trying to think about what I want to include on the board design. All the pins required are on the inside set of pins on the Wemos module. That means I can just add some header pins to the top of the Wemos module instead of having to route them  on the board. This should allow for fairly easy expansion. 

I like the single analog pin method for monitoring multiple push buttons.  I will probably add the resistor chain and some header pins on the board to make it easy to add several push button controls.  Also thinking of having provision to add a retoary encoder directly on the board, or  a connector for adding an external encoder.
 I will get started on the board layout, then decide if I want to order some from one of the board houses.  They all offer DHL shipping, so should not have to wait too long to get them.

I tried to make a video of the board working, but couldn't find a way to keep the camera steady while operating the encoder.
So here is a link to the original YouTubevideo I watched.

Thursday, April 16, 2020

Best thing to come from the lockdown so far.

With almost everything being shut down from the virus, there must be something good happening.  I think I have found at least one thing.  Since we can't gather together the ability to hold meetings via video conferencing has been really taking off.  

Last Saturday we held the monthly meeting of the North Georgia QRP Club via Zoom.  We had around 25 people show up. Mostly members, but also a couple guests including Hans Summers from QRPLabs checking in from Turkey.  He gave a brief history of the QCX transceiver. and informed us that they are only a couple hundred short of having sold 10,000 kits.  He also spoke a little about the multi mode, all HF band QSX that is in development.  We also heard from some of out local members, and got to see some pictures of their shack, and work bench. Except for a couple little glitches, from not being familiar with the software every thing went quitae well.  Now waiting for the next meeting.

NO this is not the FBI's Most wanted List, or is it?

Last evening I got to attend another meeting.  This one would be a little frather drive from Atlana than the NOGA meeting.  This was with the homebrew group from the Peal Amateur Radio Club located in the Greater Toronto area.   I usually only get together with some of them at FDIM, so this is a plus for me.
This meeting used a different software package, but also worked quite well. Except for also being the first time most of have used it. We had 17 people in the meeting including several that joined in via cell phone. As with the NOGA meeting there was a guest calling in.  He was Rex Harper from QRP ME, and he spoke about the 'Buildithon' project that has been scheduled at FDIM this year.  He is still working on the kits, and is planning on having a virtual Buildithon.  Also heard about the progress being made on the Direct Conversion Receiver, which is to be the club 'Buildithon' this year.

Possibly the RCMP most wanted list ?

With the aid of the video conferencing software we are still able to get together with our friends.  Of course most of us have more time to get on the air, work on projects, or start on the list of things the Wife has been wanting done 'forever'.

My last comment on the matter is something a friend said in one of his e-mails.   " I feel like a teenager again, gas is cheap, and I'm GROUNDED"

Thursday, April 9, 2020

UHF Version of TinySA

I had started on the TinySA from HBTE, but am still waiting on some parts that I had orderd than have yet to show up.  Looking around I found a UHF version that covers 240 to 940 MHz. This only uses a single si4432 transceiver module, which I have on hand. So I will try to do a similar UHF version of the TinySA.  Since this does not need the input LPF, mixer, and a high local oscillator, it should turn out to be a small instrument.

I have previously used a ESP32 development module, but that was quite large.  Looking around aroound I found a Wemos ESP 32 mini that looked like it would do nicely. 
It gets much of its size from having the IO pins as two rows of 2 wide headers .

  Fortunatly the SPI and I2c pins are all located on the inside rows of pins, and there are enough extra pins available for the every thing else I need.
I can also put right angle headers in the outside row of pins and connect directly to them without having to have additional connectors on the circuit board.

I had neen very happy using a joystick for the user input device, but they are a little large for what I had in mind, and also they used 3 IO pins.  I also wanted a couple extra control buttons available for the UI.  I decided to go to keypad made up of a resistor divider string with switches to ground at each intersection.  This can be read using a single ADC input.

Using surface mount components, the entire keypad can be layed out on the top side of the PCB, without taking up any extra space in he cabinet.  I designed and 3D printed a small case, and the buttons for the keypad.

The software to read the keypad is quite easy.  First you have to find out what ADC vlue is returned with no keys pressed and when each key is pressed.  These values are reduced about 10% to prevent false readings.  These values are put into an array.

The keypad function checks to see if a keyis pressed ( reading lower than none pressed value).  If it is a short delay to debounce and another reading is taken ,then simple for loop compares this to the values in the array.  The value of the last array item lower then the read value is returned to the calling program.

int readKeypad() {
  int i;
  int key;
  // analog value for each key press measured and adjusted down about 10% to prevent
  // wrong readings    0 position is no key pressed
  int key_val[] = {3500, 3200, 2900, 2600, 2200, 1700, 900, -1};
  if (analogRead(keyPadPin) > key_val[0])  // No key pressed
    return 0;                     // just return
    delay(5);                   // debounce
  i = analogRead(keyPadPin);         // get pressed key reading
  for (int n = 0; n < 8; n++) { // check to see which key is pressed
    if (i <= key_val[n])         // compare against array of measured values
      key = n + 1;              // bump up so you can use simple if test for a pressed key
  if (key > 7 )key = 0;           // helps to clean up clean up extended switch bounce
  return key;
  delay(25);                     // set max repeat rate


This works quite well, except for a little key bounce from the really cheap switches I had on hand.  I put everything in the printed case, and loaded a modified version of the menu system I had used with joystick.  

Now I need to grab some of the si4432 code from the TinySA on the HBTE group  and see if I can get it working in the receive mode, then write some sweep and display functions.