All the flight controller buses: UART, SPI, I2C and CAN bus

  Рет қаралды 10,053

FPV University

FPV University

Күн бұрын

Support my work / pawelspychalski
I am an engineer and I do flight controllers. Let me share some of my knowledge with you. Today let's talk about which buses modern flight controllers like Betaflight, Ardupilot, and INAV use. Pros and cons of each one and what kind of devices we connect to every one of them: UART, SPI, I2C and CAN bus!
0:00 I'm an engineer
0:31 Flight Controller connected devices
1:10 Buses: UART, SPI, I2C, and CAN
1:33 UART aka Serial port
4:36 SPI bus
8:29 I2C bus
10:38 CAN bus
11:40 Happy flying
#fpvuniversity #betaflight #inav

Пікірлер: 44
@M0rdH0rst
@M0rdH0rst 2 жыл бұрын
Thanks for the refreshing 😉 The CAN-bus is very popular in cars and what I have seen of it, has some overhead, to meet the safety standards. The SPI bus also can take more than one device, but then it needs an extra port for CS (chip select). Useful for sensor data from external ADCs and for flash memory.
@Idefix70
@Idefix70 2 жыл бұрын
Thanks for this explanation. Working on my first iNav setup, this is of great help!
@srul76
@srul76 2 жыл бұрын
As always great video many thanks Pavel
@WSNFPV
@WSNFPV 2 жыл бұрын
It will be nice to see details of this protocols to understand it limitations and adventages.
@blemysh0
@blemysh0 2 жыл бұрын
Great explanation Pawel. Greetings from MX 🇲🇽
@underlecht
@underlecht 2 жыл бұрын
great video. lots of new info. half-duplex, full-duplex - did not hear about those.
@carlosah2598
@carlosah2598 2 жыл бұрын
Thank you Pawel for your clear explanation as always. It means that our fligh controllers could use Can bus in the future with Inav "5.0"....👌
@FPVUniversity
@FPVUniversity 2 жыл бұрын
I hope so!
@SyvaPankumi
@SyvaPankumi 6 ай бұрын
Дякую 😁
@MCsCreations
@MCsCreations 2 жыл бұрын
Awesome, Pawel! 😃 Thanks for the lesson! Stay safe there with your family! 🖖😊
@calisti9308
@calisti9308 Жыл бұрын
I wish I would have found this video earlier! Thank you!
@FPVUniversity
@FPVUniversity Жыл бұрын
Glad that you like it
@TNCS8884
@TNCS8884 2 жыл бұрын
Thank you very much.
@FPVUniversity
@FPVUniversity 2 жыл бұрын
My pleasure
@carnagefpv8256
@carnagefpv8256 2 жыл бұрын
Since you mentioned CAN, is there any future hope for CAN support in INAV? I've been looking and it seems like CAN has become very useful on ardupilot, perhaps we could benefit?
@michaelosumune2149
@michaelosumune2149 Жыл бұрын
I want to connect multiple voltage and current sensors while controlling an ON and OFF switch using the Jetson nano using the UART but I want to know the best alternative to do this such as CAN etc. This device want to industrially customize. Kindly need your advice . Thank you
@embededfabrication4482
@embededfabrication4482 10 ай бұрын
is there CAN on a matek f765 wing ? is there a way to connect RTK gps to such a FC?
@kelvindeen
@kelvindeen 11 ай бұрын
How would you go about with communicating to a FC via an UART serial pin/port? I cant figure out for the life of me how I can use any protocol to do this. I dont understand how CRSF protocol (used by ELRS) communicates to the FC all the stick inputs with all the different channels. Do you use normal PWM values but in serial code?or a value just between 1000 and 2000? I am talking about FC that run Betaflight. Could you help me out here for a promising project I am working on? I am currently using Arduino IDE with esp32 with UART pins. Would be awesome to get your 2 cents on this. Thanks and I appreciate your content!
@stevefox3763
@stevefox3763 2 жыл бұрын
i2c is very handy, i have 6 devices connected on one build, soon to be 7 or 8.
@FPVUniversity
@FPVUniversity 2 жыл бұрын
I2C is also very slow comparing to other buses and it gets slower the more devices you connect to it
@febbyeka
@febbyeka 2 жыл бұрын
Hi, are there any hardware or software additional setting to use multiple i2c devices into a single i2c bus in the flight controller?
@FPVUniversity
@FPVUniversity 2 жыл бұрын
@@febbyeka multiple devices on I2C work out of the box. No extra settings needed
@pgabrieli
@pgabrieli 2 жыл бұрын
thank you very much. I'm a newbie, could you please explain why "SPI" onboard receivers are always worse than external receivers on UART? does it have to do with the interface (SPI/UART)? thanks again
@FPVinPA
@FPVinPA 2 жыл бұрын
I second this question.
@olafschermann1592
@olafschermann1592 2 жыл бұрын
It has nothing to do with the connection protocol (SPI vs serial). Often the implementation is executed very poorly especially the antenna which is just a wire. There are well implemented SPI receivers like the new ExpressLRS onboard reiceivers on tiny whoop boards.
@pgabrieli
@pgabrieli 2 жыл бұрын
@@olafschermann1592 but SPI *is* a serial, right?
@olafschermann1592
@olafschermann1592 2 жыл бұрын
Yes, both are serial protocols. UART is 1 sender 1 receiver, is asynchronous, has built in parity and handshaking uses 2 wires. SPI can have multiple partners = is a bus, uses 4 wires, is synchronous and needs a clock wire, has no handshaking, parity or errorcorrection, is faster, is simpler, is smaller.
@pgabrieli
@pgabrieli 2 жыл бұрын
@@olafschermann1592 thanks!
@jeremygalloway1348
@jeremygalloway1348 Жыл бұрын
What type of engineering? Radio? Aeronautical?
@hemanthkrishna5343
@hemanthkrishna5343 2 жыл бұрын
I wanted to add compass and baro to my FC but it only has one i2c bus. Is there any way to remap a UART or any other pads?
@FPVUniversity
@FPVUniversity 2 жыл бұрын
You can connect multiple devices to a single I2C bus
@hemanthkrishna5343
@hemanthkrishna5343 2 жыл бұрын
@@FPVUniversity Wow! I spent the better half of the day researching this. Thanks for the reply. Hope it does not affect the performance compared to an FC with integrated baro
@FPVUniversity
@FPVUniversity 2 жыл бұрын
@@hemanthkrishna5343 majority of FC have baro wired internally to I2C as well. And very often the same I2C bus as external one
@jimmytheriot8978
@jimmytheriot8978 2 жыл бұрын
Can you help , I have the F405 wing set up on I nav , when I arm the motor and put the plane in stabilize mode and move the ailerons to full deflection and let go of the stick they don't return to center but if I disarm they go back to center and function normal when the plane is disarmed, it only happens when I arm the motor
@carnagefpv8256
@carnagefpv8256 2 жыл бұрын
Sounds like stabilize mode is just doing it's job. The pid controller will "wind up" when it's trying to make changes, but not seeing results. This is why the control surfaces stay deflected. Disarming either disables or resets this process(can't remember).
@jimmytheriot8978
@jimmytheriot8978 2 жыл бұрын
@@carnagefpv8256 It's weird cause I never had that happen before, I always test everything on the ground before I fly And never noticed that till now , And the last time I flew when I made a turn I added rudder And the alirons straightened back out But it seemed like the rudder stayed stuck Because it kept crabbing to that Side
@jimmytheriot8978
@jimmytheriot8978 2 жыл бұрын
@@carnagefpv8256 Appreciate the input, by the way check out my homemade cockpit let me know what you think
@carnagefpv8256
@carnagefpv8256 2 жыл бұрын
Which INAV are you using? Do you have turn assist on? If so, turn it off. On builds previous to 3.0 yaw stabilization is not properly functional, so use RC yaw in the mixer, not stabilized. This is all previous to 3.0 if post 3.0, I'm not sure then.
@carnagefpv8256
@carnagefpv8256 2 жыл бұрын
@@jimmytheriot8978 could also be a bad servo/ analog servo midpoint drift/bad linkage geometry/binding/loose connection. I don't know your setup but that's where I'd start
@necipali1795
@necipali1795 Жыл бұрын
Hi, i have been watching your videos, mostly about gps. What i would like to ask you, i have m8q gps with barometre and magnetometer, so there are 6 wires on it, but i don’t know which wire goes where on my Cinebot30 drone’s fc, can you explane me like explaning to a newbee, cause this is my first drone that i haven’t fly yet. Thanks 🙏🏼
@FPVUniversity
@FPVUniversity Жыл бұрын
I2C for mag and baro will be marked as SCL/SDA , DA/CL, D/C or something like that
@necipali1795
@necipali1795 Жыл бұрын
@@FPVUniversity thanks for the answer, yes on gps there is SDA and SCL but on fc there isn’t. So where should i solder this sda and scl wires to fc?
What makes a great GPS receiver?
14:09
FPV University
Рет қаралды 9 М.
UART vs SPI on 3D Printers. What are they?
10:41
Vector 3D
Рет қаралды 49 М.
CAN Protocol Explained | Controller Area Network
12:09
The EV Engineer
Рет қаралды 68 М.
Flight controller basics for beginners
18:18
FPV University
Рет қаралды 10 М.
I2C and SPI on a PCB Explained!
15:34
Altium Academy
Рет қаралды 140 М.
Can this be cinematic? | Caddx GoFilm 20 cine drone
7:52
FPV University
Рет қаралды 7 М.
The RS-232 protocol
26:10
Ben Eater
Рет қаралды 825 М.
CAN and CAN FD protocol
18:37
Texas Instruments
Рет қаралды 89 М.
SPI-based ExpressLRS receivers are the worst
13:22
Joshua Bardwell
Рет қаралды 58 М.
INAV VTX power on a radio switch - tutorial
7:21
FPV University
Рет қаралды 20 М.