Update FlyPi Hardware Documents authored by cpryan's avatar cpryan
# Overview
Microprocessors are not equipped with the proper flight systems needed to operate a quadcopter. The FlyPi main board provides the resources needed for the basic operation of the drone. The system includes a 5V regulator to adjust the voltage level of the battery to the voltage needed by the microprocessor. An undervoltage lockout (UVLO) circuit is included to prevent the battery from being damaged by use when the battery is already drained. The UVLO is designed for use with a 3S LiPo battery and can be bypassed using a jumper resistor if software UVLO using the Seeeduino is preferred. The Seeeduino is a microcontroller mounted on the board to communicate with the Raspberry Pi Zero 2W over I2C. The microcontroller provides an interface for the Raspberry Pi to control the ESC and adjust motor outputs. An IMU breakout board is also mounted on the main board to provide accelerometer and gyroscope data to the microprocessor over I2C. An indicator LED is located in each corner of the main board to assist in distinguishing the front and back of the quadcopter and communicate error messages to the user. Flexible Printed Circuit (FPC) connectors are attached to the main board for connection to the expansion board. The expansion board is mounted to the top of the quadcopter frame, allowing the FlyPi to use the various crazyflie expansion decks to integrate new sensors.
![image](uploads/381c804a641d828552253ece55f46211/image.png)
# Modifications
To allow for quick prototyping of the quadcopter's PCB, the design was made modifiable to test various things.
### UVLO
The UVLO circuit provides a hardware implementation of battery protection, but in some situations needs to be bypassed for software UVLO, battery level sensing, or if the UVLO circuit does not behave properly. The UVLO can be bypassed by placing a 0 Ohm resistor on R20. Otherwise, R20 should be left unpopulated for proper UVLO operation.
![image](uploads/8033ceb3f51d5c467ae02a45957c013e/image.png)
### Battery Connection
The main board can be connected to the battery either through the battery terminals (circled in blue) or the ESC connector. To draw power through the ESC connector, R10 should be populated with a 0 Ohm resistor. There were initial concerns about the current rating of the ESC connector, but no issues have been experienced drawing power through the cable. Further research shows the connector is rated for 1A and R10 can likely be removed for a direct connection in future iterations.
![image](uploads/81d7cbee5af9369cafd0866958caf626/image.png)
### Expansion Board Battery Level
One of the pins connected to the Bitcraze expansion decks is a direct connection to the battery. Crazyflies typically operate off a 3.6V battery, so direct connection to our 3S battery is unadvised. Early board iterates have a voltage divider between R18 and R19 to provide a desired voltage level, but the voltage level will not remain fixed for variable current loads. Later iterates provide the option to connect to 5V by populating R18 or +3.3V by populating R19 with a 0 Ohm resistor. Before using expansion decks, it is recommended to check the expansion deck's use of the battery pin, the voltage rating of the board, and the main board revision being used to check for compatibility.
# Future Improvements
* The UVLO circuit does not currently work as needed. Flight tests late in the semester showed a larger-than-expected drop in battery level during operation. Further testing of the expected battery level is needed before the resistance values used in the UVLO are adjusted for the needed hysteresis. Resistors need less than 0.1% tolerance since we are watching 1% changes in battery level.
* If the ZynqBerry Zero becomes available, creating a design to work with the FPGA would be an exciting option. Minimal changes to the current board are required, but further research is recommended. The ZynqBerry Zero has the same pinout as the Raspberry Pi Zero, but I can't find documentation of if there is a 3.3V regulator on board. If a regulator is on board, the only needed adjustments are to replace the Seeeduino (ZynqBerryZero will have enough of its own PWM pins) with an ESPXXXX WiFi module. I recommend using the same WiFi module used on the big quadcopter. ESD protection may be required to protect the more expensive FPGA.
# Schematic (FlyPi)
# ![image](uploads/80404ba5b5bb8cf203acb42ba149f771/image.png)\
Layout (FlyPi)
Front![image](uploads/7f6ec082f6990f8489673a44bf6ef1dd/image.png)
Bottom
# ![image](uploads/38d5fb5a93d717b8dc935854c354c748/image.png)\
BOM
[MicroCART_BOM](uploads/b09f2aab3661a0688ae89b4e201d5b74/MicroCART_BOM.xlsx)
[ibom](uploads/de94a3d1e7dddb8c8bf6867146cc65b5/ibom.html)
# Gerbers
[MicroCART_Gerbers](uploads/9ffa0c6c74256008156d512aa8cd0b97/MicroCART_Gerbers.zip)
[ExpansionGerbers](uploads/dcba5b732bd4609d58f09af04c33ef18/ExpansionGerbers.zip)
[IMU_BreakOUT \_Board](uploads/55d9431aaa97013af7afc6b69293420b/IMU_BreakOUT__Board.zip)
# Board Files
[MicroCART_BoardFiles](uploads/509cae5ec6fa06a7be77b812a790dbf1/MicroCART_BoardFiles.zip)
# 3D Printed Parts
Battery Holder
[Legs](uploads/a392dc3aa7133cbf5c1e0c1a467d0f4c/Legs.ipt)
\ No newline at end of file