![Tim Huff](/img/default-banner.jpg)
- 7
- 57 015
Tim Huff
United States
Приєднався 9 жов 2011
I am a robotics engineer interested in industrial automation, computer vision and aviation.
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
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
Переглядів: 34 857
Відео
Autonomous Flight with a Camera: Horizon Detection Algorithm
Переглядів 7 тис.Рік тому
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
Переглядів 714Рік тому
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
Переглядів 500Рік тому
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
Переглядів 223Рік тому
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
Переглядів 11 тис.Рік тому
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...
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 🤣
If weight is a consideration, getting a buck converter to convert the voltage for your raspberry pi is the way to go
@@timmarkhuff Thanks :)
Is there another video in this series coming?
This series has been on pause for a while, but I might resume soon. What kind of videos were you looking for?
@@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.
Are you not controlling the thrust (i.e speed of your motor) using raspberry pi?
I am not. Haven’t figured out how to measure airspeed yet, so I wouldn’t be able to control throttle
nice projected
Hey is part 2 coming?
You have code sbus?
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.
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 👍
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 :)
Hey tim, how did this drone to maintain level flight without use of altimeter during autopilot?
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
@timmarkhuff could you please explain how do you stream the video from the camera connected to RPi? Thank you.
It’s a raspberry pi camera v2 connected directly to the raspberry pi. I used cv2.VideoCapture to interface with the camera
Tim, good job!
How would I go about finding a plane that does not come with a receiver or anything?
Cool vid. For the next one, make the arm do a dance
A fascinating example of applying computer vision. Thanks for sharing details and posting the code.
Very informative.❤
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.
Dogfight Blick😮😮😮
Hello, im from the philippines, i hve a question on the flight computer. Is it good to use raspbery pi or arduino?
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.
Love it would like to see the pi zero 2w or the zero
Extremely cool! Is there any reason not to use normal IMU? Looks bit more challenging and prone to fail in case of poor visibility.
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?
nice project) ty
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.
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.
NIce to have flap turns without disengaging autopilot. Very cool project.
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?
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.
Hi, are you still active in the project? Will there be another part/update? Thank you! :)))
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.
Thanks! I'll look into that
really cool - thank you for walking through the code here. awesome work
Glad it was helpful!
awesome video thank you -- looking forward to part 2!
It's coming soon! Stay tuned
@@timmarkhuff😢
Still waiting for software part.😢
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!
Cool project😊 don’t bother with rudder control
Why no rudder control?
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
This is awesome
👍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.
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 I would wait. The next version will be better and easier to install and deploy.
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.
Currently no, I manually take off and land the plane
👍can't wait for the next part. 😊
What's the point...
cool
Excellent!
This is so cool!
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
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.
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
2:24 ''to trim the angle of attack''. Well technically it's to trim the attitude of the aircraft.
Good catch!