Live data from Hacker News

Making a brain for my model plane

story.glass

21–30 of 73 posts

Re: Making a brain for my model plane

#22
Looks awesome. So far you've replicated what can be done with an off-the-shelf part like this:

http://hobbyking.com/hobbyking/store/__24758__F_TEK_30A_Fixe...

But you have full control of the programming and have the communications problem solved as well. It would be great to have open hardware to replace some of these parts in-plane just like OpenTX now replaces the software in the ground transmitters:

http://www.open-tx.org/

Re: Making a brain for my model plane

#24

Building a drone, or robots is one of my dreams. I mean, as I programmer, I build things all the time. How awesome it would be to code something that ends up moving in the physical realm? Even better if it had some limited form of AI. But I know nothing about hardware, and very very little about programming a UAV.

You can make a surprising amount of progress in simulation, before being committing to hardware. For example, check out the tutorials on this page for bringing up the Hector quadrotor in Gazebo:

http://wiki.ros.org/hector_quadrotor

If you're interested in planar SLAM, exploration etc, there are loads of simulated and real platforms to experiment with, and lots of ready-to-go scenarios which you can bring up, observe, play with, etc. For example:

http://wiki.ros.org/frontier_exploration#Functionality

Re: Making a brain for my model plane

#25

This is excellent in every way. Not only building a homemade UAV, but the presentation was spot on. I expected the page to run badly with all that big content but had no problems. The images and video add so much and not even a single click required!

(Jonny the author here) Thanks for the kind words! This is primarily a taster article to introduce the UAV project, I intend to write a more technical report and publish the designs/code in due time (and some more videos!). The presentation uses Story Glass, also a project of mine, which we hope to offer soon as a service. It is an experience, lying in a damp field shooting a video to think about how the text will fl…

Hmm. A few of the videos were broken for me in Firefox, but worked in Chrome. In particular, the 3D model of the plane (caption "On a real plane these control surfaces are moved by large hydraulic pistons connected to the pilot's control stick."), and the PCB design software ("PCB design is quite fun. You start off by placing the ‘footprints’ of each of the chips, and then draw in all the connections.").

Ah, looking at it, it appears that these may not have webm variants. You might want to include a static fallback image or something of the sort for videos that you don't have webm variants for; in fact, static fallback images for all of the videos would be good for people who have video disabled, don't have video support, don't have appropriate codec support, or the like.

Re: Making a brain for my model plane

#26
post #6

Earlier quoted context omitted.

Sensors/Awareness of environment is where the dream dies. Not just in that sensors give very limited input, but that limited input is far more than you can practically use effectively without a team of PhDs and a few years. You end up making very greedy decisions about behavior based on sensor readings, which work great in a narrow context of places and behaviors, but generalize poorly to human spaces. UAVs are a lit…

Robots in human spaces can be done and, more to the point, the company I'm working for is doing it[1]. And there's the Google car too. It does require spending more on sensors than a hobbyist will want to spend and in our case it requires the occasional remote intervention when, for instance, someone leaves a box in the robot's parking spot. [1] http://www.vecna.com/on-demand-delivery

I'm definitely approaching this from a hobbyist's point of view. My experience is limited to FIRST and a thrust vectoring bi-copter that was deemed too likely to maim or kill to be used in public spaces.

Re: Making a brain for my model plane

#27
I also played with servos and my Arduino a while ago. I had quite fun indeed.

I agree that piloting AR plane is quite difficult. I always end up with a crash [1] and then I spend an hour in repairing it. Keeping it up in the air is doable, landing is just impossible for me ;)

I don't quite understand how stabilisation would allow me a better fight. From what I read in another comment from yours, what you do is "work out the difference between the desired angle (set by the pilot on the ground) and the actual angle (as reported by the IMU algorithm fed by the gyro/accelometer)". Is there anything else involved in the stabilization? I mean, speed is key for maneuvering in air, and moving the flaps is less effective at low speeds, do you take this into account?

Also, why building your own PCB (and having to wait 2 weeks to get it delivered) while there's arduino nano or similars ready to go with in a very small size? I guess you do it just for the hacking fun and learing. BRILLIANT!

[1] https://vimeo.com/29559991

Re: Making a brain for my model plane

#28

This is awesome. I want to do this myself. I have a degree in EE, but I've somehow never built anything like this. One issue is how to get the bits. What I mean is where is there a summary of all the bits one might need (like a box of lego), and how to get the pcb made? Also, do you sit with an oscilloscope and debug? Or is it all simulation? What do you use to simulate? Also, do you employ control theory for the sta…

There's lots of tutorials out there for this kind of thing, and looking at other people's project logs (like this submission) is good. I like to use OSHPark to get my PCBs made, but some people also like ITead Studio. Personally, I rarely simulate stuff if I'm just hacking around unless it's a filter or maybe an amplifier. For that I use either MultiSim (not free) or LTSPICE (free). An oscilloscope is good for debugging stuff like the PWM output to your servos. In general, it's a good tool to have, and you don't need a very expensive one for most applications. If you live near the DeAnza Electronics Flea Market, you can pick one up for probably a $20 bill. Otherwise, there's plenty on eBay. As someone mentioned in another comment, the control theory for a UAV like this is usually just a PID loop or a subset of that. It's nothing fancy, but it works quite well.

Re: Making a brain for my model plane

#29

This is awesome. I want to do this myself. I have a degree in EE, but I've somehow never built anything like this. One issue is how to get the bits. What I mean is where is there a summary of all the bits one might need (like a box of lego), and how to get the pcb made? Also, do you sit with an oscilloscope and debug? Or is it all simulation? What do you use to simulate? Also, do you employ control theory for the sta…

(Jonny the author here)

I plan to write this up more completely, but here are some more technical details:

Most of the bits (the foam plane, servos, speed controller, radio modules, IMU, barometer and GPS) came from eBay or HobbyKing. I started off with a little USB development board with an Atmel SAM7 on it, and then moved to the PCB and a newer Atmel SAM3 (partly after discovering how cheap prototype PCBs are from ITEAD).

I initially wrote the algorithms in python, using pyserial to talk to the built-in bootloader the chips come with, through which you can manipulate registers and control the peripherals. This made writing and debugging the C much easier. The chip runs TNKernel, a little RTOS, which handles the radio and IMU processes (and soon GPS and barometer).

Control is currently simple proportional control based on the IMU output, but I may add integral and differential terms once I'm more comfortable flying it, to see if can improve stability. It is remarkable how happy it is flying with the relatively crude algorithm it currently uses.

Launching it is still slightly nerve-wracking - you have to throw it quite hard and hope that it is going to go up rather than down. There's also the risk that it'll fly out of radio range and keep on going, but if this happens it automatically cuts the throttle, in theory at least!

Re: Making a brain for my model plane

#30

This is excellent in every way. Not only building a homemade UAV, but the presentation was spot on. I expected the page to run badly with all that big content but had no problems. The images and video add so much and not even a single click required!

(Jonny the author here) Thanks for the kind words! This is primarily a taster article to introduce the UAV project, I intend to write a more technical report and publish the designs/code in due time (and some more videos!). The presentation uses Story Glass, also a project of mine, which we hope to offer soon as a service. It is an experience, lying in a damp field shooting a video to think about how the text will fl…

On my android tablet, I mostly see bunch of black panels with small white paragraphs. Your fancy page layout makes the article unreadable (for me).
Post reply on HN