Atlas

Aim

  • Fix upon previous flight issues especially to get a reliable working GPS system
  • Test out a long duration floater
    • Improve ability to get the balloon to float
    • Explore methods of recruiting listeners.

Components

  • Atlas flight computer
    • ATmega328
    • Radiometrix NTX2 434.075Mhz 10mW
    • Crystal oven - set point 10degC
  • GPSbee - ublox 5 GPS with patch antenna
  • ?Backup beacon
  • Sensors
    • Photodiode
    • External Temperature Sensor
    • Internal Temperature Sensor
    • Crystal Temperature Sensor

Changes

Stop bits

Through numerous flights using RTTY and dl-fldigi it has been found that dl-fldigi doesn't cope very well with too few stop bits, if you use 2 stop bits instead of 1 or 1.5 it is able to decode far better.

To transmit a character of RTTY first you send a start bit (transmitted as 0) followed by the binary of the character Least Significant Bit first, this is then followed by a 1 or 2 stop bits (transmitted as 1). So for the character 'd' the binary is:

01100100

Remember we transmit the Least Significant Bit first so swap it around:

00100110

We need to add on the start bit 0 and also two stop bits 11 to give us:

00010011011

This is easily done on the arduino using this code:

// ------------------------
// RTTY Functions - from RJHARRISON's AVR Code
void rtty_txstring (char * string)
{
	/* Simple function to sent a char at a time to 
	** rtty_txbyte function. 
	** NB Each char is one byte (8 Bits)
	*/
	char c;
	c = *string++;
	while ( c != '\0')
	{
		rtty_txbyte (c);
		c = *string++;
	}
}
 
void rtty_txbyte (char c)
{
	/* Simple function to sent each bit of a char to 
	** rtty_txbit function. 
	** NB The bits are sent Least Significant Bit first
	**
	** All chars should be preceded with a 0 and 
	** proceded with a 1. 0 = Start bit; 1 = Stop bit
	**
	** ASCII_BIT = 7 or 8 for ASCII-7 / ASCII-8
	*/
	int i;
	rtty_txbit (0); // Start bit
	// Send bits for for char LSB first	
	for (i=0;i<8;i++)
	{
		if (c & 1) rtty_txbit(1); 
			else rtty_txbit(0);	
		c = c >> 1;
	}
	rtty_txbit (1); // Stop bit
        rtty_txbit (1); // Stop bit
}
 
void rtty_txbit (int bit)
{
		if (bit)
		{
		  // high
                    digitalWrite(4, HIGH);
                    digitalWrite(5, LOW);
                    digitalWrite(13, LOW); //LED  
		}
		else
		{
		  // low
                    digitalWrite(5, HIGH);
                    digitalWrite(4, LOW);
                    digitalWrite(13, HIGH); //LED
		}
		//delayMicroseconds(20500); // 10000 = 100 BAUD 20150
                delayMicroseconds(20000); // 10000 = 100 BAUD 20150
}
 
void setup()
{
  pinMode(13, OUTPUT); //LED
  digitalWrite(13, HIGH);
  pinMode(5, OUTPUT); //Radio
  pinMode(6, OUTPUT); //Radio EN
  digitalWrite(6, HIGH); //Turn the radio on
  pinMode(4, OUTPUT); //Radio
}
 
void loop() { 
  rtty_txstring("Hello World!\n");
  delay(1000);
}
  • You will need to change pins 5 and 4 to which ever pins you are using to send data to the radio module.
  • delayMicroseconds controls the baud rate of the transmission, 20000 roughly equates to 50baud but it varies depending on the clock you are using in your microcontroller.

Crystal Oven Set Point

On the first Atlas flight the crystal oven worked great, maintain the crystal at 0 deg C throughout the flight. There was still initially some drift as the radio cooled down from ground temperature to 0 deg C. For the next flight the set point will be 10 deg C , this will reduce the drift and also test how how good that heater is at maintaining the crystals temperature. The flight computer will be individually better insulated to improve the efficiency of the system.

Nav5 Mode

The ublox5 GPS chip has different modes which optimise for a number of scenarios. By default the chip is in Mode 0: Pedestian - suited to being on the ground and so does not work above 12km altitude- this was demonstrated last flight where it stopped working. For a balloon flight we need to set the Nav5 mode to 6: <1g Airborne so that it'll work all the way up to 50km altitude. To do this we need to send a command to the module to change this setting and then check that we have successfully change it to Nav5 mode 6.

// Send a byte array of UBX protocol to the GPS
void sendUBX(uint8_t *MSG, uint8_t len) {
  for(int i=0; i<len; i++) {
    Serial.print(MSG[i], BYTE);
  }
  Serial.println();
}
 
// Get the current NAV5 mode
int getUBXNAV5() {
 
	uint8_t b;
	uint8_t byteID = 0;
	int startTime = millis();
 
	// Poll/query message
	uint8_t getNAV5[] = { 0xB5, 0x62, 0x06, 0x24, 0x00, 0x00, 0x2A, 0x84 };
 
	// First few bytes of the poll response
	uint8_t response[] = { 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF};
 
	// Interrogate Mr GPS...
	sendUBX(getNAV5, sizeof(getNAV5)/sizeof(uint8_t));
 
	// Process his response...
	while (1) {
 
		// Timeout if no valid response in 3 seconds
		if (millis() - startTime > 3000) { 
			return -1;
		}
 
		// Make sure data is available to read
		if (Serial.available()) {
			b = Serial.read();
 
			// 8th byte is the nav mode
			if (byteID == 8) {
				return b;
			} 
			// Make sure the response matches the expected preamble
			else if (b == response[byteID]) { 
				byteID++;
			} else {
				byteID = 0;	// Reset and look again, invalid order
			}
 
		}
	}
 
}
 
void setup() {
 // Check and set the navigation mode (Airborne, 1G)   
  uint8_t setNav[] = {0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xDC};
  sendUBX(setNav, sizeof(setNav)/sizeof(uint8_t));
  navmode = getUBXNAV5();
  Serial.println(navmode, DEC);
  }

SPoT

Satellite transmitter

Success 10/03/11

  • Cut the trace from pin 8 of LC07A between the MCU and the SPoT transmitter. - This now causes the SPoT to go into error mode as it is unable to get an nmea data stream.
  • Soldered a wire to TP23 and connected this to one of the digital pins on the arduino. This pin is pulled high when the SPoT device wants GPS data. Once it has valid gps data with a lock it pulls this pin low. The SPoT MCU also briefly checks for nmea on boot up.
  • Soldered another wire to TP24 which is then connected to the TX line from the Arduino.
  • When TP23 is pulled high we then start passing our 'fake' nmea stream over the TX line, the SPoT MCU interprets this as valid data with a lock and switches TP23 to low and then gets on with transmitting the data to the satellite.
  • Currently I'm monitoring TP23 with a digitalRead loop which isn't ideal an interrupt would be more sensible.
  • We also probably can do all this with our single flight computer. The only other connection is for control over the OK button to allow us to send the messages - this can be acheived using a transistor.
    • Vcc — Vbat
    • Gnd ↔ Gnd
    • A0(nss) –> GPS rx
    • D4 ←- TP23
    • A1 –> OK

Progress 14/3/11

  • Found that using software serial is too unreliable when communicating with the SPoT MCU - instead I've gone back to my original idea of having a second arduino to monitor and control the SPoT.
    • Communications between the flight computer and SPoT will be over i2c, the flight computer acting as master and SPoT arduino as the slave.
    • The master will regularly send the latest lat/lon/alt to the slave arduino which it will process.
    • Every 15 minutes the SPoT will trigger the OK button (via a transistor) and then when requested will send nmea data via its hardware serial.
    • The way this is setup if either system was to fail then it shouldn't affect the other.
  • I am going to use a seeeduino film which will be inside the SPoT case. It'll be directly connected to the power supply of the SPoT (2xAA lithiums). To turn everything on:
    • Make sure it is connected to the flight computer (i2c)
    • Insert the batteries (it will only be off when the batteries are removed) - this will start the SPoT arduino
    • Turn the SPoT on with On/Off
    • The SPoT will attempt to transmit its lat/lon every 15 minutes

Test Code

int pin = 13;
 
void setup()
{
  pinMode(pin, OUTPUT);
  Serial.begin(9600);
}
 
void loop()
{
  while(digitalRead(4) == HIGH)
  {
    digitalWrite(pin, HIGH);
    Serial.println("$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47");
    Serial.println("$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39");
    delay(1000);
    digitalWrite(pin, LOW);
  }
}

Jobs

  1. Construct Flight Computer
  2. Interface GPS
  3. Temperature sensors
  4. Reflash 328 to allow for space for PID
  5. Test setpoint 10deg in freezer - perhaps monitor battery voltage - if drops below a setpoint we turn off the heater to conserve power
  6. Change to use 2 stop bits
  7. Second freezer test
  8. Code
    1. Set NAV mode
    2. More continous Data
    3. make sure longitude if positive doesn't have a space
    4. SPoT - fix sending altitude
  9. Construct flight box
  10. Wire up
    1. external temp sensor
    2. external light sensor
    3. voltage sensor
  11. Make antenna
  12. Measure current with heater on/off
  13. Backup beacon
  14. Script to take SPoT postions and post to spacenear.us
  15. Change Hell beacon settings to ATLAS
  16. Soak test
    1. SPoT - 36hr running test to make sure SPoT gets reset after 24hrssuccess
    2. will allow us to measure battery voltages through whole rangesuccess
    3. check night mode with radiosuccess
 
missions/atlas/atlas2.txt · Last modified: 2011/05/09 14:02 by jamescoxon
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki