Merge pull request #146 from alanbjohnston/master

FIABv3 up to date
FIAB-v3
alanbjohnston 4 years ago committed by GitHub
commit 281d586ed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,13 +4,13 @@ The CubeSat Simulator https://github.com/alanbjohnston/CubeSatSim/wiki is a low
There are several hardware versions and software branches to go with them - see below for information. There are several hardware versions and software branches to go with them - see below for information.
See the Wiki Software Install page for more details: https://github.com/alanbjohnston/CubeSatSim/wiki/2.-Software-Install. The software runs on any Raspberry Pi including the Raspberry Pi 4B, 3B, 3B+, Pi Zero or Pi Zero W. See the Wiki Software Install page for more details: https://github.com/alanbjohnston/CubeSatSim/wiki/2.-Software-Install. The software runs on any Raspberry Pi including the Raspberry Pi 4B, 3B, 3B+, Pi Zero, Pi Zero W, or Pi Zero 2 W.
There are two ways to get the CubeSatSim software for your Pi. There are two ways to get the CubeSatSim software for your Pi.
One option is to download the disk image file and write it to a 16GB micro SD card or larger. The image is based on Raspberry Pi OS (Rasbian) Lite, dated December 2020. All software is installed, you just need to login to change your password and set your amateur radio callsign if you have one. You can run the ./update.sh script to update all packages and update and compile the latest CubeSatSim software. One option is to download the disk image file and write it to a 16GB micro SD card or larger. The image is based on Raspberry Pi OS (Rasbian) Lite, dated December 2020. All software is installed, you just need to login to change your password and set your amateur radio callsign if you have one. You can run the ./update.sh script to update all packages and update and compile the latest CubeSatSim software.
The other option is to start with any Raspberry Pi OS (Rasbian) image and run the installation script ./install.sh which will install and compile all the related software. This includes the following packages: The other option is to start with a Raspberry Pi OS (Rasbian) image (Bullseye or Buster works) and run the installation script ./install.sh which will install and compile all the related software. This includes the following packages:
- wiringpi - wiringpi
- git - git
- libasound2-dev - libasound2-dev
@ -18,7 +18,7 @@ The other option is to start with any Raspberry Pi OS (Rasbian) image and run th
- Direwolf - Direwolf
- rpitx - rpitx
- python3-pip - python3-pip
- python-smbus - python3-smbus
## Disk Image Option Steps ## Disk Image Option Steps
@ -26,7 +26,7 @@ See the Wiki Software Install page for details: https://github.com/alanbjohnston
## Installation Script Option Steps ## Installation Script Option Steps
CubeSatSim runs on any version of Raspberry Pi OS (Desktop or Lite), although a Pi Zero or Pi Zero W should only run Lite. Your Pi will need to have internet access to update settings and install packages. CubeSatSim runs on the Bullseye or Buster version of Raspberry Pi OS (Desktop or Lite), although a Pi Zero or Pi Zero W should only run Lite. Your Pi will need to have internet access to update settings and install packages.
To get the software follow these steps: To get the software follow these steps:

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
echo "CubeSatSim v1.0 configuration tool" echo "CubeSatSim v1.2 configuration tool"
if [ "$2" = "-n" ]; then if [ "$2" = "-n" ]; then
norestart=1 norestart=1

@ -1,6 +1,6 @@
The current CubeSatSim hardware is in the v1.1 folder. The folder contains gerbers, schematics, and images of the Main, Battery, and STEM Payload boards. The current CubeSatSim hardware is in the v1.2 folder https://github.com/alanbjohnston/CubeSatSim/tree/master/hardware/v1.2. The folder contains gerbers, schematics, and images of the Main, Battery, and STEM Payload boards.
Note: the only differences between the v1.1 and v1.0 hardware is a Low Pass Filter instead of a Band Pass Filter - this only affects the SMD components. Note: the main differences between the v1.2 and v1.1 hardware is a USB-C charging connector instead of the micro USB.
For information on building the boards, see https://cubesatsim.org/wiki. For information on building the boards, see https://cubesatsim.org/wiki.

@ -1,11 +1,16 @@
Here is information about the CubeSatSim Lite vB3 hardware Here is information about the CubeSatSim Lite vB3 hardware
For more information on the CubeSatSim Lite, see the Wiki page: https://github.com/alanbjohnston/CubeSatSim/wiki/CubeSatSim-Lite
cubesat-sim-lite_0.3_gerbers.zip -- All gerber files used to fabricate PCBs The Bill of Materials BOM is available: https://docs.google.com/spreadsheets/d/1aipwo_GPjR6v25ptgmX-ytKo2cidzvXjQHHQDvVWahU/edit?usp=sharing
cubesat-sim-lite-0.3_schematic.pdf -- Schematic Here are the hardware files:
cubesat-sim-lite-0.3.mnb cubesat-sim-lite_0.3_gerbers.zip -- All gerber files used to fabricate PCB
cubesat-sim-lite-0.3.mnb cubesat-sim-lite-0.3_schematic.pdf -- Schematic
cubesat-sim-lite-0.3.mnt -- Mount Top file
cubesat-sim-lite-0.3_board.png -- Image of the board

@ -0,0 +1,15 @@
"Qty";"Value";"Device";"Package";"Parts";"Description";"AVAILABILITY";"DESCRIPTION";"MF";"MP";"MPN";"PACKAGE";"PRICE";"PROD_ID";"PURCHASE-URL";"VALUE";
"1";"0R";"SMD-RES-1.2K-1%-1/10W(0603)";"R0603";"R14";"301010206";"";"";"";"";"RC0603FR-071K2L";"";"";"";"";"1.2K";
"1";"1.0K";"RESISTOR0603";"0603-RES";"R11";"Resistor";"";"";"";"";"";"";"";"";"";"";
"1";"10pF";"CERAMIC-10PF-50V-5%-NPO(0603)";"C0603";"C2";"302010097";"";"";"";"";"";"";"";"";"";"10pf";
"1";"12pF";"CERAMIC-10PF-50V-5%-NPO(0603)";"C0603";"C1";"302010097";"";"";"";"";"";"";"";"";"";"10pf";
"1";"13nH";"SMD-FERRITE-CHIP-120-OHM-500MA(0603)";"L0603";"L1";"303030001";"";"";"";"";"BLM18AG121SN1D";"";"";"";"";"120";
"1";"3.3K";"RESISTOR0603-RES";"0603-RES";"R12";"Resistor";"";"";"";"";"";"";"";"";"";"";
"1";"ANT-916-CHP-T";"ANT-916-CHP-T";"XDCR_ANT-916-CHP-T";"E1";"868MHz ISM, LoRa, Sensor Networks, SigFox Chip RF Antenna 863MHz ~ 873MHz 0.5dBi Solder Surface Mount Check prices";"Warning";" 915 MHz Monopole Ceramic Chip Antenna ";"Linx Technologies";"ANT-916-CHP-T";"";"Antenna Linx Technologies";"None";"";"https://pricing.snapeda.com/search/part/ANT-916-CHP-T/?ref=eda";"";
"1";"BLUE";"LED-BLUE0603";"LED-0603";"D2";"Blue SMD LED";"";"";"";"";"";"";"";"DIO-08575";"";"BLUE";
"1";"CONN_20X2";"CONN_20X2";"2X20";"J1";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";"";"";"";"";"";"";"";"";"";
"1";"DNI/0R";"SMD-RES-1.2K-1%-1/10W(0603)";"R0603";"R15";"301010206";"";"";"";"";"RC0603FR-071K2L";"";"";"";"";"1.2K";
"2";"DNI/1K";"SMD-RES-1.2K-1%-1/10W(0603)";"R0603";"R2, R6";"301010206";"";"";"";"";"RC0603FR-071K2L";"";"";"";"";"1.2K";
"2";"DTSM-6";"DTSM-6";"DTSM-6";"S1, S2";"";"";"";"";"";"";"";"";"";"";"";
"1";"GREEN";"LED-GREEN0603";"LED-0603";"D1";"Green SMD LED";"";"";"";"";"";"";"";"DIO-00821";"";"GREEN";
"1";"SMA-VERT";"SMA-VERT";"SMA-VERT";"X11";"";"";"";"";"";"";"";"";"";"";"";

@ -0,0 +1,14 @@
C1 11.42 24.80 180 12pF C0603
C2 15.79 24.78 180 10pF C0603
D1 40.40 5.11 270 GREEN LED-0603
D2 27.65 4.97 270 BLUE LED-0603
E1 3.18 17.57 270 ANT-916-CHP-T XDCR_ANT-916-CHP-T
L1 13.60 25.54 180 13nH L0603
R2 46.76 25.88 270 DNI/1K R0603
R6 50.58 25.88 270 DNI/1K R0603
R11 40.42 8.12 270 1.0K 0603-RES
R12 27.65 8.34 270 3.3K 0603-RES
R14 9.22 25.58 90 0R R0603
R15 9.98 23.32 180 DNI/0R R0603
S1 52.71 6.22 270 DTSM-6 DTSM-6
S2 14.66 6.15 270 DTSM-6 DTSM-6

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

@ -0,0 +1,11 @@
Here is information about the CubeSatSim Lite vB4 hardware
cubesat-sim-lite_0.4_gerbers.zip -- All gerber files used to fabricate PCBs
cubesat-sim-lite-0.4_schematic.pdf -- Schematic
cubesat-sim-lite-0.4.mnb
cubesat-sim-lite-0.4_pcb.png -- image of board
cubesat-sim-lite-0.4.csv.txt -- Bill of Materials (BOM)

@ -0,0 +1,13 @@
Here is information about the CubeSatSim Lite vB5 hardware
cubesatsim-lite_0.5_gerbers.zip -- All gerber files used to fabricate PCBs
cubesatsim-lite-0.5_schematic.pdf -- Schematic
cubesatsim-lite-0.5.mnt -- SMD file
cubesatsim-lite-0.5_pcb.png -- image of board
cubesatsim-lite-0.5.csv.txt -- Bill of Materials (BOM)
For more information see https://github.com/alanbjohnston/CubeSatSim/wiki/CubeSatSim-Lite

@ -0,0 +1,17 @@
"Part";"Value";"Device";"Package";"Description";"AVAILABILITY";"DESCRIPTION";"MF";"MP";"MPN";"PACKAGE";"PRICE";"PROD_ID";"PURCHASE-URL";"VALUE";
"C1";"12pF";"CERAMIC-10PF-50V-5%-NPO(0603)";"C0603";"302010097";"";"";"";"";"";"";"";"";"";"10pf";
"C2";"10pF";"CERAMIC-10PF-50V-5%-NPO(0603)";"C0603";"302010097";"";"";"";"";"";"";"";"";"";"10pf";
"D1";"GREEN";"LED-GREEN0603";"LED-0603";"Green SMD LED";"";"";"";"";"";"";"";"DIO-00821";"";"GREEN";
"D2";"BLUE";"LED-BLUE0603";"LED-0603";"Blue SMD LED";"";"";"";"";"";"";"";"DIO-08575";"";"BLUE";
"E1";"ANT-916-CHP-T";"ANT-916-CHP-T";"XDCR_ANT-916-CHP-T";"868MHz ISM, LoRa, Sensor Networks, SigFox Chip RF Antenna 863MHz ~ 873MHz 0.5dBi Solder Surface Mount Check prices";"Warning";" 915 MHz Monopole Ceramic Chip Antenna ";"Linx Technologies";"ANT-916-CHP-T";"";"Antenna Linx Technologies";"None";"";"https://pricing.snapeda.com/search/part/ANT-916-CHP-T/?ref=eda";"";
"J1";"CONN_20X2";"CONN_20X2";"2X20";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";"";"";"";"";"";"";"";"";"";
"L1";"13nH";"SMD-FERRITE-CHIP-120-OHM-500MA(0603)";"L0603";"303030001";"";"";"";"";"BLM18AG121SN1D";"";"";"";"";"120";
"R2";"DNI/1K";"SMD-RES-1.2K-1%-1/10W(0603)";"R0603";"301010206";"";"";"";"";"RC0603FR-071K2L";"";"";"";"";"1.2K";
"R6";"DNI/1K";"SMD-RES-1.2K-1%-1/10W(0603)";"R0603";"301010206";"";"";"";"";"RC0603FR-071K2L";"";"";"";"";"1.2K";
"R11";"1.0K";"RESISTOR0603";"0603-RES";"Resistor";"";"";"";"";"";"";"";"";"";"";
"R12";"3.3K";"RESISTOR0603-RES";"0603-RES";"Resistor";"";"";"";"";"";"";"";"";"";"";
"R14";"0R";"SMD-RES-1.2K-1%-1/10W(0603)";"R0603";"301010206";"";"";"";"";"RC0603FR-071K2L";"";"";"";"";"1.2K";
"R15";"DNI/0R";"SMD-RES-1.2K-1%-1/10W(0603)";"R0603";"301010206";"";"";"";"";"RC0603FR-071K2L";"";"";"";"";"1.2K";
"S1";"DTSM-6";"DTSM-6";"DTSM-6";"";"";"";"";"";"";"";"";"";"";"";
"S2";"DTSM-6";"DTSM-6";"DTSM-6";"";"";"";"";"";"";"";"";"";"";"";
"X11";"SMA-VERT";"SMA-VERT";"SMA-VERT";"";"";"";"";"";"";"";"";"";"";"";

@ -0,0 +1,14 @@
C1 11.42 24.80 180 12pF C0603
C2 15.79 24.78 180 10pF C0603
D1 40.40 5.11 270 GREEN LED-0603
D2 27.65 4.97 270 BLUE LED-0603
E1 3.18 17.57 270 ANT-916-CHP-T XDCR_ANT-916-CHP-T
L1 13.60 25.54 180 13nH L0603
R2 46.76 25.88 270 DNI/1K R0603
R6 50.58 25.88 270 DNI/1K R0603
R11 40.42 8.12 270 1.0K 0603-RES
R12 27.65 8.34 270 3.3K 0603-RES
R14 9.22 25.58 90 0R R0603
R15 9.98 23.32 180 DNI/0R R0603
S1 52.71 6.22 270 DTSM-6 DTSM-6
S2 14.66 6.15 270 DTSM-6 DTSM-6

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

@ -2,6 +2,8 @@ Here is information about the CubeSatSim v1.1 hardware
NOTE: The change between v1.0 and v1.1 is changing the BPF to a LPF. Only the SMD components change - all the rest are identical NOTE: The change between v1.0 and v1.1 is changing the BPF to a LPF. Only the SMD components change - all the rest are identical
NOTE: The STEM Payload Board has a 1.1a version. The only change is a cutout on the edge of the PCB to increase clearance for the Pi Camera. Otherwsie, it is identical to the 1.1 version.
There are files for the main board, battery board, and STEM payload board of these types: There are files for the main board, battery board, and STEM payload board of these types:
* cubesatsim-main-1.1_gerbers.zip -- All gerber files used to fabricate PCBs * cubesatsim-main-1.1_gerbers.zip -- All gerber files used to fabricate PCBs

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 801 KiB

@ -0,0 +1,51 @@
100nF; 1833; 1700;180;C1
100nF; 2560; 449; 0;C2
100nF; 240; 2008; 90;C3
1N5817; 76; 1630;270;D1
1N5817; 214; 2629; 90;D2
1N5817; 488; 2629; 90;D3
1N4148; 2341; 458;180;D4
DNI-1x2 pin header; 1637; 2621;180;J1
DNI-1x2 pin header; 1637; 2444;180;J2
DNI-1x4 pin header; 2708; 595;180;J3
CONN_20X2; 1282; 2923; 0;J4
MPU6050; 1050; 1894;180;J5
1x20 female header; 1073; 722; 0;J6
1x20 female header; 1073; 1305; 0;J7
; 653; 1564; 0;JP1
; 756; 1564; 0;JP2
; 1323; 1580; 0;JP3
JUMPER-SMT_2_NO_SILK; 1508; 2539;180;JP4
JUMPER-SMT_2_NO_SILK; 1759; 2534;180;JP5
; 1123; 1580; 0;JP6
; 1223; 1580; 0;JP7
; 1023; 1580; 0;JP8
; 923; 1580; 0;JP9
; 2023; 1580; 0;JP10
; 1923; 1580; 0;JP11
DNI-1x3 pin header with jumper; 464; 1680; 90;JP12
DNI-1x3 pin header with jumper; 272; 1680; 90;JP13
; 1623; 1580; 0;JP14
; 1823; 1580; 0;JP15
; 1723; 1580; 0;JP16
JUMPER-SMT_2_NC_TRACE_SILK; 443; 1434; 90;JP17
JUMPER-SMT_2_NO_SILK; 536; 1434;270;JP18
JUMPER-SMT_2_NC_TRACE_SILK; 275; 1434; 90;JP19
JUMPER-SMT_2_NO_SILK; 176; 1434;270;JP20
BME280; 1846; 1894; 0;JP21
Green 5mm; 110; 2241;180;LED1
Blue 5mm; 104; 2465;180;LED2
DNI-Green 5mm; 2032; 3338; 90;LED3
DNI-Blue 5mm; 932; 3340; 90;LED4
4.7k; 892; 1710;180;R1
4.7k; 673; 1710; 0;R2
470; 320; 2241;180;R3
470; 320; 2465;180;R4
DNI-1k; 2032; 3136; 90;R5
DNI-100; 932; 3136; 90;R6
DNI-4k; 1882; 2621;180;R7
DNI-4k; 1882; 2444;180;R8
10K; 339; 2008; 90;R9
10K; 142; 2008;270;R10
10K; 2271; 582; 0;R11
Sparkfun Pro Micro 3.3V 8MHz; 979; 887;270;U1

@ -0,0 +1,25 @@
"Qty";"Value";"Device";"Package";"Parts";"Description";"PROD_ID";
"12";"";"M01NOSILK-KIT";"1X01NS-KIT";"JP1, JP2, JP3, JP6, JP7, JP8, JP9, JP10, JP11, JP14, JP15, JP16";"Header 1";"";
"3";"100nF";"CAPPTH";"CAP-PTH-SMALL";"C1, C2, C3";"Capacitor";"";
"3";"10K";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"R9, R10, R11";"Resistor";"";
"1";"1N4148";"DIODE-D-2.5";"D-2.5";"D4";"DIODE";"";
"3";"1N5817";"DIODE-D-2.5";"D-2.5";"D1, D2, D3";"DIODE";"";
"2";"1x20 female header";"M20NOSILK";"1X20_NOSILK";"J6, J7";"1x20 .1" header";"";
"2";"4.7k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"R1, R2";"Resistor";"";
"2";"470";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"R3, R4";"Resistor";"";
"1";"BME280";"M04NO_SILK_ALL_ROUND";"1X04_NO_SILK_ALL_ROUND";"JP21";"Header 4";"";
"1";"Blue 5mm";"LED3MM";"LED3MM";"LED2";"LED";"";
"1";"CONN_20X2";"CONN_20X2";"2X20";"J4";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";
"1";"DNI-100";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"R6";"Resistor";"";
"1";"DNI-1k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"R5";"Resistor";"";
"2";"DNI-1x2 pin header";"CONN_021X02_NO_SILK";"1X02_NO_SILK";"J1, J2";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";
"2";"DNI-1x3 pin header with jumper";"M031X03_NO_SILK";"1X03_NO_SILK";"JP12, JP13";"Header 3";"";
"1";"DNI-1x4 pin header";"CONN_041X04_NO_SILK";"1X04_NO_SILK";"J3";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"CONN-09696";
"2";"DNI-4k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"R7, R8";"Resistor";"";
"1";"DNI-Blue 5mm";"LED3MM";"LED3MM";"LED4";"LED";"";
"1";"DNI-Green 5mm";"LED3MM";"LED3MM";"LED3";"LED";"";
"1";"Green 5mm";"LED3MM";"LED3MM";"LED1";"LED";"";
"2";"JUMPER-SMT_2_NC_TRACE_SILK";"JUMPER-SMT_2_NC_TRACE_SILK";"SMT-JUMPER_2_NC_TRACE_SILK";"JP17, JP19";"Normally closed trace jumper";"";
"4";"JUMPER-SMT_2_NO_SILK";"JUMPER-SMT_2_NO_SILK";"SMT-JUMPER_2_NO_SILK";"JP4, JP5, JP18, JP20";"Normally open jumper";"";
"1";"MPU6050";"M08NO_SILK_FEMALE_PTH";"1X08_NO_SILK";"J5";"Header 8";"CONN-08438";
"1";"Sparkfun Pro Micro 3.3V 8MHz";"SPARKFUN_PRO_MICRO";"SPARKFUN_PRO_MICRO";"U1";"SparkFun Pro Micro";"";

@ -0,0 +1,6 @@
JP4 38.30 64.49 180 JUMPER-SMT_2_NO_SILK SMT-JUMPER_2_NO_SILK
JP5 44.68 64.36 180 JUMPER-SMT_2_NO_SILK SMT-JUMPER_2_NO_SILK
JP17 11.25 36.42 90 JUMPER-SMT_2_NC_TRACE_SILK SMT-JUMPER_2_NC_TRACE_SILK
JP18 13.61 36.42 270 JUMPER-SMT_2_NO_SILK SMT-JUMPER_2_NO_SILK
JP19 6.99 36.42 90 JUMPER-SMT_2_NC_TRACE_SILK SMT-JUMPER_2_NC_TRACE_SILK
JP20 4.47 36.42 270 JUMPER-SMT_2_NO_SILK SMT-JUMPER_2_NO_SILK

@ -0,0 +1 @@
J1 32.55 74.23 0 CONN_20X2 2X20

@ -0,0 +1,52 @@
"Part";"Value";"Device";"Package";"Description";"PROD_ID";
"C1";"100nF";"CAPPTH";"CAP-PTH-SMALL";"Capacitor";"";
"C2";"100nF";"CAPPTH";"CAP-PTH-SMALL";"Capacitor";"";
"C3";"100nF";"CAPPTH";"CAP-PTH-SMALL";"Capacitor";"";
"D1";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";
"D2";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";
"D3";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";
"D4";"1N4148";"DIODE-D-2.5";"D-2.5";"DIODE";"";
"J1";"CONN_20X2";"CONN_20X2";"2X20";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";
"JP1";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP2";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP3";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP4";"JUMPER-SMT_2_NO_SILK";"JUMPER-SMT_2_NO_SILK";"SMT-JUMPER_2_NO_SILK";"Normally open jumper";"";
"JP5";"JUMPER-SMT_2_NO_SILK";"JUMPER-SMT_2_NO_SILK";"SMT-JUMPER_2_NO_SILK";"Normally open jumper";"";
"JP6";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP7";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP8";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP9";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP10";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP11";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP12";"DNI-1x3 pin header with jumper";"M031X03_NO_SILK";"1X03_NO_SILK";"Header 3";"";
"JP13";"DNI-1x3 pin header with jumper";"M031X03_NO_SILK";"1X03_NO_SILK";"Header 3";"";
"JP14";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP15";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP16";"";"M01NOSILK-KIT";"1X01NS-KIT";"Header 1";"";
"JP17";"JUMPER-SMT_2_NC_TRACE_SILK";"JUMPER-SMT_2_NC_TRACE_SILK";"SMT-JUMPER_2_NC_TRACE_SILK";"Normally closed trace jumper";"";
"JP18";"JUMPER-SMT_2_NO_SILK";"JUMPER-SMT_2_NO_SILK";"SMT-JUMPER_2_NO_SILK";"Normally open jumper";"";
"JP19";"JUMPER-SMT_2_NC_TRACE_SILK";"JUMPER-SMT_2_NC_TRACE_SILK";"SMT-JUMPER_2_NC_TRACE_SILK";"Normally closed trace jumper";"";
"JP20";"JUMPER-SMT_2_NO_SILK";"JUMPER-SMT_2_NO_SILK";"SMT-JUMPER_2_NO_SILK";"Normally open jumper";"";
"JP21";"DNI-1x2 pin header";"CONN_021X02_NO_SILK";"1X02_NO_SILK";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";
"JP22";"DNI-1x2 pin header";"CONN_021X02_NO_SILK";"1X02_NO_SILK";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";
"JP23";"DNI-1x4 pin header";"CONN_041X04_NO_SILK";"1X04_NO_SILK";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"CONN-09696";
"LED1";"Green 5mm";"LED3MM";"LED3MM";"LED";"";
"LED2";"Blue 5mm";"LED3MM";"LED3MM";"LED";"";
"LED3";"DNI-Green 5mm";"LED3MM";"LED3MM";"LED";"";
"LED4";"DNI-Blue 5mm";"LED3MM";"LED3MM";"LED";"";
"R1";"4.7k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R2";"4.7k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R3";"470";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R4";"470";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R5";"DNI-1k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R6";"DNI-100";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R7";"DNI-4k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R8";"DNI-4k";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R9";"10K";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R10";"10K";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"R11";"10K";"RESISTORPTH-1/4W-VERT";"AXIAL-0.1";"Resistor";"";
"U1";"Sparkfun Pro Micro 3.3V 8MHz";"SPARKFUN_PRO_MICRO";"SPARKFUN_PRO_MICRO";"SparkFun Pro Micro";"";
"U2";"1x20 female header";"M20NOSILK";"1X20_NOSILK";"1x20 .1" header";"";
"U2A";"1x20 female header";"M20NOSILK";"1X20_NOSILK";"1x20 .1" header";"";
"U3";"MPU6050";"M08NO_SILK_FEMALE_PTH";"1X08_NO_SILK";"Header 8";"CONN-08438";
"U4";"BME280";"M04NO_SILK_ALL_ROUND";"1X04_NO_SILK_ALL_ROUND";"Header 4";"";

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 KiB

@ -0,0 +1,16 @@
D1 19.72 35.76 180 1N5817 D-2.5
D2 19.72 31.53 180 1N5817 D-2.5
D3 22.82 21.91 180 1N5817 D-2.5
D4 57.10 21.78 0 1N5817 D-2.5
D5 58.97 30.48 0 1N5817 D-2.5
D6 58.97 34.22 0 1N5817 D-2.5
D7 25.41 60.76 0 1N5817 D-2.5
D8 31.48 60.54 90 5V1 Zener 1W ZDIO-2.5
D9 52.92 38.48 90 DNI-5V1 Zener 1W ZDIO-2.5
JP9 11.99 33.49 90 VDD-EN SMT-JUMPER_2_NC_TRACE_SILK
U5 78.85 18.87 90 INA219 purple board INA219
U6 1.60 47.29 270 INA219 purple board INA219
U7 1.68 18.97 270 INA219 purple board INA219
U8 78.79 45.82 90 INA219 purple board INA219
U9 40.32 27.69 0 CN3085-MODULE 3s CN3085-MODULE
U10 39.89 47.72 180 1V-5V Boost 5V Regulator USB-BOOST

@ -0,0 +1,20 @@
C1 10.62 75.12 0 18pF C0603
C2 15.01 75.12 0 16pF C0603
J1 32.55 66.61 0 CONN_20X2 2X20
J2 35.71 73.62 180 USB4105-GF-A or GT-USB-7010B USB-C-16P-2LAYER-PADS
J3 35.69 71.12 0 Sparkfun USB-C Breakout 1X06_NO_SILK
J4 14.00 7.77 0 Female socket 1x4 1X04_NO_SILK
L1 12.83 74.37 180 13nH L0603
LED1 64.39 77.29 90 Green 5mm LED3MM
LED2 20.60 77.25 90 Blue 5mm LED3MM
LED3 50.08 77.19 90 Red 5mm LED3MM
R2 47.96 59.89 0 DNI-1k R0603
R6 55.98 59.79 0 DNI-1k R0603
R14 42.52 75.87 0 5.1k R0603
R15 29.03 75.87 180 5.1k R0603
S1 56.91 76.59 0 CFP2-2RC4-AW OS
U1 58.24 45.82 90 INA219 purple board INA219
U2 22.05 47.27 270 INA219 purple board INA219
U3 30.30 1.45 0 INA219 purple board INA219
U4 57.40 1.45 0 INA219 purple board INA219
X1 73.52 73.18 270 SC1464-ND PG203J

@ -0,0 +1,58 @@
"Part";"Value";"Device";"Package";"Description";"MF";"MPN";"OC_FARNELL";"OC_NEWARK";"PROD_ID";"VALUE";
"C1";"18pF";"CERAMIC-10PF-50V-5%-NPO(0603)";"C0603";"302010097";"";"";"";"";"";"10pf";
"C2";"16pF";"CERAMIC-10PF-50V-5%-NPO(0603)";"C0603";"302010097";"";"";"";"";"";"10pf";
"D1";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";"";"";"";"";"";
"D2";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";"";"";"";"";"";
"D3";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";"";"";"";"";"";
"D4";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";"";"";"";"";"";
"D5";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";"";"";"";"";"";
"D6";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";"";"";"";"";"";
"D7";"1N5817";"DIODE-D-2.5";"D-2.5";"DIODE";"";"";"";"";"";"";
"D8";"5V1 Zener 1W";"ZENER-DIODEZD-2.5";"ZDIO-2.5";"Z-Diode";"";"";"";"";"";"";
"D9";"DNI-5V1 Zener 1W";"ZENER-DIODEZD-2.5";"ZDIO-2.5";"Z-Diode";"";"";"";"";"";"";
"F1";"PTC 0ZRG0120FF1E";"PTCPTH";"PTC";"Resettable Fuse PTC";"";"";"";"";"";"";
"J1";"CONN_20X2";"CONN_20X2";"2X20";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";"";"";"";"";"";
"J2";"USB4105-GF-A or GT-USB-7010B";"USB_C_2-LAYER_PADS";"USB-C-16P-2LAYER-PADS";"USB Type C 16Pin Connector";"";"";"";"";"CONN-14122";"";
"J3";"Sparkfun USB-C Breakout";"CONN_06NO_SILK_FEMALE_PTH";"1X06_NO_SILK";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";"";"";"";"CONN-08437";"";
"J4";"Female socket 1x4";"CONN_041X04_NO_SILK";"1X04_NO_SILK";"Multi connection point. Often used as Generic Header-pin footprint for 0.1 inch spaced/style header connections";"";"";"";"";"CONN-09696";"";
"JP1";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP2";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP3";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP4";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP5";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP6";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP7";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP8";"Micro JST";"M02JST-PTH-VERT";"JST-2-PTH-VERT";"Standard 2-pin 0.1" header. Use with";"";"";"";"";"";"";
"JP9";"VDD-EN";"JUMPER-SMT_2_NC_TRACE_SILK";"SMT-JUMPER_2_NC_TRACE_SILK";"Normally closed trace jumper";"";"";"";"";"";"";
"L1";"13nH";"SMD-FERRITE-CHIP-120-OHM-500MA(0603)";"L0603";"303030001";"";"BLM18AG121SN1D";"";"";"";"120";
"LED1";"Green 5mm";"LED3MM";"LED3MM";"LED";"";"";"";"";"";"";
"LED2";"Blue 5mm";"LED3MM";"LED3MM";"LED";"";"";"";"";"";"";
"LED3";"Red 5mm";"LED3MM";"LED3MM";"LED";"";"";"";"";"";"";
"R1";"1K";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R2";"DNI-1k";"R-EU_R0603";"R0603";"RESISTOR, European symbol";"";"";"";"";"";"";
"R3";"4.7k";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R4";"4.7k";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R5";"DNI-1K";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R6";"DNI-1k";"R-EU_R0603";"R0603";"RESISTOR, European symbol";"";"";"";"";"";"";
"R7";"DNI-4.7k";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R8";"DNI-4.7k";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R9";"DNI-0R";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R10";"DNI-0R";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R11";"1k";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R12";"100";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R13";"220";"RESISTORPTH-1/4W-VERT-KIT";"AXIAL-0.1EZ";"Resistor";"";"";"";"";"";"";
"R14";"5.1k";"R-EU_R0603";"R0603";"RESISTOR, European symbol";"";"";"";"";"";"";
"R15";"5.1k";"R-EU_R0603";"R0603";"RESISTOR, European symbol";"";"";"";"";"";"";
"S1";"CFP2-2RC4-AW";"SWITCH-DPDTOS";"OS";"DPDT Version of the COM-00597";"";"";"";"";"";"";
"U1";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U2";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U3";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U4";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U5";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U6";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U7";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U8";"INA219 purple board";"INA219";"INA219";"";"";"";"";"";"";"";
"U9";"CN3085-MODULE 3s";"CN3085-MODULE";"CN3085-MODULE";"";"";"";"";"";"";"";
"U10";"1V-5V Boost 5V Regulator";"USB-BOOST";"USB-BOOST";"";"";"";"";"";"";"";
"X1";"SC1464-ND";"PG203J";"PG203J";"MIC/HEADPHONE JACK";"";"";"unknown";"unknown";"";"";
"X2";"SMA-VERT";"SMA-VERT";"SMA-VERT";"";"";"";"";"";"";"";

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

@ -0,0 +1,37 @@
Here is information about the CubeSatSim v1.2 hardware
NOTE: The change between v1.1 and v1.2 is changing the USB charging connector from a micro USB to a USB-C connector. Some labels also changed
There are files for the main board, battery board, and STEM payload board of these types:
* cubesatsim-main-1.2_gerbers.zip -- All gerber files used to fabricate PCBs
* cubesatsim-main-1.2_schematic.pdf -- Schematic
* cubesatsim-main-1.2_pcb.png -- View of board
* cubesatsim-main-1.2_board_fill.png -- View of board with fill
* cubesatsim-main-1.2_topPCB.png -- Top view of PCB generated by gerbers
* cubesatsim-main-1.2_bottomPCB.png -- Bottom view of PCB generated by gerbers
* cubesatsim-main-1.2_tNames.pdf -- Top outline of components
* cubesatsim-main-1.2_bNames.pdf -- Bottom outline of components
* cubesatsim-main-1.2.mnt -- top SMD component placement data
* cubesatsim-main-1.2.mnb -- bottom SMD component placement data
* cubesatsim-main-1.2_bom.csv.txt -- Bill of Materials in CSV format
I use PCBWay to fabricate PCBs https://pcbway.com
Board sets are available on the AMSAT Store:
https://www.amsat.org/product/amsat-cubesatsim-pcb/
Bill of materials https://CubeSatSim.org/bom
Instructions https://CubeSatSim.org/wiki

@ -1,10 +1,25 @@
#!/bin/bash #!/bin/bash
echo -e "\ninstallation script for CubeSatSim v1.0\n" echo -e "\ninstallation script for CubeSatSim v1.2\n"
FILE=/home/pi/CubeSatSim/sim.cfg
if [ -f "$FILE" ]; then
echo "$FILE exists."
else
echo "creating $FILE"
echo "AMSAT 1 0.0 0.0" > /home/pi/CubeSatSim/sim.cfg
fi
cd
CubeSatSim/config -c -n
CubeSatSim/config -l -n
sudo apt-get update && sudo apt-get dist-upgrade -y sudo apt-get update && sudo apt-get dist-upgrade -y
sudo apt-get install -y wiringpi git libasound2-dev i2c-tools python-picamera python3-picamera build-essential libgd-dev libmagic-dev # removed wiringpi and python-picamera python3-picamera
sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom
cd /tmp cd /tmp
@ -15,7 +30,8 @@ sudo dpkg -i wiringpi-latest.deb
cd cd
sudo apt install -y python3-pip python-smbus #changed to python3-smbus
sudo apt install -y python3-pip python3-smbus
sudo pip3 install --upgrade setuptools sudo pip3 install --upgrade setuptools
@ -37,16 +53,6 @@ else
echo "ARG1=f" > .mode echo "ARG1=f" > .mode
fi fi
FILE=/home/pi/CubeSatSim/sim.cfg
if [ -f "$FILE" ]; then
echo "$FILE exists."
else
echo "creating $FILE"
echo "AMSAT 1 0.0 0.0" > /home/pi/CubeSatSim/sim.cfg
fi
cd cd
git clone https://github.com/alanbjohnston/direwolf.git git clone https://github.com/alanbjohnston/direwolf.git
@ -66,6 +72,8 @@ git clone https://github.com/alanbjohnston/pi-power-button.git
cd pi-power-button cd pi-power-button
git checkout master
./script/install ./script/install
@ -112,6 +120,7 @@ sudo raspi-config nonint do_i2c 0
sudo raspi-config nonint do_camera 0 sudo raspi-config nonint do_camera 0
sudo raspi-config nonint do_legacy 0
#if [ "$1" = "u" ]; then #if [ "$1" = "u" ]; then
#fi #fi
@ -155,10 +164,6 @@ sudo raspi-config nonint do_camera 0
sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt
fi fi
CubeSatSim/config -c -n
CubeSatSim/config -l -n
echo "Would you like to reboot to complete the installation (y/n)?" echo "Would you like to reboot to complete the installation (y/n)?"
read -r ANS read -r ANS

@ -23,6 +23,24 @@
int main(int argc, char * argv[]) { int main(int argc, char * argv[]) {
char resbuffer[1000];
const char testStr[] = "cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' | sed 's/^1000//' | grep '902120'";
FILE *file_test = sopen(testStr); // see if Pi Zero 2
fgets(resbuffer, 1000, file_test);
// fprintf(stderr, "test result: %s\n", resbuffer);
fclose(file_test);
// fprintf(stderr, " %x ", resbuffer[0]);
// fprintf(stderr, " %x ", resbuffer[1]);
if (resbuffer[1] != 0)
{
sleep(5); // try sleep at start to help boot
voltageThreshold = 3.7;
printf("Pi Zero 2 detected");
}
printf("\n\nCubeSatSim v1.2 starting...\n\n");
FILE * rpitx_stop = popen("sudo systemctl stop rpitx", "r"); FILE * rpitx_stop = popen("sudo systemctl stop rpitx", "r");
pclose(rpitx_stop); pclose(rpitx_stop);
@ -645,7 +663,7 @@ int main(int argc, char * argv[]) {
// IHUcpuTemp = (int)((cpuTemp * 10.0) + 0.5); // IHUcpuTemp = (int)((cpuTemp * 10.0) + 0.5);
} }
fclose(cpuTempSensor); fclose(cpuTempSensor);
}
if (payload == ON) { // -55 if (payload == ON) { // -55
STEMBoardFailure = 0; STEMBoardFailure = 0;
@ -707,7 +725,7 @@ int main(int argc, char * argv[]) {
payload = OFF; // turn off since STEM Payload is not responding payload = OFF; // turn off since STEM Payload is not responding
} }
if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) { if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) {
for (count1 = 0; count1 < 17; count1++) { for (int count1 = 0; count1 < 17; count1++) {
if (sensor[count1] < sensor_min[count1]) if (sensor[count1] < sensor_min[count1])
sensor_min[count1] = sensor[count1]; sensor_min[count1] = sensor[count1];
if (sensor[count1] > sensor_max[count1]) if (sensor[count1] > sensor_max[count1])
@ -715,12 +733,14 @@ int main(int argc, char * argv[]) {
// printf("Smin %f Smax %f \n", sensor_min[count1], sensor_max[count1]); // printf("Smin %f Smax %f \n", sensor_min[count1], sensor_max[count1]);
} }
} }
} // }
#ifdef DEBUG_LOGGING #ifdef DEBUG_LOGGING
fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold); fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold);
#endif #endif
// if ((batteryVoltage > 1.0) && (batteryVoltage < batteryThreshold)) // no battery INA219 will give 0V, no battery plugged into INA219 will read < 1V // if ((batteryVoltage > 1.0) && (batteryVoltage < batteryThreshold)) // no battery INA219 will give 0V, no battery plugged into INA219 will read < 1V
/**/
if ((batteryCurrent > currentThreshold) && (batteryVoltage < voltageThreshold) && !sim_mode) // currentThreshold ensures that this won't happen when running on DC power. if ((batteryCurrent > currentThreshold) && (batteryVoltage < voltageThreshold) && !sim_mode) // currentThreshold ensures that this won't happen when running on DC power.
{ {
fprintf(stderr, "Battery voltage too low: %f V - shutting down!\n", batteryVoltage); fprintf(stderr, "Battery voltage too low: %f V - shutting down!\n", batteryVoltage);
@ -743,7 +763,7 @@ int main(int argc, char * argv[]) {
pclose(file6); pclose(file6);
sleep(10); sleep(10);
} }
/**/
// sleep(1); // Delay 1 second // sleep(1); // Delay 1 second
ctr = 0; ctr = 0;
#ifdef DEBUG_LOGGING #ifdef DEBUG_LOGGING

@ -9,6 +9,8 @@ from time import sleep
import sys import sys
from os import system from os import system
print("CubeSatSim v1.1 rpitx.py starting...")
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False) GPIO.setwarnings(False)
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP)
@ -41,7 +43,15 @@ else:
txLedOn = 1 txLedOn = 1
txLedOff = 0 txLedOff = 0
# GPIO.setup(txLed, GPIO.OUT)
# output(txLed, txLedOff)
GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4
GPIO.setwarnings(False)
GPIO.setup(txLed, GPIO.OUT) GPIO.setup(txLed, GPIO.OUT)
output(txLed, txLedOn)
sleep(1)
output(txLed, txLedOff) output(txLed, txLedOff)
# print(txLedOn) # print(txLedOn)
@ -78,6 +88,8 @@ if __name__ == "__main__":
if (debug_mode == 1): if (debug_mode == 1):
print("Can't read callsign from sim.cfg file, defaulting to AMSAT") print("Can't read callsign from sim.cfg file, defaulting to AMSAT")
print(callsign) print(callsign)
GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4
GPIO.setup(txLed, GPIO.OUT)
sleep(1) sleep(1)
output(txLed, txLedOn) output(txLed, txLedOn)
@ -161,12 +173,15 @@ if __name__ == "__main__":
elif (mode == 's'): elif (mode == 's'):
print("SSTV") print("SSTV")
try: try:
from picamera import PiCamera # from picamera import PiCamera
# from pysstv.sstv import SSTV # from pysstv.sstv import SSTV
camera = PiCamera() # camera = PiCamera()
print("Testing for camera")
system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256")
f = open("/home/pi/CubeSatSim/camera_out.jpg")
print("Camera present") print("Camera present")
camera_present = 1 camera_present = 1
camera.close() # camera.close()
except: except:
print("No camera available") print("No camera available")
print(" -> if camera plugged in, is software enabled?") print(" -> if camera plugged in, is software enabled?")

@ -1,4 +1,4 @@
This spreadsheet is for analyzing the CubeSatSim APRS and CW telemetry ONLY. This spreadsheet is for analyzing the CubeSatSim APRS and CW telemetry ONLY. Note that this spreadsheet is based on the original AMSAT OSCAR 7 AO-7 Morse Code Telemetry Decoder spreadsheet: https://www.amsat.org/amsat/ftp/software/spreadsheet/AO7tlmSS.xls
The best telemetry for the CubeSatSim is FSK which uses the AMSAT FoxTelem software to automatically demodulate, decode, and graph the data. The best telemetry for the CubeSatSim is FSK which uses the AMSAT FoxTelem software to automatically demodulate, decode, and graph the data.

@ -1,9 +1,11 @@
// code for Pro Micro or STM32 on the CubeSat Simulator STEM Payload board
// answers "OK" on the serial port Serial1 when queried by the Pi
#include <Wire.h> #include <Wire.h>
#include <Adafruit_Sensor.h> #include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h> #include <Adafruit_BME280.h>
#include <MPU6050_tockn.h> #include <MPU6050_tockn.h>
#include <EEPROM.h> #include <EEPROM.h>
#define SEALEVELPRESSURE_HPA (1013.25) #define SEALEVELPRESSURE_HPA (1013.25)
Adafruit_BME280 bme; Adafruit_BME280 bme;
@ -20,10 +22,20 @@ void eeprom_word_write(int addr, int val);
short eeprom_word_read(int addr); short eeprom_word_read(int addr);
int first_time = true; int first_time = true;
int first_read = true; int first_read = true;
#if defined __AVR_ATmega32U4__
float T2 = 26.3; // Temperature data point 1 float T2 = 26.3; // Temperature data point 1
float R2 = 167; // Reading data point 1 float R2 = 167; // Reading data point 1
float T1 = 2; // Temperature data point 2 float T1 = 2; // Temperature data point 2
float R1 = 179; // Reading data point 2 float R1 = 179; // Reading data point 2
#endif
#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4)
float T2 = 25; // Temperature data point 1
float R2 = 671; // Reading data point 1
float T1 = 15.5; // Temperature data point 2
float R1 = 695; // Reading data point 2
#endif
int sensorValue; int sensorValue;
float Temp; float Temp;
float rest; float rest;
@ -33,6 +45,7 @@ void setup() {
Serial.begin(9600); // Serial Monitor for testing Serial.begin(9600); // Serial Monitor for testing
Serial1.begin(115200); // Pi UART faster speed Serial1.begin(115200); // Pi UART faster speed
// Serial1.begin(9600); // Pi UART faster speed
Serial.println("Starting!"); Serial.println("Starting!");
@ -88,70 +101,57 @@ void setup() {
Serial.println(((float)eeprom_word_read(2)) / 100.0, DEC); Serial.println(((float)eeprom_word_read(2)) / 100.0, DEC);
Serial.println(((float)eeprom_word_read(3)) / 100.0, DEC); Serial.println(((float)eeprom_word_read(3)) / 100.0, DEC);
} }
pinMode(greenLED, OUTPUT); /**/
pinMode(blueLED, OUTPUT);
} }
void loop() { void loop() {
if ((Serial.available() > 0)|| first_time == true) { if (Serial1.available() > 0) {
blink(50); blink(50);
char result = Serial.read(); char result = Serial1.read();
// Serial.println(result); // Serial1.println(result);
// Serial1.println("OK");
if (result == 'R') { // if (result == '?')
Serial.println("OK");
delay(100);
first_time = true;
setup();
}
else if (result == 'C') {
Serial.println("Clearing stored gyro offsets in EEPROM\n");
eeprom_word_write(0, 0x00);
first_time = true;
setup();
}
if ((result == '?') || first_time == true)
{ {
first_time = false;
if (bmePresent) { if (bmePresent) {
Serial.print("OK BME280 "); Serial1.print("OK BME280 ");
Serial.print(bme.readTemperature()); Serial1.print(bme.readTemperature());
Serial.print(" "); Serial1.print(" ");
Serial.print(bme.readPressure() / 100.0F); Serial1.print(bme.readPressure() / 100.0F);
Serial.print(" "); Serial1.print(" ");
Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); Serial1.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
Serial.print(" "); Serial1.print(" ");
Serial.print(bme.readHumidity()); Serial1.print(bme.readHumidity());
} else } else
{ {
Serial.print("OK BME280 0.0 0.0 0.0 0.0"); Serial1.print("OK BME280 0.0 0.0 0.0 0.0");
} }
mpu6050.update(); mpu6050.update();
Serial.print(" MPU6050 "); Serial1.print(" MPU6050 ");
Serial.print(mpu6050.getGyroX()); Serial1.print(mpu6050.getGyroX());
Serial.print(" "); Serial1.print(" ");
Serial.print(mpu6050.getGyroY()); Serial1.print(mpu6050.getGyroY());
Serial.print(" "); Serial1.print(" ");
Serial.print(mpu6050.getGyroZ()); Serial1.print(mpu6050.getGyroZ());
Serial.print(" "); Serial1.print(" ");
Serial.print(mpu6050.getAccX()); Serial1.print(mpu6050.getAccX());
Serial.print(" "); Serial1.print(" ");
Serial.print(mpu6050.getAccY()); Serial1.print(mpu6050.getAccY());
Serial.print(" "); Serial1.print(" ");
Serial.print(mpu6050.getAccZ()); Serial1.print(mpu6050.getAccZ());
sensorValue = analogRead(A3); sensorValue = read_analog();
//Serial.println(sensorValue);
Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1));
// Serial.println(sensorValue);
Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1));
Serial.print(" XS "); Serial1.print(" XS ");
Serial.print(Temp); Serial1.print(Temp);
Serial.print(" "); Serial1.print(" ");
Serial.println(Sensor1); Serial1.println(Sensor2);
float rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ()); float rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ());
float acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ()); float acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ());
@ -159,7 +159,12 @@ void loop() {
// Serial.print(" "); // Serial.print(" ");
// Serial.println(acceleration); // Serial.println(acceleration);
if (acceleration > 1.2) if (first_read == true) {
first_read = false;
rest = acceleration;
}
if (acceleration > 1.2 * rest)
led_set(greenLED, HIGH); led_set(greenLED, HIGH);
else else
led_set(greenLED, LOW); led_set(greenLED, LOW);
@ -169,13 +174,15 @@ void loop() {
else else
led_set(blueLED, LOW); led_set(blueLED, LOW);
} }
}
if (Serial1.available() > 0) { }
if (Serial.available() > 0) {
blink(50); blink(50);
char result = Serial1.read(); char result = Serial.read();
// Serial1.println(result); // Serial.println(result);
// Serial.println("OK");
// Serial.println(counter++);
if (result == 'R') { if (result == 'R') {
Serial1.println("OK"); Serial1.println("OK");
@ -183,46 +190,56 @@ void loop() {
first_read = true; first_read = true;
setup(); setup();
} }
else if (result == 'C') {
Serial.println("Clearing stored gyro offsets in EEPROM\n");
eeprom_word_write(0, 0x00);
first_time = true;
setup();
}
if (result == '?') if ((result == '?') || first_time == true)
{ {
first_time = false;
if (bmePresent) { if (bmePresent) {
Serial1.print("OK BME280 "); Serial.print("OK BME280 ");
Serial1.print(bme.readTemperature()); Serial.print(bme.readTemperature());
Serial1.print(" "); Serial.print(" ");
Serial1.print(bme.readPressure() / 100.0F); Serial.print(bme.readPressure() / 100.0F);
Serial1.print(" "); Serial.print(" ");
Serial1.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
Serial1.print(" "); Serial.print(" ");
Serial1.print(bme.readHumidity()); Serial.print(bme.readHumidity());
} else } else
{ {
Serial1.print("OK BME280 0.0 0.0 0.0 0.0"); Serial.print("OK BME280 0.0 0.0 0.0 0.0");
} }
mpu6050.update(); mpu6050.update();
Serial1.print(" MPU6050 "); Serial.print(" MPU6050 ");
Serial1.print(mpu6050.getGyroX()); Serial.print(mpu6050.getGyroX());
Serial1.print(" "); Serial.print(" ");
Serial1.print(mpu6050.getGyroY()); Serial.print(mpu6050.getGyroY());
Serial1.print(" "); Serial.print(" ");
Serial1.print(mpu6050.getGyroZ()); Serial.print(mpu6050.getGyroZ());
Serial1.print(" "); Serial.print(" ");
Serial1.print(mpu6050.getAccX()); Serial.print(mpu6050.getAccX());
Serial1.print(" "); Serial.print(" ");
Serial1.print(mpu6050.getAccY()); Serial.print(mpu6050.getAccY());
Serial1.print(" "); Serial.print(" ");
Serial1.print(mpu6050.getAccZ()); Serial.print(mpu6050.getAccZ());
sensorValue = read_analog();
sensorValue = analogRead(A3);
//Serial.println(sensorValue);
Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1));
Serial1.print(" XS "); Serial.print(" XS ");
Serial1.print(Temp); Serial.print(Temp);
Serial1.print(" "); Serial.print(" ");
Serial1.println(Sensor2); Serial.print(Sensor2);
Serial.print(" (");
Serial.print(sensorValue);
Serial.println(")");
float rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ()); float rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ());
float acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ()); float acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ());
@ -246,8 +263,7 @@ void loop() {
led_set(blueLED, LOW); led_set(blueLED, LOW);
} }
} }
delay(100);
// delay(100);
} }
void eeprom_word_write(int addr, int val) void eeprom_word_write(int addr, int val)
@ -314,3 +330,15 @@ void led_set(int ledPin, bool state)
digitalWrite(ledPin, state); digitalWrite(ledPin, state);
#endif #endif
} }
int read_analog()
{
int sensorValue;
#if defined __AVR_ATmega32U4__
sensorValue = analogRead(A3);
#endif
#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4)
sensorValue = analogRead(PA7);
#endif
return(sensorValue);
}

@ -14,60 +14,12 @@ int main(int argc, char *argv[]) {
debug = ON; debug = ON;
} }
} }
wiringPiSetup ();
printf("\n"); printf("CubeSatSim v1.2 INA219 Voltage and Current Telemetry\n");
pinMode (2, INPUT);
pullUpDnControl (2, PUD_UP);
if (digitalRead(2) != HIGH)
{
printf("vB3 with TFB Present\n");
map[BUS] = MINUS_Z;
map[BAT] = BUS;
map[PLUS_Z] = BAT;
map[MINUS_Z] = PLUS_Z;
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(0));
}
else
{
pinMode (3, INPUT);
pullUpDnControl (3, PUD_UP);
if (digitalRead(3) != HIGH)
{
printf("vB4 Present\n");
map[BAT] = BUS;
map[BUS] = BAT;
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(0));
// strcpy(busStr,"1 0");
}
else
{
pinMode (26, INPUT);
pullUpDnControl (26, PUD_UP);
if (digitalRead(26) != HIGH)
{
// if (debug == ON)
printf("CubeSatSim v1.0 INA219 Voltage and Current Telemetry\n");
map[MINUS_X] = MINUS_Y; map[MINUS_X] = MINUS_Y;
map[PLUS_Z] = MINUS_X; map[PLUS_Z] = MINUS_X;
map[MINUS_Y] = PLUS_Z; map[MINUS_Y] = PLUS_Z;
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(3)); snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(3));
}
else
{
printf("VB3 Present\n");
map[BUS] = MINUS_Z;
map[BAT] = BUS;
map[PLUS_Z] = BAT;
map[MINUS_Z] = PLUS_Z;
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(0));
}
}
}
// Reading I2C voltage and current sensors // Reading I2C voltage and current sensors
// printf("Starting\n"); // printf("Starting\n");
@ -128,6 +80,7 @@ int main(int argc, char *argv[]) {
printf("-Z | % 4.2f V % 5.0f mA \n", voltage[map[MINUS_Z]], current[map[MINUS_Z]]); printf("-Z | % 4.2f V % 5.0f mA \n", voltage[map[MINUS_Z]], current[map[MINUS_Z]]);
printf("Bat | % 4.2f V % 5.0f mA \n", voltage[map[BAT]], current[map[BAT]]); printf("Bat | % 4.2f V % 5.0f mA \n", voltage[map[BAT]], current[map[BAT]]);
printf("Bus | % 4.2f V % 5.0f mA \n\n", voltage[map[BUS]], current[map[BUS]]); printf("Bus | % 4.2f V % 5.0f mA \n\n", voltage[map[BUS]], current[map[BUS]]);
fclose(file1);
return 0; return 0;
} }

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
echo -e "\nupdate script for CubeSatSim v1.0\n" echo -e "\nupdate script for CubeSatSim v1.2\n"
sudo rm /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/id.txt /home/pi/CubeSatSim/cw.txt > /dev/null 2>&1 sudo rm /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/id.txt /home/pi/CubeSatSim/cw.txt > /dev/null 2>&1
@ -8,10 +8,12 @@ if [ "$1" = "u" ]; then
sudo apt-get update && sudo apt-get dist-upgrade -y sudo apt-get update && sudo apt-get dist-upgrade -y
sudo apt-get install -y wiringpi git libasound2-dev i2c-tools python-picamera python3-picamera build-essential libgd-dev libmagic-dev sudo apt-get install -y wiringpi git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev python3-pip minicom
fi fi
sudo apt-get install -y python3-smbus
sudo sed -i 's/update.sh/update /g' /etc/motd sudo sed -i 's/update.sh/update /g' /etc/motd
sudo sed -i 's/installed and/installed\nand/g' /etc/motd sudo sed -i 's/installed and/installed\nand/g' /etc/motd

Loading…
Cancel
Save

Powered by TurnKey Linux.