Home

PICetSat Lite Project

Project Description

What is the PICetSat Lite?

The PICetSat Lite involves radios, space and programming. We are build a balloon module based on a PICAXE 08M. It is build on half a Radio Shack Dual General Purpose IC PC board 276-159. It reads several sensors and transmits the data in CW through a TX433. It is an expansion on something called a CricketSat that was based on a 555. Our first flight was on Pat's SIMSAT 3 . The altitude recorded just before burst by APRS (which was also on that flight) was just under 103,000 feet. Think of cruising altitudes (or what we know of them) for U2 and SR-71.

The Purpose of PICetSat Lite

We plan to fly just the PICetSat on 30 gram balloons for about 10 flights to get good at:

  • prediction - have an idea of where it is going
  • notification - have FAA letter of "no objection" in hand
  • launch (especially launch safety)
  • telemetry - be able to capture telemetry throughout its flight
  • recovery - be able to recover the payload using Fade Circle or other techniques
We plan to be a resource to our county schools for Science, Technology, Engineering and Math. Students can be involved in programming, construction, prediction, launching, telemetry and recovery.

Project Hardware Setup

The PICetSat Lite hardware as we have it now consists of two sensors, a thermistor which was handed out with the protoboard and a photo cell from a RadioShack assortment. Its outputs are to the TX433 8 mW transmitter and an LED, both were also handed out. A couple of resistors and a capacitor complete the hardware. The following picture shows the hardware configuration on a protoboard which is easier to follow and describe. (Yeah, I'm using the same picture from the PICAXE page - I only have 25 megs on this site.) Then we will show it built for flight.

HalfBoard3.jpg

We mentioned on the PICAXE page that the left pin on the Half-board is the ground and runs to the blue strip. The right pin is v+ and runs to the red strip. What we want to look at now are the connections to the various I/O ports.

  • P0, which is on the left is the serial output. When you are loading a program into the PICAXE you must have the jumper, red in this picture, set to the RS position. When you are running the PICAXE program it must be in the P0 position if you use P0, as it is in this picture. We are using P0 to send morse code to the LED. You can see in row 47 that P0 is connected to the LED which is connected to ground (it has the built in 330 resistor).
  • P1 is an input that does Analog to Digital Conversions (ADC), so we have the thermistor connected to that and to V+. Also we have a 10k resistor from P1 to ground. See row 48,
  • P2 is our output to the transmitter. This is connected through a 0.001 uf capacitor. You can see this going from row 46 to a connection point at row 55 and through the capicitor to the TX433 input on row 57.
  • P3 is not being used for this project. It is an input but not ADC. It would be good for infrared projects.
  • P4 is another ADC input and we are using it to read a photocell. On row 51 you can see P4 connected to the photocell which is connected to V+. Here I am using a 1k resistor to divide the voltage. Since these come from an assortment, you have to play with them to get a nice value range.
  • P5 is a serial input which we are not using in this project.
The only other connections to look at are those to TX433. They are from left to right as you look at them, antenna, V+, input (from the PICAXE), and ground. You can see the ground connected to the blue strip and the V+ to the red strip. We've mentioned the output from the PICAXE connected to the TX433 input at row 57. You willalso see a 4.7k resistor from the red V+ strip to TX433 input. This turns on the transmitter as soon as we start up the PICetSat Lite. This works as is with a nearby 440 receiver, but you really need to add a 7" antenna to TX433 antenna, row 55, and a 7" counterpoise to TX433 ground, row 58.

But once you finish prototyping a project you'll probably want to move it to a more permanent, soldered, setup. In our case we want to move it to something light enough to fly. So we have built it on half of an RadioShack IC PC board.

PICetSatLite.jpg

Now this is a slightly different version of the PICetSat. It has no LED and uses P7 to turn the TX433 on before transmit and off after. It also has a few resistors added so that you can program the chip while it is soldered to the board. Of course it is also run by two 3v coin batteries. The biggest problem is that now you are in the world of pins and not ports. And they don't match up directly. So here is how ports map to pins.

  • Pin 1 - V+
  • Pin 2 - P5, serial input
  • Pin 3 - P4, ADC input, can be used for output
  • Pin 4 - P3, infra red input
  • Pin 5 - P2, output (tune for our CW signal, can be used for ADC input
  • Pin 6 - P1, ADC input, can be used for output
  • Pin 7 - P0, serial output
  • Pin 8 - ground

Project Software

The current PICetSat code is a combination of Steve's Code, which flew on SIMSAT 3 and code from the March/April 2007 AMRAD Newsletter article, written by Andre Kesteloot (N4ICK). He wrote a Morse Code Generator that ran in a PICAXE 08 (only 128 bytes, the 08M we have has 256 bytes). I have commented where his code starts and stops in case you want to use it in your own Morse Code project. Several of us belong to AMRAD .

To quote him, Andre's scheme will be:

"Each Morse character is encoded in one byte: for the four Most Significant Bits, a dah is a 1 and a dit is a 0. For instance, K being -.- the first three bits from the left will be 101. The three Least Significant Bits represent the number of elements, in our case 3, hence the last 3 bits on the left will be 011 while the middle bits will be set to 0. K will thus be 10100011 = decimal 163."

So you will have:

A=66 B=132 C=164 D=131 E=1
F=36 G=195 H=4 I=2 J=116 K=163
L=68 M=194 N=130 O=227 P=100
Q=212 R=67 S=3 T=129 U=35
V=20 W=99 X=148 Y=180 Z=196
1=125 2=61 3=29 4=13 5=5 6=133
7=197 8=229 9=245 0=253 /=149

Here is the code:

' Note 218 bytes used, 253 with ID


' Combination of Steve's code and Andre's code
'Symbol usage follows Andre's code

Symbol Tone = 100
Symbol Quiet = 0
Symbol Dit_length = 10
Symbol Dah_length = 30
Symbol Wrd_length = 60
Symbol Character = b4 'holds the character to be sent in Morse
Symbol Index1 = b5 'not needed when we have a different Main
Symbol Index2 = b6 'works thru the number of elements
Symbol Num_elements = b7 'the number of elements in a Morse Code Character
Symbol Frame = w0 'holds the frame count
Symbol Wrd = w1 'holds the number in hex, binary, whatever
Symbol Decimal_0 = b8 'holds least significant decimal
Symbol Decimal_1 = b9
Symbol Decimal_2 = b10
Symbol Decimal_3 = b11
Symbol Decimal_x = b12 'holds the decimal being translated to morse code
Symbol Flag = b13 'indicates leading zeros

Frame = 0

'Main routine starts here
Main:

pause 2000 'Wait 2 seconds for transmitter to come on

for index1 = 0 to 5
lookup index1, (4,2,4,2,0,36),Character
gosub Send_letter
next index1
Wrd = Frame 'Prepare to send frame counter
gosub Send_word

pause 1000 'Wait 2 seconds

Temperature:
Character = 129 ' Send "T" for Temperature
gosub Send_letter
readadc10 1, Wrd 'Get value of Analog input on ADC Pin 1 (Chip pin 6)
gosub Send_word

pause 1000 'Wait 2 seconds

Light:
Character = 68 ' Send "L" for Light
gosub Send_letter
readadc10 4, Wrd ' Get value of Analog input on ADC Pin 4 (Chip pin 3)

gosub Send_word

Id:
Decimal_x = Frame % 10
if Decimal_x <> 0 then Skip_id
pause 1000
for index1 = 0 to 9
lookup index1, (131,1,0,163,29,100,196,130,0,0),Character
gosub Send_letter
next index1

Skip_id:
Frame = Frame + 1
pause 10000 'Wait 10 more seconds
goto Main 'End of main program
'Main routine ends here.

Send_word:

'This routine sends out the value in Word in CW.

Decimal_0 = Wrd % 10 'Convert 16 bit binary number to decimal
Wrd = Wrd / 10
Decimal_1 = Wrd % 10
Wrd = Wrd / 10
Decimal_2 = Wrd % 10
Wrd = Wrd / 10
Decimal_3 = Wrd % 10
Decimal_x = Wrd / 10

Flag = 0 'Start with this flag cleared - gets set in Send_number subroutine

gosub Send_number

Decimal_x = Decimal_3
gosub Send_number

Decimal_x = Decimal_2
gosub Send_number

Decimal_x = Decimal_1
gosub Send_number

Decimal_x = Decimal_0
Flag = 1
gosub Send_number
return

Send_number:
if Decimal_x = 0 and Flag = 0 then Skip_digit
Flag = 1
lookup Decimal_x,(253,125,61,29,13,5,133,197,229,245),Character 'character translation table
gosub Send_letter
Skip_digit:
return

'Here is starts the Andre code
'If you are doing a project using Morse Code you might want
'to use this section.
'The high 0, low 0 stuff I added to trigger an LED on port 0
'along with the sound.
Send_letter:
let Num_elements = Character & %00000111
if Num_elements <> 0 then Normal_letter
sound 2,(Quiet,Wrd_Length)
goto End_if1

Normal_letter:
for Index2 = 1 to Num_elements
if Character >= 128 then If_send_dah
high 0 sound 2,(Tone,Dit_Length)
low 0 sound 2,(Quiet,Dit_Length)
goto End_if2

If_send_dah:
high 0 sound 2,(Tone,Dah_Length)
low 0 sound 2,(Quiet,Dit_Length)

End_if2:
let Character = Character * 2
next Index2

sound 2,(Quiet,Dah_Length)

End_if1:
return
'Here ends the Andre code