Been some time since I've posted anything, since I've been working on this really big dream project of mine, a quadcopter which can fly for around 60 mins , provide a HD video downlink and have a really powerful flight controller.
I had to consider many things to acheive my goal, especially :
The Copter :
Long flight times meant I needed to have a lightweight copter with large props and low kV motors. EndOfDay's thread (http://www.rcgroups.com/forums/showthread.php?t=1880665) was a wealth of information and I took the time to go through each and every page to gather knowledge.
I decided on this setup :
- MultiStar 4108 - 380kV motors
- 16x5.5 props
- AfroESC 12A
- 17000mAh 4S5P NCR18650B battery pack
- ~1900g AUW
The Lynxpilot Hybrid FC :
Next came the flight controller. I had been experimenting for many days with a pcDuino , a 1GHz board with an ARM SoC which fitted great with my purposes. But with it came the problems of running timing-intensive operations on Linux. Due to the non-realtime nature of Linux this was especially problematic. To work around this I patched the 'linux-sunxi' kernel sources with a RT-PREEMPT patch and got the realtime kernel running on my board. This took a long time since the kernel sources were hardly documented and also obsolete to some extent.
Testing some code with an old APM
The software running on the board was my next consideration , since I couldn't decide whether to port AP_HAL over to it or write my very own. In the end I decided to write my own. Now, I already had a spare APM 2.5 and i thought, why not use it as a slave for a robust autopilot system. I went ahead on this angle and ended up with running the computationally intensive algorithms (EKF , etc.) on the pcDuino while using the APM to get raw sensor data and R/C inputs and shoot it over a UART to the pcDuino. I was inspired by El Gallinazo's work (http://gallinazo.flightgear.org/) to do this.
Onboard integration
I had decided to use the APM for controlling the ESCs too, but I got some AfroESCs which are awesome and allow me to use i2c to control the motors. I ported a firmware patch (https://github.com/balrog-kun/tgy) to the latest version of SimonK which allows me to use the ESCs to get motor RPM feedback back to the flight controller allowing for major improvements in stability. My code is yet to implement this as of now as I still haven't tested the firmware on the Afros (ordered some from HK). I presently use a very limited set of Mavlink parameters for telemetry, but will expand this in the future. Telemetry will be run via the same radio as below - the Rocket M5
High-Definition FPV :
My third and last wish for my project was to have a high definition digital video downlink as I was really frustrated with the low-quality analog we use presently.
I've been successful in streaming low-latency video over my wifi network using a crappy webcam using the pcDuino, so I decided to expand the same system for the downlink as it had worked well for me. I have decided to go with the following equipment for the downlink as seen in this post : http://diydrones.com/profiles/blog/show?id=705844%3ABlogPost%3A1433488
- 2 x Ubiquiti Rocket M5's - Air side one will be decased and carrying 2x cloverleaf antennas [lighter that a Bullet with a heavy N-Type connector at 85 grams]
- 1 x Logitech C920 webcam - has hardware H.264 encoding which means the pcDuino can just route packets without any computation required for encoding the video stream
Present Status:
Presently I have finished my custom frame which allows for large props and mostly unobstructed camera views. The motors and ESCs are on their way from HobbyKing. I am yet to buy the 20 NCR18650B cells required for making the battery pack.
Flight control software is very very beta, more work needs to be done. It can stabilize a quad , altitude hold and position hold (with inertial data !! ) presently. I had a simple hover test with my SFC quad , and basics seem to be OK. I learnt a lot from the ArduCopter code and am slowly implementing features into my own. PIDs will need to be tuned to suit my large quad , but that comes later. A simple command-line interface allows me to change params. I had started off with Python , but switched to C++ as I could reuse lots of code and use the Eigen library. The EKF should give exceptionally good performance.
The HD FPV part has been on pause due to lack of funds , since I'm a 16 year old student doing this with saved up pocket money, and really don't have the funds for buying the Rockets + Webcam. The software setup required to stream HD-quality video over UDP is ready, but I cannot proceed without hardware.
How YOU can help :
I've been saving up for this for a long time and most of my funds have gone on the copter itself. I would really be grateful if people would support my project with some small contribution as that could mean I can go ahead with the whole system. If you have any parts or stuff which you can spare, it would be a great help. I cannot go ahead at this stage without some sponsors / contributors. I am willing to work in exchange for help.
I still need to get the Rocket M5s , the Logitech c920 and the 20x NCR18650b cells . It would be great if anyone could help out on these angles. This is going to be my last project before college (university for those of you in other parts of the world) so I'd really like it to be successful.
The work done till now wouldn't have been possible without :
Wayne - Long time supporter and friend.
Chris - Gave me my first APM which I'm using here.
Jani - Helped me with the GPS , MinimOSD , etc.
Mr. Mohtashim (www.tutorialspoint.com) - Huge supporter, has helped with a lot of hardware
Mr. Steve Taylor - Donated frame arms and some electronics.
RCBazaar.com - Helped me with some hardware like radios , etc.
Faheem Adam (www.adamengineering.co.za) - Helped with a nice donation
You can PM me or write to me at mhkabir98@gmail.com for information or if you'd like to help out. ;)
In the future if I'm successful with this, I may sell complete HD FPV kits which would be just plug and play so that anyone could take advantage of present-day systems and taking the 'guess' out of it at the same time. The LynxPilot flight controller though a baby presently, could grow up and become a contender in the world of high-performance autopilots.
Please follow my blog : cpvrc.wordpress.com for updates or keep checking back here at DIYD :)
Thanks for reading!!!
Kabir
Comments
Dear Roberto,
I am NOT using the PWM output of the pcDuino, there are only 2 hardware PWM ports which can support the 490Hz refresh, so I am using I2C to control the ESCs + receiving the BEMF feedback from them.
I have had success using gstreamer to stream the video, but perhaps might go with some other solution after testing.
:D
Kabir
@Magnus Thanks :)
@Thomas I had initially checked out QNX , FreeRTOS and NuttX. Only NuttX had an (obsolete) port to the pcDuino, while the other two did not. I'd have to do a lot of work to port one of them over, but I preferred the familiarity of Linux :)
Nice to see DroidPlanner in there :)
Any thoughts on showing the Video stream on the tablet? Do you want to integrate that on DroidPlanner?
Hi Kabir ,
you are doing a great job :) The main problem is as you see to use PWM output directly on PCDuino ... if you don't have on board hardware pwm . Where is the video of your flight ?
About the use of h.264 camera i think that is a good solution so the router board don't need to compress video and don't have latency during trasmission ... What you use for trasmission Gstream ?
:)
Best
Roberto
Wow. Just woooow.... You make it seem so simple!
Your skills blow my mind. Looking forward to perhaps using some of the solutions you have implemented further down the road. Good job!
Thank you Chris :) Glad that you like it.
Awesome work!
I'm sorry but I can't manage a step by step install process as I'm not opensourcing the code yet. Also, the code is quite dirty , not quite what an end user wants ;) I'll keep you updated though :D
I theoretically could run two webcams, but never tested that out.
Thanks OG, had a look at the bladeRF , it seems nice but its too expensive at $420 when I can make do pretty well at $160 a pair of Rocket M5s
I'm running my own autopilot code on the pcduino which is optimised to take advantage of the processing power of the ARM.
Kabir