Tuesday, August 28, 2012

New shield (2.2 BETA) and firmware (1.4) are up

If you have tried to build a Trackuino board, you will have noticed that the Venus GPS part from Sparkfun (GPS-09133) has been retired and replaced with GPS-10921, which has in turn been replaced with GPS-11058.

Unfortunately, the engineers at Sparkfun have deemed necessary to reshuffle the pinout and make the newer board incompatible with existing designs that used the older boards, including Trackuino. I'm still puzzled at this decision, this is like the 7805 reversing in and out just because it "makes more sense".

If you already have a board designed for GPS-09133 or GPS-10921 and want to use GPS-11058, there are two solutions: either run small cables instead of pin headers, or build a small adapter board to rearrange the messed-up pins.

The GPS chip has also been replaced (634FLPx becomes 638FLPx), but this should not be a problem.

Although I plan to run away from this problematic part, I have uploaded the Eagle files of a new design that is compatible with GPS-11058. Look for trackuino-shield-2.2.zip in the downloads area.

I have not tested this design yet. I will remove the "BETA" label as soon as I get some boards tested.

Since I haven't built any 2.2 board yet, all I can show is this nice 3D rendering from mayhem labs:

The complete feature set of the Trackuino Shield 2.2 is:

  • Replaced Venus GPS 634FLPx (sparkfun #9133) with newer 638FLPx (sparkfun #11058).
  • Auto 3.3/5.0v operation for Chipkit Uno32 compatibility
  • Eagle files converted to 6.x format.
  • Use Arduino's own 5V regulator to power the HX1.
  • Replaced TO220 3.3V regulator with SMT + board sink.
  • Added bleeder resistor for passive piezo speakers.
  • Battery (Vin) sensing (through a resistive voltage divider).

Matching this new shield, there is also a new firmware version: trackuino-firmware-1.4.zip in the downloads area. The new features are:

  • NEW: Support for PIC32 / Chipkit Uno32 platform
  • NEW: Support for active or passive buzzers (DC or PWM driven)
  • NEW: Battery voltage sensing
  • NEW: Slotted transmissions for multilaunch events
  • REMOVED: Support for the MX146 radio

Find more information in the project page at google code, and enjoy!

Saturday, December 17, 2011

The amazing flight of K6RPT-11

Wow!

This was about 3 days ago. The California Near Space Project (CNSP) team launched 4 balloons. Two of them were short-duration, high-altitude flights. The other two were long-duration floaters (K6RPT-11 and K6RPT-12). First, the announcement:

http://www.tapr.org/pipermail/aprssig/2011-December/038028.html

Quote:

Our goal is to reach neutral buoyancy at a very high altitude and fly as far across the United States as possible.

Well...

The balloon not only made it through north america. It completely crossed the Atlantic, entered Spain through Jerez de la Frontera and exited towards Italy. After a 57 hours flight, it eventually descended on the Mediterranean sea off the coast of Algeria.

Captura de pantalla 2011 12 16 a las 09 33 40

Look at the green portion of the trajectory after the balloon passed New Jersey. These were quiet hours of uncertainty until the signal was picked up again from the Azores:

Captura de pantalla 2011 12 16 a las 09 35 37

Launch time was 2011-12-12 00:40:31z. The last packet was heard on 2011-12-14 09:46:30z:

Captura de pantalla 2011 12 16 a las 09 34 29

You can see the full trajectory on aprs.fi while it's recent:

http://aprs.fi/?call=K6RPT-11

Update: Below is a video of the launch:

 

Sunday, September 25, 2011

OSHWCON 2011

¡Gracias a todos los asistentes a mi charla sobre fotografía espacial en la conferencia OSHWCON 2011 y sobre todo a los organizadores por darme la oportunidad de exponer el proyecto! Espero que se repita y nos podemos ver con más proyectos el año que viene. Para cualquier duda me podéis localizar en el correo javi en trackuino punto org. ¡Un saludo!

(ENG: Thanks to all who attended my talk at OSHWCON 2011 and especially to the organizers for the opportunity to present my project! Keep it up and hope we'll see more projects coming next year!)

Tuesday, August 2, 2011

Important fix in version 1.31

Version 1.3 of the Trackuino firmware had a bug by which altitudes over 32767 feet would be rolled over to negative values. A new version fixing this issue is available in the downloads area. No extra features have been added, so your "config.h" from previous version 1.3 can be reutilized verbatim.

 

Saturday, July 30, 2011

How NOT to launch a balloon

The neck snapped when the balloon turned upside down. We were planning to release the load line slowly so that the strings would not rip through the payload box, completely oblivious that the weakest point was the neck of the balloon :(

Tuesday, July 5, 2011

Trackuino Shield

This is really exciting! Kyle Crockett has designed a new Trackuino shield. Just plug it on top of an Arduino board to turn it into an APRS tracker complete with GPS, a Radiometrix HX1 FM transmitter and a temperature sensor!

The whole thing is powered through the Arduino jack (7-12V), and the only external components needed are the GPS and radio antennas. The total footprint is much smaller than the previous board, so its price is also cut by more than half. And because all the Atmega pins are broken out to female headers, It can be easily extended by stacking more shields on top of it.

For now, you'll have to figure out the bill of materials from the Eagle schematic, but we'll post a proper BOM shortly. The SCH and BRD files can be downloaded from the project page.

Monday, July 4, 2011

Version 1.3 of the firmware is up!

Trackuino logoVersion 1.3 of of the Trackuino firmware is up in the downloads area! There are lots of improvements and fixes. Here is a summary:

Improved GPS compatibility

The previous GPS code made too many risky assumptions about the NMEA format, so it failed miserably on certain versions of the Venus 634FLPx (which, ironically, was the only supported GPS). Now the parsing routines are more tolerant to variations in the numeric formats, so compatibility with other units should be greater.

Signal quality (enter real-time computing)

In Packet Radio, the maximum bandwidth used by the AFSK carrier is 2,200 Hz. Nyquist tells us that we need at least 4,400 samples per second to properly rebuild the signal at the receiver, but that requires an ideal low-pass filter with a cutoff frequency of 2,200 Hz, which is neither physically achievable nor realistic in FM radios where the cutoff is usually higher, around 3,000 Hz. For those two reasons, oversampling is usually desirable (even if not mathematically necessary) if we want to avoid annoying harmonics that distort the signal and waste our scarce power.

The Trackuino firmware uses a 62,500 KHz sample rate, which is well away from the audible spectrum. Oversampling improves the quality of the signal at the receiver, but it requires pushing samples at a rate of 1 sample every 256 clock cycles (16 MHz clock rate / 256 = 62.5 KHz), so it's really taxing on the CPU. To make things worse, the Arduino is also busy doing a lot of equally important things, such as staying up to date with the GPS, keeping track of time so that millis() and delay() keep working as expected, and handling the buzzer (more on the buzzer later). All these tasks are interrupt-driven, which means they happen asynchronously without regard of one another or the normal program flow. The interrupts can be queued, but only one of each kind at a time. If an interrupt comes without having served the previous one, the second interrupt will be lost. So, not only has our modulator a meager 256 cycles to do its job, but it also has to struggle over the CPU with other interrupts...   When some task needs to be done under a deadline constraint such as this, it's called a real-time system. Efforts to ensure real-time operation are geared towards three goals:

  1. Priorizing the real-time task over not-so-important tasks. In the AVR architecture, interrupt priorities are fixed, so we can't do that.
  2. Keeping our real-time task short, so that it can meet its deadline.
  3. Keeping non-important tasks short, so that they don't hog the CPU while the important task is waiting.

There are a number of improvements in version 1.3 on those regards:

  • Serial (GPS) interrupt: The selfish implementation of this interrupt in the Arduino library spent an abusive 330 cycles on every received byte. It means that, for every received character from the GPS, chances are that one modem interrupt is lost altogether. Arduino version 22 has an optimization that cuts this time down to 80 cycles, so the code now enforces compilation under Arduino version 22 or later.
  • Modem interrupt: Some optimizations have been done to shave off a few cycles here and there. The modem interrupt should take 150 cycles max, average is less than that.
  • Debug information: By uncommenting a flag in config.h you can get useful information on overrun conditions.

Previous versions of had interrupt overrun issues, which translated into small variations from the nominal baud rate (1200 bps). Luckily receivers have some tolerance to baud rate deviations, so it's not that big a deal. In any case, the new version should improve the rate of successfully decoded packets.

SRAM usage optimization

The Atmega328P has 2 KB of SRAM, of which about 512 bytes were taken up by a huge sine table in modem.cpp. This table has been moved to the much more spacious program memory (32 KB). There are a few other candidates that scream to be moved to PROGMEM too, such as the APRS comment, callsigns and such, but these haven't been moved (yet).

Buzzer support

This should help in acoustically locating the payload. The buzzer is handled by timer 1 using PWM. Piezoelectric buzzers demand very little current, so they can be driven directly with pins 9 or 10. The tone frequency can be configured in config.h as well as the duty cycle in seconds. It doesn't make sense to have a payload beeping at 100,000 ft. since there is no air to begin with, so the maximum operating altitude can also be programmed.

CPU usage LED indication

This might look just cosmetic or geeky, but it's actually quite useful. The idea is that the LED will glow increasingly brighter as the CPU gets busier. For example:

  • If the AVR is idle, the light will be very dim. Tthe AVR is never really idle for long periods of time, since timers 0 (millis) and 1 (buzzer) are going off periodically.
  • When receiving data on the serial port, the LED will turn slightly brighter because it takes extra CPU to process the incoming bytes. This is a way of checking for GPS activity at a glance.
  • APRS transmission takes the most CPU, so the LED will be almost fully bright.