Feasibility of Pi 5 and Pico on quadcopter

December 31, 2023, 19:43

Xyler

Hi I'm relatively new to SBCs and microcontrollers. I'm currently working on programming a flight controller using a Pico W (running MicroPython) and Pi 5. The Pico will be running the flight control logic in an infinite loop taking accelerometer, gyroscope and RC data (from FS-iA6B) and sending out PWM signals to the ESCs. What the Pi 5 will be doing is partial autonomous control where my group plans to use a GCS (like QGroundControl) and wirelessly transmit messages (MAVLink?) to the Pi 5 via ~~WiFi~~ another RF transmitter and it controls the Pico based on what we do in the GCS. There will be an external GPS module connected to the Pi 5 so it can do the location processing and just send directions to the Pico, which then controls the ESCs/motors to move to the target. I don't really understand MAVLink (and a lot of these in general) and would like to appreciate some guidance/explanations. Also, is it possible to store multiple python files and have the Pi 5 re-flash the Pico on the go? I was thinking of something like having the Pi 5 store a whole bunch of programs like a calibration program, self-test program, flight program, etc. and whatever data from the prior programs (like gyro bias data from the calibration) to be stored in flash memory on the Pico or Pi 5, then load the flight program which grabs these values.

k9t33n

at that point why have the Pico? the pi 5 has gpio so it could do all this it's self

k9t33n

also WiFi wouldn't be a very good choice to make on this, your better off having a radio kit

Xyler

We read that the Pi would run too slow or would need a RTOS

k9t33n

wth is an RTOS?

k9t33n

also no it would run fine, in fact faster than the pico

k9t33n

much faster

Xyler

Like an antenna plugged into the computer's USB port? Are those expensive?

Xyler

Real time operating system

k9t33n

the pi 5 would need an os yes, not sure what real time means because any os runs in "real time" but yes the pi 5 needs an os

k9t33n

that's fine tho

k9t33n

not much more than the rest of this project, I suspect $15. but it'd make the drone much more reliable

Xyler

We're already using a FS-iA6B for manual control

Xyler

It sends the iBUS packets into the Pico's UART

k9t33n

WiFi isn't very good at vertical stuff so pretty much as soon as you take off to any decent height youll have problems

k9t33n

what is that?

k9t33n

radio antenna?

k9t33n

not sure, that's a bit out of my league ig

k9t33n

anyway what's your motors like?

Xyler


Xyler

Emax RS2205 2300KV

k9t33n

ah ok that ensues a tad bit of confidence in me lol, but if anything important is sent via wifi I'd still be worried

Xyler

Yeah I was worried about the distance

k9t33n

I mean volts, I don't know every motor of by heart

Xyler

Since WiFi isn't known for long distance comms

k9t33n

yeah

Xyler

It can run on a 4S, but we're using 3S so about 12 V?

k9t33n

ok not bad

k9t33n

4 of them?

Xyler

Quadcopter so yeah 4

k9t33n

ok last few questions, do you know your total power consumption?

Xyler

Not really why

Xyler

Flight time is not a concern at this stage

k9t33n

oh ok

Xyler

Just wondering if any of this is feasible

k9t33n

well apart from the things I pointed out, it seems possible

k9t33n

wait are these motors brushless?

Xyler

Yes

k9t33n

yeah ok, you got the wearable pass from me

k9t33n

*feasibile

Xyler

That's great, just that I need some guidance on understanding how all these work

Xyler

Robotics and embedded is not an area I am familiar with

k9t33n

how the hell did you get this far without knowing too much?

k9t33n

you've done well so far

Xyler

Sheer hard work

k9t33n

oh well you've got most of the knowledge I can give I think

Xyler

But google can only take me this far so I've come here

k9t33n

I'm not too skill full myself. I know a server which specialises in this stuff if you want to join

k9t33n

in robotics

Xyler

Yes please

k9t33n

ok one second

k9t33n

done, sent it to you

Xyler

Thank you