Blueprint

Flight Controller Board

For one of my biggest projects yet I want to design a custom flight controller board for a quadcopter I'm building. It will be programmed manually with my own firmware. It will also need to both route power for the quad through XT60 connectors but also integrate sensors and control directly into the PCB and have PWM inputs/outputs for remote control input and ESC output. All with as small a footprint as possible to save space efficiently.

Created by eduardbrisca eduardbrisca

12 views

0 followers

eduardbrisca eduardbrisca added to the journal ago

98% done with the PCB

  1. Changed to a microSD card slot as it uses up much less space
  2. Placed everything in position on the other board
  3. Routed everything up, keeping more or less to my stackup
  4. Added main ground planes

Now I need to fix the silkscreen, add some cool graphics on the front, then figure out if economic or standard PCBA is cheaper, and also clean up the DRC as there are a few problems. The PCB however is pretty much completed. I also need to not forget about the tab that holds the two boards together when they are being PCBA'd.

image
image

eduardbrisca eduardbrisca added to the journal ago

Added circuit breaker chip (eFuse), finished off the b board

  1. I added an eFuse to protect the circuitry in case anything happens (I realized I had nothing to protect the circuit in the event of a short from the hundreds of amps my LiPo can provide). I had to research which chips to use, Ti only had 3 chips with enough current and voltage capacity for my needs thankfully, they were all ok, although a bit expensive but I'd rather have this eFuse that can go off in less than 200ns than have to replace the entire board. I think I did my best this time with using the datasheet and I managed to get pretty much all the values I needed for the resistor/capacitors. I also set a generous current limit for short burst of about 60A, my drone should consume more than 40A but I don't want to risk it falling out of the sky either. It however has the short protection breakage circuit at about 2x this, so 120A, but that's the one that goes within nanoseconds.

  2. Finished off several nets

  3. Added main ground plane and cleaned up the 3d models so they're aligned.

Now onto the top board!!!

image

image

eduardbrisca eduardbrisca added to the journal ago

Lots and lots of stuff happened 50% of the bottom board done

Again a while since I journaled so I'll list everything I've done.

  1. Removed redundant pull-ups/pull-downs as STM32 has built in ones on every GPIO pin
  2. Completed the motor power and return ground plane and also plenty of via stitching and rough calculations for how much copper I'll need to keep cool at 32A.
  3. Added the INA and shunt resistor sensor in it's correct position and wired it up after setting up the board with the XT60 connectors
  4. Changed to this diamond "pine cone" shape, this project is now officially called the Pine Cone Flight Controller (PCFC)
  5. Added the net ties for the motor ground and power ground, lots were needed because its the MGND plane that connects to the XT60 as it carries most power so all the GND plane has to then go into that to return to the battery
  6. (I feel like I made really good use of the space I had for the power zones, I added the + power ones on the bottom and top layers, adding lots of vias and a small all layer plane near the shunt and XT60 pin, then I added MGND everywhere else, and the appropriate ground planes too.
  7. Then I also added the diode and added the connections for VBUS to power everything else.
  8. Then I organized, placed and routed the 12V and 5V regulators (Hopefully, fingers crossed they actually function).
  9. I also arranged the connections on the header pins to benefit me routing
  10. Then I positioned the MAX7456, VTX (Ill solder it myself on the back) and the logic level shifter, I wired those up and calculated I need an impedance matched trace width of 0.44mm for 75ohm impedance for the video signals before and after the MAX7456.
  11. Wired that up accordingly, then I also put the LED MOSFETs above the VTX and quite close to the antenna output but this should be fine because there will be 2+ ground planes in-between them.
  12. Now I just have to arrange everything a little bit better, wire it all up and add the ground plane, and also find the impedance matched trace width for 50ohms for the 5.8ghz antenna signal.

image

eduardbrisca eduardbrisca added to the journal ago

Split the whole design onto two boards bc it's too much

As you can see in the pictures, I had to completely overhaul my original idea of having just one PCB because there is simply nowhere near enough space on the size I'm aiming for. I decided to just split the whole circuit into two separate ones that go onto separate PCBs with a riser in-between them using pin headers/sockets. I'm going to be keeping the Video, motor power and LED strip stuff, and their according voltage regulator circuits on the bottom PCB and then have the STM32, sensors, SD card, Display, USB etc plus their voltage regulators on the top board. And to reduce cost I realized I can probably just combine the two resulting PCBs into one PCB with some tabs that hold them connected, which I can just then cut and sand when I get the PCB. And then stack them using the risers.

(this is what I was presented with upon updating PCB, I clearly underestimated the number of components)
image

(Updated schematic)
image

(where we are now, much better and less overwhelming)
image

eduardbrisca eduardbrisca added to the journal ago

Finished schematic

Finally finished the schematic for the flight controller. Assigned the LCSC footprints as they needed their library name changed and checked DRC. Then I also made sure to check the pinout for the STM32 matches the one in Cube MX several times just to make sure. I also added a PWM buzzer connected to a pin on the STM32 for PWM control and I also added a switch so I can turn the VTX off when I don't want to use it as it consumes quite a bit of power.

image

eduardbrisca eduardbrisca added to the journal ago

Pinned out the MCU and I2C

Mostly sorted out the MCU pinout and I2C pullups/addresses and pinned everything out. Almost done. I have however runout of GPIO so I will have to get rid of some LEDs and 2 of the LED strip channels to be left with only 4. I hope I don't need any more GPIO for anything else as I've managed to use all ~80.... Plus some other small tweaks here and there. I will also have everything on the board on one I2C channel and have another separate one for some headers for off-board stuff.

image

image

eduardbrisca eduardbrisca added to the journal ago

Finished ALMOST all of the schematic.

It's been quite a while since I journaled but I simply just forgot.

  1. Added SD card
  2. Added MAX7456 OSD Injector
  3. Added a data voltage shifter for the MAX7456 5V data lines to 3.3V MCU lines
  4. Added the VTX
  5. Added some DIP switches for the VTX radio band and general use as well
  6. Added LEDs for indication of almost everything
  7. Added motor PWM headers
  8. Added a custom footprint for my radio receiver module (a simple 3x8 pin header kind of thing)
  9. Added separate grounds and tied them with nets (i need to decide what to do for antenna ground)
  10. And probably some other small things I've forgotten (the schematic is there).

Now I just have to find out the GPIO placements for my MCU, I'm like 3 GPIO pins over budget so I do need to remove something and once I get the STM wired up and remember to put I2C pullups (!), I should be good to go (after doing DRC, which can take a few hours after I learnt the hard way).

image

eduardbrisca eduardbrisca added to the journal ago

Added sensors / user interaction and cleaned up schematic

Added the BNO080 IMU and since that had ENV sensor support I also added a humidity BME280 sensor to it's I2C ENV sensor connection. Then I also wired up the BMP580 for altitude measurement (on a separate I2C line, not the ENV one because the BMP580 is a later generation than the BNO080 and it might not support it, even though it supports the BMP280).

After that I also wired up the 8 segment, 4 digit display I will be using for easy viewing of flight/PID/other settings, I multiplexed it but then, the digit pin would have to sink about 64mA as a max, even if I run each LED at only 8mA, which is way above the MCU's absolute max limit of 50mA per pin so I added a small MOSFET for each of the digit pins to let me run more current. (I will also have to worry about the 100mA limit per GPIO group, probably split the pins over two channels).

And obviously, I need to be able to actually change those settings from in front of the PCB, otherwise the display is useless, so I also added 9 small SMD buttons, to act as editing and function inputs. I could have made them into a matrix to reduce the amount of GPIO needed however, on my MCU, I have about ~80, and the reduction of 3 GPIO would really not be worth it for the extra components (diodes) and the extra firmware needed.

Then I also organized everything into neat red labelled boxes as the schematic was getting too messy. Now I just have the SD card, MCU and video feed to plan and then I would be almost finished!

image

eduardbrisca eduardbrisca added to the journal ago

Finished making the schematic for power.

Routed up the 12V buck/boost regulator for the LEDs, took a lot of patience to read all of the stuff that's going on in a regulator and understand it (some of it) and I managed to get a basic circuit going for 12V using some help from the excel calculator they provide and ai to explain all the terminology. Then I wired up the N MOSFETs to the LED outputs and connected them to GPIO labels, ready for connection to any GPIO channel on my MCU. (This also means I can add RGB strips!!!) And I raised the channel count to 6 because why not.

image

eduardbrisca eduardbrisca added to the journal ago

Continued schematic for power and LED channels

Added the 3.3V buck regulator as well. Then started wiring up the LED driver I chose, the AL8871QT16E-13, however I realized that I don't necessarily know the current that my LED's will consume because I haven't even decided what LED strip/module to use yet on my drone. I just know that they are 12V.

Now, because of this, I will go against all guidance and don't bother about current limiting. As long as I just buck/boost to 12V, it should be fine and not consume astronomically much, I won't be using a considerable amount of LEDs anyways, you can only put so much on a drone. What I will do however is add several control channels, either find an IC that only buck/boosts and use several MOSFETS in parallel to drive several LED channels or find an IC that supports multiple channels but doesn't have complicated current limiting circuitry to work with. This will give me very cool abilities and control over decorating my drone.

I decided to use the TPS55287 for the 12V regulation (driving LEDs from the LiPo's without any voltage regulation might be asking for a bit too much). And after some tiring MOSFET research, I found a MOSFET package that fulfills my needs more or less. I tried looking for dual MOSFET chips but all of the TI ones were pretty much $6+ on JLCPCB, absolutely not worth it, so instead I have to make do with more chips. I found the CSD16340Q3, this one has plenty of VDS at 25V, and plenty of current capacity at about ~60A I think it was, way more than the 2A max I need. I also made sure that it had a rating for RDS(on) for 2.5V (or anything 3.3V or less) and that it was acceptably low so that I didn't have any heat or even functionality issues at that logic level of 3.3V. It's gonna be a bit crowded with 5 ICs just to have 4 LED strip channels however...

image

image

eduardbrisca eduardbrisca added to the journal ago

Schematic for the power monitor and the 5V regulator

Continued the schematic for the INA226 power monitor and the 5V regulator.

The INA226 uses a shunt resistor (2 milli ohms for my total current target of about 34A). The wiring for this got a bit confusing because I also want to be able to power the board from the 5V USB C connection. However I don't need to and so I don't want to include the USB C connection into the shunt calculation. In addition to that I also need to stop any back feeding. To do that I separated the input voltages from the battery and USB C into VBAT and VBUS respectively. Then, I also setup my output (or voltages that go into the system) into VSYS for the MCU and sensors and everything else and VMOTORS for the drone motors. The reason for this is because I need a diode to stop back feeding (two diodes actually) but I don't want to have to run ~32A through a diode, as that voltage drop would make immense amounts of heat and waste power. So, I took VBAT to the shunt then straight through to the VMOTORS. And for the others I then took the output from the shunt (Basically VMOTORS) and took it through a diode to VSYS, in parallel with another diode connecting VBUS to VSYS. This way there is no back feeding in any situation and the motors always run only with power from the battery (through the shunt). But, the shunt also measures the VSYS current when the drone is running off of battery power, giving a more accurate indication of total power usage. (Which will be helpful for estimating battery life and predicting flight time left).

The 5V buck/boost regulator was as easy as just following the schematic included in the datasheet (they even gave proper values and SMD sizes) for the exact 5V output version. I also only just realized that the "boost" part would be very much needed because the diode will drop some voltage meaning VBUS won't be perfectly 5V (but a little low) so when powering off of USB there could've been a problem with the 5V rail being too low without a "boost" regulator as well.

(I also decided to remove the feature of also charging my 3s battery capability. This is because it is simply too risky and out of my depth to design a circuit like that yet, and I don't want to risk any fires...)

image

eduardbrisca eduardbrisca added to the journal ago

Extra features / components

Decided to use the voltage regulators mentioned in the guide for the 3.3V and 5V rails as they are perfect as they are. Also picked out a 12V buck boost with LED driving built into it, to drive a 12V LED strip for illumination on my drone.

I also decided to completely full-fill the "jack of all trades" functionality and look for a battery charger. I'm using a 3s LiPo currently but I want to make the board capable of charging from 1-4s if possible and also ensure that it is balanced. This would require another IC and balancing connecter, but this would mean it would be possible to charge the battery simply from the 5V UCB C input, without the need for an external charger. After a lot of overwhelming battery research I found some ICs that can fulfill my charging needs. I can't seem to find any charger IC's that integrate both boost charging and balancing on the same chip. So instead I had to choose the BQ25703A and the BQ40Z50-R2, both from TI.

Now, currently my USB-C is just acting as a default sink meaning that the USB-C only provides maximum 500mA of power by default. To charge a battery, that is extremely slow and would take ages. To get past this I can use USBC PD, to negotiate as much power is available, up to 3A from capable sources. I'm not very keen on more firmware so I will just use the STUSB4500QTR, which is an IC that does PD negotiation for me on the CC lines. All I need to do is write with I2C to it what power PDOs I want to check for and which ones (there are also other registers for features I can write to). This makes it much easier to use USBC PD as I don't have to worry about all the USB Stack and policy engine etc.

I will however have to worry about my PCB layout, as signals need to shielded, and high current lines will also cause magnetic coupling. This means I need to be careful where I route even the high current motor power, so that it avoids digital signals.

image

eduardbrisca eduardbrisca added to the journal ago

Decided on the MCU. (STM32F765VGT6)

Last think to plan was to pick the MCU and I have a list of things it needs to have.

x1 I2C
x2 SPI
x1 USB 2.0
x1 SPDO (SPI IS OK)

x11 GPIO PWMs (IN/OUT)
x21 Normal GPIO
x1 ADC GPIO (IN)

x33 GPIO total

PLUS SPARE SPI AND I2C

DUAL CORE

The guide I am half following uses the STM32F722RET6. This is the smallest pin package (only 100 pins) meaning not a lot of GPIO is exposed however it's still more than enough but I want to pick a more advanced MCU in the line, preferably dual core.

I decided to stay on the F7 line, I would have gone with the H7 which is dual core, this means that I would have been able to separate the main critical running of the drone (IMU reading, calculate angles, adjust PWMs, repeat) and have everything else on another core to add another layer of reliability incase any experimental code causes the thread on one core to crash, this wouldn't crash the drone itself. However, H7 is quite expensive as is, and there is a lot of extra coding and setup needed for dual core. And it's not really worth it as performance wise, one core is way more than enough. The other lines were either less powerful, had less peripherals or weren't as suited for this.

Then I looked on the JLCPCB parts search and listed the STM32F7's in order of price. I want to stay out of the "foundation" line of MCUs to maintain enough cache space and RAM for plenty of future code and features (I have a lot of plans for this drone), plus more RAM means more reliability and reduced risk of overflow. I also set a filter for only 100 pin packages, which is plenty for my purposes. The first "advanced" line chip there was the F765VG, 100 pin package, and 512Kb of ram, which was the max without going higher into the "advanced" lineup, this chip is more or less perfect at £4.96, compared to other much more expensive options. So the STM32F765VGT6 is the MCU I will be using.

image

eduardbrisca eduardbrisca added to the journal ago

Flow chart map of components and general component finding.

Relating to the previous feature definition, with some extensive research. I have found more or less the components needed. The camera system is as cheap as it gets, the VTX is only 20mA and is SMD, and very tiny, about 20mm square so I can solder it straight to the PCB and simplify the process. Some of the components like the OSD screen injector for things like battery voltage and speed I had a very hard time finding, I found MAX7456 but it seems to be the only one of it's kind and is quite old (200x) so I will have to be careful. I've also chosen the most recent version of the BMPxxx series and the BNO0xx series, that being the BMP850 and the BNO085. The BNO086 is more performant but it's twice the price.

Besides that I have also created a flow diagram of all the components and most of the criteria needed for them to simplify the schematic design process and help me catch any errors/problems. The biggest worry I have is power traces and how thick they can be but also managing to keep the CVBS and RF signals impedance matched to their 50-ohm and 75-ohm criteria and having the proper ground planning and distance from noisy digital signals.

I now only need to work out the GPIO count needed, make a final decision on Bluetooth/WiFi support, figure out how many mA each component will pull and then decide on the ESP32 or STM32 CPU version (Which needs to be dual core so that one core can run the flight stabilization without interruption and the other core can do other stuff like OSD injection or data logging).

This is the list of components and their arrangements so far (representing the flow diagram):

SENSORS

  1. 9 Axis DOF IMU - BNO085. Sensor fusion integrated into the chip, reduces the need for MCU Kalman filters etc and therefore reduces MCU load and increases reliability
  2. Barometer for altitude / temperature - BMP580. Can be connected straight to MCU or through a passthrough for “Environmental Sensors” through the BNO085, this is harder to implement but it may simplify circuitry use less I2C lines.
  3. STM32 processor. Which one? Needs to be dual core

CONTROL

  1. GPIO PWM outputs connected to 4 (more if there is space) groups of 3 pin headers for the ESCs, backup 5V power will also be taken from here as ESCs also step-down power to 5V. Located preferably in a symmetric position or spread out symmetrically so all the wires are extended the same.
  2. PWM Inputs from the Radio Receiver (6 groups of also 3 pin headers, more if there is space and GPIO availability). These must OUTPUT 5V as well because the receiver needs a voltage input to function, unlike the ESCs that make their own.

POWER

  1. USB C port connection on the back of the board
  2. Female XT60 power connector with appropriate step down for MCU and sensors (Not LDO as components will likely consume too much current for too high a step down from ~14V)
  3. Dual connection with diodes to both the ESC power outputs but also a voltage reducer like LDO or buck reducer on the USB C for redundancy if the LDO/buck dies.
  4. Each side of the board will also have 2 (Maybe more if there's space) XT60 connectors powering the ESCs/motors

CAMERA SUPPORT

  1. Caddx Ant (Lite) camera
  2. 75-ohm impedance matched trace from JST-SH 1.0 mm connector to VID_IN of OSD Injector
  3. MAX7456 OSD injector connected through communication protocol to MCU
  4. MAC7456 VIDOUT connected through another 75-ohm impedance matched trace to TX5813 VIDIN
  5. TX5813 SMD VTX + necessary support electronics + switch for on/off as VTX is very power hungry
  6. 50-ohm impedance matched / ground trace from ANTENNA pad to an SMA connector
  7. Antenna Plus, appropriate ground plane and distances from other electronics such as MCU and switching regulators

OTHER

  1. 12V LED control with up to 200mA+ of power available from GPIO.
  2. SD Card module also placed wherever best, far away from the VTX module and preferably close to the MCU
  3. I2C and SPI output headers for any future addition of sensors/logging/modules
  4. 4 segment display (3 if not enough GPIO) plus a few tactile buttons (again GPIO limited) to allow easy tweaking of PID control values and other settings without the need for reupload of code.

IMG_20251231_141110

eduardbrisca eduardbrisca added to the journal ago

Defined basic feature list (May change in future)

Feature list defined:

  • Can run off a 3s LiPo battery with an XT60 connector (ESCs can provide 5V as well but only one ESC can be connected, and it doesn’t provide much power)
  • Have a decently powerful STM32 or ESP32 processor with enough speed to process all data and run a camera too
  • Integrated USB C port
  • Can obtain position and altitude data with sensors (sensor will probably be a chip with integrated fusion technology to remove the need for things like Kalman filters and reduce main MCU load)
  • Can log and store data for when powered off
  • Can control and output PWM data signals for 4+ brushless motors
  • Can take PWM input signals from 6+ channels from radio control
  • Can power 4+ 3s power outputs with XT60 connectors for motors
  • Can power a small medium power LED of about 100-200mA with GPIO control
  • Have a camera port to connect a standard FPV camera
  • Bluetooth/Wi-Fi capability to transmit log data / FPV camera view
  • Have a 3-4 segment display and 3+ tactile pushbuttons for easy setting tweaking (or equivalent
  • I2C (and other communication protocol) inputs to allow for easy accommodation for sensors added later in development
  • Integrate infrared distance sensors on each direction of the board (I have to research if some 90-degree modules are available to solder directly to the board)

It must also fit into that space more or less and be below a certain width/height to avoid collision with rotor blades

image

eduardbrisca eduardbrisca started Flight Controller Board ago

12/30/2025 - Defined basic feature list (May change in future)

Feature list defined:

  • Can run off a 3s LiPo battery with an XT60 connector (ESCs can provide 5V as well but only one ESC can be connected, and it doesn’t provide much power)
  • Have a decently powerful STM32 or ESP32 processor with enough speed to process all data and run a camera too
  • Integrated USB C port
  • Can obtain position and altitude data with sensors (sensor will probably be a chip with integrated fusion technology to remove the need for things like Kalman filters and reduce main MCU load)
  • Can log and store data for when powered off
  • Can control and output PWM data signals for 4+ brushless motors
  • Can take PWM input signals from 6+ channels from radio control
  • Can power 4+ 3s power outputs with XT60 connectors for motors
  • Can power a small medium power LED of about 100-200mA with GPIO control
  • Have a camera port to connect a standard FPV camera
  • Bluetooth/Wi-Fi capability to transmit log data / FPV camera view
  • Have a 3-4 segment display and 3+ tactile pushbuttons for easy setting tweaking (or equivalent
  • I2C (and other communication protocol) inputs to allow for easy accommodation for sensors added later in development
  • Integrate infrared distance sensors on each direction of the board (I have to research if some 90-degree modules are available to solder directly to the board)

It must also fit into that space more or less and be below a certain width/height to avoid collision with rotor blades

image

12/31/2025 - Flow chart map of components and general component finding.

Relating to the previous feature definition, with some extensive research. I have found more or less the components needed. The camera system is as cheap as it gets, the VTX is only 20mA and is SMD, and very tiny, about 20mm square so I can solder it straight to the PCB and simplify the process. Some of the components like the OSD screen injector for things like battery voltage and speed I had a very hard time finding, I found MAX7456 but it seems to be the only one of it's kind and is quite old (200x) so I will have to be careful. I've also chosen the most recent version of the BMPxxx series and the BNO0xx series, that being the BMP850 and the BNO085. The BNO086 is more performant but it's twice the price.

Besides that I have also created a flow diagram of all the components and most of the criteria needed for them to simplify the schematic design process and help me catch any errors/problems. The biggest worry I have is power traces and how thick they can be but also managing to keep the CVBS and RF signals impedance matched to their 50-ohm and 75-ohm criteria and having the proper ground planning and distance from noisy digital signals.

I now only need to work out the GPIO count needed, make a final decision on Bluetooth/WiFi support, figure out how many mA each component will pull and then decide on the ESP32 or STM32 CPU version (Which needs to be dual core so that one core can run the flight stabilization without interruption and the other core can do other stuff like OSD injection or data logging).

This is the list of components and their arrangements so far (representing the flow diagram):

SENSORS

  1. 9 Axis DOF IMU - BNO085. Sensor fusion integrated into the chip, reduces the need for MCU Kalman filters etc and therefore reduces MCU load and increases reliability
  2. Barometer for altitude / temperature - BMP580. Can be connected straight to MCU or through a passthrough for “Environmental Sensors” through the BNO085, this is harder to implement but it may simplify circuitry use less I2C lines.
  3. STM32 processor. Which one? Needs to be dual core

CONTROL

  1. GPIO PWM outputs connected to 4 (more if there is space) groups of 3 pin headers for the ESCs, backup 5V power will also be taken from here as ESCs also step-down power to 5V. Located preferably in a symmetric position or spread out symmetrically so all the wires are extended the same.
  2. PWM Inputs from the Radio Receiver (6 groups of also 3 pin headers, more if there is space and GPIO availability). These must OUTPUT 5V as well because the receiver needs a voltage input to function, unlike the ESCs that make their own.

POWER

  1. USB C port connection on the back of the board
  2. Female XT60 power connector with appropriate step down for MCU and sensors (Not LDO as components will likely consume too much current for too high a step down from ~14V)
  3. Dual connection with diodes to both the ESC power outputs but also a voltage reducer like LDO or buck reducer on the USB C for redundancy if the LDO/buck dies.
  4. Each side of the board will also have 2 (Maybe more if there's space) XT60 connectors powering the ESCs/motors

CAMERA SUPPORT

  1. Caddx Ant (Lite) camera
  2. 75-ohm impedance matched trace from JST-SH 1.0 mm connector to VID_IN of OSD Injector
  3. MAX7456 OSD injector connected through communication protocol to MCU
  4. MAC7456 VIDOUT connected through another 75-ohm impedance matched trace to TX5813 VIDIN
  5. TX5813 SMD VTX + necessary support electronics + switch for on/off as VTX is very power hungry
  6. 50-ohm impedance matched / ground trace from ANTENNA pad to an SMA connector
  7. Antenna Plus, appropriate ground plane and distances from other electronics such as MCU and switching regulators

OTHER

  1. 12V LED control with up to 200mA+ of power available from GPIO.
  2. SD Card module also placed wherever best, far away from the VTX module and preferably close to the MCU
  3. I2C and SPI output headers for any future addition of sensors/logging/modules
  4. 4 segment display (3 if not enough GPIO) plus a few tactile buttons (again GPIO limited) to allow easy tweaking of PID control values and other settings without the need for reupload of code.

IMG_20251231_141110

1/3/2026 - Decided on the MCU. (STM32F765VGT6)

Last think to plan was to pick the MCU and I have a list of things it needs to have.

x1 I2C
x2 SPI
x1 USB 2.0
x1 SPDO (SPI IS OK)

x11 GPIO PWMs (IN/OUT)
x21 Normal GPIO
x1 ADC GPIO (IN)

x33 GPIO total

PLUS SPARE SPI AND I2C

DUAL CORE

The guide I am half following uses the STM32F722RET6. This is the smallest pin package (only 100 pins) meaning not a lot of GPIO is exposed however it's still more than enough but I want to pick a more advanced MCU in the line, preferably dual core.

I decided to stay on the F7 line, I would have gone with the H7 which is dual core, this means that I would have been able to separate the main critical running of the drone (IMU reading, calculate angles, adjust PWMs, repeat) and have everything else on another core to add another layer of reliability incase any experimental code causes the thread on one core to crash, this wouldn't crash the drone itself. However, H7 is quite expensive as is, and there is a lot of extra coding and setup needed for dual core. And it's not really worth it as performance wise, one core is way more than enough. The other lines were either less powerful, had less peripherals or weren't as suited for this.

Then I looked on the JLCPCB parts search and listed the STM32F7's in order of price. I want to stay out of the "foundation" line of MCUs to maintain enough cache space and RAM for plenty of future code and features (I have a lot of plans for this drone), plus more RAM means more reliability and reduced risk of overflow. I also set a filter for only 100 pin packages, which is plenty for my purposes. The first "advanced" line chip there was the F765VG, 100 pin package, and 512Kb of ram, which was the max without going higher into the "advanced" lineup, this chip is more or less perfect at £4.96, compared to other much more expensive options. So the STM32F765VGT6 is the MCU I will be using.

image

1/7/2026 - Extra features / components

Decided to use the voltage regulators mentioned in the guide for the 3.3V and 5V rails as they are perfect as they are. Also picked out a 12V buck boost with LED driving built into it, to drive a 12V LED strip for illumination on my drone.

I also decided to completely full-fill the "jack of all trades" functionality and look for a battery charger. I'm using a 3s LiPo currently but I want to make the board capable of charging from 1-4s if possible and also ensure that it is balanced. This would require another IC and balancing connecter, but this would mean it would be possible to charge the battery simply from the 5V UCB C input, without the need for an external charger. After a lot of overwhelming battery research I found some ICs that can fulfill my charging needs. I can't seem to find any charger IC's that integrate both boost charging and balancing on the same chip. So instead I had to choose the BQ25703A and the BQ40Z50-R2, both from TI.

Now, currently my USB-C is just acting as a default sink meaning that the USB-C only provides maximum 500mA of power by default. To charge a battery, that is extremely slow and would take ages. To get past this I can use USBC PD, to negotiate as much power is available, up to 3A from capable sources. I'm not very keen on more firmware so I will just use the STUSB4500QTR, which is an IC that does PD negotiation for me on the CC lines. All I need to do is write with I2C to it what power PDOs I want to check for and which ones (there are also other registers for features I can write to). This makes it much easier to use USBC PD as I don't have to worry about all the USB Stack and policy engine etc.

I will however have to worry about my PCB layout, as signals need to shielded, and high current lines will also cause magnetic coupling. This means I need to be careful where I route even the high current motor power, so that it avoids digital signals.

image

1/9/2026 - Schematic for the power monitor and the 5V regulator

Continued the schematic for the INA226 power monitor and the 5V regulator.

The INA226 uses a shunt resistor (2 milli ohms for my total current target of about 34A). The wiring for this got a bit confusing because I also want to be able to power the board from the 5V USB C connection. However I don't need to and so I don't want to include the USB C connection into the shunt calculation. In addition to that I also need to stop any back feeding. To do that I separated the input voltages from the battery and USB C into VBAT and VBUS respectively. Then, I also setup my output (or voltages that go into the system) into VSYS for the MCU and sensors and everything else and VMOTORS for the drone motors. The reason for this is because I need a diode to stop back feeding (two diodes actually) but I don't want to have to run ~32A through a diode, as that voltage drop would make immense amounts of heat and waste power. So, I took VBAT to the shunt then straight through to the VMOTORS. And for the others I then took the output from the shunt (Basically VMOTORS) and took it through a diode to VSYS, in parallel with another diode connecting VBUS to VSYS. This way there is no back feeding in any situation and the motors always run only with power from the battery (through the shunt). But, the shunt also measures the VSYS current when the drone is running off of battery power, giving a more accurate indication of total power usage. (Which will be helpful for estimating battery life and predicting flight time left).

The 5V buck/boost regulator was as easy as just following the schematic included in the datasheet (they even gave proper values and SMD sizes) for the exact 5V output version. I also only just realized that the "boost" part would be very much needed because the diode will drop some voltage meaning VBUS won't be perfectly 5V (but a little low) so when powering off of USB there could've been a problem with the 5V rail being too low without a "boost" regulator as well.

(I also decided to remove the feature of also charging my 3s battery capability. This is because it is simply too risky and out of my depth to design a circuit like that yet, and I don't want to risk any fires...)

image

1/10/2026 6 PM - Continued schematic for power and LED channels

Added the 3.3V buck regulator as well. Then started wiring up the LED driver I chose, the AL8871QT16E-13, however I realized that I don't necessarily know the current that my LED's will consume because I haven't even decided what LED strip/module to use yet on my drone. I just know that they are 12V.

Now, because of this, I will go against all guidance and don't bother about current limiting. As long as I just buck/boost to 12V, it should be fine and not consume astronomically much, I won't be using a considerable amount of LEDs anyways, you can only put so much on a drone. What I will do however is add several control channels, either find an IC that only buck/boosts and use several MOSFETS in parallel to drive several LED channels or find an IC that supports multiple channels but doesn't have complicated current limiting circuitry to work with. This will give me very cool abilities and control over decorating my drone.

I decided to use the TPS55287 for the 12V regulation (driving LEDs from the LiPo's without any voltage regulation might be asking for a bit too much). And after some tiring MOSFET research, I found a MOSFET package that fulfills my needs more or less. I tried looking for dual MOSFET chips but all of the TI ones were pretty much $6+ on JLCPCB, absolutely not worth it, so instead I have to make do with more chips. I found the CSD16340Q3, this one has plenty of VDS at 25V, and plenty of current capacity at about ~60A I think it was, way more than the 2A max I need. I also made sure that it had a rating for RDS(on) for 2.5V (or anything 3.3V or less) and that it was acceptably low so that I didn't have any heat or even functionality issues at that logic level of 3.3V. It's gonna be a bit crowded with 5 ICs just to have 4 LED strip channels however...

image

image

1/10/2026 8 PM - Finished making the schematic for power.

Routed up the 12V buck/boost regulator for the LEDs, took a lot of patience to read all of the stuff that's going on in a regulator and understand it (some of it) and I managed to get a basic circuit going for 12V using some help from the excel calculator they provide and ai to explain all the terminology. Then I wired up the N MOSFETs to the LED outputs and connected them to GPIO labels, ready for connection to any GPIO channel on my MCU. (This also means I can add RGB strips!!!) And I raised the channel count to 6 because why not.

image

1/10/2026 10 PM - Added sensors / user interaction and cleaned up schematic

Added the BNO080 IMU and since that had ENV sensor support I also added a humidity BME280 sensor to it's I2C ENV sensor connection. Then I also wired up the BMP580 for altitude measurement (on a separate I2C line, not the ENV one because the BMP580 is a later generation than the BNO080 and it might not support it, even though it supports the BMP280).

After that I also wired up the 8 segment, 4 digit display I will be using for easy viewing of flight/PID/other settings, I multiplexed it but then, the digit pin would have to sink about 64mA as a max, even if I run each LED at only 8mA, which is way above the MCU's absolute max limit of 50mA per pin so I added a small MOSFET for each of the digit pins to let me run more current. (I will also have to worry about the 100mA limit per GPIO group, probably split the pins over two channels).

And obviously, I need to be able to actually change those settings from in front of the PCB, otherwise the display is useless, so I also added 9 small SMD buttons, to act as editing and function inputs. I could have made them into a matrix to reduce the amount of GPIO needed however, on my MCU, I have about ~80, and the reduction of 3 GPIO would really not be worth it for the extra components (diodes) and the extra firmware needed.

Then I also organized everything into neat red labelled boxes as the schematic was getting too messy. Now I just have the SD card, MCU and video feed to plan and then I would be almost finished!

image

1/12/2026 - Finished ALMOST all of the schematic.

It's been quite a while since I journaled but I simply just forgot.

  1. Added SD card
  2. Added MAX7456 OSD Injector
  3. Added a data voltage shifter for the MAX7456 5V data lines to 3.3V MCU lines
  4. Added the VTX
  5. Added some DIP switches for the VTX radio band and general use as well
  6. Added LEDs for indication of almost everything
  7. Added motor PWM headers
  8. Added a custom footprint for my radio receiver module (a simple 3x8 pin header kind of thing)
  9. Added separate grounds and tied them with nets (i need to decide what to do for antenna ground)
  10. And probably some other small things I've forgotten (the schematic is there).

Now I just have to find out the GPIO placements for my MCU, I'm like 3 GPIO pins over budget so I do need to remove something and once I get the STM wired up and remember to put I2C pullups (!), I should be good to go (after doing DRC, which can take a few hours after I learnt the hard way).

image

1/14/2026 - Pinned out the MCU and I2C

Mostly sorted out the MCU pinout and I2C pullups/addresses and pinned everything out. Almost done. I have however runout of GPIO so I will have to get rid of some LEDs and 2 of the LED strip channels to be left with only 4. I hope I don't need any more GPIO for anything else as I've managed to use all ~80.... Plus some other small tweaks here and there. I will also have everything on the board on one I2C channel and have another separate one for some headers for off-board stuff.

image

image

1/16/2026 - Finished schematic

Finally finished the schematic for the flight controller. Assigned the LCSC footprints as they needed their library name changed and checked DRC. Then I also made sure to check the pinout for the STM32 matches the one in Cube MX several times just to make sure. I also added a PWM buzzer connected to a pin on the STM32 for PWM control and I also added a switch so I can turn the VTX off when I don't want to use it as it consumes quite a bit of power.

image

1/17/2026 - Split the whole design onto two boards bc it's too much

As you can see in the pictures, I had to completely overhaul my original idea of having just one PCB because there is simply nowhere near enough space on the size I'm aiming for. I decided to just split the whole circuit into two separate ones that go onto separate PCBs with a riser in-between them using pin headers/sockets. I'm going to be keeping the Video, motor power and LED strip stuff, and their according voltage regulator circuits on the bottom PCB and then have the STM32, sensors, SD card, Display, USB etc plus their voltage regulators on the top board. And to reduce cost I realized I can probably just combine the two resulting PCBs into one PCB with some tabs that hold them connected, which I can just then cut and sand when I get the PCB. And then stack them using the risers.

(this is what I was presented with upon updating PCB, I clearly underestimated the number of components)
image

(Updated schematic)
image

(where we are now, much better and less overwhelming)
image

1/18/2026 - Lots and lots of stuff happened 50% of the bottom board done

Again a while since I journaled so I'll list everything I've done.

  1. Removed redundant pull-ups/pull-downs as STM32 has built in ones on every GPIO pin
  2. Completed the motor power and return ground plane and also plenty of via stitching and rough calculations for how much copper I'll need to keep cool at 32A.
  3. Added the INA and shunt resistor sensor in it's correct position and wired it up after setting up the board with the XT60 connectors
  4. Changed to this diamond "pine cone" shape, this project is now officially called the Pine Cone Flight Controller (PCFC)
  5. Added the net ties for the motor ground and power ground, lots were needed because its the MGND plane that connects to the XT60 as it carries most power so all the GND plane has to then go into that to return to the battery
  6. (I feel like I made really good use of the space I had for the power zones, I added the + power ones on the bottom and top layers, adding lots of vias and a small all layer plane near the shunt and XT60 pin, then I added MGND everywhere else, and the appropriate ground planes too.
  7. Then I also added the diode and added the connections for VBUS to power everything else.
  8. Then I organized, placed and routed the 12V and 5V regulators (Hopefully, fingers crossed they actually function).
  9. I also arranged the connections on the header pins to benefit me routing
  10. Then I positioned the MAX7456, VTX (Ill solder it myself on the back) and the logic level shifter, I wired those up and calculated I need an impedance matched trace width of 0.44mm for 75ohm impedance for the video signals before and after the MAX7456.
  11. Wired that up accordingly, then I also put the LED MOSFETs above the VTX and quite close to the antenna output but this should be fine because there will be 2+ ground planes in-between them.
  12. Now I just have to arrange everything a little bit better, wire it all up and add the ground plane, and also find the impedance matched trace width for 50ohms for the 5.8ghz antenna signal.

image

1/19/2026 - Added circuit breaker chip (eFuse), finished off the b board

  1. I added an eFuse to protect the circuitry in case anything happens (I realized I had nothing to protect the circuit in the event of a short from the hundreds of amps my LiPo can provide). I had to research which chips to use, Ti only had 3 chips with enough current and voltage capacity for my needs thankfully, they were all ok, although a bit expensive but I'd rather have this eFuse that can go off in less than 200ns than have to replace the entire board. I think I did my best this time with using the datasheet and I managed to get pretty much all the values I needed for the resistor/capacitors. I also set a generous current limit for short burst of about 60A, my drone should consume more than 40A but I don't want to risk it falling out of the sky either. It however has the short protection breakage circuit at about 2x this, so 120A, but that's the one that goes within nanoseconds.

  2. Finished off several nets

  3. Added main ground plane and cleaned up the 3d models so they're aligned.

Now onto the top board!!!

image

image

1/21/2026 - 98% done with the PCB

  1. Changed to a microSD card slot as it uses up much less space
  2. Placed everything in position on the other board
  3. Routed everything up, keeping more or less to my stackup
  4. Added main ground planes

Now I need to fix the silkscreen, add some cool graphics on the front, then figure out if economic or standard PCBA is cheaper, and also clean up the DRC as there are a few problems. The PCB however is pretty much completed. I also need to not forget about the tab that holds the two boards together when they are being PCBA'd.

image
image