Wednesday, November 5, 2014

Confession of Arrogants

This is a confession of an Arrogant Engineer.

I may not be posting much more to this blog for a while. Although, I will still be thinking of electronic projects and software solutions for interesting problems. But, . . . most of my attentions will be elsewhere.

For the last few weeks (months) I have been feeling weak, it was getting difficult to climb the 32 steps to my Loft Apartment. I am 68, and I was just thinking I am getting older. But then, when going down the stairs was getting difficult, I decided something was wrong and decided it was time to see my Doctor again.

After some blood test, they found low-red-cell-count and low-Iron. Iron is necessary to make more NEW red blood cells. The Doctor suspected I was leaking blood into my intestines and iron was being depleted trying to replace lost blood. Note: Normally it takes about 90 days to replace your own blood.

My Arrogance

Two years ago, I ignored my Doctors advice to get a Colonoscopy. For those that do not know, the Colon is the name for the entire Large Intestine.

A colonoscopy is the process of viewing the colon from the inside. It sounds terrible, but completely painless with drugs. Unfortunately, there is several days of prep which requires you to drink some awful tasting clear liquid the day before.

To make a long story short; Last Monday my colonoscopy found a "growth" within my Colon that is leaking blood. Even without the pathology test, it is suspect to be Cancer. The good news is it appears to be only associated with one short section of my colon, maybe 6cm (2 inches). Hopefully, a resection of my colon will remove it all. I have appointments later this week for review and surgery planning.

If my problem would have been found earlier, it would have been a simple in-office procedure to remove a polyp or two. That was done from another location during my current colonoscopy.

My advice, Hobbyist-to-Hobbyist, Engineer-to-Engineer;

Get a Colonoscopy as soon as your Doctor recommends.

I am planning a New Blog to posts my colon adventures, I know it will not be as interesting as Ham Radio and Electronic Projects, but it is what I can do to encourage others to follow Doctors orders, I will edit here and add the URL when it is established. And of course, as usual, I will try to provide clinical photos and details.



-- Home Page: https://WA0UWH.blogspot.com

Wednesday, October 29, 2014

Minima - User Options


On Mon, Oct 27, 2014 at 11:36 AM, John <****@*******> wrote:
Hello Eldon
I know that you said that you want to stop coding and get on with construction,  I was just about to upload BS02 again but with various options turned off to suit my way of operating , which is a bind, as I have to make the changes, upload again every time I make a small change,     So I was wondering if it would be possible to have some of the more popular options available on the menu like you have the 60m (yes /No), possibly     Tune 2500 khz,    CW beacon,    Scanning, they could all be Yes/No options
Would save a lot of trouble,   Just a suggestion !!!! get the minims going first
73
John


John,

I decide to respond to your questions via a blog post, and CC to the Minima email reflector, so my answers can be leverage by others.

Yes, I need to finish my Minima build.

And YES, most options could (or should) be added to the menu option.

Although, I wrote the menus as it is, in hast, as a trial to see if it was valuable. In hast, means that the menu system is very inefficient and requires much code space than it should. It needs to be rewritten with space, performance, and optimisation in mind.

In previous revisions of the Arduino IDE, my Minima Alternate Tuning Method (MATM) Sketch was running out of space and therefore user compile-time USER_OPTIONS was the only method available for allowing users to pick and choose their desired functions. As you know, with the NEWER Arduino IDE 1.5.8, the MATM uses much less of the available space and therefore most (if not all) current USER_OPTIONS will fit, at the same time.

John, I think you have said that you take your ATMEGA328P processor out of the Minima circuit and place it in an Arduino UNO to reprogram it. If so, yes, I can see how compile and modifications would be a pain - and therefore menus would be much better. First, I suggest that you upgrade and use a USB to Serial Converter connected to a four pin header on the edge of your controller board. There are NO components necessary to use this header. Although personally, I always put a 1nF cap on all processor pins that leave the processor board, especially when used in an RF environment. Downloading a Sketch and Restating the processor with this set up is automatic.

PropPlug and Four Pin Header
There are several USB-to-Serial Converters available from different manufactures, most are created using the same FTDI FT232R chip.  I use the "PropPlug" from Parallax. The required four header pins from the processor are; GND, TX, RX, and Reset. The PropPlug works very nicely with the Arduino IDE.

As most readers of my blog know, I like to build electronic project with the smallest parts that I can find (small is my thing). For example, for the Minima I did not use the ATMEGA328P-PU, I used the ATMEGA328P-MU which is a small MLF-32 package. The downside is, it can not be taken out of the circuit to be programmed, nor can it be easily replaced.

Top: ATMEGA328P-PU
Bottom: ATMEGA328P-MU

For me, using the original suggested large DB9 Serial connector for programming on the back of my project was a non-starter, but a simple four pin header is acceptable. Also, the original suggested level translation parts are not necessary with a FTDI interface.


So Yes, new revisions of my MATM software will include more menu items to make option selection easier. Note: "menus" will always be a compile time USER Option.



-- Home Page: https://WA0UWH.blogspot.com

Sunday, October 26, 2014

Julian - G4ILO

This weekend I learned of the loss of my friend and fellow blogger, Julian Moss - G4ILO.
Julian Moss - G4ILO
Julian has succumb to an incurable brain tumour, which he gallantly fought, and has blogged about at: http://onefootingrave.blogspot.com/ . Like most, I will miss him and his Ham Radio Blog entries at: http://blog.g4ilo.com/

My blog is a direct result of Julian's encouragement, he convinced me to start my own blog. He encouraged and guided my initial efforts. Over the years, we exchanged posts, comments, email, programs, and even some small QRP hardware projects.
 
So, I think, A blog entry is the best possible tribute to my friend - Julian.

RIP - Julian - G4ILO, you will be missed.


-- Home Page: https://WA0UWH.blogspot.com

Monday, October 20, 2014

Minima - Jeff's ENCODER04

This is a proposed configuration to support Jeff's ENCODER04 routines within my Minima's Alternate Tuning Method. This is a fantastic addition for the Minima.



The following circuit should be added to the Minima to implement the ENCODER04 Rotary

Encoder and Multiple Push-Button Switches parallel to the original FN Switch. 

--------+
Arduino |
        |
   AVCC |
   pin20|--------+---1K---- +5V
        |        |
        |        = 100nF
        |        |
        |        G
        |
    PD5 |---------------- To Original Minima LowPass Filter
  pin11 |
        |
    PC0 |---------------- To Proposed Rf386 Power Amp Filter Selector
  pin23 |
        |
        |
    PD7 |                                    +--------+
  pin13 |------------------------+-----------|B      C|------------------------+
        |                        |     G-----|G  ENC  |                        |
    PD6 |--------------+---------)-----------|A      G|---+                    |
  pin12 |              |         |           +--------+   |                    |
        |              = 1nF*    = 1nF*                   G                    |
        |              |         |                                             |
        |              G         G                                             |
   AREF |                                                                      |
   pin21|----+-------+                       * = Optional but Suggested        |
        |    |       |                           for CPU's in RF Environments  |
        |    |       = 100nF                                                   |
        |    |       |                                                         |
        |    |       G                                                         |
        |   47K                                                                |
        |    |                                                                 |
        |    |                                                                 |
        |    |                                                                 |
    PC3 |    |                                                                 |
   pin26|----+-----+---4K7---+---4K7---+---4K7---+---4K7---+---4K7---+---4K7---+
        |    |     |         |         |         |         |         |         |
        |   FNS    = 1nF*    S         S         S         S         S         S
   AGND |    |     |         |         |         |         |         |         |
   pin22|----+-----+---------+---------+---------+---------+---------+---------+
        |    |
--------+    G

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


Where:
  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
    G is a ground and AGND
  ENC is the Rotary Encoder (A/G/B) with Push Button (C/G).

NOte: The Encoder Push Button switch (pins C/G) is parallel with btn7, if desired,
      one or the other switches can be deleted of left in parallel.

Note: The Encoder pins A and B, can be exchanged to reverse the Encoders electrical rotation.


ENCODER04 is available as a User Option within the current Rev (ERB_IL) of Minima Alternate Tuning Method at:


--

Thursday, October 16, 2014

Minima - Encoder, Two Implementions

After several days of work, I think I now have a working set of Encoder Routines that are usable for the Minima. Testing has been done by several builders.

The first routine: Encoder01, uses a polling analog read (non interrupt) to detect the Encoder switch changes and is not listed below.

The second routine; Encoder02, is usable for the builders that have moved to an I2C LCD and therefore have two dedicated microprocessor pins to connect to the Encoder pins A and B.

The third routine; Encoder03, is usable for builders that continue to use the parallel LCD and therefore do NOT have dedicated pins to connect to the Encoder. The previous Analog Tuning Pin and the FN Pin are used as shown in the suggested multi-switch schematic.

Selecting which Encoder routines are used, is done via a Optional Configuration selection in the "A1Config.h" file, by un-commenting the selected Encoder.



//#define USE_POT_KNOB  1 // 2304b - Option to include POT support
//#define USE_ENCODER01 1 // 2220b - Option to include Simple Encoder01 support
//#define USE_ENCODER02 1 // 2610b - Option to include FULL Two Digital Pin ISR Encoder02 support
  #define USE_ENCODER03 1 // 2604b - Option to include ISR Encoder03 support On Tuning Pin


Now that the details are work out, the Encoder supporting routines are short and simple. Each containing the "tigger" debounce timers as suggested by the author of the PinChange Library. Yes, it is called "tigger", because everyone knows tiggers bounce, as in Winnie-the-Pooh.

Some unnecessary detail are left out of these listing, check the GitHub for the actual code.

For Encoder02, these routines are used:



#include "PinChangeInt.h"

volatile int knob;

// ###############################################################################
void encoderISR() {
    int pin = ENC_B_PIN;
    static unsigned long startTime = 0;
    unsigned long tigermillis;
    uint8_t oldSREG = SREG;

    cli();
    tigermillis = millis();
    SREG = oldSREG; 
    if (tigermillis-startTime <= ISR_DEBOUNCE_TIMEOUT) return;
    startTime=tigermillis;
    
    knob += digitalRead(ENC_B_PIN) ? -1 : +1;
}

// ###############################################################################
void initEncoder() {
    int pin = ENC_A_PIN;
     
    pinMode(ENC_A_PIN, INPUT_PULLUP);
    pinMode(ENC_B_PIN, INPUT_PULLUP);
    
    PCintPort::attachInterrupt(pin, &encoderISR, FALLING);
}

// ###############################################################################
int getEncoderDir() {
    char tmp = knob;
      
    if (tmp>0) {uint8_t oldSREG = SREG; cli(); knob--; SREG = oldSREG; return +1;}      
    if (tmp<0) {uint8_t oldSREG = SREG; cli(); knob++; SREG = oldSREG; return -1;}
    return 0;
}


For Encoder03, these routines are used:



#include "PinChangeInt.h"

volatile char knob;

// ###############################################################################
void encoderISR() {
    int pin = ENC_B_PIN;

    static unsigned long startTime = 0;
    unsigned long tigermillis;  
    uint8_t oldSREG = SREG;

    cli();
    tigermillis = millis();
    SREG = oldSREG;   
    if (tigermillis-startTime <= ISR_DEBOUNCE_TIMEOUT) return;
    startTime=tigermillis;
        
    knob += analogRead(pin) < 440 ? -1 : +1;
}

// ###############################################################################
void initEncoder() {
    int pin = ENC_A_PIN;
      
    pinMode(ENC_A_PIN, INPUT_PULLUP);

    PCintPort::attachInterrupt(pin, &encoderISR, FALLING);
}

// ###############################################################################
int getEncoderDir() {
    char tmp = knob;

    if (tmp>0) {uint8_t oldSREG = SREG; cli(); knob--; SREG = oldSREG; return +1;}
    if (tmp<0) {uint8_t oldSREG = SREG; cli(); knob++; SREG = oldSREG; return -1;}
    return 0;
}


Notice: Only a few lines are different between the two implementations.


-- Home Page: https://WA0UWH.blogspot.com

Tuesday, September 30, 2014

Minima - Multi-Button Funciton

In previous revisions of my Minima Controller Code, I had used a "table" to lookup and decode the Buttons being pressed.

The buttons are connected together via  identical resistors to form a resistive ladder (see previous post). It was a simple matter of pressing a button, reading the resulting decoded value at the analog port of the ATMEGA328, and then inserting the correct value in the table for that button (Note: some of the current coding details have been left out, see source if necessary).



// ###############################################################################
int btnDown(){
  int val;
  
  val = analogRead(FN_PIN);

  if (val>1000) return 0;
 
  // 47K Pull-up, and 4.7K switch resistors,
  // Val should be approximately = 1024*btnN*4700/(47000+(btnN*4700))
  // N = 0 to Number_of_button - 1

  if (val > 350) return 7;
  if (val > 300) return 6;
  if (val > 250) return 5;
  if (val > 200) return 4;
  if (val > 150) return 3;
  if (val >  50) return 2;
  return 1;

}




That became a little boring, so I decided to replace the table with an algorithm.




// ###############################################################################
int btnDown(){
  int val = 0;

  val = analogRead(FN_PIN);

  if (val>1000) return 0;

  // 47K Pull-up, and 4.7K switch resistors,
  // Val should be approximately = 1024*btnN*4700/(47000+(btnN*4700))
  // N = 0 to Number_of_button - 1

  // 1024L*b*4700L/(47000L+(b*4700L))   >>>  1024*b/(10+b);

  for(int b = MAX_BUTTONS - 1; b >= 0; b--) {
      if(val + 15 > 1024*b/(10+b)) return b+1;
  }
  return 1;
}




The NEW algorithm is smaller, faster and more flexible than the "table", only MAX_BUTTONS need to be change to add/remove new buttons. There is probably a limit to the number of buttons that can reasonably be added to the Resistive/Switch chain, currently I have used eight.

Note: According to ohm's law, with 47K ohm Bias Resistor and 4.7K ohm Switch Resistors, (see previous post) the value read by the ATMEGA should be:

val = 1024 * b * 4700 / (47000 + (b * 4700)); 
 
Where "b" is the button pressed

As long as the Bias and Switch Resistors have a fixed ratio (in this case 10:1), they can be factored-out to leave a much smaller function:

val = 1024 * b / (10 + b);

The biggest disadvantage of using an algorithm is; it can NOT easily be tweaked to solve a resistive tolerance problems - the moral of the story, use good resistors and pay attention to the Bias source for the network and the ATMEGA contained ADC's.


-- Home Page: https://WA0UWH.blogspot.com

Saturday, September 27, 2014

Minima - Proposed Rotary Encoder Circuit

This is just a proposal, the final suggested circuit maybe somewhat different, this is a excerpt, with additions, from a previous post.

My current experimental Encoder software works very smooth with this circuit. Whit a little more testing, it will be published on GitHub soon.

My goal is to be as compatible with the Original Minima as possible.


The following circuit should be added to the Minima to implement a Rotary Encoder and
Multiple Push-Button Switches parallel to the original FN Switch. The original
Tuning POT has been removed to accommodate the Encoder.

--------+
Arduino |
        |
   AVCC |
   pin20|--------+---1K---- +5V
        |        |                       +--------4K7-----+
        |        = 100nF                 |                |
        |        |                       |   +--------+   |
        |        G                       +---|B      C|---+--------------------+
 Tune A2|                              G-----|G  ENC  |                        |
   pin25|--------+---------------------------|A      G|---+                    |
        |        |                           +--------+   |                    |
        |        = 1nF                                    G                    |
        |        |                                                             |
        |        G                                                             |
   AREF |                                                                      |
   pin21|----+-------+                                                         |
        |    |       |                                                         |
        |    |       = 100nF                                                   |
        |    |       |                                                         |
        |    |       G                                                         |
        |   47K                                                                |
        |    |                                                                 |
        |    |                                                                 |
        |    |                                                                 |
    PC3 |    |                                                                 |
   pin26|----+-----+---4K7---+---4K7---+---4K7---+---4K7---+---4K7---+---4K7---+
        |    |     |         |         |         |         |         |         |
        |   FNS    = 1nF     S         S         S         S         S         S
   AGND |    |     |         |         |         |         |         |         |
   pin22|----+-----+---------+---------+---------+---------+---------+---------+
        |    |
--------+    G

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


Where:
  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
    G is a ground and AGND
  ENC is the Rotary Encoder with Push Button

Note: The Encoder pins A and B, can be exchanged to reverse the Encoders electrical rotation.

-


More info to follow.

--

Encoder Internals

Just for fun, here are some Rotary Encoder internal details.

Switch Slider and Detent Ball Rotary Switch Mechanism Switch Contacts
Slight Detents can be seen in the edge of the white plastic insulator next to the Detent Ball. The ball is held against the plastic via a spring clip.


-- Home Page: https://WA0UWH.blogspot.com

Friday, September 26, 2014

Minima - With An Encoder

UPDATED: Sep 27, 2014 15:06


An Encoder for the Minima

For the last few days I have been experimenting with three or four implementations to replace the Tuning POT with a Quadrature Encoder (Encoder for short) on the Minima. The implementations range from "Proper" to "Economical". Where "Proper" requires circuit modification and "Most Economical" is 100% compatible with Farhan's original circuit as published. I have experimented and tested each of these solutions, with better than expected results.

The range of solutions each have their pro's and con's.

With exception of adding a simple resistor chain and push-button switches, my overall goals has been to stay compatible (as much as possible) with Farhan's original Minima.

Background
Rotary Encoders

The advantage of a Encoder vs a POT for tuning is that the Encoder does not have "stops" at the extremes, and therefore it is easier to use as re-centering is not necessary.

A typical Encoder internally consists of two switches that turn ON and OFF in sequence when rotated, the sequence can be detected and therefore used to determine the direction of user knob twist.

The switches are connected to Pins Labelled "A" and "B", a third pin "G" is a common to both (normally connect to ground). The switches are normally "open" when the knob is in the detent rest position. Most Encoder also contain a push-button switch labelled "C", which can be used by software to effect mode changes.

Inexpensive ($2 to $5) Encoder are available on Ebay and Electronic Supply houses (Mouser). These inexpensive encoders typically have 16 to 24 detents per knob revolution. Expensive Encoders (>$60) are typically optical and have >200 detents (or pulses) per knob revolution. For the Minima, I suggest the inexpensive Encoders.

I have used Rotary Encoders in several of my previous projects.

Note: for all Encoders, pins "A" and "B" can be connected in reverse to correct direction of rotation.

Now for some proposed implementation details

A Proper Implementation

A "Proper" Encoder circuit requires two (or three, if push-button is used) dedicated I/O line from the microprocessor. At least one of the two lines should be connected to an I/O pin that is configured for Interrupts. When the Encoder is turned, the direction and magnitude can be determined. Software can be written to use this information to change Frequencies, or select Menus, or etc, etc.

Because the original Minima does NOT have extra I/O pin available, modification of the original circuit is necessary to use a "Proper" encoder implementation. To free up some I/O pins, a typical modification include moving the LCD Display to I2C via an inexpensive "BackPack". But this has it own problems, as the Minima currently uses the I2C pins to control the Si570 VFO. The Si570 is a 3.3volt device and the BackPacks are typically a 5.0volt device. The voltage disparity can be alleviated via the addition of a resistor network and/or an I2C Expander (details are not included).

To used this "Proper" configuration, Interrupt Software and Encoder Libraries need to be downloaded and included to be compiled into the Minima Sketch. This included software and libraries uses precious space that could be used for other functionality.

The major advantage is responsiveness of the Encoder and with little or no adverse reaction on other hardware elements. The accumulated magnitude of the interrupts can be used to implement a type of inertia feel, found with normal radio dials.

A Modified Proper Implementation

A modified version of "Proper" implementation is the same as above, except the Interrupt and Encoder Libraries are not used. Software Polling of the Encoder I/O lines is used to get the rotation valuses. On the surface, this may seem unacceptable, but in practice the Sketch's Idle Display Loop is quick enough to display changing digits faster than the eye can see and therefore polling fast enough to be usable.

The disadvantage of this implementation is that Polling is necessary and any stupid delays within the Idle Loop will adversely effect over all performance. Programmed Idle loop delays should be avoided. With polling, magnitude accumulation is slower and therefore it is more difficult to implement an inertia dial feel.

Special code that runs outside of the normal Idle Display Loop has to accommodate Encoder polling. My implementation of Beacons come to mind.

An Economical Implementation

A modified Minima that uses my suggested Resistive Chain Push-button switches can be easily augmented to use an Encoder.

The POT is removed. The "A" pin of the Encoder is connected to the POT's abandoned processor connection (pin A2).  The Encoder's pin "C" (the push-button) is connected across (or replace) button 7.  The Encoder's pin "B" is connected to Encoder pin "C" with a 4.7K ohm resistor.

Note: a better description and diagram will be published later.

This may seem to be a strange configuration, but when the Encoder is being turned, the "FN" button is not typically being used. And, when the "FN" button (or any button) is be pressed the Encoder is not being twisted. Software can detect this and do the right thing.

Experiments, and in practice, has shown that this works very well.

This will probably be my first published implementation. To avoid Interrupt Software and Encoder Libraries, polling software (with its small code space requirement) will be used to detect the Encoder rotation.

The goal will be to eventually publish all implementation with conditional compile flags that the user can select.


The Most Economical Implementation

Farhan's original Minima circuit can be made to work with an Encoder with only slight modification. Similar to above, the POT is removed. The "A" pin of the Encoder is connected to the POT's abandoned processor connection.   The Encoder's pin "C" (the push-button) is connected across the "FN" button.  The Encoder pin "B" pin is connected to Encoder pin "C" with a 4.7K ohm resistor.

This may seem to be a strange configuration, but as stated above, it works.

Software changes are necessary to decode and use this configuration, but the results will be the same as original. Or better yet , the software can be improved to not require re-centering of the dial before reverse tuning can be effected.

Theoretically, an original Minima could be built with only a Display and an Encoder Knob on the face plate, this is because the FN button is contained within the Encoder.

As time permits, and if desired, I may publish this software implementation.

Stay Tuned

More information will follow.


-- Home Page: https://WA0UWH.blogspot.com

Friday, September 19, 2014

Decapping a Small CFPX-5 Crystal

In preparation for building the "Smaller Bandpass Filter" (see previous post), I wanted to see how these very small Crystals are made. The crystals packages CFPX-5 measures 3.2 x 2.5 mm, the actual contained crystal must be very-very small.

I had a spare 16MHz Crystal that was sacrificed to satisfy my curiosity.  I removed the lid by grinding away the at the edges.

3.2 x 2.5 mm 16MHz Crystal
For scale, the edge of a Dime is shown.

The photo shows the small crystal chip inside of a cavity supported by two gold plated corners on two gold rounded mounds. The electrical connection appears to be just a gold-on-gold contact, with a dab of silicone on each terminal for shock mount. The other end is free floating without support.
3.3 x 2.5 mm 16MHz Crystal
In my efforts to DECAP the lid, I broke the crystal, as can be seen in the photo, the crack runs from upper right to lower mid. On inspection of the edge of the fracture, the crystal appear to be thick in the middle and thin on the edges. Perhaps etching is used to adjust to published tolerance.

I an not sure that I can expect much from these when used is a multiple crystal Bandpass Filter, but it will be a fun experiment. I expect too much drive level will be the biggest concern. As per Farhan's original circuit, I will use 8 of these to build the filter.

--

Thursday, September 11, 2014

Minima - Smaller Bandpass Filter

OK, ok, . . . I have NOT finished my Minima Audio Modules yet,  . . . What am I doing designing another RF circuit?

Well, I like RF circuits, and not so much for Audio Circuits. As I have stated before, the audio Capacitors are too big for my liking and building interests.

This new RF circuit is a Trial Bandpass Filter using very-VERY small crystals (2x2.5mm). I know, small SMT crystals may not perform well as a Bandpass Filter, but I could not pass up the chance to experiment with them.

My first Minima Bandpass Filter is 1x2 inches (2 sq inches).

My Original Minima Bandpass Filter Module
The new Filter will only be 0.8x1 inches (0.8 sq inch).
New Smaller Bandpass Filter
About 2.5 times smaller than the Original
The boards are on order from OshPark.com, three boards will only be $4.00.

I am not sure this will work well for the Minima Bandpass Filter, but it will be a fun experiment and, I really enjoy small projects.


-- Home Page: https://WA0UWH.blogspot.com

Monday, September 8, 2014

Minima - Wayne's Build

Sunday I had a chance to work with Jeff - KO7M via Skype for a few hours. He has the loan of Wayne's (NB6M) Minima Transceiver for a few weeks while Wayne is on vacation - Thanks Wayne.

A large part of the discussion was about "How to Use Git and GitHub" for software development.

Wayne's Mimima
Afterwards, we decided to try to update Wayne's Minima to my latest Alternate Tuning Method transceiver control code. Wayne had previously downloaded and was using a much older copy of my code. The older copy did NOT have many of the NEW and current features and functions. Our goal was to exercise these new features on Wayne's hardware.

When we first downloaded my NEW Revision, Wayne's Minima went NUTS, with a loud Buzzing sound on all frequencies.

We reinstalled the old software and the Buzz went away.

Something that I had done over the last few weeks has made my software almost useless. With a little work, and via the process of elimination (removing sections of code), Jeff was able to track down the offending routine.

I had inappropriately moved two of the PTT Pin Initialization Statements to within the main TX/RX Idle Loop. This pin is also used to control the TX/RX relay. Rapid re-initialization of the PTT pin was producing hash that the receiver was picking up. Removing the two nu-necessary and redundant statements solved the problem. Initialization of the PTT pin is now done between Receive and Transmit and then when switched back.

The GitHub copy has now been updated.

While we had Wayne's Minima NOW working so well with the new updated code, I wanted to exercise each of the new functions. Wayne does not yet have a "seventh" push button installed, and therefore we had to use a jumper wire as a switch to access some of the functions. For the full list of new functions that I have added to Farhan's original Minima code, see Link. Everything worked better than expected - I am a Happy Camper.

One of my main interest was to see how well the CW ID and MACRO's worked, and how well the QRSS Beacon worked. They actually worked much better than expected!!

The Non-Volatile Save and Load of User Memories worked as expected. Dial Calibration for both USB and LSB was an easy task.

Over the next few weeks, Jeff will be introducing some new hardware support and functionality for the Minima. He has plans for multiple Si570's (VFO and BFO), other I2C Displays and more. See his blog at: http://ko7m.blogspot.com/search/label/Minima.

Contributing to the Minima Hardware and Software has been a very rewarding and interesting project, . . . Thanks, Farhan.


-- Home Page: https://WA0UWH.blogspot.com

Sunday, August 24, 2014

Minima - Planned Panel

Some design progress

Along with my Minima LAB modules (see previous post) I plan to actually build a Minima Transceiver.

This is what I think the front panel will look like. It will be created on brushed double sided copper clad PCB material with nomenclature applied via the Toner Transfer Method. A light protective layer of shellac (or varnish) will be applied.

The rest of the chassis will be double sided copper clad PCB material also.

I take inspiration from Dave's - AA7EE wonderful Chassis that he has built for his projects. His blog is a must-see! . . . I can only hope to be maybe 10% as artful.

My Minima - Planned Panel
Note: A front panel PTT Button may not be necessary depending on the Mic/Phone/Headset used. But, when the switch is absent within the Mic, the panel PTT can be used.

The Reset Button will be mounted on the back of the chassis.

--

Wednesday, August 20, 2014

Minima - Split Operation

For the last few days I have been finalizing the last little bits of code necessary to implement "Split Operation".  I had a bug that just eluded my understanding, I just could NOT see the "forest" for the "trees".

To get another set of eyes on it, I ask Jeff - KO7M to take a look. I sent him the code files and we chatted a few minutes before he left work and was heading home. AND THEN, WHILE DRIVING home we chatted some more on his cell, he was debugging the Sketch from memory !

I guess that is one of the great skills he learned when doing similar software consulting for many years at Microsoft.

I do not know how he does it. As always, he zeroed right in to the problem, we found the fault and I had a solution before he got home.

A few minutes to rewrite a few line, and the problem was solved.

So now, "Split Operation" works on the Minima using my "Alternate Tuning Method". See previous posts for details.

While in "Split Mode" the "A:" VFO is displayed as "a:", similar for "B:" is "b:".

The Displayed VFO is always Receive frequency, while the "other" VFO is used for Transmit.  Regardless, the system will only allow Transmit within the Ham Bands.

Thanks, Jeff !

--

Saturday, August 16, 2014

Minima - My Audio Chain

My Minima Build is still progressing slowly, I have received the audio modules back form OSHPark.com and now doing a trial mock-up (fit) with the Audio Mother Board.

As with all of my Minima Build, it is being produced in modules, so that they can be replaced with other experimental circuits. This is NOT the most economical or desirable building technique for producing a working radio. But, for my LAB experiments this is the most flexible.
My Minima - Audio Modules
From far to near, the modules are:
  • Side Tone Oscillator
  • Mic Pre-Amp
  • Relay Control
  • Receiver Audio Pre-Amp
  • Audio Power Amp
  • Power Supply and Regulator
Each of the module's PCB are about 1 inch square and the cost for each is about $5 (for 3 copies) at OSHPark.com.  I am looking for shorter header or sockets for the final assembly.

The Audio Mother Board has all of the I/O to support the modules.

Unfortunately, OSHPark is trying out some new faster production processes which my board were a part of, the silk screen image as received was not clipped at the copper pads, as it should have been.  OSHPark is now in the process of  producing new replacement boards.

--

Minima - One Builders Success

John - MI0DFG
For the last few months I have been working with John - MI0DFG while programming and testing new operational options for the Minima Transceiver Controller.

John is an avid Hardware Builder and he has produced some very impressive Homebrew equipment. My Minima hardware build is still in progress. While developing the Alternate Tuning Method for the Minima, John has been willing to test a few of my program modification.

Because John is 8 time zones away, we have been communicating via e-mail, and only recently via skyp.

John has provided photos of his build which includes the RF386 Power Amp - very impressive! 

Jeff - KO7M and I put them together into this Video.


The build is very impressive, and the resulting receiver audio performance is also impressive.

Thanks, John and Farhan.


Note: Permission was granted to make and publish this video. Although inconvenienced, NO electrons were harmed and were returned to their origin during the filming and audio recording :-)

--

Wednesday, August 13, 2014

Git and GitHub - For Sotfware Development

Beware, this post may be contagious.

My confession: over the last few weeks I have become a "Git and GitHub Junkie" !

During my work career I have used several Software Development Tools. Most have had some sort of Revision Control, the simplest is no control at all, where files are backed up by the user. Others automate the process, and provide tools to allow the user to see the difference between revisions. In general, most just document the time line of a software project and provide a snap shot of the project when requested. That is, they provide a one dimensional view of a software project.

As an analogy comparison, Git and GitHub provides a three dimensional view or "branches" to a software project. Where simultaneous branches are used for; Development, Experimentation, Patches, HotFixes, and Deployment,  all from within one software project environment. When complete, branches can be merged to update the project, history is maintained for project completeness.

The "GitHub" is the network accessible repository, where others can access your published project.

The "Git"  is the local environment on your computer, where the actual work is typically done. There are command-line and GUI window operations to control the local software development, and which all work with most program development/editor tools.

When necessary, local Git Tools provide means to transfer status and data to-or-from the networked "GitHub". Internally and during transfers, Git and GitHub protects the data from corruption and miss handling with sophisticated cryptographic methods. The use of cryptographic methods is NOT for obscuration nor security, but is simply used to maintain data integrity. What goes into the network or local repository, will come out exactly as it went in.

Each view of a project is call a "branch", Git provides (almost) simultaneous views of a software project. For the developer, a simple command switches between branches.

Typical Local Developer commands are as follows, my linux command-line alases are shown within parentheses, "()":
  • List the current branches = (gbr), git branch 
  • Switch branches = (gco ...), git checkout <branch name>
  • Create a new branch (clone of current) = (gco -b ...), git checkout -b <a new branch name>
  • Save current branch edits = (gci ...), git commit -a -m "A quick note that is saved in history"
  • Merge another branch with the current = (gmg ...), git merge <other branch name>
  • Get current status = (gst), git status 
  • Upload to the GitHub = (gpu ...), git push --all
  • To get Help = git --help

There are other commands that do more sophisticated things, but the basics as listed above will do most things for a new user.

Branches can be named anything, but typical branch names are: "Release", "Dev" (development), "HotFix", "Exp" (experimental). These are then divided into yet other branches to support actual development effort.

For example; When HotFix1234 is finished, it would be merged into HotFix, which could be merged into Dev, and which would ultimatly be merged into Release at the appropriate time. Note: Multiple HotFixNN's could be worked on at the same time, if they effect different sections of code, they will merge without conflicts, otherwise the conflicts will need to be resolved during the merge process. Tools are available to assist with conflict resolution.

My GitHub repository is https://github.com/wa0uwh, over time more software projects will be included.

My current Git software project is "Minima - Alternate Tuning Method" (see previous posts).


Yes,  . . . I am a Git and GitHub Junkie,  . . . and with help,   I am finally willing to admit it !!

--

Wednesday, August 6, 2014

Minima - My Button Help Text

UPDATED: Aug 8, 2014 15:49
UPDATED: Aug 9, 2014 16:51
UPDATED: Aug 10, 2014 17:05
UPDATED: Aug 17, 2014 02:03
UPDATED: Aug 20, 2014 22:01
UPDATED: Aug 29, 2014 13:02
UPDATED: Sep 23, 2014 10:04 

My Minima Controller Alternate Tuning Method Help Text


Tuning Knob Operations, used for both Frequency and RIT

   Tuning POT = Incremental Near Center
   Tuning POT = Auto Increment Near Extremes
   Tuning POT = Faster Auto Increment At Extremes


Button Operations

   Btn1 is the original Minima FN Button
   Btn2-Btn7 are added, see: http://goo.gl/Ca1JUz


   Btn1 Single_Press = Toggles: RIT Mode ON/OFF 
   Btn1 Double_Press = Swap A/B VFO's, Cancels any Pending Edit-IF-Freq 
   Btn1   Long_Press = VFO Copy, A>B or B>A
 
   Btn2 Single_Press =  Left, Move Frequency Cursor 
   Btn3 Single_Press = Right, Move Frequency Cursor
 
   Btn4 Single_Press = Select: USB, LSB, or Auto USB (default) 
   Btn4 Double_Press = Loads User-Preferences from Non-Volatile Memory
   Btn4   Long_Press = Saves User-Preferences  to  Non-Volatile Memory
   Btn4  Alt_PressFN = Toggles: Split Operation ON/OFF
   Btn4  Alt_PressLF_CUR = Starts CW Macro MSG1, Key down to abort
   Btn4  Alt_PressRT_CUR = Starts CW Macro MSG2, Key down to abort
 
   Btn5 Single_Press =   Up, Change HAM Band (saves current Freq and SSB Mode) 
   Btn6 Single_Press = Down, Change HAM Band (saves current Freq and SSB Mode)
 
   Btn7 Single_Press = Toggles: Tune/Cursor-Move Mode
   Btn7 Double_Press = Toggles: Menu Mode
   Btn7   Long_Press = Display, and Edit IF-Freq, Saves IF-Freq
   Btn7  Alt_PressLF = Toggles: Tune 2500Hz Mode ON/OFF
   Btn7  Alt_PressLF_CUR = Starts QRSS Beacon Macro MSG1, Key down to abort
   Btn7  Alt_PressRT_CUR = Starts QRSS Beacon Macro MSG2, Key down to abort

   Where: 
       "Alt_PressFN" = First press a BtnN (while holding) quickly press FN and
                          release FN, then release BtnN

       "Alt_PressLT" = First press a BtnN (while holding) quickly press LEFT and
                          release LEFT, then release BtnN

       "Alt_PressRT" = Similar to LEFT
 
       "Alt_PressLT_CUR" = First press a BtnN (while holding) quickly press LEFT-Cursor and
                          release LEFT-Cursor, then release BtnN

       "Alt_PressRT_CUR" = Similar to LEFT-Cursor


IF Frequency Adjustment (Dial Calibration)

    1. Select a Sideband
    2. Adjust VFO Display to the expected Zero Beat Frequency of a Standard
    3. Long-Press btn7
    4. Zero Beat, adjust as necessary with the Cursor and Dial, or the RIT
    5. To Complete Calibration, Long-Press btn7 (or, to abort IF CAL - Double-Press FN)
    6. To Save to Non-Volatile Memory Double-Press btn4
    7. Do the same for the other Sideband


User-Preferences

   The Current Saved/Loaded User-Preference Include:

       The Current Band, Frequency and Sideband Selection
       The Last Frequency and Sideband used within each Ham Bands
       USB and LSB IF-Freq Adjustments
       The Current VFO "A/B" (or "I" if in  IF-Freq Edit Mode)

   Excluded from User-Preferences Save/Load are:

       RIT
       Cursor Position

   The goal of saved User-Preferences is to return the Receiver
   to a previously saved configuration at the next Power-ON or Processor Reset.
 

Factory Reset = Holding any Button at Power-ON or Processor Reset.

   Note: previously saved User-Preference can be re-loaded with another
   Power-ON, Reset, or with the Load Button.


Error and Status Messages

   Load Fail = The internal Non-Volatile ID does not match the current Rev
   of the Save/Load code, please re-save User-Preferences.

   Load Fail CSum = The internal Check-Sum of the Non-Volatile Memory does
   not match as expected, please re-save User-Preferences.

   Loading nnnB = This is the size of the User-Preferences Loaded
      from Non-Volatile Memory.

   Storing nnnB = This is the size of the User-Preferences Saved
      to Non-Volatile Memory.



Note: When the IF Frequency is Set to Zero, the Controller can be used as a handy signal source. The software is available at:


The Development (Dev) Respository is available at:


This list will be updated as the Controller Software changes.

--

Tuesday, August 5, 2014

Minima - Software Progress 2

Current State

Updated: Aug 7, 2014 11:26
Updated: Aug 9, 2014 18:32
Updated: Aug 14, 2014 18:20
Updated: Aug 20, 2014 21:59
Updated: Sep 1, 2014 06:44
Updated: Sep 23, 2014 10:12

See the next post for help text, and here for a users successful build.

The additional functions that my Minima Alternate Tuning Method Repository provides are as following.
  • High resolution, plus/minus 1Hz Tuning (thanks to Jeff - KO7M).
  • Near Normal Dial Tuning Method as found on most Dial Radio system.
  • Support for six additional buttons
  • 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
  • Two Memories for each Band, implemented and saved as "A" and "B" VFO
  • RF386 Power Amplifier Filter Selection via generated clock pulses on PD7 (pin13).  Note: It works now, with new revised timing pulses.
  • Tuning by 2500Hz Steps (similar to FT-817, mode set via button 7)
  • Re-Center Tuning Knob while any Button, Key, or PTT is pressed, without changing the Freq
  • RIT Mode, implemented as +-990Hz in 10Hz Steps
  • Limit TX to within the Ham Bands (currently, the user must control Sidebands out side of the Ham Bands)
  • Include Jeff -KO7M Si570 Driver "Tuning Click Fix"
  • Frequency Dial Calibration via IF Frequency Adjustment
  • IF Configuration and Adjustments
  • On demand, save user specified Band Memories into non-volatile memory, and retrieved on power up.
  • Factory Reset - By Holding any Button at Power-ON or Processor Reset
  • Split, 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 Split operations is legal on HF?)
  • Automatic CW ID and/or CW CQ Calling Memories.
  • Two CW Macros and Two QRSS Macros Beacon
  • User Preference Menu Edit Mode
The software can be access at:


Some Plans

Additional functions that are currently being planned, are:
  • Implement option for UK Band Limits and Default Frequencies

Long Term Plans

Some longer term implementation ideas include:
  • Implement 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.
  • etc, etc
--

Monday, August 4, 2014

Minima - RIT Funciton

I have implemented the RIT funciton for my Minima Controller. It works extremely well.

When RIT (FN) mode is ON, the display shows:
  • A:03.985000+000
  • LSB  RX RDY 
Where the RIT is the three digits to the right. During Transmit, the RIT digits are removed, as:
  • A:03.985000
  • LSB  TX RDY 
While in the RIT mode, turning the tuning knob changes just the RIT digits, +-990Hz in 10Hz steps.

For testing I used 3.985MHz so that the addition of the LO at 20MHz can be heard on my HF receiver as 23.985MHz. And, the default frequency on my Alternate Tuning Method Minima Controller for 80m is 3.985MHz.

RIT can be turned ON/OFF with a simple press of the FN button.

--

Sunday, August 3, 2014

Minima - Software Progress

With a now working Minima Controller board (see previous post), I can continue software development and test.

I have just added the following functions to my Minima GitHub Repository:
  • Tuning by 2500Hz Steps (mode set via button 7)
  • Re-Center Tuning Knob while any button is pressed, without changing the Freq

I now have working, but not officially published:
  • RIT is working as expected (tested via the Si570 RF output)
  • Limit TX to within the Ham Bands (currently, the user must control Sidebands out side of the Ham Bands)

The above new functions are added to the current list:
  • 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)
More clean up and testing is needed.

--

Minima - Good Progress

After a long late night working with Jeff - KO7M,  trying to fix my Minima Controller board, I finally gave up and went to bed.

About two hours of trying to sleep it dawned on me what was wrong, I got up and fixed the problem within a few minutes - Progress.

The initial problem was I had inadvertently ordered and installed the wrong Atmega328 part. The part that I installed is the "Atmega328-MU" and the desired part is the "Atmega328P-MU", the internal ID's were different, which confused me,  the Arduino IDE, and Avrdude. After modifying a few files, all worked as expected. I set "fuses", downloaded the bootloader, and downloaded the Minima Sketch. All is well.

The "P" in the product number indicate a "picopower" device, which is what all of the Minima builders are using. Actually, the builders are using the "Atmega328P-PU", the "P" in  "-PU" designates a Dual-Inline-Plastic package. Because I am building my Minima with very small parts, I am using the "-MU" package.

To avoid having a special configuration for my Minima build, I plan on ordering the correct "-MU" part.

Thanks to all those that have provided Comments, e-mails, and Assistance with this problem, a special thanks goes to Jeff for staying up very late at night on a Chat window.

Note: This morning, I also recovered my original damaged Minima Controller board, using the same strategy. Now I have two !!



UPDATE: Aug 3, 2014 22:26

For future reference, I used the following to "jump start" my new raw Atmega328-MU:
  • I changed the ID for the m328p to "m328" in the "/etc/avrdude.conf" file
  • avrdude -F -b 19200 -c usbtiny -p m328 -v -e -U efuse:w:0x05:m -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m
  • See: http://www.codingwithcody.com/2011/04/arduino-default-fuse-settings/
  • Used Arduino IDE to download the UNO bootloader
  • Changed the ID for the m328 in the "avrdude.conf" file, back to the original
  • Used the Arduion IDE to download a Sketch
  • Note: Arduino IDE does not use /etc/avrdude.conf, it uses its own conf file.
--

Saturday, August 2, 2014

Minima - Very Little Progress

The lack of posting on my part does not mean that I have not be very actively working on my Minima Controller.

I received from OSHPark.com the replacement boards for my damaged Minimal Controller. I loaded the board with as few components as necessary to install the bootloader and verify the microprocessor's operation.

That is were I have been STUCK for the last few days.

The "out of the box" ATMEGA328P-MU does not contain a bootloader and does not appear to be able to converse with my USBTinyISP for installing the bootloader.

The Original Board with
Microprocessor and Crystal
The "-MU" version for the microprocessor solders directly to the PCB, along with its attending (and very small) crystal. The processor works or it doesn't, trouble shooting is very difficult because each can NOT be easily replaced with known good parts, and a short under the part means it removal just for the inspection.

For the new board, I have replaced each part with "package fresh" parts, but with the same results. If I had used the much larger DIP version of the microprocessor, this would have been a no-brainer repair. The DIP version would have been removed and then place into an Arduino-UNO and programmed as per the documentation.

But I still like the challenge of using the very smallest parts that are available, and this has been a challenge.

My original Minima Controller exhibited a similar "brain dead" behaviour when I first turned it ON. But while stumbling around trying different things, it some how got into the correct state and accepted the bootloader. I do not know or understand the events that lead to success.

The ATMEGA328 has what are called "fuses" to configure its operational states. These fuses once set, stay set, and affects further operation. One of the fuses configurers the Clock, which is necessary to run at 16MHz from the crystal, otherwise the Clock runs at a much slower speed via an internal RC clock.  I suspect that my new microprocessors are running a the slow speed and therefore unable to accept my bootloader from the Arduino IDE.
 
The previous board was damage, but with the aid of the microscope and some very intense micro soldering, I think I have repaired the damage. But alas, the newly installed replacement processor is behaving exactly as that of the new board (at least the two board are consistent). I just need to find the "Magic" that will allow them to accept the bootloader.

Jeff - KO7M, has been providing suggestions to help with my problem. So far nothing has worked.

Once the bootloader is accepted, programming the Minima Controller via the Arduino IDE is a breeze.

Hopefully, good news will follow.

--

Tuesday, July 22, 2014

Minima - Programming

UPDATED: Aug 14, 2014 15:58


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 - DONE
  • Tuning 2500 Hz Steps, similar to FT-817 left knob. Note: most SSB stations are spaced 2500 Hz apart as seen on most waterfalls. - DONE

Some Plans

Additional functions that are currently being planned, are:
  • Two Memories for each band, implemented and saved as "A" and "B" VFO - DONE
  • Plus or minus 990 Hz RIT with 10 Hz resolution - DONE
  • 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?) - DONE
  • Transmit enabled only within the nine Ham Bands (Note: due to complexity, 60m band is not currently planned) - DONE

Long Term Plans

Some longer term implementation ideas include:
  • Frequency Dial Calibration - DONE
  • IF Configuration and Adjustments - DONE
  • On demand, save user specified Band Memories into non-volatile memory,  and retrieved on power up. - DONE
  • Implement a simple Menu System for user specified function and modes.
  • Implement simple automatic CW ID and CW CQ Calling Memories. - DONE
  • Implement QRSS, WSPR, and PropNET Transmit Beacon modes. QRSS - DONE
  • 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. - DONE
  • 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).

Implementation

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 -
AB7YL
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

Updated with 3D Model Link, see below.

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.

My 3D Model Library

To promote the use of 3D Models in Published Documents I will share all of my 3D Models, the following Dropbox link is my "working and storage" space for my Electronic Parts.


Feel free to use my 3D Models as you like, but if they are used in your Published Documentation, please give me credit.

--

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!"));
printLine2(c);



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:

http://electronics4dogs.blogspot.com/2010/12/simple-way-how-to-use-progmem.html

I wished I have found this link long ago.


--