Sensing hardware and software
Repository for all Olin Rocketry hardware and firmware.
The purpose of the avionics system is to determine when to deploy the drogue and main chutes, and to send the signal to do so to the recovery system. The flight computer contains several sensors to help detect apogee, and a microcontroller to read and process the data and send the signal.
The avionics system consists of
The COTS computer is a _ model. It has its own batteries, sensors, and radio and can trigger the recovery system independently. It is intended as a backup and is required by IREC competition rules (partly so they have a reliable altitude measurement for the competition). The BMS is described on the Power Management subteam page. It can suppy a steady 3.3V current up to about 1000 mA to the student-designed flight computer board.
The flight computer consists of a Teensy 3.6 microcontroller and various sensors.
We designed our Rev1 PCB to hold all three IMUs, so that we could test all of them at once. However, as of ordering time in January, the BMI088 and BNO055 were out of stock at Digikey and Mouser, so these were never tested.
Rev 1 Testing Update: Spring 2021
The sensors on Rev1 (the ADXL345 accelerometer and the MPL3115A2 barometer) work, and the data can be read over I2C. The current data format is a csv file with time since launch, x, y, and z acceleration, pressure, altitude, and temperature. The readings from the accelerometer have very little noise when at rest (the only test performed so far - others to follow soon). The barometer has some issues. First of all, it has an offset of about 1.7 atmospheres. When those 1.7 atm are subtracted out, however, it provides high precision and sensitivity. The altitude readings are off by the same offset, as I believe they are calculated from the barometer reading anyway. The temperature has some 20 degrees F offset and significant drift of 2-5 degrees F over a few minutes. More testing to follow.
I looked at the specs and realized that the ADXL345 and MPL3115A2 together consume less than 3 mA of current at their max. Since the Teensy can output 250 mA through those pins, I don’t see why to use an external power source; we can just use the 3.3V pins on the Teensy.
The tests I have done have been using the 3.3V pin as a power source.
Tests performed 3/26/2021:
Power supply test: Get an external power supply and give 3.3V to the power inputs. Test the test points and the Teensy’s Vin pin. Test data logging onto SD card. Test sensors connected only to external power supply vs. connected to Teensy 3.3V pin vs. connected to both.
Results:
The transistor part of the Rev1 power management circuit did not work. For some reason, there was always only ~0.6V on both the gate and drain pins, and so 0.6V on the rest of the PCB. I tried several pin configurations and nothing helped. It worked fine when I bypassed the transistor and powered 3.3V to both the Teensy and the PCB.
The Teensy could not write to the SD card when the PCB and Teensy were powered independently; it only works when the rest of the PCB is powered through the Teensy’s dedicated 3.3V pin. Therefore, I recommend just using the Teensy’s 3.3V pin to power the sensors.
In this case, I suggest the voltage supplied by the BMS should be 3.6V instead of 3.3V, so that the linear voltage regulator on the Teensy can effectively supply the 3.3V to the sensors. Voltage regulators necessariy have a small voltage drop across them, although I came across a source that says the Teensy will bypass its voltage regulator if the voltage is too low, so there is not necessarily an issue.
MPL3115A2 Accuracy Test: Take the Rev1 board up and down the stairs of the MAC building 2 times and measure altitude difference.
Results:
The readings are inaccurate, yet very precise. The pressure has reads on the order of 200 kPa, which is double what is expected (1 atmosphere is about 100 kPa), and the temperature reads 90 degrees F in a 70 degree room. Yet after the offset is subtracted, the sensor tracks changes in height of less than 20 feet (the distance between floors in the MAC, and the highest resolution analyzed) quite well. The graph below shows the corrected elevation and temperature over the course of my trip up and down the stairs of the MAC, then outside onto the great lawn and up to the 4th floor of West Hall. There is some drift over time as it sat on my desk after “landing,” on the order of 20 feet over 20 minutes. This is worrying, but it will likely not be a problem during a launch lasting a few minutes.
Developing the Rev 2 board
With the ADXL345 and MPL3115A2 sensors confirmed to work, the main objective of the Rev 2 board is to make it fit into the avionics bay. The final board is 80mm tall by 72mm wide and has a mounting hole in each corner. The power supply transistor circuit has been replaced with a power multiplexer, a zener diode was added for overvoltage protection, and the power from the BMS goes directly into the Vin pin on the Teensy; the sensors and other circuitry are powered by the Teensy’s 3.3V pin as discussed above. Additionally, 5 debugging LEDs, one power LED, and a buzzer have also been added and are controlled by spare digital pins on the Teensy. A 10uF capacitor was added between the power and ground pins of the radio upon testing by the Communications team.
The board has been ordered from JLC and will arrive within a couple days.
The process for creating the flight computer PCB has multiple stages:
* In fact, I did make a very significant error while copying the footprint from the datasheet for both the BNO055 and the MPL3115. I copied the pads as they were shown in the datasheet, which was a bottom-up view. What matters for the layout is the top-down view (think about how the sensor sits on the PCB; you want to design the pads so they sit directly beneath the sensor). When you design the pads using the bottom-up view, you get a mirror image of how they are supposed to be. Moreover, since the footprints are often symmetrical, it can be impossible to tell you’ve made a mistake, until you realize that the pins things are supposed to be connected to are actually on the opposite side of the chip.
Rev2 full schematic
Rev2 power supply
Rev2 layout
Rev2 3D model (front)
Rev2 3D model (back)
Rev1 full schematic
Rev1 power supply
Rev1 layout
Rev1 3D model (front)
Rev1 3D model (back)
For ordering the boards, go to JLCPCB.com (https://jlcpcb.com/RAT), and click on “Quote Now” button.
JLCPCB (ShenzhenJLC Electronics Co., Ltd.), is the largest PCB prototype enterprise in China, and a high-tech manufacturer specializing in quick PCB prototype and small-batch PCB production. You can order a minimum of 5 PCBs for just $2.
First: Upload the gerber files for the board by clicking the “Add gerber file” button. You’ll notice a message at the bottom if the file is successfully uploaded.
A correctly uploaded gerber folder renders the board as follows:
Second: In order to get the board assembled (optional, based on the project requirements), select the “SMT Assembly option. It is important to select the side of the PCB that needs to be assembled, as well as the quantity for SMT. Press the “Confirm” button, then press the “Next” button.
Third: upload the BOM (Bill of Material) and CPL (Component Placement List) files and click the “Next” button. It is necessary to make sure that each of these files follow the jlcpcb specified BOM and CPL formats, respectively:
Note: If there is an issue with the BOM/CPL formatting, the the page will keep erroring out until it is resolved.
Fourth: The parts are automatically detected through the uploaded BOM. They are also matched against jlcpcb’s in-stock parts. It is important to go through each row and confirm if the auto-detected parts are the desired parts. Some parts will remain undetected if they cannot be assembled through SMT and require manual assembly post-deilvery.
Fifth: The website renders an assembled board using the CPL file. This feature can be used to review the placement of the components (including orientation). Once carefull reviewed, the next step is to download a list of parts remaining to be assembled towards the bottom of this page view. It is important to place an order for the remaining components to be manually assembled upon delivery.
Sixth: Click on the “Save to Cart” button. Then, click on the “Secure Checkout” button.
Last: Add the payment details and choose the suitable delivery method (this includes FedEx, DHL, and standard mail options). Then, place the order.
Optional: To review the production status of the board, click on the “Order History” button under username. Then, click on In Production > view progress to obtain timestamps for each of the production steps in real time.
Design Reviews
-November 11, 2022 6:00 PM (done)