diff --git a/README.md b/README.md index 6f7bc957..d319e9c4 100644 --- a/README.md +++ b/README.md @@ -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. -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. 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 - git - libasound2-dev @@ -18,7 +18,7 @@ The other option is to start with any Raspberry Pi OS (Rasbian) image and run th - Direwolf - rpitx - python3-pip -- python-smbus +- python3-smbus ## Disk Image Option Steps @@ -26,7 +26,7 @@ See the Wiki Software Install page for details: https://github.com/alanbjohnston ## 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: diff --git a/config b/config index 765e2620..7f0dec97 100755 --- a/config +++ b/config @@ -1,6 +1,6 @@ #!/bin/bash -echo "CubeSatSim v1.0 configuration tool" +echo "CubeSatSim v1.2 configuration tool" if [ "$2" = "-n" ]; then norestart=1 diff --git a/hardware/README.md b/hardware/README.md index cbfe8a55..ebe70f45 100644 --- a/hardware/README.md +++ b/hardware/README.md @@ -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. diff --git a/hardware/lite/vB3/README.md b/hardware/lite/vB3/README.md index 6f0c168a..e71d92f9 100644 --- a/hardware/lite/vB3/README.md +++ b/hardware/lite/vB3/README.md @@ -1,11 +1,16 @@ 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 diff --git a/hardware/lite/vB4/cubesatsim-lite-0.4.csv.txt b/hardware/lite/vB4/cubesatsim-lite-0.4.csv.txt new file mode 100644 index 00000000..0af81ffb --- /dev/null +++ b/hardware/lite/vB4/cubesatsim-lite-0.4.csv.txt @@ -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";"";"";"";"";"";"";"";"";"";"";""; diff --git a/hardware/lite/vB4/cubesatsim-lite-0.4.mnt b/hardware/lite/vB4/cubesatsim-lite-0.4.mnt new file mode 100644 index 00000000..268387bb --- /dev/null +++ b/hardware/lite/vB4/cubesatsim-lite-0.4.mnt @@ -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 diff --git a/hardware/lite/vB4/cubesatsim-lite-0.4_gerbers.zip b/hardware/lite/vB4/cubesatsim-lite-0.4_gerbers.zip new file mode 100644 index 00000000..0ebd78f9 Binary files /dev/null and b/hardware/lite/vB4/cubesatsim-lite-0.4_gerbers.zip differ diff --git a/hardware/lite/vB4/cubesatsim-lite-0.4_schematic.pdf b/hardware/lite/vB4/cubesatsim-lite-0.4_schematic.pdf new file mode 100644 index 00000000..e8a252ab Binary files /dev/null and b/hardware/lite/vB4/cubesatsim-lite-0.4_schematic.pdf differ diff --git a/hardware/lite/vB4/cubesatsim-lite-04_pcb.png b/hardware/lite/vB4/cubesatsim-lite-04_pcb.png new file mode 100644 index 00000000..74b82bfd Binary files /dev/null and b/hardware/lite/vB4/cubesatsim-lite-04_pcb.png differ diff --git a/hardware/lite/vB4/readme.MD b/hardware/lite/vB4/readme.MD new file mode 100644 index 00000000..04edc861 --- /dev/null +++ b/hardware/lite/vB4/readme.MD @@ -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) diff --git a/hardware/lite/vB5/README.md b/hardware/lite/vB5/README.md new file mode 100644 index 00000000..af044d35 --- /dev/null +++ b/hardware/lite/vB5/README.md @@ -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 diff --git a/hardware/lite/vB5/cubesatsim-lite-0.5.csv.txt b/hardware/lite/vB5/cubesatsim-lite-0.5.csv.txt new file mode 100644 index 00000000..2bcc548e --- /dev/null +++ b/hardware/lite/vB5/cubesatsim-lite-0.5.csv.txt @@ -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";"";"";"";"";"";"";"";"";"";"";""; diff --git a/hardware/lite/vB5/cubesatsim-lite-0.5.mnt b/hardware/lite/vB5/cubesatsim-lite-0.5.mnt new file mode 100644 index 00000000..268387bb --- /dev/null +++ b/hardware/lite/vB5/cubesatsim-lite-0.5.mnt @@ -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 diff --git a/hardware/lite/vB5/cubesatsim-lite-0.5_gerbers.zip b/hardware/lite/vB5/cubesatsim-lite-0.5_gerbers.zip new file mode 100644 index 00000000..596266cf Binary files /dev/null and b/hardware/lite/vB5/cubesatsim-lite-0.5_gerbers.zip differ diff --git a/hardware/lite/vB5/cubesatsim-lite-0.5_pcb.png b/hardware/lite/vB5/cubesatsim-lite-0.5_pcb.png new file mode 100644 index 00000000..e79b752d Binary files /dev/null and b/hardware/lite/vB5/cubesatsim-lite-0.5_pcb.png differ diff --git a/hardware/lite/vB5/cubesatsim-lite-0.5_schematic.pdf b/hardware/lite/vB5/cubesatsim-lite-0.5_schematic.pdf new file mode 100644 index 00000000..5882d3d3 Binary files /dev/null and b/hardware/lite/vB5/cubesatsim-lite-0.5_schematic.pdf differ diff --git a/hardware/v1.1/README.md b/hardware/v1.1/README.md index edce7b53..781000d3 100644 --- a/hardware/v1.1/README.md +++ b/hardware/v1.1/README.md @@ -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 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: * cubesatsim-main-1.1_gerbers.zip -- All gerber files used to fabricate PCBs diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a._pcb.png b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb.png new file mode 100644 index 00000000..72723ab9 Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb.png differ diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_bottom.png b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_bottom.png new file mode 100644 index 00000000..95c8d08a Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_bottom.png differ diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_pour.png b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_pour.png new file mode 100644 index 00000000..a92a56d7 Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_pour.png differ diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_top.png b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_top.png new file mode 100644 index 00000000..98448e89 Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a._pcb_top.png differ diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a.mnt b/hardware/v1.1/cubesatsim-STEM-1.1a.mnt new file mode 100644 index 00000000..6a0d5bab --- /dev/null +++ b/hardware/v1.1/cubesatsim-STEM-1.1a.mnt @@ -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 diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a_bnames.pdf b/hardware/v1.1/cubesatsim-STEM-1.1a_bnames.pdf new file mode 100644 index 00000000..8a6db01a Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a_bnames.pdf differ diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a_bom.csv.txt b/hardware/v1.1/cubesatsim-STEM-1.1a_bom.csv.txt new file mode 100644 index 00000000..e004e337 --- /dev/null +++ b/hardware/v1.1/cubesatsim-STEM-1.1a_bom.csv.txt @@ -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";""; diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a_gerbers.zip b/hardware/v1.1/cubesatsim-STEM-1.1a_gerbers.zip new file mode 100644 index 00000000..5e7b4e10 Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a_gerbers.zip differ diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a_schematic.pdf b/hardware/v1.1/cubesatsim-STEM-1.1a_schematic.pdf new file mode 100644 index 00000000..c1d2179b Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a_schematic.pdf differ diff --git a/hardware/v1.1/cubesatsim-STEM-1.1a_tnames.pdf b/hardware/v1.1/cubesatsim-STEM-1.1a_tnames.pdf new file mode 100644 index 00000000..b4a4e058 Binary files /dev/null and b/hardware/v1.1/cubesatsim-STEM-1.1a_tnames.pdf differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2.mnb b/hardware/v1.2/cubesatsim-STEM-1.2.mnb new file mode 100644 index 00000000..25658199 --- /dev/null +++ b/hardware/v1.2/cubesatsim-STEM-1.2.mnb @@ -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 diff --git a/hardware/v1.2/cubesatsim-STEM-1.2.mnt b/hardware/v1.2/cubesatsim-STEM-1.2.mnt new file mode 100644 index 00000000..5bda3a67 --- /dev/null +++ b/hardware/v1.2/cubesatsim-STEM-1.2.mnt @@ -0,0 +1 @@ +J1 32.55 74.23 0 CONN_20X2 2X20 diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_bnames.pdf b/hardware/v1.2/cubesatsim-STEM-1.2_bnames.pdf new file mode 100644 index 00000000..9d3e32b4 Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_bnames.pdf differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_bom.csv.txt b/hardware/v1.2/cubesatsim-STEM-1.2_bom.csv.txt new file mode 100644 index 00000000..0e0b282e --- /dev/null +++ b/hardware/v1.2/cubesatsim-STEM-1.2_bom.csv.txt @@ -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";""; diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_bottom.png b/hardware/v1.2/cubesatsim-STEM-1.2_bottom.png new file mode 100644 index 00000000..2865a918 Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_bottom.png differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_gerbers.zip b/hardware/v1.2/cubesatsim-STEM-1.2_gerbers.zip new file mode 100644 index 00000000..9a183caa Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_gerbers.zip differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_pcb.png b/hardware/v1.2/cubesatsim-STEM-1.2_pcb.png new file mode 100644 index 00000000..ebe1afe8 Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_pcb.png differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_pour.png b/hardware/v1.2/cubesatsim-STEM-1.2_pour.png new file mode 100644 index 00000000..894b89dd Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_pour.png differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_schematic.pdf b/hardware/v1.2/cubesatsim-STEM-1.2_schematic.pdf new file mode 100644 index 00000000..520306e8 Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_schematic.pdf differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_tnames.pdf b/hardware/v1.2/cubesatsim-STEM-1.2_tnames.pdf new file mode 100644 index 00000000..9e7f6b07 Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_tnames.pdf differ diff --git a/hardware/v1.2/cubesatsim-STEM-1.2_top.png b/hardware/v1.2/cubesatsim-STEM-1.2_top.png new file mode 100644 index 00000000..dac73d01 Binary files /dev/null and b/hardware/v1.2/cubesatsim-STEM-1.2_top.png differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_bnames.pdf b/hardware/v1.2/cubesatsim-battery-1.2_bnames.pdf new file mode 100644 index 00000000..35540409 Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_bnames.pdf differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_gerbers.zip b/hardware/v1.2/cubesatsim-battery-1.2_gerbers.zip new file mode 100644 index 00000000..4e14977c Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_gerbers.zip differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_pcb.png b/hardware/v1.2/cubesatsim-battery-1.2_pcb.png new file mode 100644 index 00000000..7b7f0a06 Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_pcb.png differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_pcb_bottom.png b/hardware/v1.2/cubesatsim-battery-1.2_pcb_bottom.png new file mode 100644 index 00000000..5a2a9622 Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_pcb_bottom.png differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_pcb_top.png b/hardware/v1.2/cubesatsim-battery-1.2_pcb_top.png new file mode 100644 index 00000000..a049904f Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_pcb_top.png differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_pour.png b/hardware/v1.2/cubesatsim-battery-1.2_pour.png new file mode 100644 index 00000000..8dc51bef Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_pour.png differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_schematic.pdf b/hardware/v1.2/cubesatsim-battery-1.2_schematic.pdf new file mode 100644 index 00000000..430c908e Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_schematic.pdf differ diff --git a/hardware/v1.2/cubesatsim-battery-1.2_tnames.pdf b/hardware/v1.2/cubesatsim-battery-1.2_tnames.pdf new file mode 100644 index 00000000..062661e4 Binary files /dev/null and b/hardware/v1.2/cubesatsim-battery-1.2_tnames.pdf differ diff --git a/hardware/v1.2/cubesatsim-main-1.2.mnb b/hardware/v1.2/cubesatsim-main-1.2.mnb new file mode 100644 index 00000000..5a155fd5 --- /dev/null +++ b/hardware/v1.2/cubesatsim-main-1.2.mnb @@ -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 diff --git a/hardware/v1.2/cubesatsim-main-1.2.mnt b/hardware/v1.2/cubesatsim-main-1.2.mnt new file mode 100644 index 00000000..248baaa6 --- /dev/null +++ b/hardware/v1.2/cubesatsim-main-1.2.mnt @@ -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 diff --git a/hardware/v1.2/cubesatsim-main-1.2_bnames.pdf b/hardware/v1.2/cubesatsim-main-1.2_bnames.pdf new file mode 100644 index 00000000..bd966429 Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_bnames.pdf differ diff --git a/hardware/v1.2/cubesatsim-main-1.2_bom.csv.txt b/hardware/v1.2/cubesatsim-main-1.2_bom.csv.txt new file mode 100644 index 00000000..56e27aeb --- /dev/null +++ b/hardware/v1.2/cubesatsim-main-1.2_bom.csv.txt @@ -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";"";"";"";"";"";"";""; diff --git a/hardware/v1.2/cubesatsim-main-1.2_bottom.png b/hardware/v1.2/cubesatsim-main-1.2_bottom.png new file mode 100644 index 00000000..0a189a10 Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_bottom.png differ diff --git a/hardware/v1.2/cubesatsim-main-1.2_gerbers.zip b/hardware/v1.2/cubesatsim-main-1.2_gerbers.zip new file mode 100644 index 00000000..c551925c Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_gerbers.zip differ diff --git a/hardware/v1.2/cubesatsim-main-1.2_pcb.png b/hardware/v1.2/cubesatsim-main-1.2_pcb.png new file mode 100644 index 00000000..ace00752 Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_pcb.png differ diff --git a/hardware/v1.2/cubesatsim-main-1.2_pour.png b/hardware/v1.2/cubesatsim-main-1.2_pour.png new file mode 100644 index 00000000..b187a490 Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_pour.png differ diff --git a/hardware/v1.2/cubesatsim-main-1.2_schematic.pdf b/hardware/v1.2/cubesatsim-main-1.2_schematic.pdf new file mode 100644 index 00000000..004b7da7 Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_schematic.pdf differ diff --git a/hardware/v1.2/cubesatsim-main-1.2_tnames.pdf b/hardware/v1.2/cubesatsim-main-1.2_tnames.pdf new file mode 100644 index 00000000..faef322e Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_tnames.pdf differ diff --git a/hardware/v1.2/cubesatsim-main-1.2_top.png b/hardware/v1.2/cubesatsim-main-1.2_top.png new file mode 100644 index 00000000..bf171bef Binary files /dev/null and b/hardware/v1.2/cubesatsim-main-1.2_top.png differ diff --git a/hardware/v1.2/readme.md b/hardware/v1.2/readme.md new file mode 100644 index 00000000..6343a414 --- /dev/null +++ b/hardware/v1.2/readme.md @@ -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 diff --git a/install b/install index 0bfea58f..bfe6b61e 100755 --- a/install +++ b/install @@ -1,10 +1,25 @@ #!/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 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 @@ -15,7 +30,8 @@ sudo dpkg -i wiringpi-latest.deb 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 @@ -37,16 +53,6 @@ else echo "ARG1=f" > .mode 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 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 +git checkout master + ./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_legacy 0 #if [ "$1" = "u" ]; then #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 fi -CubeSatSim/config -c -n - -CubeSatSim/config -l -n - echo "Would you like to reboot to complete the installation (y/n)?" read -r ANS diff --git a/main.c b/main.c index a77b2472..0088b1da 100644 --- a/main.c +++ b/main.c @@ -22,6 +22,24 @@ #include "main.h" 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"); pclose(rpitx_stop); @@ -645,7 +663,7 @@ int main(int argc, char * argv[]) { // IHUcpuTemp = (int)((cpuTemp * 10.0) + 0.5); } fclose(cpuTempSensor); - + } if (payload == ON) { // -55 STEMBoardFailure = 0; @@ -707,7 +725,7 @@ int main(int argc, char * argv[]) { payload = OFF; // turn off since STEM Payload is not responding } 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]) sensor_min[count1] = sensor[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]); } } - } +// } #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); #endif // 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. { fprintf(stderr, "Battery voltage too low: %f V - shutting down!\n", batteryVoltage); @@ -743,7 +763,7 @@ int main(int argc, char * argv[]) { pclose(file6); sleep(10); } - +/**/ // sleep(1); // Delay 1 second ctr = 0; #ifdef DEBUG_LOGGING @@ -1764,10 +1784,10 @@ void write_wave(int i, short int *buffer) else { if ((ctr - flip_ctr) < smaller) -// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); +// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples] / 2); else -// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); +// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]); } // printf("%d %d \n", i, buffer[ctr - 1]); @@ -1813,7 +1833,7 @@ int test_i2c_bus(int bus) strcat (busDev, busS); printf("I2C Bus Tested: %s \n", busDev); - if (access(busDev, W_OK | R_OK) >= 0) { // Test if I2C Bus is present + if (access(busDev, W_OK | R_OK) >= 0) { // Test if I2C Bus is present // printf("bus is present\n\n"); char result[128]; const char command_start[] = "timeout 2 i2cdetect -y "; // was 5 10 @@ -1835,7 +1855,7 @@ int test_i2c_bus(int bus) if (bus == 3) printf("-> If this is a CubeSatSim Lite, then this error is normal!\n"); output = -1; - } + } } else { printf("ERROR: %s bus has a problem \n Check software to see if I2C enabled \n", busDev); diff --git a/rpitx.py b/rpitx.py index ae5c2728..08f929a1 100644 --- a/rpitx.py +++ b/rpitx.py @@ -9,6 +9,8 @@ from time import sleep import sys from os import system +print("CubeSatSim v1.1 rpitx.py starting...") + GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) @@ -41,7 +43,15 @@ else: txLedOn = 1 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) + +output(txLed, txLedOn) +sleep(1) output(txLed, txLedOff) # print(txLedOn) @@ -78,7 +88,9 @@ if __name__ == "__main__": if (debug_mode == 1): print("Can't read callsign from sim.cfg file, defaulting to AMSAT") print(callsign) - + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 + GPIO.setup(txLed, GPIO.OUT) + sleep(1) output(txLed, txLedOn) if (debug_mode == 1): @@ -161,12 +173,15 @@ if __name__ == "__main__": elif (mode == 's'): print("SSTV") try: - from picamera import PiCamera +# from picamera import PiCamera # 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") camera_present = 1 - camera.close() +# camera.close() except: print("No camera available") print(" -> if camera plugged in, is software enabled?") diff --git a/spreadsheet/readme.txt b/spreadsheet/readme.md similarity index 84% rename from spreadsheet/readme.txt rename to spreadsheet/readme.md index 62f8117d..e03460ff 100644 --- a/spreadsheet/readme.txt +++ b/spreadsheet/readme.md @@ -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. diff --git a/stempayload/Payload_BME280_MPU6050_XS/Payload_BME280_MPU6050_XS.ino b/stempayload/Payload_BME280_MPU6050_XS/Payload_BME280_MPU6050_XS.ino index 43e758c1..f0111f9e 100644 --- a/stempayload/Payload_BME280_MPU6050_XS/Payload_BME280_MPU6050_XS.ino +++ b/stempayload/Payload_BME280_MPU6050_XS/Payload_BME280_MPU6050_XS.ino @@ -1,14 +1,16 @@ +// 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 #include #include #include #include - #define SEALEVELPRESSURE_HPA (1013.25) Adafruit_BME280 bme; MPU6050 mpu6050(Wire); - + long timer = 0; int bmePresent; int RXLED = 17; // The RX LED has a defined Arduino pin @@ -20,24 +22,35 @@ void eeprom_word_write(int addr, int val); short eeprom_word_read(int addr); int first_time = true; int first_read = true; + +#if defined __AVR_ATmega32U4__ float T2 = 26.3; // Temperature data point 1 float R2 = 167; // Reading data point 1 float T1 = 2; // Temperature 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; float Temp; float rest; - + void setup() { Serial.begin(9600); // Serial Monitor for testing - + Serial1.begin(115200); // Pi UART faster speed - +// Serial1.begin(9600); // Pi UART faster speed + Serial.println("Starting!"); - + blink_setup(); - + blink(500); delay(250); blink(500); @@ -48,70 +61,143 @@ void setup() { led_set(blueLED, HIGH); delay(250); led_set(blueLED, LOW); - + if (bme.begin(0x76)) { bmePresent = 1; } else { Serial.println("Could not find a valid BME280 sensor, check wiring!"); bmePresent = 0; } - + mpu6050.begin(); - + if (eeprom_word_read(0) == 0xA07) { Serial.println("Reading gyro offsets from EEPROM\n"); - + float xOffset = ((float)eeprom_word_read(1)) / 100.0; float yOffset = ((float)eeprom_word_read(2)) / 100.0; float zOffset = ((float)eeprom_word_read(3)) / 100.0; - + Serial.println(xOffset, DEC); Serial.println(yOffset, DEC); Serial.println(zOffset, DEC); - + mpu6050.setGyroOffsets(xOffset, yOffset, zOffset); } else { Serial.println("Calculating gyro offsets and storing in EEPROM\n"); - + mpu6050.calcGyroOffsets(true); - + eeprom_word_write(0, 0xA07); eeprom_word_write(1, (int)(mpu6050.getGyroXoffset() * 100.0) + 0.5); eeprom_word_write(2, (int)(mpu6050.getGyroYoffset() * 100.0) + 0.5); eeprom_word_write(3, (int)(mpu6050.getGyroZoffset() * 100.0) + 0.5); - + Serial.println(eeprom_word_read(0), HEX); Serial.println(((float)eeprom_word_read(1)) / 100.0, DEC); Serial.println(((float)eeprom_word_read(2)) / 100.0, DEC); Serial.println(((float)eeprom_word_read(3)) / 100.0, DEC); } - pinMode(greenLED, OUTPUT); - pinMode(blueLED, OUTPUT); +/**/ } - + void loop() { + + if (Serial1.available() > 0) { + blink(50); + char result = Serial1.read(); +// Serial1.println(result); +// Serial1.println("OK"); + +// if (result == '?') + { + if (bmePresent) { + Serial1.print("OK BME280 "); + Serial1.print(bme.readTemperature()); + Serial1.print(" "); + Serial1.print(bme.readPressure() / 100.0F); + Serial1.print(" "); + Serial1.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); + Serial1.print(" "); + Serial1.print(bme.readHumidity()); + } else + { + Serial1.print("OK BME280 0.0 0.0 0.0 0.0"); + } + mpu6050.update(); + + Serial1.print(" MPU6050 "); + Serial1.print(mpu6050.getGyroX()); + Serial1.print(" "); + Serial1.print(mpu6050.getGyroY()); + Serial1.print(" "); + Serial1.print(mpu6050.getGyroZ()); + + Serial1.print(" "); + Serial1.print(mpu6050.getAccX()); + Serial1.print(" "); + Serial1.print(mpu6050.getAccY()); + Serial1.print(" "); + Serial1.print(mpu6050.getAccZ()); + + sensorValue = read_analog(); + +// Serial.println(sensorValue); + Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); + + Serial1.print(" XS "); + Serial1.print(Temp); + Serial1.print(" "); + Serial1.println(Sensor2); + + 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()); +// Serial.print(rotation); +// Serial.print(" "); +// Serial.println(acceleration); + + if (first_read == true) { + first_read = false; + rest = acceleration; + } + + if (acceleration > 1.2 * rest) + led_set(greenLED, HIGH); + else + led_set(greenLED, LOW); + + if (rotation > 5) + led_set(blueLED, HIGH); + else + led_set(blueLED, LOW); + } + + } - if ((Serial.available() > 0)|| first_time == true) { + if (Serial.available() > 0) { blink(50); char result = Serial.read(); - // Serial.println(result); - - if (result == 'R') { - Serial.println("OK"); +// Serial.println(result); +// Serial.println("OK"); +// Serial.println(counter++); + + if (result == 'R') { + Serial1.println("OK"); delay(100); - first_time = true; + first_read = true; setup(); } - else if (result == 'C') { + 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) + } + + if ((result == '?') || first_time == true) { first_time = false; if (bmePresent) { @@ -128,113 +214,44 @@ void loop() { Serial.print("OK BME280 0.0 0.0 0.0 0.0"); } mpu6050.update(); - + Serial.print(" MPU6050 "); Serial.print(mpu6050.getGyroX()); Serial.print(" "); Serial.print(mpu6050.getGyroY()); Serial.print(" "); Serial.print(mpu6050.getGyroZ()); - + Serial.print(" "); Serial.print(mpu6050.getAccX()); Serial.print(" "); Serial.print(mpu6050.getAccY()); Serial.print(" "); - Serial.print(mpu6050.getAccZ()); - - sensorValue = analogRead(A3); - //Serial.println(sensorValue); - Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); - + Serial.print(mpu6050.getAccZ()); + sensorValue = read_analog(); + + Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); + Serial.print(" XS "); Serial.print(Temp); Serial.print(" "); - Serial.println(Sensor1); - + 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 acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ()); // Serial.print(rotation); // Serial.print(" "); // Serial.println(acceleration); - - if (acceleration > 1.2) - led_set(greenLED, HIGH); - else - led_set(greenLED, LOW); - - if (rotation > 5) - led_set(blueLED, HIGH); - else - led_set(blueLED, LOW); - } - } - - if (Serial1.available() > 0) { - blink(50); - char result = Serial1.read(); - // Serial1.println(result); - - if (result == 'R') { - Serial1.println("OK"); - delay(100); - first_read = true; - setup(); - } - - if (result == '?') - { - if (bmePresent) { - Serial1.print("OK BME280 "); - Serial1.print(bme.readTemperature()); - Serial1.print(" "); - Serial1.print(bme.readPressure() / 100.0F); - Serial1.print(" "); - Serial1.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); - Serial1.print(" "); - Serial1.print(bme.readHumidity()); - } else - { - Serial1.print("OK BME280 0.0 0.0 0.0 0.0"); - } - mpu6050.update(); - - Serial1.print(" MPU6050 "); - Serial1.print(mpu6050.getGyroX()); - Serial1.print(" "); - Serial1.print(mpu6050.getGyroY()); - Serial1.print(" "); - Serial1.print(mpu6050.getGyroZ()); - - Serial1.print(" "); - Serial1.print(mpu6050.getAccX()); - Serial1.print(" "); - Serial1.print(mpu6050.getAccY()); - Serial1.print(" "); - Serial1.print(mpu6050.getAccZ()); - - sensorValue = analogRead(A3); - //Serial.println(sensorValue); - Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); - - Serial1.print(" XS "); - Serial1.print(Temp); - Serial1.print(" "); - Serial1.println(Sensor2); - - 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()); -// Serial.print(rotation); -// Serial.print(" "); -// Serial.println(acceleration); - if (first_read == true) { first_read = false; rest = acceleration; } - + if (acceleration > 1.2 * rest) led_set(greenLED, HIGH); else @@ -245,22 +262,21 @@ void loop() { else led_set(blueLED, LOW); } - } - -// delay(100); + } + delay(100); } - + void eeprom_word_write(int addr, int val) { EEPROM.write(addr * 2, lowByte(val)); EEPROM.write(addr * 2 + 1, highByte(val)); } - + short eeprom_word_read(int addr) { return ((EEPROM.read(addr * 2 + 1) << 8) | EEPROM.read(addr * 2)); } - + void blink_setup() { #if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) @@ -269,7 +285,7 @@ void blink_setup() pinMode(PB9, OUTPUT); pinMode(PB8, OUTPUT); #endif - + #if defined __AVR_ATmega32U4__ pinMode(RXLED, OUTPUT); // Set RX LED as an output // TX LED is set as an output behind the scenes @@ -277,30 +293,30 @@ void blink_setup() pinMode(blueLED,OUTPUT); #endif } - + void blink(int length) { #if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) digitalWrite(PC13, LOW); // turn the LED on (HIGH is the voltage level) #endif - + #if defined __AVR_ATmega32U4__ digitalWrite(RXLED, LOW); // set the RX LED ON TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF #endif - + delay(length); // wait for a lenth of time - + #if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) digitalWrite(PC13, HIGH); // turn the LED off by making the voltage LOW #endif - + #if defined __AVR_ATmega32U4__ digitalWrite(RXLED, HIGH); // set the RX LED OFF TXLED0; //TX LED macro to turn LED ON #endif } - + void led_set(int ledPin, bool state) { #if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) @@ -309,8 +325,20 @@ void led_set(int ledPin, bool state) else if (ledPin == blueLED) digitalWrite(PB8, state); #endif - + #if defined __AVR_ATmega32U4__ digitalWrite(ledPin, state); #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); +} diff --git a/telem.c b/telem.c index a2d0182f..a32746db 100644 --- a/telem.c +++ b/telem.c @@ -14,60 +14,12 @@ int main(int argc, char *argv[]) { debug = ON; } } - wiringPiSetup (); - - printf("\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[PLUS_Z] = MINUS_X; - map[MINUS_Y] = PLUS_Z; - 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)); - } - } - } + printf("CubeSatSim v1.2 INA219 Voltage and Current Telemetry\n"); + map[MINUS_X] = MINUS_Y; + map[PLUS_Z] = MINUS_X; + map[MINUS_Y] = PLUS_Z; + snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(3)); // Reading I2C voltage and current sensors // printf("Starting\n"); @@ -127,7 +79,8 @@ int main(int argc, char *argv[]) { printf("-Y | % 4.2f V % 5.0f mA \n", voltage[map[MINUS_Y]], current[map[MINUS_Y]]); 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("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; } @@ -141,7 +94,7 @@ int test_i2c_bus(int bus) strcat (busDev, busS); // printf("Bus Dev String: %s \n", busDev); - if (access(busDev, W_OK | R_OK) >= 0) { // Test if I2C Bus is present + if (access(busDev, W_OK | R_OK) >= 0) { // Test if I2C Bus is present // printf("bus is present\n\n"); char result[128]; const char command_start[] = "timeout 10 i2cdetect -y "; @@ -161,7 +114,7 @@ int test_i2c_bus(int bus) { printf("ERROR: %d bus has a problem \n Check I2C wiring and pullup resistors \n", bus); output = -1; - } + } } else { printf("ERROR: %d bus has a problem \n Check software to see if enabled \n", bus); diff --git a/update b/update index 67f5074b..53aa19cd 100755 --- a/update +++ b/update @@ -1,6 +1,6 @@ #!/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 @@ -8,10 +8,12 @@ if [ "$1" = "u" ]; then 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 +sudo apt-get install -y python3-smbus + sudo sed -i 's/update.sh/update /g' /etc/motd sudo sed -i 's/installed and/installed\nand/g' /etc/motd