Difference between revisions of "New Flight Computer"

From AD7ZJ Wiki
Jump to navigation Jump to search
Line 27: Line 27:
  
 
The hardware is based around the NXP (formerly Phillips) LPC2148 - a microcontroller built on the ARMv7 architecture.  Benefits are low cost, generous amounts of flash memory and RAM, and plenty of I/O.  The chip is driven off a 12 MHz crystal which is multiplied up to 24 MHz by the onboard PLL.  This particular processor can run at up to 60 MHz.   
 
The hardware is based around the NXP (formerly Phillips) LPC2148 - a microcontroller built on the ARMv7 architecture.  Benefits are low cost, generous amounts of flash memory and RAM, and plenty of I/O.  The chip is driven off a 12 MHz crystal which is multiplied up to 24 MHz by the onboard PLL.  This particular processor can run at up to 60 MHz.   
 +
 +
=== Peripherals ===
 +
A CML Micro CMX678 bell 202 modem IC is used to generate the AFSK AX.25 packet that modulates the radio.  This talks to the uC using one of the built-in SPI ports (SPI0).  Setup of this IC is pretty simple, and the bitstream is simply shifted out to it via SPI commands. 
 +
 +
An SD card is hooked up to the second built-in SPI port.  The SD standard allows for a slower (but simpler) SPI interface to the cards.  The trick to this is implementing the FAT filesystem in software, but thanks to the ChanFS FAT library this has been made pretty easy. 
 +
 +
A Trimble Copernicus GPS engine is connected to one of the built-in UARTs.  This outputs standard NMEA strings and is itself configured over the same serial port.
 +
  
 
== Software ==
 
== Software ==
  
 
The software is written primarily in C++, with the exception of the basic startup routines to initialize the hardware and setup the C++ runtime.  I use a port of GCC for arm, put together by CodeSourcery (now MentorGraphics).  The 'lite' version is fine, all you get by paying for the other versions is an IDE and the startup routines - we're going to do everything with a makefile anyways, which is really superior to a project file for an IDE anyways (at least in my opinion :).   
 
The software is written primarily in C++, with the exception of the basic startup routines to initialize the hardware and setup the C++ runtime.  I use a port of GCC for arm, put together by CodeSourcery (now MentorGraphics).  The 'lite' version is fine, all you get by paying for the other versions is an IDE and the startup routines - we're going to do everything with a makefile anyways, which is really superior to a project file for an IDE anyways (at least in my opinion :).   
 +
 +
=== Build Environment & Procedures ===
 +
Since the software is built using a makefile, the build environment setup is very simple.  I use Ubuntu Desktop as the host platform. The CodeSourcery compiler is available for windows as well however, so with a few tweaks to the makefile it should also build under Cygwin.  I like to use the Eclipse editor since it has integrated in-circuit debugging capability with GDB and OpenOCD.  Install the codesourcery version (??) lite package and ensure it gets added to your $PATH environment variable.  Run 'make' in the directory to start the build. 
  
 
== Useful References ==
 
== Useful References ==

Revision as of 00:13, 21 April 2012

This is the new flight computer we are in the process of developing. This page serves to document the current progress.

High Level System Requirements

  • Documentation
    • Complete documentation including development tool requirements and installation process.
    • User’s manual showing how to utilize all hardware and software features of the system.
  • Single board for flight computer and beacon use
  • AX.25 packet capability for data transmission
  • On-board landing prediction based on wind data gathered during ascent
    • Auto flight start detection to begin logging for prediction
  • Logging
    • Mass storage support for easy access to flight data
    • Internal and external temp sensors
    • Ability to add additional sensors externally would be nice
    • Log battery voltage
  • At least one servo driver
  • Ability to receive DTMF/packet commands in flight
    • (clear logging, begin logging, beacon reset, GPS reset, frequency change)
  • Ability to configure volatile parameters via menu or file
    • Call Sign
    • Beacon time slotting
    • Customization of the status string

Hardware

The hardware is based around the NXP (formerly Phillips) LPC2148 - a microcontroller built on the ARMv7 architecture. Benefits are low cost, generous amounts of flash memory and RAM, and plenty of I/O. The chip is driven off a 12 MHz crystal which is multiplied up to 24 MHz by the onboard PLL. This particular processor can run at up to 60 MHz.

Peripherals

A CML Micro CMX678 bell 202 modem IC is used to generate the AFSK AX.25 packet that modulates the radio. This talks to the uC using one of the built-in SPI ports (SPI0). Setup of this IC is pretty simple, and the bitstream is simply shifted out to it via SPI commands.

An SD card is hooked up to the second built-in SPI port. The SD standard allows for a slower (but simpler) SPI interface to the cards. The trick to this is implementing the FAT filesystem in software, but thanks to the ChanFS FAT library this has been made pretty easy.

A Trimble Copernicus GPS engine is connected to one of the built-in UARTs. This outputs standard NMEA strings and is itself configured over the same serial port.


Software

The software is written primarily in C++, with the exception of the basic startup routines to initialize the hardware and setup the C++ runtime. I use a port of GCC for arm, put together by CodeSourcery (now MentorGraphics). The 'lite' version is fine, all you get by paying for the other versions is an IDE and the startup routines - we're going to do everything with a makefile anyways, which is really superior to a project file for an IDE anyways (at least in my opinion :).

Build Environment & Procedures

Since the software is built using a makefile, the build environment setup is very simple. I use Ubuntu Desktop as the host platform. The CodeSourcery compiler is available for windows as well however, so with a few tweaks to the makefile it should also build under Cygwin. I like to use the Eclipse editor since it has integrated in-circuit debugging capability with GDB and OpenOCD. Install the codesourcery version (??) lite package and ensure it gets added to your $PATH environment variable. Run 'make' in the directory to start the build.

Useful References

http://www.gnu.org/savannah-checkouts/gnu/libc/manual/html_node/Rounding-Functions.html

http://openocd.sourceforge.net/doc/html/General-Commands.html

http://openocd.sourceforge.net/doc/html/CPU-Configuration.html

http://openocd.sourceforge.net/doc/html/Flash-Commands.html

http://gitref.org/basic/