Tuesday, December 23, 2014

Arduino EEPROM - Power Trip

I've continued to work on the rocket telemetry platform. One of my last issues (beyond frying my Nano by back-feeding power) was that the combination of GPS + IMU + microSD card was simply consuming more power than the little Nano could produce. Right now I'm working on a small instrument package for a model rocket payload, so I really didn't want to go to all the trouble of adding a power regulator and such.

Well, since I fried my nano and missed the launch date anyhow, that gave me some time to noodle over the issue. In reading one of my Arduino books (Exploring Arduino, by Jeremy Blum), I came across a discussion of EEPROMs. That led to a fair amount of research and I ultimately concluded that, for a rocket, using an EEPROM is a great idea!

What is an EEPROM? 

An EEPROM chip is a small non-volatile memory chip. Each Arduino has between 512k and 1024k EEPROM built in, and it's rarely ever used. For less than $5, you can buy an external EEPROM and use it for the same purpose, and the external EEPROMs are generally larger (I bought an 8k RCA chip from Ballard Supply (which just happens to be in my home town). I haven't used the chip yet, but the onboard EEPROM has worked like a charm.

This will work great for a rocket project, where I am gathering minimal telemetry data and the flight is short. For the balloon platform, I'm still planning to use the microSD reader along with a Mega - more memory, more expansion.

What's in a Structure?

With the storage issue solved, at least partly, my next challenge was writing data to the card. The built-in EEPROM.h library is a byte-by-byte read/write tool, and the data I'm storing is variable in length and format so I was stumped by how I could store and retrieve that data. My original thought was to store it as a long string, which is how I planned to do it with the microSD card. The challenge was that the string length would vary as numbers had more or fewer digits. Plus, building strings on Arduino can suck up memory. And along came... the struct. I've never really messed with structs before, but they are a sort of 'uber' datatype, which contains data within. In essences, it is a complex data type which includes datatypes within.

A struct looks something like this:
// Struct for storing a blog of data
struct store_t {
    float gpsLat, gpsLon;
    float gpsSpeed, gpsAlt;
    float imuX, imuY, imuZ;
    float imuPress, imuAlt;
  } storeBlob;

With the EEPROManywhere library from Arduino Playground, I can actually write an entire struct directly into the EEPROM. No mess, no fuss, no pointers or array indeces. Just write and read.

Writing to the EEPROM

With some research in the Adafruit GPS library, I realized every bit of data I'm writing is a float and, since floats have fixed length, my struct is a predictable 36 bytes, every single time. That means I have a predictable length and, therefore, a predictable starting point to read the next struct.

With a struct of 36 bytes, I can write 28 'blobs' to the Arduino's internal EEPROM, and 227 blobs to an 8K EEPROM chip. I anticipate about a 30-second flight, so I could write 7 times per second (if the Arduino could keep up). I intend to write 2 times per second, not much more.

Reading from the EEPROM

The EEPROManything library is dirt-easy to use. To write, you give it a starting location and the object (struct, in my case). To read, give it a starting location and an object to store the result in (again, a struct). So writing looks like this:
EEPROM_writeAnything(0,storeBlob);

And reading looks like this
EEPROM_readAnything(0,storeBlob);

The only challenge in all of this will be to keep track of the starting point, but it's actually straightforward, just have to careful of 0-based indexing.

Test Code

Here is some test code for writing and reading:
#include <EEPROManything.h>
#include <EEPROM.h>


// Struct for storing a blog of data
struct store_t {
    float gpsLat, gpsLon;
    float gpsSpeed, gpsAlt;
    float imuX, imuY, imuZ;
    float imuPress, imuAlt;
  } storeBlob;
  
  
void setup ()
{
  Serial.begin(9600);
  Serial.println ("Creating storeBlob");
  storeBlob.gpsLat = 4026.1162;
  storeBlob.gpsLon = 11202.8095;
  storeBlob.gpsSpeed = 141.2;
  storeBlob.gpsAlt = 1506.80;
  storeBlob.imuX = 13.2;
  storeBlob.imuY = 4.2;
  storeBlob.imuZ = 97.9;
  storeBlob.imuPress = 847.69;
  storeBlob.imuAlt = 1547.39;
  
  // Calculate length
  Serial.print("storeBlob length:" ); Serial.println(sizeof(storeBlob));
  
  // Now write to EEPROM
  Serial.println (EEPROM_writeAnything(0,storeBlob));
}

void loop ()
{
  
}



#include <EEPROManything.h>
#include <EEPROM.h>


// Struct for storing a blog of data
struct store_t {
    float gpsLat, gpsLon;
    float gpsSpeed, gpsAlt;
    float imuX, imuY, imuZ;
    float imuPress, imuAlt;
  } storeBlob;
  
  
void setup ()
{
  Serial.begin(9600);
  Serial.println ("Reading storeBlob");
  
  // Read from EEPROM
  EEPROM_readAnything(0,storeBlob);
  
  // Write to screen
  Serial.print("Lat:.. ");  Serial.println(storeBlob.gpsLat);
  Serial.print("Lon:.. ");  Serial.println(storeBlob.gpsLon);
  Serial.print("Speed: ");  Serial.println(storeBlob.gpsSpeed);
  Serial.print("Alt:.. ");  Serial.println(storeBlob.gpsAlt);
  Serial.print("X:.... ");  Serial.println(storeBlob.imuX);
  Serial.print("Y:.... ");  Serial.println(storeBlob.imuY);
  Serial.print("Z:.... ");  Serial.println(storeBlob.imuZ);
  Serial.print("Press: ");  Serial.println(storeBlob.imuPress);
  Serial.print("Alt:...");  Serial.println(storeBlob.imuAlt);
}

void loop ()
{
  
}

Saturday, November 15, 2014

GAPA Launch Facility

We took our Scout troop to the GAPA launch facility in northwestern Utah. The facility is reached by taking I-80 to exit 81, backtracking about a mile on a frontage road, then turning left. The site is snug up behind "Clean Harbor" which bills themselves as a waste management company.

What is GAPA?

In the late 50's the US Air Force tested surface-to-air missiles known as "Ground to Air Pilot-less Aircraft" build and designed by Boeing. Boeing built the GAPA launch site, which is now a Utah Historic SIte and on the national register of historic places. The site is on Bureau of Land Management land, although we did need special permission to camp there due to the historic status of the site.
Utah Historic Site Sign

Launch Bunker

 The site consists of a small bunker, which has been damaged by vandals (apparently someone exploded a large charge inside, blowing out the door and shattering the windows) and what remains of a launch tower: the pad and a few bolts for the towers.

Launch Pad

Tower Stanchion in Foreground

Panoramic view: there is NOTHING out here

Launching Rockets

We woke this morning to 28 degrees, a skiff of snow, and a stiff wind. We ended up scrubbing the launch but we had a nice trip anyhow!

Just a little snow

Tuesday, November 11, 2014

Ultimate Telemetry Platform

I have been working for the past 4 years, off and on, on building the ultimate telemetry platform for rockets and balloons. I started originally with a set of stackable Arduino shields - GPS, SD card, etc. Over the years my understanding has grown and the technology has shrunk quite a bit, to the point where I've designed what I think to be the ultimate platform.

Ultimate Telemetry Platform

The ultimate platform consists of:
  1. Arduino Mega
  2. Mega proto shield
  3. Adafruit "Ultimate GPS" breakout
  4. Adafruit microSD breakout
  5. Adafruit 10 DOF IMU
  6. 2m amateur "radio on a chip"
  7. 3.3v power supply
I liked the Mega because of the extra size. My vision is that my local Scout troop will start a NOVA team and that the kids will throw additional experiments onto the telemetry platform, and the Mega gives me plenty of pins!

Thanks to my employer, Caliber Security Partners, I was able to stock up on supplies for the project:


Arduino Uno, Mega, and the breakout boards.

My original design focused on ballooning, but I ran into an opportunity to launch the telemetry platform via a rocket. My buddy and amateur radio "Elmer" has a high-power rocket with a payload. Perfect for the Mega!

Here's a shot of the Mega proto shield with the breakout boards:

Mega proto shield with the GPS and IMU. Radio chip and power supply will go in the empty spot on the left.


With the radio chip and power supply, there's not enough acreage for the microSD card, so I put it on the bottom!


This tangle of wires is the 3 sensors on a breadboard, tied to an Uno


Life Is Full of Opportunity

I ran into a number of issues building my platform:
  • My buddy had to back out - no motor, his high power license expired, and he's out of time.
  • The radio and power supply haven't arrived
  • The microSD card draws too much power to use without an external power supply
  • ...
So now I have an opportunity! My launch is scheduled for 11/15, and it's 11/11 today. I have to build a solution practically overnight.

Options

Launch Platform

I have an old Estes "Maxi Force" 3-motor cluster rocket that I can launch with. It wasn't made for payloads, so I'm taking a bit of a risk here but at this point I am going to go for it. The nose cone is just exactly wide enough to fit an Arduino Uno:

It's this, or we launch with a kite (and the kite's not all that exciting, especially since we're launching rockets the boys built as part of Space Exploration merit badge).

Telemetry Package

I have a few options on the telemetry side:
  • Powered Arduino sd shield, with is big and bulky
  • Strip out the GPS and send up the microSD shield and the IMU on an Uno
  • Do the same, but use a PC board and solder on a nano
The next few hours will be telling, as I hook the Nano up to the breadboard to see if it can handle everything. I have a number of 3.3v batteries from various cell phones, so I think I can actually use them to power the microSD card. If the nano idea pans out, I just need to find enough power to bring up the Nano and the sensors.



Sunday, September 21, 2014

Repairs Complete

A day later and the repairs are finished. The tail section isn't perfect, but it should fly without complaints. Much like 2x4's, it appears balsa thicknesses have changed over time, so I had to putty the seem where I replaced the broken leading fin. You can totally see the seam.

If it's less than straight in flight, replacing the tail fins with laser-cut plastic, and assembling with a custom fin jig will be the next step. We will see--this guy launches in less than a month!


Saturday, September 20, 2014

Rocket Repairs

I was hanging on with my Elmer Chuck (WB6YOK) the other day and the conversation turned from radios to radios in balloons. We have been "working on" a balloon project for what, five years now? We started in with Arduino several years ago and, while we haven't launched anything yet, we've got solid plans and a lot of functioning code for various sensors. As we were talking about the balloon project, I mentioned that I am interested in starting a BSA Nova program (BSA's new STEM initiative, to encourage youth to study science, technology, engineering and math). I told him that we are doing space exploration merit badge in Novemeber and mentioned that I would like to launch a rocket at October's Jamboree on the Air campout, to start to generate some interest.

Well, as it always does, the conversation quickly devolved into some wild fantasizing about having a rocket that was large enough to carry the balloon payload, so we could test it. As we were discussing that, Chuck said "Hang on, wait a minute..." and left the room. He returned with an enormous 3-peice rocket (base, payload bay, and nose cone). "This ought to do what you want," he said. Turns out, Chuck is high-powered certified. This is the rocket he certified with--it's powered by a single "H" motor and should go as high as 8,000 feet or more. 

As we talked further, I got more excited about the possibilities. That rocket could carry an Arduino, a Pi with a camera--pretty much anything! Suddenly Chuck left again and returned with this rocket:



An Estes Maxi-Force 3-engine cluster 50" tall rocket. These were a short-lived rocket built by Estes in the early 80's. Chuck said "It's yours if you want to fix the fins." Well, gosh... How difficult could that be? I took it before he could change his mind! 

Two out of three fins needed repair. The first had several cracks lengthwise, and the second had lost its leading edge. Today's project was to swing by Hobby Lobby after my trail run, to grab a few motors and some balsa wood, and then to fix the fins.



These are the cracks on the first fin (above).


And this is the broken leading fin. 

The fins are made of several peices: the main or base fin, a leading fin above it, and some edging which appears to be made of tougher material to withstand the bumps of landing.

My first plan was to just rip all three fins off and replace them with laser cut plastic fins (another buddy has a laser cutter). The more I thought about that, though, the more I realized it was more work than it's worth. As I looked over the fins again, I realized they were totally fixable. I needed to trace one of the leading fins to make a pattern to cut a new one from balsa, and I needed to glue the cracks together on the other. 

So today I dropped by the store and picked up balsa. After a few chores, I started in. First I opened up all the cracks in the fin, as shown below:


Then with a toothpick, I started to slip Gorilla Glue into all of the cracks. It's not as precise as I would like to be, but it worked. Here is the fin, drying, with a little pressure supplied by a couple rubber bands:


Next I traced an intact leading fin, cut some balsa, and dry-fitted a new leading fin. First I had to carve away the remainder of the leading fin--it isn't perfect, the surface of the rocket body was a bit wavy when I finished but the glue will help with that. Balsa is a really forgiving medium, and the dry-fit went quickly.

Knowing that it would be a challenge to have the new leading fin attach at every point and stay aligned, I opted to only glue where it touches the base fin and where it contacts the rocket body nearby. Once it's dried, I will glue up the rest. It's that easy...

I had to laugh--I spent more time thinking up a variety of ways to replace the fins than I actually spent repairing them. In fact, I've spent more time writing up this blog entry! With only an hour's effort, everything is glued except the front of the leading fin.

My next steps are to sand out the excess Gorilla Glue, then using a light putty I will fill in gaps and holes. Once the fins are smooth and straight, I think I'll paint the base again--probably black, just to put my own touch on the rocket.

The Scouts don't know about this rocket, but this is the one we will launch at JOTA, in an effort to pique their interest. I think it'll get their attention!

If I had unlimited time and funds, I would put together a tiny XBee unit, with an XBee 2 transceiver and a GPS. Then I would find a way to slip that into the nose cone so we could stream telemetry while flying the Maxi-Force. But I decided to keep my focus on building a package for the November launch, instead.

Sunday, August 24, 2014

Arduino: TempLogger

I’ve gotten terrible sleep the past 4-5 weeks. I wake up every night around 2 am, just hot and uncomfortable. I usually can’t get back to sleep once I wake up, either.

So time for another lifehack! I have an Arduino, I have an SD card logging shield, and I have a digital temp sensor – I decided to build a temperature logger and record the temps overnight.

WP_20140824_001[1]

Below is the code from my first attempt about a year ago. I broke it out again today and was looking at it – I found an article on the BMP085 online at Sparkfun, which when reading seems to indicate that you need to do a fair amount of calibration at startup in order to get accurate data. I went ahead and downloaded Sparkfun’s code and ran it – lo and behold, with all of its calculations it is still reporting the same 80 degrees my simple code is reading.

Lesson: you don’t need that calculation!

#include <Wire.h>
#include <Adafruit_BMP085.h>
#include <SD.h>
#include "Arduino.h"
#include "RTClib.h"

/**********************************************************************************
   TempLogger is an Arduino tool to log temperatures throughout a sustained time
   period. Ever wonder how well your heat is regulated? Tired of waking up hot at
   night? That's why I built templogger - my bedroom seemed awfully hot around 2
   am and, coincidentally, I kept waking up at 2 am.
  
   Requires an Arduino board, a GPS logging shield, and a BMP085 pressure/temp
   sensor from AdaFruit (
https://www.adafruit.com/products/391)
  
   See K7JTO.blogspot.com for this and other Arduino recipes.
**********************************************************************************/

/*
  Connect VCC - 3v
  Connect SCL - Analog pin #5
  Connect SDA - Analog pin #4
  Connect GND - GND (obviously)
*/

// Define Section
#define DEBUG 1                                    // Toggle 1/0 to en/disable serial out
#define led1Pin 5                                  // OPTIONAL: wire pin 5 to write LED
#define led2Pin 6                                  // OPTIONAL: wire pin 6 to read LED
#define BUFFSIZE 90                               // Create a buffer to store log file name

// Variables and Objects
Adafruit_BMP085 bmp;                                // ID for BMP085 unit
RTC_DS1307 RTC;                                     // Real-time clock object
const int chipSelect = 10;                          // Must be left as an output or SD library won't work
boolean gotSDCard = false;                          // Set to true if file successfully created
File logFile;                                       // File for logging data
char buffer[BUFFSIZE];                         // String buffer for the sentence
uint8_t i;                                          // usigned int for iterating
float currTemp = 0;                                 // Int for current temperature
String stringTemp = "";                             // String to hold temperature in
static char sprintfbuffer[15];                      // Buffer to convert float to string
static char dtostrfbuffer[15];                      // 2nd buffer to convert float to string

 

void setup() {
  Serial.begin(9600);
  if (!bmp.begin()) {
    Serial.println("Could not find a valid BMP085 sensor, check wiring!");
      return;
  }

  // Setting up the card means creating a new logging file for
  // each session, and initializing that logging file.
  if (setupSDCard()) {
    if (DEBUG) {
      Serial.println("card initialized.");
    }
    // Start RTC
    RTC.begin();
  }
}
 
void loop() {
  // Variables
  String nowTime = "";                                // String name for current time
  String dataString = "";                             // Store line for temp sensor
   
  // First grab the time from the RCT on the logging shield
  DateTime now = RTC.now();
 
  // Now build the timestamp. Should look like 12/25/2013 04:27:00"
  // Slight hack - sometimes the seconds value reads funny, and for
  // what we're doing, seconds aren't important, so just shove two
  // 0's in.
  nowTime += now.month(), DEC;
  nowTime += "/";
  nowTime += now.day(), DEC;
  nowTime += "/";
  nowTime += now.year(), DEC;
  nowTime += " ";
  nowTime += now.hour(), DEC;
  nowTime += ":";
  nowTime += now.minute(), DEC;
  nowTime += ":00";
 
  // Next grab the temp from the BMP. Problem is the temp comes in as an int, which
  // the Arduino can't convert to a string. So once the temp comes in, turn it into
  // a string via sprintf and dtostrf
  currTemp = ((bmp.readTemperature()*1.8)+32);
  sprintf(sprintfbuffer,"%f", currTemp);
  dtostrf(currTemp,8, 2, dtostrfbuffer);
 
  dataString = nowTime + "," + dtostrfbuffer;
  if(DEBUG) {
    Serial.println("Datastring: ") + dataString;
  }
   
  // Now write temp to logfile
  File dataFile = SD.open(buffer, FILE_WRITE);
   
    // if the file is available, write to it:
    if (dataFile) {
      // Light an LED
      digitalWrite(led1Pin, HIGH);
      digitalWrite(led2Pin, HIGH);
     
      // Write
      dataFile.println(dataString);
      dataFile.close();
     
      // Unlight the LED
      delay(1000);
      digitalWrite(led1Pin, LOW);
      digitalWrite(led2Pin, LOW);
     
      // print to serial port too:
      if (DEBUG) {
        Serial.println(dataString + " saved to data file");
      }
    }
    else {
      Serial.println("Error opening log file to write " + dataString);
    }
   
   // Now delay the device. This could be a sleep delay, if the device were running off
   // batteries, but a simple delay will suffice for externally-powered scenarios.
    delay(60000);
}

//** Sets up SD card. Returns true if no error **/
boolean setupSDCard() {
  // Now set up SD for logging
  // This code lifted from "Datalogger" sample sketch
  if (DEBUG)
    Serial.println("Initializing SD card...");
// make sure that the default chip select pin is set to
  // output, even if you don't use it:
  pinMode(10, OUTPUT);
// see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card init. failed! chipSelect = " + chipSelect);
    error(1);
    return false;
  }
  // Now create a unique file. NOTE: IF YOU CHANGE THE FILE NAME, CHECK THAT YOUR INDEXES STILL WORK
  // (buffer[6] and buffer[7] will need to change if you change the length of the file name)
  strcpy(buffer, "TMPLOG00.TXT");
  for (i = 0; i < 100; i++) {         
    // Keep iterating till you find unique file name
    // Create if does not exist, do not open existing, write, sync after write
    buffer[6] = '0' + i/10;
    buffer[7] = '0' + i%10;
    if (! SD.exists(buffer)) {
      break;
    }
  }
  // Now open the file just created
  logFile = SD.open(buffer, FILE_WRITE);
  if( ! logFile ) {
    if (DEBUG)
    {
       Serial.print("Couldnt create "); Serial.println(buffer);
    }
    error(3);
    return false;
  }
  if (DEBUG)
  {
    Serial.print("Creating file on card: "); Serial.println(buffer);
  }
  return true;
  // Done opening log file
}

// Handling Errrs HERE
// blink out an error code
void error(uint8_t errno) {
  if (DEBUG)
  {
     Serial.print("Error encountered. Error no: ");
     Serial.print(errno);
  }
 
  // First, blink 3x fast
  blinkThrice();
 
  // Now blink errno times, slow
  for (i=0; i<=errno; i++) {
    digitalWrite(led1Pin, HIGH);
    digitalWrite(led2Pin, HIGH);
    delay(3000);
    digitalWrite(led1Pin, LOW);
    digitalWrite(led2Pin, LOW);
    delay(1000);
  }
 
  blinkThrice();
}

void blinkThrice() {
  for (i=0; i<3; i++) {
    digitalWrite(led1Pin, HIGH);
    digitalWrite(led2Pin, HIGH);
    delay(3000);
    digitalWrite(led1Pin, LOW);
    digitalWrite(led2Pin, LOW);
    delay(1000);
  }
}

/***************************************************
  Portions of this code based on Adafruit BMP085 sample code. See
  info below.

  Designed specifically to work with the Adafruit BMP085 Breakout
  ---->
https://www.adafruit.com/products/391

  These displays use I2C to communicate, 2 pins are required to interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries. 
  BSD license, all text above must be included in any redistribution
****************************************************/

Sunday, August 17, 2014

High Altitude Balloon–Requirements

I’ve been toying with sending a balloon to near space. This idea has passed through my two youngest sons (neither really got interested), and now I’m looking at doing this with a NOVE group (NOVA is Scouting’s STEM program). I’m an assistant scoutmaster now and I think there are a few kids who might be interested. It’ll be winter before we can get the NOVA stuff off the ground, but meanwhile I’m planning.

I want the instrument package to do the following:

Experiments

  • Temp sensors combine with altitude measurements to record the adiabatic lapse rate. As altitude increases the temperature should drop 5 degrees per 1000 feet.
  • Audio sensors combined with altitude to demonstrate that in space, no one can hear you scream. As the altitude increases, air density decreases and sounds travel less effectively so the amplitude of an audio signal on a constant frequency should reduce.

Sensors

  • GPS (working; proven in my TrunkTrackerino project)
  • Temperature (working, both digital and analog)
  • Audio (working somewhat—need to learn to eliminate all but the test frequency, so the sensor only grabs that freq and determines its volume)

Package

I have the option of building on Raspberry Pi or Arduino. I’ve chosen to build on Arduino simply because that’s what I started with—the Pi being a full-fledged operating system is a bit more complex, but will be used for version 2. Pi offers a variety of great stuff, from a very small camera capable of video to a more powerful CPU. For now, I’d like to keep it simple. NOTE: I have three Pi version B’s, one of which could become the base package. The B+ was recently released, though, and seriously offers a better platform: more USB ports (4), lower power drain, etc. I may end up purchasing one of those.

Since the Arduino can’t do video, we’ll be sending up a GoPro camera. I have an older camera, purchased specifically for the balloon project.

So the total package will be:

  • Arduino Uno or Due (I have one of each)
  • Shield stack of GPS shield w/SD card + radio shield
  • {maybe} small hand-held to be used as a beacon
  • Temp sensors
  • Audio sensor (as yet unidentified)
  • Go-pro camera
  • Battery power for Arduino shield

Communications

As a licensed ham, I can use RF to transmit data back to earth. I want to transmit everything, in the worst-case chance that we don’t recover the instrument package. This means:

  • GPS coordinates: lat, long, altitude, trajectory, speed, rate of ascent/descent.
  • Temp/altitude pair
  • Temp/amplitude pair

I’d also like the package to switch to beacon mode, or to include a beacon, once the package descends to within 1000 feet of land, so we can more easily recover the package upon arrival.

There are the specs. Next step is to close on the communications package.

Balloon–Question, more questions…

I’ve mentioned a couple times on my blog that I’m interested in building a high-altitude balloon and sending some experiments up. I have worked for several years now on an Arduino-based package. I’ve successfully got GPS tracking working, SD cards, and a variety of sensors.

Now I’d like to take the next step and actually start transmitting sensor data over RF (preferably VHF or UHF). I see a lot of balloons going up with Trackuino-based comms, but I’ve also been intrigued with the Radio Shield 2 from Argent communications.

There are a ton of options—there are even folks sending photos back via radio layers. I haven’t found a really good primer yet for all the various options, but I’m getting started.

More to come…

Tuesday, August 12, 2014

SDR on Linux Mint

I picked up one of those "el-cheapo" SDR dongles off Amazon recently and got it working on Windows with SDR Sharp. I'm actually kind of happy with it - not enough time to do a lot, but it's a start. Of course, my Windows machine is my day-to-day work machine and SDR# uses a lot of resources. So why not move it to linux?

My Linux box runs Mint 17 (this will be important very soon). I poked around the Software Manager and was surprised that searching for "SDR" returned no results. I did a few interwebz searches and came across an excellent guide to using SDR on Linux--which included a full bash script for downloading and building GNU-Radio. Seeing that it *is* the workday, I figured that's probably better than doing it manually!

OOPS - when I tried to run the bash script, it alerted me that I need at least version 11 of Mint. But wait - like I said, I'm on Mint 17. I did a little troubleshooting by opening the script and found out the supported versions of Mint are hard-coded to 11, 12, 13, 14, and 15. So I did what any good hacker does and I simply added 17 to the list:


Bazinga! The script is now running.

In total, with me focusing on my business day, the script ran for about 5 hours (part of that was the script waiting for me to enter my password for "sudo" dependent actions).

Saturday, July 19, 2014

Buddistick Hiking Stick Mount

 I am a weight geek,a specially when I'm hiking. I bought my Buddistick so I could operate backcountry QRP even when I'm about tree line, but I've been stumped looking for a leightweiht weigh to get it vertical. I finally figured something out, and with the help of my Elmer, refined the design today. I'm quite pleased with it, in fact.

The design begins with a 1" PVC cap with a 1/4-20 bolt through the top. I then modified the Buddistick base plate by adding a 1/4 hole, so there are 5--1 off each corner (used for guy lines) and one on the center of one end, for the counter poise. Now the hiking staff I use all the time (which I made myself from a Virginia maple sapling on my property) can serve a second purpose.

The design did great in this evening's calm weather. I'll be taking it up a local peak in a few weeks, so we'll see how it does in a breeze.


Tuesday, May 27, 2014

Mini DXPedition

My buddy WB6YOK and I have been toying with a semi-local mini-DXPedition. I brought up the hair-brained scheme last fall and we’ve dabbled at it here and there ever since. We decided to do something to commemorate the air mail arrows from the US Airmail service dating back to the 20’s. We found an arrow about 125 miles north of Salt Lake City, just across the border in Idaho. This Memorial Day we took a road trip to check out the site.

Airmail Arrows

In the 1920’s the Postal Service wanted to take advantage of these new airplanes that had seen so much action in WWI so they instituted the airmail service. Problem was, the pilots could only fly during the day, and they tended to get lost. With daytime restrictions, airmail was no faster than the train. Finally someone came up with the great idea to build 30’ concrete arrows pointing the pilots along the route, and to set up towers with beacons on top.

airmail-beacon-route-1924

http://sometimesinteresting.files.wordpress.com/2013/11/airmail-beacon-route-19241.jpg?w=595&h=451

This article covers the history of the airmail system quite well.

Reconnaissance Trip

Monday we took a trip up with Chuck’s radio van (he has an old law enforcement investigation van that he’s converted to essentially a war wagon). Finding the site was really quite easy. We’ve been looking at the arrow on Google Maps for quite some time, so we knew it was due east of the junction of Strevell Rd and 81/30s, just over the Idaho border. We pulled up to the intersection and discovered the road is being rebuilt, so there was a lot of equipment there. Nonetheless, we pulled off and I headed out to find the arrow.

This didn’t look like an auspicious beginning:

WP_20140526_001[1]

And of course, I found these bones just after Chuck made a comment about rattlesnakes and me wearing sneakers… I pushed ahead though and soon I found the arrow!

WP_20140526_004

Sage brush is growing over it, and there’s a fair amount of debris obscuring it, but it’s definitely an arrow. Looking north over the arrow:

WP_20140526_003

With a little more walking around, we discovered we could drive the van right up to it, so… We did! You can barely see the arrow in the sagebrush in the middle of this photo. Looking sound toward the arrow:

WP_20140526_008

WP_20140526_007

The purpose of the trip was to check our equipment, so we did a fair amount of work setting up and powering up radios. As you can see, we had a Buddistick supported on a mast on the side of the truck.

WP_20140526_006

Once we had that tuned up, we were easily copyable into North Dakota, St. Louis, and California at 100 watts. With my 817 at 5 watts, we had a clear-as-a-bell QSO into Washington State (Spokane). Overall we were quite pleased with the site and the equipment, although there are some take-aways that we need to work on.

WB6YOK working contacts on 20m with a Yaesu FT-897:

WP_20140526_005

Some additional photos:

Looking NE over the arrow. The orange piece sticking up in the lower corner of the arrow is the foot for the steel tower that sat on top of the arrow. This photo was taking from inside of what once was a cabin next to the tower – it appears they had two generators installed in the cabin.

WP_20140526_011

Looking at the hills to the east:

WP_20140526_013

Standing on the arrow, looking toward the north:

WP_20140526_012

We have a ton of stuff to do to get prepared, but we’re really excited about the trip. Hope you can join us over the bands!

Thursday, May 15, 2014

K7JTO: What's Comng

It's been quite some time since finishing my PFR3. And that coincided with work really picking up, so I have been slammed in my life. I've not been out to operate on HF, at all, and barely even on VHF. Good news though: my buddy WB6YOK and I are putting together plans for a local mini DXpedition. We are tentatively looking to activate an old airmail direction arrow north of Salt Lake City. We should be operating Thursday through Saturday noon the week after the 4th (July 10-12). We'll be putting plans together shortly and hope to have some big announcements to make soon.

My main goals:
- operate CW. I completed the CWOps Club class and have hardly touched a key since, so I need to burn some midnight oil between now and July to get my listening skills back. I'd like to leave the weekend copying and sending > 15 wpm and then keep it there by operating weekly
- operate SSB and digital (PSK)
- experiment with a variety of antennas, including a kite antenna
- kit up a couple project radios and make some QRP and QRPp contacts
- one of these projects is a Rockmite I can take when I travel, so I can do CW while on the road
- order and build a 20m QRPp rig, probable a Hendricks or a new Rockmite ][
- run and use WSPR on a Raspberry Pi, to check out propagation
- shoot the breeze with Chuck and anyone else who shows
- I have been wanting a contact from India, so I'm hoping to get that contact on the DXpedition.
- build my SSB and CW contesting skills 

Chuck's got a massive delta loop antenna he built for a Pony Express commemorative station a few years back when I first met him, we'll be using that as our primary antenna for QRO HF ops. Hopefully that monster will pull in Asia. I'll also be putting my Buddistick to use, and checking out (maybe building) a series of other backcountry EFHW and dipole antennas. We'll have a couple video cameras on site as well, and so you should actually see some activity on my YouTube channel. We are hoping to have Internet access and to keep folks up to date via Twitter--we'll see about that.

Want to know more about the arrows? Google "airmail direction arrows" to learn more. We'll maybe have a few write ups and stuff at some point, so keep checking here.

Wednesday, February 26, 2014

PFR3: Build Complete


I finally finished building the rig about 10 days ago. What an adventure! I last left off having completed Group 2 and started on a group 3. Finishing group 3 was actually pretty straightforward: wind and install a bunch of torroids, and solder in a few more components to complete the transmitter and BLT tuner. The only really tough aspect was winding the monster torroid in the transmitter. Wow--3 interleaving windings, with heavy gauge wire. More on that later...

Recycling an old photo of the board, let me assure you of one thing: random lead clippings that short pins on the programable chip can be quite annoying. I must have re soldered 10 different components before I saw the lead clipping laying there. Assemble, disassemble, reassemble, disassemble... That cost a good 20 minutes. But finally I have the main board complete!


Next, it was time to kit the box. The instructions recommend not kitting until the rig has been fully tested. In retrospect, that makes sense... sigh. Here's how it looks now that it's kitted, though!

The circuit board mounts into the top of the case, with 4 screws which seem to provide ground. That will become important shortly... Kitting everything was pretty straightforward, although I was surprised that the power tap didn't fit. I had to ream out the hole just a bit (nothing a really sharp tempered steel knife couldn't handle). Remember the comment about the external power? Well, if you look really close you'll see I connected the center pin on the external power jack to the ground (white lead), and the outside of the jack to the board's power. Yes, I'm sure you did the math and arrived at the conclusion I overlooked: this causes a short and can really heat up a battery quickly. I'm actually lucky I tested with 8 AA's at 12v rather than a larger 12v SLA battery that could have delivered a bigger punch!


The internal battery pack has sticky tape on it. It needs to be soldered to a wire. This is one of two complaints I have about the entire kit: the plastic battery case melts before the contacts are warm enough for the solder to flow. (My other complaint is about the documentation on T1 and on the monster torroid.) You can barely see it my workaround, but I ended up soldering to the spring inside the battery pack (topmost row, on the far right).


This is the rig, no decals yet. That yellow color is pretty bright--selected to help you find or avoid stepping on the rig while operating in the field.


Connection points. From left to right: power, BNC antenna, switch from BNC to balanced line, and balanced line contacts.

Well at this point I'm pretty happy. My buddy WB6YOK and wrapped up around 10:30 Saturday--another quite long evening and I know my wife will be happy when I'm done disappearing for half a day at a time. I know I will be!


Evidence: it runs on external power. It runs on internal power. It runs!

My preliminary testing was indeterminate--lower power reading on the SWR/power meter, but the antenna was poorly tuned. My Elecraft T1 tuner showed 5+ watts on 40 and 30 (the tuner has LEDs to indicate 1, 5 and 10 watts, so if the rig puts out 4.5 watts it's still not possible to know anything other than the righ puts out more than 1 watt). More testing yet to be done.

Next steps:
1. More output testing: I'd like to buy a few $0.50 50 Ohm resistors, build a dummy load, and test on a matched "line".
2. Install decals
3. Clear coat
4. I'm toying with spraying some reflective clear paint I have on various spots around the rig, to aid discoverability during nighttime
5. I would love to find some small rubber "covers" to put over the 4 switches. The rest of the through holes are actually sealed, but these 4 aren't. We swapped out cable boxes recently, but kept the old remote and it has a few rubber covers which just might work.
6. Build a balanced line and test the BLT
7. QSO! 

I broke this out a couple days ago and tuned around the bands. I was swapping back and forth between my 817 and the PFR. I got a report later from a ham in Oregon that he'd heard me call CQ on 40 but he couldn't get his rig set up in time to answer me (I QSY'ed a bit too quickly). I don't know which radio I was on at the time). 

Between the dummy load and figuring out the "recipe" for my Buddistick, I think I'll have this dialed in shortly.






Saturday, February 1, 2014

PFR3 Continues

Just an update: successfully finished group 2, all tests passed (although due to some unplanned massive remodeling at my buddy's, we couldn't get the oscilloscope out). Happy happy! So of course, I soldiered on and started group 3, which begins with a few soldered components and then a pretext. It was on the protest that I completely fell apart. The mistakes?

1. There are two "U8" markings on the board. Pins 1 and 13 are supposed to be at zero volts with the power on and the rig in straight key mode, then 1.2 volts with the key closed. Odd, I was seeing 4 volts on pin 1. Oops... Wrong U8. On the correct U8, I see 0 volts with the key opened and 2 with it closed. The group weighed and said 2 volts is fine--less important the voltage vs. the fact that the circuit is open or closed.

2. Wrong resistors. As I posted to the reflector:

* Manual R6 & R7 should be YEL/VOL/YEL
* Errata: ORG/ORG/YEL
* Installed: YEL/VOL/YEL

Which is right? The errata and the manual agree on 470k, which is YEL/VOL/YEL. Press onward.

3. While troubleshooting the voltage issues, I literally went back to the beginning and checked every single component. Oops, I installed the wrong captor C24. Desoldering, replace, resolder in C56. Oh, whoopsies... Omitted R35 (I remember now I couldn't find it on the board when I was doing stage 2, and apparently I forgot to look again).

Needless to say, I have now checked every component, looked at every solder joint, and made sure everything works. Finally, time to press forward wih L7 to finish the transmitter, so I can start the BLT.

Lessons? Go slow. Mark your questions. Pay very close attention to markings, esp on your caps. If you're tired, stop--rushing won't get it done sooner.

I cannot wait till this is done, if only to put my quirky tom-foolery behind me!


The blue cap on the right side, next to the LCD? Yah, it goes about 5 o'clock from the Dove treat (my wife is the best!). You can see the big trace, right next to the little yellow 104 cap.

See the LCD display? See the conspicuously large resistor spot traced out in white marking, much like a victim's profile at a murder scene? Yah, I don't know how I missed it either!

See the vertical chip just next to the Dove treat? That's U8. Oh, but wait--see the other U8, just below the LCD. Hello, I'm Daryl. This is my brother, Daryl and this is my other brother Daryl. No offense to the boys at Hendricks. I'm sure this is my careless reading of the manual and/or errata. I've made enough dumb mistakes to prove them the experts! And hey, every problem is an opportunity to learn!

Thursday, January 23, 2014

American Morse KK2 Paddle

This Christamas had a special treat for me. I told my wife that all I wanted for Christmas was an American Morse KK-2 CW paddle, because in 2014 I have a goal to learn CW. She worked with Santa, and the two of them came through for me!

Background: American Morse is a US-based manufacturing company which builds CNC-shaped precision products. They can be found at www.americanmorse.com Their approach is to keep it simple and build a few things really well. I was looking for a solid base station iambic paddle, and the KK-2 seemed like just the thing. It is!

The folks at American Morse build everything as a kit, and can ship kits or built product. I wanted the kit, of course. "I build, therefore I am..." Assembly was a snap--took about 15 min to prebuild, after which I disassembled, sanded out burrs, and did final assembly. This is the final product:

American Morse KK-2 paddle kit, assembled

The paddle arms are machined brass. It's not visible in the picture, but the arms are actually hollowed. The paddle tips are nylon. Everything else is high grade steel. As you can see, I've done nothing to "protect" the steel base--there are some rust spots appearing. I'm tempted to brush the base with my grinder and put a quick clear coat on it. That would look cool, but of course have no effect on the paddle's performance.

The paddle does not ship with a cable. I was toying with building one from scratch but when I got to Radio Shack and priced options, buying a stereo cable turned out to be cheaper vs buying wire and plugs and building it. In keeping with the garish color scheme of the Hendricks PFR3, I bought a lime green cable.

 American Morse KK-2 with cable

Wiring was simple -- first I cut one end off (leaving a couple inches of factory wire, in case I ever need that tip), then I made sure which wires went where on the plug, then I wired them up based on iambic paddle wiring guides online. The outcome is rather nice, I believe:

KK-2 cable wiring

The black wire holder fit the factory cable perfectly. Everything feels solid.

The real question is, how does it work? I'm an absolute beginner when it comes to CW, so all I can say is that it's been a joy to use during my CWOps "CW Academy" training class. The rubber feet you see in the photo leave something to be desired when using the paddle on a Formica desktop. My buddy WB6YOK recommended I cut a mousepad to fit inside the rubber feet, and while I haven't done it yet, the idea has merit. But keying is precise and the device works great. 

According to American Morse, the KK-2 weighs in at 1.5 pounds (24 oz). I haven't weighed it yet, but that seems accurate. As I will be operating in the backcountry as well as from home, having a "mid-weight" unit was important (although I am seriously considering their DCP or Port-a-Paddle kits for lightweight backcountry use).

You can find this paddle online at http://www.americanmorse.com/kk2.htm

Saturday, January 18, 2014

Elecraft T1 Tuner Repair

I've been kind of "radio inactive" whilst sorting out a few things over the last 3 years or so. First time operating in quite a while was back in October up in the Fish lake National forest with my sons. Just prior to leaving, I visited my buddy Chuck to run my gear through its paces. We hooked up my T1 QRP tuner (actually a max of 20 watts) to his FT-897 and my PRC74 military radio whip antenna. I keyed an AM carrier, pressed the tune switch and man--that old military whip tuned up in about 1.5 seconds. Well, that's what I thought... In actuality, I either hit it with too much RF (might have turned down the wrong power settings on the 897) or the tuner just hadn't been used in a long while... Regardless, I fried two diodes. They are barely visible on either side of the right-most torroid on the bottom of this photo. Small blue components aligned horizontally in this snap.


I looked all over and found replacement diodes at Mouser. Ironically, they are fifty cents each, and shipping is $6 (and it's no wonder--my two diodes were shipped in a mid-sized cardboard box!).

I've been stabbing away at desoldering these diodes, but no joy. I'm taking them to my buddy's. He's got a beautiful desoldering station (no joke--I seem to use it a lot). This repair should go quickly! Along wth testing my PFR, we're doing the repair in the next couple days. Hopefully my next post will be of a successful tuning sequence with my 817 and his Gap Titan antenna.

By the way: the trip to Fish Lake wasn't a total bust. That old whip is resonant on 10m (when switched to the antenna's 40m configuration), and 10m was wide open. At 5 watts with right around 1:1.5 antenna matching, I was using PSK to contact France and several US stations. It could have been worse!

73's de K7JTO

Hendricks PFR3 build, groups 1 & 2

If you've read my other blog posts here, you know I'm really interested in light-weight portable operations. That's what led me to buy the Yaesu FT-817, but eventually I realized that was good for park bench or quick day-trip summit work, but it just wouldn't work for a long (3+ days) backcountry hike. 

I reviewed a ton of radios annd came to the conclusion that I needed to learn CW and move to a dedicated QRP rig. After a lot of research, I was about ready to buy an Elecraft KX-1 (http://www.elecraft.com/KX1/KX1.htm). It's highly rated, well-crafted, and quite popular. Then someone turned me onto the Hendricks PFR3 (http://www.qrpkits.com/pfr3.html). The owner of the company was at a QRP meeting listening to someone discuss backcountry QRP operation. An audience member asked what the best rig for backcountry is, and the presenter said it didn't exist yet. He proceeded to list out the features of the dream rig, and Hendricks wrote it all down. He and Steve Weber design, prototyped, and started selling the rig. Not only is it better designed for the backcountry, but it's also much cheaper (the PFR3 currently sells for $240).

About 3 years ago, in 2011, I ordered my kit. I think I sorted the kit the first day I received it, but that's about it. Life got very busy for me, I went through some ups and downs, and now three years later I'm finally building it. In researching the kit, I found there's very little available on the Internet on how to build this rig. If you can't figure it out in the manual, there aren't many resources other than the group. I decided to document the build process so others might benefit.

I am about 4 hours into the build, done with the first two stages.

Basically stage 1 is the LED and power switch. The receiver, stage 2, is most of the right half of the circuit board. The build is very straightforward, except for one item: there's a torrid with a 5-turn primary winding and a 40-turn secondary winding:

I discovered in the course of winding that there is only room for a 40-turn winding, but the manual calls for 40 turns followed by 5 turns. It was all very confusing, until I emailed the PFR3 Yahoo group. A group member clarified: the 5 turns go over the 40 turns. This is probably the least clear portion of the manual.


Another point of conversation: some people have had issues with torroid wires breaking due to the jostling of backcountry travel (shaking in the pack). After discussion with list members, I decided to drop some wax under each torroid. That's what you can see in the shot above. The torroid a are installed on what will be the bottom of the board.


It's difficult to tell, but the radio is powered up and showing 30.0 on the right three digits.


My kit arrived with every component, but unfortunately I lost one of the RF chokes. A list member sent me a replacement. In the lower left of the photo you can see the stock choke--it looks like a fat resistor, just below C42. In the middle of the photo, between the blue and green caps, is the replacement choke. I love the way amateurs help each other out all the time!


Just another random shot of the main board. The kit is very well laid out and goes together quickly--most people estimate 6-8 hours to build. I'm probably 4 hours in, but a lot more considering the head scratching I went through over that torroid!

The manual lists a modification to stage two which address noise in the receiver. It requires two caps to be added--one in a through-hole, and on jumping a couple pins on another component. I was in Seattle on business so I grabbed the components at Frys and installed them with Group 2.

Next step is to dial in the receiver, then build out stage 3 (transceiver). Finally, prep the case and finalize the install.