Tim Huff
Tim Huff
  • 7
  • 54 569
Raspberry Pi Flight Controller: Hardware Review
This video shows the basic hardware needed to create a Raspberry Pi flight controller.
Hardware Components:
RadioMaster TX16S: www.radiomasterrc.com/products/tx16s-hall-radio-controller
FrSky Taranis Receiver X8R 8: www.frsky-rc.com/product/x8r/
Buck Converter: www.amazon.com/dp/B07XXWQ49N?ref_=cm_sw_r_apin_dp_2JH7JYSD1CM9EB2NCZ6H
Raspberry Pi 4: www.raspberrypi.com/products/raspberry-pi-4-model-b/)\
ESC (Electronic Speed Controller): www.amazon.com/gp/product/B071GRSFBD/ref=ppx_yo_dt_b_search_asin_image?ie=UTF8&psc=1
Servos: a.co/d/2zQ9lRW
Git Hub Repository for Computer Vision Flight Controller:
github.com/timmarkhuff/horizon_detector
#python #opencv #drone #rcplane #computervision #robotics #aviation #fpv
zhlédnutí: 32 955

Video

Autonomous Flight with a Camera: Horizon Detection Algorithm
zhlédnutí 7KPřed rokem
I built a computer vision autopilot system for an RC plane. The plane is able to maintain level flight and execute controlled turns using only input from the camera and no other standard aviation sensors such as a gyroscope, GPS, altimeter, air speed indicator, etc. This video explains the horizon detection algorithm that allows the system to work. To see the project overview, check out this vi...
Python Game Dev - Gobblet Gobblers
zhlédnutí 703Před rokem
I created this game in Python for one of my programming classes. It’s based on the children’s game Gobblet Gobblers. The code is available on my GitHub: github.com/timmarkhuff/gobblet_gobblers Chapters 0:00 Intro 1:01 Game Logic 2:36 Creating a GUI with OpenCV 4:01 Playing in a Browser via Flask 4:30 Conclusion #python #opencvpython #opencv #gamedev #programming
FridgeMon - Smart Fridge System with RFID
zhlédnutí 482Před rokem
FridgeMon is a smart refrigerator system that helps users keep track of food in their fridge, thereby reducing waste. This was my group's final project for our Fabrication and Prototyping class at the Global Innovation Exchange in Bellevue, Washington. More details and the Python code can be found on GitHub: github.com/timmarkhuff/fridgemon #python #iot #programming
VIA Prototype Demo
zhlédnutí 215Před rokem
This was my first IoT project at GIX (Global Innovation Exchange). My team created a device that helps visually impaired users read grocery store signs. The code is available on GitHub: github.com/timmarkhuff/visualimpairmentassistance #python #opencv #computervision #ocr #iot
Computer Vision Autopilot for RC Airplane
zhlédnutí 11KPřed rokem
I built an autopilot system for RC planes that uses computer vision. The plane is able to maintain level flight and execute controlled turns using only input from the camera and no other standard aviation sensors such as a gyroscope, GPS, altimeter, air speed indicator, etc. Future versions of the program will be able to execute waypoint missions and track objects. GitHub: github.com/timmarkhuf...

Komentáře

  • @SzybkiPolonezGSI
    @SzybkiPolonezGSI Před 24 dny

    Great stuff man, Im currently working or should say sstart buying hardware for it and I am not too familiar with the electronic, however even if I crash this I'd have some joy on working with that. So in theory I can have one LiPo Battery for the whole setup meaning, servos, ESC and motor, pi controller, however this needs voltage converter for pi and servos right ? I My limit for motor is 5s and they are pretty rare , however if I use one 6s battery for everything voltage would drop down eventually and should work ok, another options is larger propellers. My ESC is 50A and engine is 1100 KV and 911W. initialy I was thinking to only use one battery for ESC and motor and another setup for the rest, but now I think that minding the weight it may be not ideal. Please just be aware that I am completely amatour and still leaarning this by having a goal to do something working 🤣

    • @timmarkhuff
      @timmarkhuff Před 24 dny

      If weight is a consideration, getting a buck converter to convert the voltage for your raspberry pi is the way to go

    • @SzybkiPolonezGSI
      @SzybkiPolonezGSI Před 24 dny

      @@timmarkhuff Thanks :)

  • @jamesaddison81
    @jamesaddison81 Před měsícem

    Is there another video in this series coming?

    • @timmarkhuff
      @timmarkhuff Před měsícem

      This series has been on pause for a while, but I might resume soon. What kind of videos were you looking for?

    • @jamesaddison81
      @jamesaddison81 Před 29 dny

      @@timmarkhuff something that covers the basics of the code and how you starting building the software would be interesting. Even if it was high level and not super detailed.

  • @mukeshbaskaran2557
    @mukeshbaskaran2557 Před měsícem

    Are you not controlling the thrust (i.e speed of your motor) using raspberry pi?

    • @timmarkhuff
      @timmarkhuff Před měsícem

      I am not. Haven’t figured out how to measure airspeed yet, so I wouldn’t be able to control throttle

  • @narimanfrokawan7729
    @narimanfrokawan7729 Před měsícem

    nice projected

  • @choasisgoated
    @choasisgoated Před měsícem

    Hey is part 2 coming?

  • @juan4972
    @juan4972 Před měsícem

    You have code sbus?

    • @timmarkhuff
      @timmarkhuff Před měsícem

      I was working on a proof of concept here: github.com/timmarkhuff/horizon_detector/tree/sbus, but it's not really complete. The code I wrote uses an SBUS library provided here: github.com/VermontCoder/read_sbus. I have also had some luck using this C++ SBUS library: github.com/Carbon225/raspberry-sbus. Let me know if any of that is interesting, and I might be able to make a video on it.

  • @someDude809
    @someDude809 Před měsícem

    Interesting approach to this problem. There are some downsides to using visuals for such a vital system. Is this just meant as a proof of concept, because for production a simple IMU would probably be faster and less complex on the software side. But nevertheless, great video 👍

    • @timmarkhuff
      @timmarkhuff Před měsícem

      Yeah, there are definitely more established and straightforward ways of doing this. My project was about exploring what could be accomplished with computer vision. Who knows, maybe it could function as a backup system when IMU data is not reliable? Or maybe it was just a fun project :)

  • @sahilnarola_0566
    @sahilnarola_0566 Před 2 měsíci

    Hey tim, how did this drone to maintain level flight without use of altimeter during autopilot?

    • @timmarkhuff
      @timmarkhuff Před 2 měsíci

      Hi Sahil. Altimeters don’t keep a plane flying level; that’s the job of a gyroscope. My system can keep the plane flying level by visually identifying the horizon. Since it doesn’t have an altimeter, it will tend to lose or gain altitude over time. I’ve tried to think of ways to visually gauge the altitude of the plane, but haven’t been able to solve that problem yet

  • @IgorWolkov
    @IgorWolkov Před 3 měsíci

    @timmarkhuff could you please explain how do you stream the video from the camera connected to RPi? Thank you.

    • @timmarkhuff
      @timmarkhuff Před 3 měsíci

      It’s a raspberry pi camera v2 connected directly to the raspberry pi. I used cv2.VideoCapture to interface with the camera

  • @ChantOfSpirit
    @ChantOfSpirit Před 4 měsíci

    Tim, good job!

  • @smol2844
    @smol2844 Před 4 měsíci

    How would I go about finding a plane that does not come with a receiver or anything?

    • @timmarkhuff
      @timmarkhuff Před 4 měsíci

      Search for “plug and play” airplanes

  • @daniellewis9955
    @daniellewis9955 Před 5 měsíci

    Cool vid. For the next one, make the arm do a dance

  • @AerialWaviator
    @AerialWaviator Před 5 měsíci

    A fascinating example of applying computer vision. Thanks for sharing details and posting the code.

  • @erdum
    @erdum Před 6 měsíci

    Very informative.❤

  • @SteveWrightNZ
    @SteveWrightNZ Před 7 měsíci

    Was flying the clubs' C172 one day and the turn coordinator ball was way the hell out the side, very odd.. I did everything in my power to center it, but my head wouldn't let me, so I went instrument only for ten seconds and the ball magically centered. Eyes outside again, and as if by some black magic the damn ball headed off to the side again! What was it? A cloud on the horizon was on an angle.... You will need some checks on your algorithm - I did on mine.

  • @cacanghoihoi3005
    @cacanghoihoi3005 Před 8 měsíci

    Dogfight Blick😮😮😮

  • @nakilakeddys.7571
    @nakilakeddys.7571 Před 8 měsíci

    Hello, im from the philippines, i hve a question on the flight computer. Is it good to use raspbery pi or arduino?

  • @elektron2kim666
    @elektron2kim666 Před 8 měsíci

    Thanks. I want to do this on some level with a Pico/MMBasic and already have a PWM Throttle function similar to a tester. Some sensors should be able to provide "something" to start with and flying in a straight line for some time would be a pass.

  • @qkb3128
    @qkb3128 Před 9 měsíci

    Love it would like to see the pi zero 2w or the zero

  • @janoshorvath9430
    @janoshorvath9430 Před 9 měsíci

    Extremely cool! Is there any reason not to use normal IMU? Looks bit more challenging and prone to fail in case of poor visibility.

  • @unclelelax8341
    @unclelelax8341 Před 10 měsíci

    i badly want this kind of stuffs for my project in thesis. especially UAV projects for reconnaisance using raspberry pi. is it possible for me to build it from scratch? even the plane itself?

  • @andreyl2705
    @andreyl2705 Před 10 měsíci

    nice project) ty

  • @hamzaehsan404
    @hamzaehsan404 Před 10 měsíci

    This was amazing. I have some experience wit computer vision and drones but needed a little guidance when it comes to hardware. I am trying to work on rasberry pi powered autonomous check point script for my aeroscout.

  • @charimuvilla8693
    @charimuvilla8693 Před 11 měsíci

    This is very promising! First time I see computer vision on an RC plane. I wonder how more complex the software can get if you feed the footage to a laptop and perform the computer vision there.

    • @timmarkhuff
      @timmarkhuff Před 11 měsíci

      Or what about putting a more powerful computer on the plane, like a Jetson. I might go in that direction at some point

  • @jsmythib
    @jsmythib Před 11 měsíci

    NIce to have flap turns without disengaging autopilot. Very cool project.

  • @pranavk1646
    @pranavk1646 Před 11 měsíci

    How did you perform testing of the code and the airplane in general? Did you use simulation software to model the plane and test the code?

    • @timmarkhuff
      @timmarkhuff Před 11 měsíci

      I started by flying the plane manually and recording footage. I used that to develop and test the horizon detection algorithm. It became tricky when I started developing the flight controller. I had no simulation software, so most testing was in the air. I did create a simulated horizon out of poster board, which I held in front of the plane to test that it made sensible responses to changes in the horizon. Once in the air, I found that the PID controller was not well tuned (lots of oscillation). I had to do trial and error over many flights to get the PID parameters tuned reasonably.

  • @ja_ja_wunderbar
    @ja_ja_wunderbar Před rokem

    Hi, are you still active in the project? Will there be another part/update? Thank you! :)))

    • @timmarkhuff
      @timmarkhuff Před 11 měsíci

      This project has been on the back-burner for a bit, but I’m getting back into it now. I hope to have a new version available soon that controls the rudder and reads SBUS packets from the receiver. Stay tuned!

  • @Willy_Tepes
    @Willy_Tepes Před rokem

    So you are using one voltage converter for the Pi and one for the receiver? How many amps does the Pi actually need? You can easily get 3 amps out of a esc with bec. Size and weight does not seem to be an issue here, but this setup could easily lose over half it's weight with some planning.

  • @StuartRobinson123
    @StuartRobinson123 Před rokem

    really cool - thank you for walking through the code here. awesome work

  • @StuartRobinson123
    @StuartRobinson123 Před rokem

    awesome video thank you -- looking forward to part 2!

  • @guckesksk5895
    @guckesksk5895 Před rokem

    Still waiting for software part.😢

    • @timmarkhuff
      @timmarkhuff Před 11 měsíci

      It’s coming soon! Within a couple weeks I plan to have a version that’s ready to release

  • @stage666
    @stage666 Před rokem

    May I ask how is the realtime video feed transmitted to you? What is the controller range of such a RC plane and how would you know it is about to go out of range? What happens if it fly out of range? Lost forever? Thanks!

    • @timmarkhuff
      @timmarkhuff Před rokem

      There are two cameras on the plane. A raspberry pi camera 2 is used for the computer vision operations. It also records footage onboard, and that is what you see in my videos. It doesn’t transmit footage in real-time. I also have an FPV camera with an antenna that transmits footage back to my goggles. I have never really tested the range, because I fly within a park, but sometimes at the corners of the park, the image starts to get a fuzzy, so I turn back. The airplane transmitter has RSSI, so I get warnings if signal is low, but that rarely happens in practice.

    • @stage666
      @stage666 Před rokem

      @@timmarkhuff Great stuff. Thanks!

  • @tn1509
    @tn1509 Před rokem

    Cool project😊 don’t bother with rudder control

    • @timmarkhuff
      @timmarkhuff Před rokem

      Why no rudder control?

    • @tn1509
      @tn1509 Před rokem

      because it's useless unless you wish to do aerobatics (assymertic flight) or if you must have a perfect lateral control during crosswind takeoffs and landings 😅 => I think both cases are irrelevant in your case (basically mono speed aircraft. takeoffs and landings from/to whatever ) Never forget that the best way to avoid a system failure, is by deleting it lol. Go on simplicity. Use programmable/mechanical aileron differential to avoid lateral dissymetry during flight ... but maybe you have no idea of how to adjust such parameters ... ?!? If your airplane has issues with lateral stability, increase the vertical surface. An approximate formula here Va*l/b*Sw=0.035 where : Va=vertical surface (rudder and fin) l=distance from the forward 1/4 of the wing's median chord to the forward 1/4 of the vertical surface's median chord b= wingspan Sw= wing surface all figures must be in metric decimeters. I really love your project. Ask for more info if you wish :) GL

  • @MrDavidHearn
    @MrDavidHearn Před rokem

    This is awesome

  • @mrmoonrc
    @mrmoonrc Před rokem

    👍I looked at the sources. seems like I might dare. but where do i choose the pins for the servos etc.? Didn't find this in the GitHub sources. thanks.

    • @timmarkhuff
      @timmarkhuff Před rokem

      Thank you for your interest in the project! The GPIO pin numbers are passed into the TransmitterSwitch and ServoHandler objects in main.py. Please note that the version on GitHub is a slightly older version than what I use in this video. The version you see on GitHub does not use SBUS, but rather reads each output from the receiver using different GPIO pins. I plan to have the updated SBUS version of the code up on GitHub soon, but it still needs more work at this point.

    • @mrmoonrc
      @mrmoonrc Před rokem

      @@timmarkhuff thanks! So I should wait...

    • @timmarkhuff
      @timmarkhuff Před rokem

      @@mrmoonrc I would wait. The next version will be better and easier to install and deploy.

  • @isntitawesome2104
    @isntitawesome2104 Před rokem

    I am very new to these thing forgive me for the stupid question but i am curious is it possible that it can take off and land on its own.

    • @timmarkhuff
      @timmarkhuff Před 11 měsíci

      Currently no, I manually take off and land the plane

  • @ja_ja_wunderbar
    @ja_ja_wunderbar Před rokem

    👍can't wait for the next part. 😊

  • @joshuajustfine
    @joshuajustfine Před rokem

    What's the point...

    • @Raine-Cat
      @Raine-Cat Před rokem

      Why does it have to have a point?

    • @joshuajustfine
      @joshuajustfine Před rokem

      @Raine Lauer this line of thought leads to useless waste of resources...

    • @Raine-Cat
      @Raine-Cat Před rokem

      @@joshuajustfine Well you're just a ton of fun aren't you...

    • @daniellewis9955
      @daniellewis9955 Před 5 měsíci

      @joshuajustfine the point is to someday steal your job

  • @jaxon1913.
    @jaxon1913. Před rokem

    cool

  • @bernardhfox
    @bernardhfox Před rokem

    Excellent!

  • @MrTully
    @MrTully Před rokem

    This is so cool!

  • @tenns
    @tenns Před rokem

    you can use ELRS with an sbus(i think it's the protocol on the RX output side) library if you want more range and consistancy, and want to reduce weight. A bit of a tangent to your goal, just in case you need it! You could also get a pwm ELRS receiver, but that's more than 1 wire, but you're using the RX as PDB so might be a better option

  • @djquick
    @djquick Před rokem

    Seems it would have difficulty flying in mountainous terrain where the mountains extend above the horizon line. This reminds me of the AP2000i IR autopilot systems we’d use on RC helicopters 15 yrs ago. Those had an array of 4 IR sensors to detect sky from ground… purely analog. They worked for the most part but not so well on cool cloudy days.

    • @timmarkhuff
      @timmarkhuff Před rokem

      It would struggle with mountains for sure. I’m interested in making a system that uses a machine learning model to find the horizon line. I’m thinking it could look at more features than just relative brightness, and therefore achieve better accuracy.

  • @5x25_fpv
    @5x25_fpv Před rokem

    Very cool project! I would love to see a future version that uses a down facing cam and a offline map to calculate position :D

  • @alisioardiona727
    @alisioardiona727 Před rokem

    2:24 ''to trim the angle of attack''. Well technically it's to trim the attitude of the aircraft.

  • @BooDevil65
    @BooDevil65 Před rokem

    Cool stuff! What happens in a steep dive, when the sky is out of view?

    • @timmarkhuff
      @timmarkhuff Před rokem

      A steep dive would be a problem. It needs to always keep the horizon in sight. The autopilot program I wrote only allows level flight, slight turns, and slight ascents/descents so it isn’t a problem. This could be improved with a wider angle lens, but I haven’t really explored that too much.