Tuesday, July 22, 2014

Minima - Programming

Due to my Minima CPU Module damage (see: Link) I will have some time to consider some addition modifications to my Minima Program.

Please provide comments and feedback.

Current Status

As currently implemented the following functions exist and published on my GitHup Repository. This implementation is know as an "Minima Alternate Tuning Method". Note: these functions are not found in the Farhan's original sketch.
  • High resolution, plus/minus 1Hz Tuning (thanks to Jeff - KO7M).
  • Near Normal Dial Tuning Method as found on most Dial Radio system.
  • Tuning Cursor positioning via Left/Right push buttons.
  • Automatic (original) or Manual Selection of Sideband via push button.
  • Ham Band Switching via Up and Down push buttons
  • Nine Ham Band Memories, with Frequency and Sideband Saved
  • RF386 Power Amplifier Filter Selection via generated clock pulses (Note: Not a lot of testing has been done on this yet)

Recent Additions

These are some recently implemented, but NOT published, functions that are being tested. These will be made available soon.
  •  Re-centering the Tuning POT can be done while any button is pushed (held) without changing the current frequency
  • Tuning 2500 Hz Steps, similar to FT-817 left knob. Note: most SSB stations are spaced 2500 Hz apart as seen on most waterfalls.

Some Plans

Additional functions that are currently being planned, are:
  • Two Memories for each band, implemented and saved as "A" and "B" VFO
  • Plus or minus 990 Hz RIT with 10 Hz resolution
  • Cross-Band or In-Band operations; Transmit on "A" VFO and Receive on "B" VFO (Note: I need to check the Regulations to see if Cross-Band operations is legal?)
  • Transmit enabled only within the nine Ham Bands (Note: due to complexity, 60m band is not currently planned)

Long Term Plans

Some longer term implementation ideas include:
  • Frequency Dial Calibration
  • IF Configuration and Adjustments
  • On demand, save user specified Band Memories into non-volatile memory,  and retrieved on power up.
  • Implement a simple Menu System for user specified function and modes.
  • Implement simple automatic CW ID and CW CQ Calling Memories.
  • Implement QRSS, WSPR, and PropNET Transmit Beacon modes.
  • Limits imposed on modes, based on Band Plans, i.e., SSB Transmit only in phone section. A "digital" mode could allow computer controlled transmit via a sound card on Upper Sideband.
  • "Factory" Reset (memories and configuration) on demand.
  • etc, etc

The GitHUB

With the normal GitHUB functionality different "Named" levels of complexities can be made available for users;
  • Farhan's Original Sketch
  • My Alternate Tuning Method without buttons (this works with the original Minima Hardware as documented by Farhan)
  • My Alternate Tuning Method used with Six additional buttons (used by functions as proposed here)
  • Beta code with new untested functions

Hardware Requirements

All of the above proposed functionality requires only the addition of a few parts (see: Link);
  • One 47K Resistor between two pins on the microprocessor.
  • Six simple push button switches with six 4.7K Resistors, all installed on the front panel. 
  • For RF protection, a few bypass Caps are suggested (see: Link).


To implement all of the above functionality in the programming space available, a Sketch rewrite for size optomization may be necessary. Therefore, the original Sketch and programming details may become less obvious to a novice programmer.

Your Help Needed

Other implementation ideas are Requested, Encouraged and Welcome.

OR, this could be a starting point for your own GitHUB Fork, a place to save your Sketch Modifications and share in the programming fun.

OR, someone that likes to write user documentations is always welcome to help. But note, all of this is in flux, and therefore flexibility is a necessity.

Please provide comments and feedback.


Sunday, July 20, 2014

Minima - Damage Report

After returning home from Salmoncon 2014, where I had my Minima Transceiver Modules on display and for demonstration, I decided to again add some more functionality to my Minima Alternate Tuning Method software.

My Minima Transceiver Modules
This photo was taken at Salmoncon 2014,
Thanks to Linda -
But at home, when I turned the Minima ON, it ran for a short time and then went blank. A second attempt at Turn ON, was equally as bad, the LCD presented large black-blocks for the top row of characters.

My Minima CPU Board has Died!

The Problem

The voltage on the 5.0V Rail was measured at 7.8 Volts. The regulator was fried, which I am sure that voltage cooked the ATMEGA328P-MU Microprocessor as well. I knew the regulator was under rated for the increased load that I had put on it, but it had worked so far, even though it would get very warm.

The Attempted Repair

For repairs, I first replaced the 5 Volt Regulator.

Now the 5 volts Rail is correct, but the microprocessor is still toast!

My attempt to replace the microprocessor was NOT so successful, some traces were damaged while removing the micro. The micro had been solder through the back side of the PCB as a heat sink. De-soldering the heat sink heated the board and small traces TOO much, damage was almost inevitable. In hindsight, it would have been better to Hot Air reflow the part off. But I do not have Hot Air tools.

Dead Microprocessor

This of course is one of the pitfalls of using very small quad-flat-pack version of the microprocessor, if it were the large DIP, replacement would be a quick chip replacement. But, I like to use the smallest chips that I can find.

My software modification testing will have to wait until I replace the board, but I am NOT looking forward to re-building this Homebrew board with its 85 via's.

The Solution

I decided to pay the bucks, and have OSHPark.com manufacture a set of boards for me. The boards will be in hand in about a week. I will continue working on the Minima Software additions, but software testing will have to wait.

Maybe, this may provide time for me to finish my Homebrew Audio boards for the Minima.


Wednesday, July 9, 2014

Minima - User Interface Module

Thus far, I have been working on the Minima Alternate Tuning Method with push button switches that were hay-wired on a Protoboard.  Reliability of the switches and connecting wires were always suspect.

To solve this problem I have created a Modular User Interface (UI) that will be used with the rest of my Minima Modules. The UI will plug directly onto the Processor Board.

Here it is as designed in DipTrace,  and presented in 3D:

The UI in DipTrace 3D
And, as plugged onto the Processor Board:

As Installed
 (sorry for the poor photo quality, it was taken late last night)

The UI board was produced via the Toner Transfer Method, it is double sided and contains 23 40mil via's.

Wardy at http://wardyprojects.blogspot.com/ has rekindled my interest in building 3D component models for DipTrace.

DipTrace provides over 3500 component in their 3D Library, but rarely are the components that I use found (like simple headers, POTS, and buttons).

DipTrace uses the newer VRML2 format (and a few others) for their 3D components.

In the past I have used AC3D from http://www.inivis.com/ for my 3D needs , but I had let my License laps on an old forgotten dead workstation.

Wardy inspired me to re-purchase the AC3D software and start playing in 3D again (I hope that was a good idea!). The POT and push button switches seen in the design image above were recently created. The following is the most recent 3D part that I have created, it is a SMA PCB Edge Connector. It will be seen on future projects.

A 3D SMA PCB Edge Connector
To use AC3D, I save the component in the native format (*.ac) and then export the same part in VRML2 format, and which is saved in the same directory. Because AC3D does not read (import) VRML2 format, I have to re-export the parts if changes are made to the original.

Although AC3D does read (import ) the older VRML1 format, it does NOT read the VRML2 format (only export), the 3500 3D parts supplied by DipTrace can not be used as a template or starting point for my parts (what a waste).

I need to find a VRML2 to VRML1 converter, so far, googling has not helped.


Sunday, July 6, 2014

Minima - Alternate Tuning Method - Cont'd

I have been working on Software for the Minima Transceiver. As posted before, my plan was to provide an Alternate Tuning Method for the Minima.

 In the Beginning

The original tuning method was provided via a standard POT that had a center position that did not change the frequency of the radio. When turned off center to the left the frequency would go down in different steps depending on how far from center the POT was turned. Once near the desired frequency, turning the POT back toward the center would decrease the steps size so that tuning could be stopped on the desired frequency. The same is necessary to increase the frequency, but in the opposite direction. The original Driver for the Si570 did not have 1Hz resolution and therefore the preprogrammed tuning steps was a reasonable, or an acceptable solution.

New Direction

I desired higher resolution and a more natural way of tuning the Minima Transceiver, within the limits of using the existing Minima hardware as much as possible. And I wanted to add some additional features to the software, see below. A method of adding additional push buttons switches was found, thanks to Minima e-mail contributors.The button circuit can be found here. Note: most of the wiring can be done on the front panel, next to the switches.

With a lot of work Jeff - KO7M, rewrote the Si570 Driver to provide better than 1Hz resolution. He did so by, rewriting the original floating point algorithms using fast 64bit interger math. His Driver is a plug-and-play replacement for the original. Jeff's Si570 Driver can be found here.

Writing replacement software to implement my Alternate Tuning Method started as a simple modification and grew into a major rewrite of the Minima program sketch. Many people around the world provided inspiration, testing, and ideas that were eventually included in what it has become today.  

Jeff - KO7M, Wayne - NB6M, and John - MI0DFG are major contributors.

The functionality of this program will continue to grow; to include menus, beacon modes and several other interesting ideas. Programming space is limited, but some things can be carefully added.

But, Program Modifications and Additions have Costs

One major cost, hassle, or headache was how to minimize the use of Variable Space to stay within the 1K bytes (RAM) available on the ATMEGA328P microprocessor.

So far, the Program Space has not been an issue, currently the program uses only about 20K bytes of the available 32K bytes (FLASH).

Free Memory from the Variable Space (RAM) is necessary for proper program execuiton as the "stack" used by each programmed function consumes and releases it as they are called. There are NO reported run-time errors if ALL of the Free space is used, the program just become erratic or fails (crashes). Using ALL of Free Memory is NOT a good thing. At one point, there were only 322 bytes of available Free Space at program reboot (way too little), program crash was inevitable.

An analyses of Variable Space of the modified Sketch indicate that most of it was used by String Constants within the program. A method was needed to move the String Constants to FLASH Memory, and out of RAM. With lots of research and putting disconnected ideas together, a method was concocted that provided the solution. The problem is discussed, but no-where on the web could I find a suggested cut-n-paste integrated solution.

Arduino String Constant Moved to FLASH Memory

The solution that I came up with is implemented via a set of Macros. The macros uses the PSTR construct in conjunction with a "strcpy_P" function. My simple solution is implemented as a buffer and two simple macro. This solution is not as fast as it could be, because it copies the String Constants back to RAM before it's used. But in doing so, the String Constants can be used anywhere within the program as normal, by wrapping it in a simple "FLASH( ... )" programming construct.

char buf[60];
// ERB - Force format stings into FLASH Memory
#define FLASH(x) strcpy_P(buf, PSTR(x))
// FLASH2 can be used where Two small (1/2 size) Buffers are needed.
#define FLASH2(x) strcpy_P(buf + sizeof(buf)/2, PSTR(x))

A few examples from the Minima Sketch as used:

debug(FLASH("Register[%i] = %02x"), i, dco_reg[i]);

sprintf(c, FLASH("%-16.16s"), FLASH2("VFO swap!"));

These examples are saved here for my future reference, and hopefully saved where other programmers may find it, and find it as useful.

After moving the String Constants to FLASH Memory, it has grown from 20K to about 21.5K bytes, but still with lots of room for careful additions.

This solution has changed Free Memory from 322 bytes to 1070 bytes for this Minima Program Sketch. With 1070 bytes of Free Space the program will not (should not) fail for lack of stack resources.

The Alternate Tuning Method

The Alternate Tuning Method implements the following, which are not found in the original sketch.

  • High resolution, plus/minus 1Hz Tuning (thanks to Jeff).
  • Near Normal Dial Tuning as found on most Dial Radio system.
  • Tuning Cursor positioning via Left/Right push buttons
  • Automatic (original) or Manual Selection of Sideband via push button
  • Nine Ham Band Memories, with Frequency and Sideband Save via Up and Down push buttons
  • RF386 Power Amplifier Filter Selection via generated clock pulses (Note: Not a lot of testing has been done on this yet)

Thanks to the people on the web and Minima e-mail list, the current Alternate Minima Tuning software is working very smooth and provides some very desirable functions.

The GitHub Repository where this software is available, is:

As the software continues to be developed, the GitHub Repository will be updated, check back often.

A complete dynamic list of my Minima Project posts are available via this search link (which will include this post):

UPDATE: July 14, 2014 12:16
After much more research, I found the use of "PSTR" used in a similar context as I have suggested documented, at:


I wished I have found this link long ago.


Saturday, June 21, 2014

Salmoncon 2014

This years Salmoncon is approaching fast, it will be on July 12 and 13.

Last Year

Last year I put up a 40m Bottom Fed Delta Loop between two tall trees near my camp site. The results were Impressive. With a little effort, we worked all of the stations the we could hear on all HF bands with my FT-817 (at 5 watts).

(last years photo to be inserted here)

The top of the Delta Loop was at 90 feet AGL (some very tall trees) and was fed from the bottom with 450 ohm ladder line via a balun. We used the formula: "1005/Freq" to calculate the length of wire, which was folded in thirds to fine the corners.

In practice, the antenna resonated on a slightly higher frequency than I expected, but still within the 40m band. The LDG Z817 tuner on the FT-817 was able to match it on all HF bands. I may be wrong, but I think the impressive performance is due to the massive capture area of that much copper high in the air.

This Year

Because space and hight is available, I plan to double last years wire length, and put up an 80m Delta Loop. I am expecting good things, and will report the results.

There is a third tall tree that I might be able to use to convert the Vertical Delta Loop to Horizontal. It would be really fun to use an 80m Horizontal Loop at 90 feet AGL (I may need to splice in some more feed line).


Sunday, June 15, 2014

Minima - Proposed New Tuning Method - Cont'd

Currently, there has been several successful Alternate Minima Tuning Method installations on different users Builds. The Alternate Tuning Method is very smooth and intuitive, some of the additional (yet unassigned) buttons will be used for future menu functions.

Initially, there was a problem getting the Multiple Buttons to decode correctly on some microprocessor configurations. The problems consisted of slightly different internal analog pull-up resistors contained within the different microprocessor package styles, and a user error in wiring of one of the Minima Builds.

Once found, the simple wiring error was easily fixed.

But, the ATMEGA328P-PU and ATMEGA328-MU packages have slightly different internal pull-up values. Properly decoding seven switches on a single analog pin is very dependant on consistent pull-up resistor values, the way around the difference is to use an external pull-up (47K) and proper analog circuit wiring.

To help with button decode consistency, the analog support pins; AVCC, AREF, and AGND were properly configured to be used with pin 26. Pin 26 is connected to the FN Button in the original Minima circuit,  and this pin is where the additional buttons resistor network are added.

The external pull-up is connected between AREF and pin 26, and AVCC is connected to +5V via a simple lowpass filter (see diagram).

The Alternate Minima Tuning Sketch which support Multiple Push Buttons is available at the GitHub. Currently it is "alpha" code, but I will update the URL when it has been "committed" to production.


Saturday, June 14, 2014

Minima - Multiple FN Buttons - Cont'd

To properly and simultaneously support different ATMEGA328P packages (e.g., -PU and -MU) for use in the Minima, I suggest the FN push button circuit to be augmented to correctly use the analog AVCC, AREF and AGND pins.

Hopefully this will allow a single Revision of the Sketch to support all ATMEGA328P microprocessor packages.

Note: this circuit and sketch are "alpha" and should only be use to help test this solution.

See the previous post showing the circuit that has been updated.


Friday, June 13, 2014

Minima - Proposed Button Layout

My proposed Minima Transceiver button enabling software will assume the addition of six buttons (7 total) connected in parallel with the original FN button (btn1). The software will continue to evolve to include new functions based on these buttons.

The first two buttons (btn2-3) will be used to move the "Cursor" for tuning.

The rest of the buttons (btn4-7) will have definitions based on planned software additions which will include interactive menus, where "Up - Down" and "Left - Right" will have some implied meaning. The suggested "diamond" layout of buttons 4-7 is similar to consumer products with key pads.

I suggest button groups something like the following:
Proposed Button Layout
Of course, the actual layout is up subjective and up to you.

Actual button "labels" will be suggested as the software evolves.

I would also suggest you stay flexible, and plan your Front Panel Layout with replacement and changes in mind.

Also, I welcome other ideas for button use, layouts and menu strategies.


Tuesday, June 10, 2014

Minima - Multiple FN Buttons

At the request of John - MI0DFG, I have been rewriting my Alternate Mimima Tuning Method.

John suggested that moving the cursor via (additional) buttons would work much better than waiting for the cursor mode to automatically switch intervals as I proposed.

The problem is the original Farhan's Minima does not have extra pins available for dedicated connections for additional switches. John suggested maybe we abandon pins 2 and 3, because he has an alternate method of programming his Arduino. I checked the possibilities and it could be done at the expense of Arduino Bootloader use, and at the expense of the programmer DEBUG output. Nether of which I would like to abandon.


An alternate method was suggested by someone (?) on the Minima Reflector, more User Buttons can be provided by a network of Resistors and Switches on an analog pin.

The current FN Switch is on an analog pin, and switches (and resistors) can be added in parallel.


I have successfully added six additional Switches in parallel to the original FN switch, and have written a Sketch Modification to decode them.

I was able to retain the original FN button's definition; Momentary, Double Push, and Long Push.

The first two new switches will be used to move the cursor; "Left" and "Right".

Current the other four switches are currently being defined as the Sketch is being changed.

This new (and preliminary) User Interface (UI) works very natural and smoothly with my new Sketch. I will soon publish the NEW Sketch that I used to decode these switches (unfortunately, I currently have another major project that is interfering with this Hobby project).

The following circuit should be added to implement multiple switches parallel
to the original FN Switch.

Arduino |
    AVCC|--------+---1K---- +5V
        |        |
        |        = 100nF
        |        |
        |        v
        |    |       |
        |   47K      = 100nF
        |    |       |
        |    |       v
        |    |
        |    |           |         |         |         |         |         |
        |   FNS          S         S         S         S         S         S
        |    |           |         |         |         |         |         |
        |    |
--------+    v

            "FN"       "Left"   "Right"   "SBand"     "Up"     "Down"     btn7
           (btn1)      (btn2)    (btn3)   (btn4)     (btn5)    (btn6)    (btn7)

  4K7 is a 4.7K ohm resistor
  47K is a 47K ohm resistor
  FNS is the original FN switch
    S is a new switch
    = is a capacitor
    v is a ground and AGND

  AVCC is:
     pin 20 on ATMEGA328P-PU, check spec sheet for other packages
  AREF is:
     pin 21 on ATMEGA328P-PU, check spec sheet for other packages

  AGND is:
     pin 22 on ATMEGA328P-PU, check spec sheet for other packages

Note: The use of AVCC, AREF, and AGND with these analog circuits ensure consistance
      decoded values for use within the Sketch.

Note: To avoid ground loops, the ground sides of all Switches should be
      connected to the same point on the FN Switch and AGND.

Note: Not all switches and resistors are necessary, install only
      the left most desired switches and resistors, the current software
      only decodes seven switches total.

When used with my Alternate Tuning Method Sketch:
      "Left" and "Right" buttons moves the Cursor
      "SBand" selects the Side Band Mode; "Auto SB", "USB", or "LSB".
      "Up" and "Down" switches Ham Band, and saves the current


Note: this information is preliminary, and applicable to only the most adventurous Minima builders.

See a suggested Button Grouping at:

UPDATE: Jul 2, 2014 12:33
The GitHub that contains the Preliminary Sketch that supports the above is at:


Wednesday, June 4, 2014

Minima - New Positive Progress

The last few days I have be struggling with my least favorite Homebrew build type of circuits, and that is the Audio Modules for the Minima Transceiver. I general, I just do not like to build Audio circuits.

Originally when I started the Minima Build, I was planning to build each schematic section as separate modules. For the RF sections that approach has work well. My original attempt to build modules for the Audio sections failed because they are somewhat dependent on each other, and therefore many interconnecting pins were going to be necessary to connect everything together. My original thought was to arrange the five Audio modules into a "checker board" with edge header between each. The first layout with headers on several sides of the modules eliminated their general use as building blocks for other projects. I wanted an easily adaptable modules for future projects. Because the module approach became to complex and therefore after several days (weeks) I abandoned the Module approach for the Audio Circuit - FAIL.

I collected the modules together into a single complex layout, but thats is where it sat for several weeks, although I publish blog posts with photos, diagrams, and discussions about the project. I was still not happy with the design or the approach.

But I needed to get something done to show progress on my Minima Build.  Three days ago, I decided to Build the Audio Board with the Toner Transfer Method (the same as with all of my modules). The Audio Board was going to be about 2.5x5.0 inches with 84 hand soldered via's. I printed, etched, dilled, and solder wiped the board and got it ready to install the 84 via's. But each time I looked at hand soldering 84 via's the number looked like a bigger task, and my interest diminished. I again abandoned the complex Audio Board, as there has got to be a better way!! - Another FAIL.

An Idea

The solution may be going back to individual modules, but this time I am going to stand-up each module on its edge Header. There will be five modules as described on the original schematic, and one power supply module. The modules will stand on a group of spaced headers on a Audio Mother board. These modules will easily work with ProtoBoards for experiments and testing, and therefore satisfying my original goal for the Minima.

I have now completed the layout for each Module and the Mother Board. The Mother Board is about 1.5x5.0 inches.  Each of the five modules will be 1.0x1.0 inches square. The Relay Module is a little larger.

The Mother Board will contain the Module Headers, Jacks, the edge connector headers for the Digital Controller Board, Tuning Pot, and Volume Control. It will be the "Glue" that connects all of the Modules together.

Mother Board, Five Modules and
a Power Supply Module
These boards will be created using the Toner Transfer Method.

With this new approach, I have a design (with only a few via's) that will hold my interest, and therefore my Minima Project Build should now continue forward. I can build a Module when I have time with very little overhead.

If this prototype works, I may send the design out for professional manufacture.