Build Guide
Intro
Welcome to the Build Guide! This guide will give you instructions and links to resources that will help you design and build your femtosat.
Choosing a Sensor
Your femtosat must include at least one sensor. We currently recommend and provide support for two sensors:
- The BME280 atmospheric sensor, which measures humidity, pressure (altitude), and temperature.
- The ADXL345 inertial measurement unit, which measures 3-axis acceleration.
You may supply a different sensor of your choice, but you will be on your own when learning how to use it.
Designing the Printed Circuit Board
Installing EAGLE
For PCB design, we will be using a program called Autodesk EAGLE. Before beginning, you'll want to follow this guide by SparkFun to download and install EAGLE and to learn your way around: How to Install and Setup EAGLE. While the free version has all the features you will need for femtosat, you can unlock additional features if you create an account with your BYU email and request academic access.
- Navigate to "C:\EAGLE 9.x" and find the file "LIBEAY32.dll".
- Rename the .dll by appending .bak at the end of the file name: "LIBEAY32.dll.bak".
- Start Eagle again, the program should open with no issue.
Schematic
Next, you will want to follow a guide to learn how to use EAGLE to create a schematic diagram. This guide from SparkFun is a good place to start: Using EAGLE Schematic.
Note that some of the parts we are using will not be found in the default EAGLE libraries. You will be given a link to download additional parts (like the sensors) to add to your schematic and board layout.
The datasheets for the active components contain suggestions for wiring. You should follow these guides to know how to wire the active components, what passive components are needed, and how to connect them. The datasheets can be found here:
Instructions
- Add the active components to the schematic, which can be found in the provided Femtosat library.
- the battery connector
- the voltage regulator
- the processor
- the sensor(s)
- the radio
- Add passive components. Capacitors, resistors, and LEDs should be size 0805.
- capacitors from the rcl>C-US library
- resistors from the rcl>R-US library
- LEDs from the led>LED library
- antenna from the discrete library
- connectors from the pinhead library
- The power supply:
- Connect the voltage regulator according to the datasheet.
- Connect the battery connector to the voltage regulator. The battery connector should be wired as follows:
Pin 1 Battery voltage (positive) Pin 2 Ground - Add a resistor and LED to the output of the voltage regulator. This will be your power indicator.
- Name the output of the voltage regulator 3V3. This is your voltage supply for the rest of the circuit.
- The processor:
- Connect VCC, AVCC, and AREF to 3V3. Connect GND to ground.
- Add a 100nF decoupling capacitor between the supply voltage 3V3 and ground.
- Connect MOSI, MISO, and SCK to your SPI bus. Use pin 14 as the SS/CS line for processor. Use pin 13 as the SS/CS line for the radio.
- Connect SDA and SCL to the I2C bus.
- Connect a 10k pull-up resistor to RESET.
- Optional: you may also add an LED to one of the digital output pins (PD2-PD7) for status indication.
- ICSP header:
- This is a 2x3 header for programming the bootloader onto the ATMega. It should be connected as follows:
Pin 1 SPI MISO Pin 2 No connection (NC) Pin 3 SPI SS/CS for ATMega Pin 4 SPI MOSI Pin 5 ATMega RESET (pin 29) Pin 6 Ground
- This is a 2x3 header for programming the bootloader onto the ATMega. It should be connected as follows:
- UART header:
This is a 1x6 header for programming your code onto the ATMega. It should be connected as follows:
Pin 1 ATMega RESET through a 100nF series capacitor. Pin 2 ATMega pin 31 Pin 3 ATMega pin 30 Pin 4 No connection (NC) Pin 5 Ground Pin 6 Ground
- The radio:
- Connect according to the datasheet. Note that the datasheet schematic shows the radio connected to a PIC16 microcontroller. We are not using a PIC16, so you don't need to worry about that part of the circuit.
- Connect MOSI, MISO, and SCK to your SPI bus. Connect NSS to the SS/CS line for the radio.
- The sensors:
- Connect according to their respective datasheets.
- Data connections via I2C are preferred over SPI.
- The I2C pull-up resistors:
- Your I2C bus should have a 4.7k pull-up resistor on both the clock and data line.
- LEDs:
- You'll need a series resistor to limit current through the LED to about 10mA. You can find a resistor calculator here.
Board Layout
Next, you'll want to turn your schematic into a PCB design. This guide from SparkFun is a good place to start: Using EAGLE Board Layout.
Requirements
- Your board must be no larger than 20x70 mm.
- Your board must have rounded corners.
- Your board must only have two copper layers (top and bottom).
- All SMD components must be on the top layer.
Ordering Your PCB
Your PCB will be manufactured by JLCPCB. There you will upload your Gerber files and choose your manufacturing settings. The settings can be left at their default values (although you may want to set "Mark on PCB" to "Remove Mark" to prevent the order number from being printed on the PCB).
Programming the Flight Computer
Loading the Bootloader
Before you can load code onto your processor, you must program the bootloader. You can learn more about this here. This requires an Arduino with a logic level shifter which will be provided for you.
The Arduino IDE
For programming your femtosat, you'll want to use the Arduino IDE. A guide for getting started can be found here.
To be continued...