rizacelik / STM32F411CEU6_INAV_Firmware

STM32F411CEU6 Board Firmware
122 stars 32 forks source link

PCB project #57

Open suchigno opened 1 month ago

suchigno commented 1 month ago

I designed a PCB for this great project, ordered with JLCPCB ($2 for 5 pieces, and $2 for shipping). The PCB is only compatible for a quadcopter with wire for INAV 7.1. The wiring diagram is in sections so it should be easy to understand.

Specs:

image image

Some notes to help you understand: NOTE: Always READ Rıza Çelik advice and suggestions. NOTE: Always test everything first on a breadboard. NOTE: Always remember to remove the propellers during setup tests.

NOTE Power Board Power for the PCB components is taken from the ESC of Motor 1 (M1BR, back right). Power for the LED strips is taken from the ESC of Motor 4 (M4FL, front left). Never connect the USB cable if the M1BR ESC is connected to the board even if the battery is disconnected. When you want to test the motors with the PCB connected to the configurator with the USB cable, use jumper cables to connect the M1BR ESC connector to the board, then connect only GND and Signal (therefore exclude the 5volts pin, the central one of the connector) .

NOTE Gyro Section Even if you buy the MPU9250 module it probably won't be the original one, now out of production, so you will find the MPU6500 in it, so if you want a compass you have to add an HMC5883 module. Rıza Çelik reported this here #42.

NOTE Battery Monitor Section In my case I power my drone with a 3S battery so the two resistors of the voltage divider (RP1 and RP2) are calculated to obtain approximately 3 volts from 12.6 volts. If you change battery cells, calculate the resistors to avoid damaging the board.

NOTE Receiver Section My receiver only has PWM channels so I used a converter to have a SBUS. The pads for the PPM and SBUS connectors are used to connect it to the PCB. In the images below you can see the converter I used and the pads for the connectors. image image

PPM If your receiver has the PPM signal you can use the PPM pads, to power the receiver use the central pad which supplies the 5 volts. Then use the J-SBUS-PPM (pin 1 and 2) to connect pin A3 of the micro to the PPM signal.

SBUS If your receiver has the SBUS signal you can use the SBUS pads, you have to take the 5 volts power supply from the PPM side to power it. You can also make a connection between the two central pads. Then use the J-SBUS-PPM, pin 2 and 3 together. If you do NOT need to invert the SBUS signal you can close the JSBUS which will bring the signal directly to pin A3 of the micro. If you need to invert the SBUS signal you must leave the JSBUS disconnected and use the two resistors (RSBUS 4k7, RSBUS2 10K) and the BC547 transistor to invert the signal, as specified by Rıza Çelik.

NOTE Led Strip In the PCB there are two connections for two LED strips, one is completely independent (Ext Strip Section), the other (strip section) is connected to pin A8 of the micro and can be used with the INAV configuration. Remember that the LED strips are powered by the M4FL ESC.

Ext Strip Section I needed to understand what the orientation of the drone was when it was overhead, so I added a strip under the frame that moves the LEDs from the last rear to the first front. The strip turns on/off with a switch and changes color with a tactile button. The components used for this strip are:

If you don't want to use this feature just don't solder them to the PCB. To program the attiny85 there are many guides on the web, you can create the LED effect you want.

Here you can download the zip file with the PCB gerbers Gerber_SMT32F411-FC-V2_PCB.zip

rizacelik commented 1 month ago

You really did a great job. Thank you for your contributions. This work will greatly simplify the use of the flight control card. Everything will be together and easy to use. If you find it suitable, I will put your work in the warehouse as a PCB file at a convenient time on your behalf.

rizacelik commented 1 month ago

It would be nice if you included HM-10 bluetooth connection with TX_PIN PA0 and RX_PIN PA1 via SOFTSERIAL2 in the scheme. Thus, configuration operations could be performed from the smartphone using the speedybee application.

suchigno commented 1 month ago

Sure, I'm waiting to receive the JDY-08 module, when it arrives I'll test it and if it works, update the PCB.

suchigno commented 3 weeks ago

Update PCB V2.1 with Software Serial Port 2 connector. Gerber_SMT32F411-FC-V2.1_2024-06-16.zip

chynbnbnb commented 1 week ago

good job!Thanks for your contribution