[HN Gopher] Build a Low-Cost Drone Using ESP32
       ___________________________________________________________________
        
       Build a Low-Cost Drone Using ESP32
        
       Author : m3at
       Score  : 334 points
       Date   : 2024-12-24 00:20 UTC (22 hours ago)
        
 (HTM) web link (www.digikey.com)
 (TXT) w3m dump (www.digikey.com)
        
       | phoronixrly wrote:
       | What a great time for this article! The US is having a mass
       | hysteria event and it turns out you can churn out DYI drones for
       | the fat sum of $12-13 each? What a time to be alive!
       | 
       | Edit: Hmm, considering that people are taking stars for UFOs
       | lately, maybe a cheap drone is an overkill and a 20-pack of
       | Chinese sky lanterns would be more than enough to keep the
       | average US neighbourhood in a state of constant fear / see how
       | long it takes for you to get to the front page of /r/UFOs...
        
         | abracadaniel wrote:
         | Judging from the posts I've seen, others have already started.
         | Someone had a drone with a lit Roman candle going the other
         | day. Or it was FAA compliant aliens. One of the two.
        
         | ActorNightly wrote:
         | The interesting/scary part is that its not that hard to
         | weaponise these drones. You can make one drop a home made
         | explosive pretty easily, fully autonomous. and then dump itself
         | into a body of water. All for way less cost than a gun.
        
           | bubaumba wrote:
           | > home made explosive
           | 
           | With this a lot of damage can be done even without drone. As
           | for weaponized it's not a future, it's a reality in Ukraine
           | for years now. Defense against them is difficult to
           | impossible. A bodyguard who can sacrifice himself may
           | sometimes work.
        
           | JKCalhoun wrote:
           | It's not scary when it is just a hypothetical. If this were
           | happening with some frequency it would be concerning. Until
           | then I suspect there is something you are overlooking,
           | oversimplifying.
           | 
           | (EDIT: I'm assuming you are talking about non-military use.)
        
             | ActorNightly wrote:
             | Its one of those things where once you can buy "kits" for
             | it, you may see its use. Ukraine war videos popularized the
             | idea of using drones to drop explosives.
             | 
             | I could see Cartels using this to take out targets.
        
           | idunnoman1222 wrote:
           | I don't know what drone you're talking about but you
           | absolutely cannot make a tiny Wi-Fi drone autonomous or drop
           | things for less than a cost of a gun, every part of your
           | statement is wrong. Currently anyone smart enough to build
           | drone with 7 inch propellers and programmable GPS waypoints,
           | improvised explosives ... 3d printed release mechanism ..
           | probably has a pretty good paying job and doesn't see the
           | value proposition of blowing things up
           | 
           | You know what you can easily do drive a truck into a crowd of
           | people or fill your car with explosives in park it under a
           | building and then blow up the entire building, but people
           | aren't doing that every day but continue whingeing about
           | drones
        
             | Max-q wrote:
             | Autonomous isn't a problem, the open source firmwares for
             | drones include fully autonomous mode. I don't know if this
             | particular one does but it should be easy to port. The size
             | and range, however, doesn't make this particular drone very
             | scary.
        
           | numpad0 wrote:
           | I find it funny that the US is so obsessed with infantry
           | firearms and surgical strikes that people think those are the
           | best "ways to go" for certain things. I guess not a bad thing
           | considering we don't need any improved means for those
           | stuffs...
        
           | aftbit wrote:
           | Why even "drop" an explosive? Just fly it straight into the
           | target.
        
         | diggan wrote:
         | > The US is having a mass hysteria event
         | 
         | What is this in reference to? The Chinese weather-balloon drama
         | was years ago, wasn't it?
        
           | mathgeek wrote:
           | https://apnews.com/article/drones-new-jersey-what-to-
           | know-e6...
        
             | diggan wrote:
             | Thanks!
             | 
             | > Authorities say many of the drone sightings have actually
             | been legal drones, manned aircraft, helicopters and even
             | stars.
             | 
             | > many state and municipal lawmakers have called for
             | stricter rules about who can fly unmanned aircraft -- and
             | for the authority to shoot them down.
             | 
             | Hard to find a more American article than this.
        
               | jbuzbee wrote:
               | "Hard to find a more American article than this." Just
               | wait until they start taking pot-shots at them and then
               | it will be "real" America: BOOM! "Look Ma! I done got
               | one!"
        
       | teruakohatu wrote:
       | This is amazing. Even the landing gear (struts?) is part of the
       | PCB. I hope the author considers selling kits or outsourcing kits
       | to SeedStudio. I live in a country where digikey order shipping
       | is quite pricey.
       | 
       | The author estimates the BOM to be a little under US$13. At that
       | price it would be fun to try create a swarm for DIY drone lights
       | show.
       | 
       | [1] https://circuitdigest.com/microcontroller-projects/DIY-
       | wifi-...
        
         | jdboyd wrote:
         | FWIW, making just 10 might drive that $13 price down quite a
         | bit.
         | 
         | Although, it looks like 1 unit might be closer to $50 (at least
         | for the suppliers I might use), but $150 for 10.
         | 
         | I think costs could be cut somewhat though. The USB->serial
         | chip is nearly $6, but differently packaged it can be $4.40 for
         | 1 or $3.99/ea for 10, and alternative chips that seem like they
         | should be good enough can be cheaper still. The voltage
         | regulator they chose is $1/ea for 500ma, while the one I would
         | normally go to is $0.22/ea for 1000ma (dropping down to
         | $0.13/ea for 10).
        
           | awestroke wrote:
           | Which is your go-to voltage regulator?
        
           | pjc50 wrote:
           | If you're making lots, you could uncouple the programming
           | interface which isn't needed while in flight, thereby saving
           | both BOM and weight.
        
           | numpad0 wrote:
           | Does it need a regulator at all? ESP32 should be able to run
           | on raw battery voltage, assuming the ESP is necessary.
           | RealTek TX2/RX2 + PIC10/ATTiny10/CH32V003 could be even
           | cheaper if user is okay with a dedicated transmitter.
        
           | sweetjuly wrote:
           | The entire BOM is crazy. The USB to UART chip is wholly
           | unnecessary if you simply pick a better (at an equal or lower
           | price) ESP32-S3 module which has a USB interface.
           | 
           | I suspect this was designed based on things the author had in
           | their cupboard as opposed to something that's reasonable for
           | new designs.
        
       | iandanforth wrote:
       | Meta: This has to be one of the most aggressively blocked pages
       | I've encountered as it refuses to render any content if you have
       | an adblocker on (uBlock at least) and resists several forms of
       | archiving.
        
         | macrocosmos wrote:
         | I'm able to access the site with uBlock Origin.
        
           | downrightmike wrote:
           | Same here
        
           | prmoustache wrote:
           | Same here on firefox/linux. Is that IP dependent?
        
         | moepstar wrote:
         | uBlock on, pihole on the net - not sure what it dislikes more.
         | 
         | I see a screen (light grey on white) which reads something
         | along to "Press & hold" some button to confirm i'm human. Which
         | does nothing, because of adblocking?
         | 
         | Well, f* you then - let me find something different to read :)
        
           | stavros wrote:
           | This will work (make sure you check the video at the bottom):
           | 
           | https://circuitdigest.com/microcontroller-projects/DIY-
           | wifi-...
        
         | ElectRabbit wrote:
         | Even with uBlock and Cookie AutoDelete disabled it doesn't
         | work.
         | 
         | OK. Then I'll order my stuff from Mouser in the future.
        
         | RamblingCTO wrote:
         | I also had the worst anti robot thing ever. I had to hold a
         | button for what feels like 10s. Who does that?
        
         | pjc50 wrote:
         | Odd, it's just fine for me on firefox/ublock origin.
        
           | 0xEF wrote:
           | I'm also using firefox/ublock but I'm getting the mentioned
           | agressively-blocked page. I'm also using a VPN, if that makes
           | any difference.
           | 
           | I also see the extremely light "Press & Hold" message to
           | prove I am not a bot. I missed it the first few times I
           | loaded the page because my eyes just don't pick up on things
           | like that very easily (I'm the guy who turns the brightness
           | up in video games with a lot of shadow). Not only does this
           | press & hold action seem to be ineffective, but they made a
           | message that some humans have trouble seem to keep bots out?
           | Smdh.
           | 
           | Which is disappointing, because I've ordered from digikey
           | countless times, both for work and for personal projects.
           | There should be absolutely no reason they clamp down on
           | people using adblockers since they are highly profitable
           | already. Guess I'll be looking for a different parts source.
        
       | joshu wrote:
       | note: appears to use an outdated esp-idf. worth checking to see
       | if esp-drone has been ported a newer esp-idf.
        
       | asadalt wrote:
       | this is amazing. on similar note, I have spent last few months
       | trying to fit visual inertial odometry into esp32. Combining that
       | with this would be insane (and so cheap!)
        
         | timschmidt wrote:
         | I've had similar thoughts and have been working on firmwares
         | for the esp32. My contact info is in my profile. Hollar at me
         | and lets compare notes.
        
           | asadalt wrote:
           | i don't see your contact info.
        
             | timschmidt wrote:
             | My mistake. Updated.
        
       | AstroJetson wrote:
       | Is the custom circuit board something that mortals can get made?
       | That seems to be the sticky point to me.
        
         | asadalt wrote:
         | just upload it to jlcpcb and get it delivered with components
         | soldered.
        
         | wiml wrote:
         | Yup. About fifteen years ago there was an explosion in small-
         | run PCB services that cater to hobbyists (and cottage-scale
         | professionals). If you don't need them overnight you can get
         | good quality PCBs made at a very reasonable price.
        
         | ElectRabbit wrote:
         | 99% of hobbyist PCBs are can be ordered from JLCPCB nowadays.
         | 
         | As long the PCBs have no components on them it's very cheap.
        
           | stavros wrote:
           | Even if they have components on them, that's only $1-$2 extra
           | per board (depending on the components), JLCPCB will assemble
           | all the common components (resistors, capacitors, some more
           | exotic ones) for very cheap, and you can solder the rest
           | yourself. Their PCB assembly saves so much time, I don't want
           | to waste half an hour soldering 20 0805 resistors to save
           | $0.30 any more.
        
           | nick__m wrote:
           | JLCPCB assembly services are so cheap as long as you don't
           | use components marked as extended!
           | 
           | I don't solder passive components anymore and now mostly use
           | 0402 (that i am not able to solder reliably) instead of the
           | bigger 0805. If you value your time and don't derive pleasure
           | from soldering passive components, try the assembly services!
        
       | frognumber wrote:
       | It's odd, considering this is digikey, that there isn't a "Buy
       | now" button.
       | 
       | I'd totally do that if I got everything shipped to me, and knew I
       | wasn't forgetting something.
        
         | wat10000 wrote:
         | There's a small link at the bottom to "Add all DigiKey Parts to
         | Cart."
         | 
         | But one of the parts is apparently already obsolete and
         | unavailable, and two more have minimum quantities above what's
         | needed here, so it's not great.
        
           | rkagerer wrote:
           | _But one of the parts is apparently already obsolete and
           | unavailable_
           | 
           | I love Digikey, but unfortunately this is not uncommon at
           | all.
        
             | CamperBob2 wrote:
             | To answer the question asked by the [dead] commenter:
             | because every other electronic component distributor site
             | (with the exception of Mouser, which is basically DigiKey
             | with a different stylesheet) is much worse.
        
       | anigbrowl wrote:
       | Or if you don't want to do it from scratch, you can get a
       | programmable readymade for a little more:
       | https://shop.m5stack.com/products/m5stamp-fly-with-m5stamps3...
       | 
       | The included software stack is very basic, dig around on Japanese
       | nerd Twitter for open source avionics.
        
         | rahimnathwani wrote:
         | Right, but it's 3x the price and out of stock :(
        
       | asadalt wrote:
       | i wish this didn't use mpu6050 imu, which is obsolete and
       | unavailable it seems.
       | 
       | but i guess they used it due to existing code/drivers widely
       | available for it and esp32.
        
       | timonoko wrote:
       | I played with EUR25 foldable wifi drone from Lidl until EU
       | started requiring EUR30 fee annual for a camera drone.
       | 
       | I cannot think much practical use for drone without a camera.
       | Fly-fishing might be one, but I need to program it so that it
       | drops the line and returns home the moment it feels fish yanking.
        
         | eptcyka wrote:
         | How much lift can a 30EUR drone produce? A 600 gram trout could
         | easily drag the drone underwater unless it is ridiculously
         | overpowered.
        
           | timonoko wrote:
           | "drops the line" == does not even try, me myself reel the
           | fish in.
        
         | wyan wrote:
         | EU doesn't require a EUR30 annual fee for a camera drone,
         | though. Your country might. Mine surely doesn't.
        
         | VagabundoP wrote:
         | Drone reg here in Ireland (over 250g or with a camera its
         | required) EUR38 for two years.
         | 
         | https://www.iaa.ie/general-aviation/drones/drone-register
        
           | mig39 wrote:
           | I'm registered as an operator in Ireland. This isn't per
           | drone fee. It's a per-operator fee.
        
       | fitsumbelay wrote:
       | love everything here but I'm skeptical of real time control via
       | wifi. for me there's always been a noticeable delay in video
       | streaming and receiving control signal so I'm curious how this
       | works?
        
         | m00x wrote:
         | There's no video feed on this drone
        
       | jauntywundrkind wrote:
       | Feels like a poor fit, given the limited number of cores
       | available.
       | 
       | Would be awesome to see rp2350 or some such, where there are very
       | low power io cores available that can do work whether the main
       | core is on or not. Embedded really is one of the best places for
       | many-core, but it's so so rare there are good offload
       | architectures and puny Programmable IO systems.
       | 
       | Should out to folks like Silego/Dialog/Renesas with their
       | GreenPAK; ultra tiny but interesting mixed signal little bits of
       | programmable logic with a healthy dollop of peripherals!
        
         | not_the_fda wrote:
         | You don't need more cores. Ardupilot runs on much less capable
         | hardware https://ardupilot.org/copter/docs/common-
         | autopilots.html#com..., we've sent people to the moon with less
         | capable hardware. More cores just make things more complicated.
        
         | crote wrote:
         | Calling the RP2350's PIO units "low power io cores" is quite an
         | exaggeration. Although they are _technically_ turing-complete
         | with a lot of hacking, they are absolutely awful at any kind of
         | compute. Heck, you probably don 't even want to let it handle
         | UART parity calculation!
         | 
         | If anything the ESP32's Ultra-Low-Power Coprocessor would be
         | _perfect_ for such applications - but realistically it isn 't
         | worth the effort. Compute power usage is going to be negligible
         | compared to what is needed for wifi and rotors, and running
         | multiple realtime tasks on a single core isn't exactly rocket
         | science either.
        
       | curiousgeorgio wrote:
       | Is this just someone reposting espressif's esp-drone
       | (https://github.com/espressif/esp-drone) and passing it off as
       | their own (and DigiKey posting it on their site)? They talk about
       | making a custom PCB, but it looks pretty much the same.
       | 
       | The repository linked from the article
       | (https://github.com/Circuit-Digest/ESP-Drone) has some issues
       | claiming there's malware in it, and the commit history looks a
       | little suspicious, but I could be wrong.
        
         | asadalt wrote:
         | damn you are right!
        
         | stavros wrote:
         | Wow, yeah, I thought Espressif just wrote the firmware, but
         | this drone is really really similar to the one posted, PCB
         | struts and all.
        
         | nick__m wrote:
         | Since those who filed the issue did not even stated which file
         | is affected this is pure speculation but the virus issue really
         | look like a false positive. The pre-built firmware checked into
         | a repo could easily trigger an anti-virus.
         | 
         | The repo is mostly made of plain text files, the zip and the
         | bin don't look required for anything so if your feeling
         | paranoid delete them before building!
        
         | m00x wrote:
         | Yeah, he took the code straight from esp-drone which is
         | copyrighted.
         | 
         | https://github.com/Circuit-Digest/ESP-Drone/blob/main/Firmwa...
         | 
         | I believe this is a violation of the license. Very poor form of
         | Digikey to hire these people.
        
       | ChuckMcM wrote:
       | Fun! I built a Crazyflie[1] back in the day which was bespoke
       | 2.4GHz protocols (no ESP32 at the time) so this is a great
       | upgrade to that. Also the use of a single low side MOSFET as the
       | motor controller makes it simpler and cheaper at the expense of
       | some moves that BLDC motors give you. All in all, at $10 - $15
       | that is a great deal and I'm wondering if one will show up in a
       | Hackerbox[2] as that is exactly the kind of thing they do.
       | 
       | I have had a lot of fun playing with the CF microdrones, I'm
       | definitely going to build one of these too.
       | 
       | [1] https://github.com/bitcraze/crazyflie-firmware
       | 
       | [2] https://hackerboxes.com/
        
       | amelius wrote:
       | With the power budget of a drone almost any board will do.
        
       | mrtksn wrote:
       | Fun. I'm looking into turning my old iPhone into a drone as it
       | has great hardware already to do higher level tasks and use ESP32
       | for the more real time stuff like actually driving the motors
       | based on sensor input.
       | 
       | If you think about it, an old iPhone 6 comes with GPS, gyro,
       | accelerometer, multiple cameras, pretty powerful processors,
       | bluetooth + wifi + LTE, sound + light, ambient + proximity
       | sensors. Get rid of the case, and you have a great mini computer
       | that can be aware of its surroundings and communicate.
       | 
       | On more modern iPhones, you can even use advanced tech like ARKit
       | to have great spatial understanding of your drone and environment
       | and do autonomous drones. With an iPhone 15, you can even get
       | spatial video. How amazing would that be?
       | 
       | I wish Apple provided a straightforward way to unlock(like remove
       | restrictions on the OS level) old phones and use them for DIY
       | projects.
        
         | szundi wrote:
         | Not a realtime os though
        
           | mrtksn wrote:
           | True but, IMHO, a lot of the higher level task should be able
           | to handle it. I guess you can have a simple real time IC to
           | handle the flight envelope to provide stable flight and then
           | use the iPhone to do the advanced operations. For example, if
           | you are building a drone that is mapping the environment and
           | follows you through a bike ride, does it really matter if the
           | 3D environment it creates for autonomous navigation is
           | slightly off? You can continuously compensate for it, stick
           | with moving averages and avoid extreme moves.
        
             | sokoloff wrote:
             | That real-time controller still needs the IMU sensors,
             | which is maybe what GP was responding to. (Your iPhone
             | could have an _additional set_ of them, but the ones on the
             | phone don 't do any good to the real-time subsystem.)
        
               | mrtksn wrote:
               | Oh, I got an accelerometer card for that. It's very small
               | and cheap, there are also cards that contain a gyro +
               | barometer. So if the phone ones are not real-time enough
               | cheap options exist.
        
           | bschwindHN wrote:
           | Hence a microcontroller for flight control. The iPhone can
           | just decide on the higher level tasks and send control
           | signals to the microcontroller, similar to how a
           | microcontroller delegates tasks to the underlying hardware
           | peripherals.
        
           | numpad0 wrote:
           | imo "realtime" is such a misnomer. It should be re-termed as
           | "jitter minimized" or "loop interval stabilized" or something
           | along that.
        
         | Max-q wrote:
         | Do you really need the phone? The dual core 240MHz ESP32 seems
         | to be able to do the job at lower weight and power consumption.
         | 
         | Maybe the old phone is better used as a controller?
        
           | mrtksn wrote:
           | I got an ESP32 WROOM 32U board that I intent to use it as the
           | flight controller which will keep the drone within its flight
           | envelope and do the maneuvering upon receiving commands from
           | the phone.
           | 
           | I find the phone appealing because I want try to make it
           | somewhat autonomous, like im RTS games where you give a unit
           | a command to go somewhere and it figures the path out by
           | itself and avoids obstacles without direct input. The phone
           | has quite a lot of processing power and sensors and IMHO
           | doing it on board will be more interesting. Also, I'm not
           | sure that the connection will be always stable and high
           | bitrate make the drone a thin client.
        
             | jeremyjh wrote:
             | Still I think I'd just have the phone run an app that talks
             | to a microcontroller by Wifi, even if it is strapped to the
             | drone all the time.
        
               | mrtksn wrote:
               | I haven't tried it yet but as it appears that will be my
               | choice too. Other options appear to be bluetooth or
               | ethernet tethering over USB.
        
       | the__alchemist wrote:
       | Note to anyone unafamiliar: There is a thriving "FPV" ecosystem
       | of drones that can be DIYed. Example common setup, you can
       | mix+match:                 - Small square PCB with the main
       | flight control MCU (STM32), and some sensors       - Smalls
       | square PCB with motor drivers       - Carbon fiber frame       -
       | Small PCB with a LoRa radio       - Camera and video transmission
       | system. (90s-security-cam style analog, or digital.       -
       | Brushless DC motors, props etc
       | 
       | Uses Betaflight, ArduPilot, iNav, or PX4 firmware. Or, you could
       | write your own.
       | 
       | The PCB-frame in the article is neat and has obvious convenience
       | advantages, but I speculate that it would not be stiff enough for
       | desirable controllable characteristics under high accel
       | situations.
        
         | hylaride wrote:
         | And a lot of it is all open source!
         | 
         | ESC software:
         | 
         | - https://github.com/am32-firmware
         | 
         | - https://github.com/mathiasvr/bluejay
         | 
         | Flight controller (you mentioned these):
         | 
         | - https://github.com/betaflight
         | 
         | - https://github.com/ArduPilot
         | 
         | - https://github.com/iNavFlight
         | 
         | Control link:
         | 
         | - https://github.com/ExpressLRS (also uses ESP32/ESP82 chips)
         | 
         | Radio Controllers:
         | 
         | - https://github.com/EdgeTX
         | 
         | 5+ years ago the vast majority of this stuff was proprietary-
         | only and getting into the hobby cost thousands of dollars. Now
         | you could start at ~$500 (big price factor for FPV is the
         | goggles, but cheap analog ones can be had for ~$100).
        
           | nullstyle wrote:
           | With luck the OpenIPC cameras that are starting to come on
           | the market will find traction and the entire hardware stack
           | will run on open source firmware.
           | 
           | https://www.youtube.com/watch?v=EdjI3ZQsmCA
        
             | the__alchemist wrote:
             | This is so cool; LFTI!
        
         | Kadin wrote:
         | This is all true, but just to set expectations: the open source
         | ecosystem seems to be lagging the proprietary world pretty
         | significantly, unless there's some corner where development is
         | really chugging along that's not making it out to the rest of
         | the hobbyist market.
         | 
         | Though there have been incremental improvements in flight
         | control software, and video subsystems have moved (mostly) from
         | analog to 2.4/5.8 GHz and digital, the overall architecture is
         | pretty similar to what it was 5+ years ago. You have a hobby
         | R/C transmitter and receiver driving PWM outputs (through the
         | flight controller, typically an STM32) to hobby-type ESCs which
         | control the motors. The ESCs are microcontroller-driven and can
         | be reflashed, but painstakingly and annoyingly. Telemetry is
         | typically separate from control, which is separate from video.
         | Everything is very short-range and non-IP.
         | 
         | In comparison, a COTS quadcopter from DJI has a single backhaul
         | from the airframe to the controller which does control, video,
         | and and telemetry. And the video is impressively low-latency.
         | (I'm pretty sure they use a WiFi-type chipset and just spew raw
         | vendor frames, and the receiver picks up what it can, best
         | effort. You could do this with an ESP32 in ESP-NOW mode, I
         | suspect?) I've seen some efforts to reverse-engineer the DJI
         | protocol but I'm not aware of a fully compatible implementation
         | or equivalent in the OSS world.
         | 
         | And at the upper end of the commercial/proprietary space you
         | have systems with out-of-the-box autonomy, multiple backhauls
         | over IP -- so they can use LOS/BLOS radio, LTE, SATCOM,
         | whatever you want -- integration with navigation beacon systems
         | to reduce GPS dependence, hybrid motor/generators, redundant
         | power systems, the whole shebang.
         | 
         | There's no real reason aside from developer interest that this
         | situation exists, as far as I can see. The components are
         | mostly all available. A Raspberry Pi running a decent RTOS
         | would have orders of magnitude more processing capacity than an
         | STM32 and could easily do the sort of multi-sensor fusion that
         | the commercial systems do. LTE modems are cheap. A bigger
         | hexacopter or fixed-wing could easily loft one of the small
         | Starlink dishes, if someone wanted to. Stuff like "perching"
         | (landing and recharging from solar panels) is entirely
         | possible.
         | 
         | But from what I can tell, the cutting edge of open source
         | drones is happening behind closed doors in Ukraine and Iran.
         | 
         | Happy to be corrected if there's new stuff that I'm not
         | tracking, but the gap between the "art of the possible" and
         | current practice seems large.
         | 
         | Lots of opportunity though, is the other way to view it.
        
           | the__alchemist wrote:
           | That is consistent with my experience. My highlights:
           | 
           | - Current betaflight devevelopers and leaders are incompetent
           | (They inherited the code base from others), and are slow, and
           | varying degrees of willing, to add higher-level flight-
           | control mechanics (semi-autonomous modes etc).
           | 
           | - The Ardupilot and PX4 configuration systems, and general
           | experience, are user-hostile.
           | 
           | Note that the converses of these hold: Betaflight has a
           | reasonably-good user experience, and Ardupilot and PX4 have
           | extensive higher-level flight control mechanics. If only you
           | could get the pros of both together!
           | 
           | Regarding hardware, frames generally accommodate flight
           | controllers and ESCs elegantly, but other hardware like
           | cameras, radios, and especially batteries, feel clumsy to
           | assemble in a safe and consistent way.
        
             | bodhi_mind wrote:
             | Fwiw, betaflight for acro flight is probably the best.
             | Tuning is dead simple. Filtering is possibly the best.
             | 
             | That said, I don't need much else because I just fly acro
             | mode 100% of the time.
        
             | aftbit wrote:
             | I haven't touched this stuff in 5+ years, but I wonder how
             | iNav stacks up on your list? I was about 50% of the way
             | through a 7" FPV build with a GPS receiver based on iNav
             | when COVID hit, and between the supply shortages and
             | general life shift, I stopped working on it.
        
               | the__alchemist wrote:
               | I'm curious too; of those it's the one I have the least
               | experience with. It is currently not an option for me, as
               | the aircraft I would use with it uses CAN perhipherals,
               | which iNav doesn't support.
        
             | elcapitan wrote:
             | Interesting, I wanted to look into building a drone myself
             | next year. Mostly to learn about tinkering with engineering
             | and electronics. What are the issues with the codebases and
             | their development?
        
               | the__alchemist wrote:
               | This is a tough question to answer in detail: I encourage
               | you to browse yourself. (They are all on Github) but: The
               | BF code base in itself isn't too bad. The AP one is
               | _very_ complicated, and difficult to navigate. The names
               | and organization are confusing. Compiling is finicky and
               | slow due to the tool system they use, and it requires
               | Linux (Note: The compile target is embedded!). I PRed an
               | update to the build instructions, but it was rejected.
               | 
               | For all of these code bases, there is minimal or no
               | documention: Neither guides, nor code comments. The
               | functions, structs, fields, etc have no descriptions of
               | their purpose or use. The modules, where you would expect
               | a description of their purpose and use, instead includes
               | the same license text at the top.
        
             | Fabricio20 wrote:
             | I think to be fair BetaFlight is not aimed at autonomous
             | flight, when I got into this stuff a few years ago I was
             | told "BetaFlight is for FPV (acro mode?)" and "iNAV is for
             | Autonomous" and after giving both a try I can say that my
             | experience on iNAV was much better for what I wanted
             | (autonomous). BetaFlight worked wonders for flying around
             | (very low input delay, etc..) but it was pretty clear it
             | barely had anything related to auto control. Hells, it
             | didn't even have a reasonable return-to-home!!! It would
             | just drift diagonally in the "home" direction and try to
             | land when it felt it was close enough.
             | 
             | iNAV on the other hand REQUIRES a full gps suite for
             | starters (which for me was REALLY expensive) but you can do
             | full waypoint navigation with just that and a barometer.
             | 
             | Of course it's been at least 4 years but hey at least it
             | was pretty good back then already on the iNAV side!
        
             | holoduke wrote:
             | Sorry but the main dev of Inav is a very experienced dev
             | with a lot of knowledge. He has many youtube videos about
             | developing of drone software/hardware.
        
           | qazxcvbnmlp wrote:
           | Everything here is possible, the gap in implementation is
           | that it's a) expensive and b) non trivial engineering work.
           | There is vanishingly small overlap between the people whom
           | have the capital for parts, the understanding of the
           | engineering needed, free time to do it and desire to do it
           | for free.
           | 
           | The people whom have the true multidisciplinary understanding
           | to do robotics well can usually also consult (with little
           | difficulty finding work) for $$$s per hour and get the same
           | "problem solving satisfaction".
           | 
           | Open source software shortcuts a couple of these limitations
           | because you can work on it with little investment over than
           | time.
        
           | aftbit wrote:
           | Back in the old days (Phantom 1), it was all IP. The "range
           | extender" box that you could buy for the controller was
           | literally a MIPS box running OpenWRT. I took one apart and
           | used a debug interface to jailbreak it, then connected my own
           | RPi to its network and used it for some degree of autonomous
           | control. I assume things have advanced substantially since
           | then.
           | 
           | I was very disappointed that my Mavic Mini 1 could not be
           | controlled through the DJI SDK so I couldn't use any external
           | apps to drive it. I assume that has also improved, but for a
           | minute at least, the cheaper DJI drones were essentially
           | unusable for my use cases.
           | 
           | To some extent, the availability of cheap commercial gimbal
           | camera drones really set the OSS side of the hobby back.
           | Eventually most of that energy moved to FPV acro drones, but
           | definitely something was lost, as nobody really tries to
           | build a DIY DJI competitor anymore. Of course, DJI drones are
           | absurdly performance limited compared to what is possible
           | with similar sized platforms.
        
         | helpfulContrib wrote:
         | > There is a thriving "FPV" ecosystem of drones that can be
         | DIYed.
         | 
         | As someone who has for decades built flying things which could
         | be drone'ified any day of the week, it is sort of also
         | necessary to point out that even before drones became so
         | widespread and commonplace, rcgroups.com has been _the_
         | ecosystem in which to find oneself.
         | 
         | And indeed, the "model airplane/remote control flight" subject
         | has been prosperous and flourishing as a hobby for decades too
         | .. just feast yourself on the categories here:
         | 
         | https://www.rcgroups.com/forums/index.php
         | 
         | A very earnest exploration of the various sub-forums will
         | reveal some extraordinary designs - some which, indeed, break
         | the 'norm' for what a flying thing should look like, in respect
         | to a more casual view. Magnus, aerostat, Fettler are pretty
         | good search terms...
        
         | dheera wrote:
         | Also
         | 
         | > All-in-one PCB: Doesn't need any 3D printed parts or such
         | 
         | I actually am fine 3D printing and laser cutting stuff at home
         | but I don't have the stuff to make a PCB and don't have the
         | hand skills to do anything more than through-hole soldering.
        
           | the__alchemist wrote:
           | The intent is not at-home fabrication: It's sending it to a
           | company in Shenzhen (e.g. JLCPCB) to do both PCB fab, and SMT
           | assembly for you. 10-day time between order and arrival.
           | (USA), and astonishingly low cost.
           | 
           | PCB are sometimes used in these structural scenarios, (Where
           | they are not the _right_ tool for the job) as they 're one of
           | few(?) ways to get a custom part fabricated at low cost. If
           | the device has electronics anyway, the added cost of
           | expanding the PCB footprint for structure, as in this case,
           | is small.
        
       | no_time wrote:
       | I wonder what differs in the hardware (other than obviously using
       | the newer esp32) compared to the implementation in this vid:
       | https://www.youtube.com/watch?v=3n76iMTHXuE
       | 
       | tldw: he experienced significant packet latency while the motors
       | were spinning, making the drone uncontrollable.
        
       ___________________________________________________________________
       (page generated 2024-12-24 23:00 UTC)