Hacker News new | past | comments | ask | show | jobs | submit login
Making a brain for my model plane (story.glass)
194 points by evansd on Nov 6, 2014 | hide | past | favorite | 70 comments

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 flow over it!

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.

A small bit of feedback - The only issue I have with this style is offline reading: I tend to print every webpage I'm interested in to PDF files for offline reference. Story Glass doesn't really work very well for that - the PDF I got was not formatted and not usable.

How are you planning to reliably serve all the video content? I am looking to have a similar static site with a bunch of videos and am debating between Youtube, Vimeo, mp4/webm over some cdn.

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).

Great job, I can definitely see myself using your service assuming it runs properly on several different platforms upon release.

please do! I subscribed with my email, hope to read more updates.

Yes I loved the presentation. Got way more out of it than if it was just pictures and youtube embeds. Nice work!

In an an iPhone the videos of the site are broken. So much better expirience from the desktop browser!

let me add it was terrible for me. I'm using a modern macbook pro over a slow 3g connection (there's not currently wired connection near by). As soon as the page content loads, I hit "ESC" to stop loading images.. with most sites this approach just works, this was not the case..

Anyways, this looks like a really great project and looking forward to re-open over a wired full-speed connection.

Excellent, I've been waiting for Moore's Law to catch up with what I need to engineer my groundbreaking, innovative personal flight device design. Ever since I learned about the F-16's use of thrust and computing power to enable Relaxed Stability, I've been certain my personal flight device will need the capability to operate in that mode. I'm still trying to secure proper IP protections (I'm an amateur inventor) before prototyping for marketing / capital raising, but this is very relevant. Thanks for sharing and I hope to be in contact eventually regarding potential collaboration. Cheers!

What's Moore's Law have to do with this at all? Just trying to understand. This was do-able ten, if not twenty years ago.

The model helicopter guys have been using gyro-stabilized platforms for probably decades. These are cases where the darn thing would be almost impossible to fly without the gyro taking control of various aspects of the aircraft. One of my current helicopters (1.5 meter rotor) can be tuned to go from docile-and-almost-boring to what I would call "tasmanian-devll-mode".

I'm thinking the processing power to do calculations that are corresponding to the passenger / payload (which will move somewhat while in flight and be unstable), flight control inputs, and perhaps communications ability within a very small package. My point is while some of the parts have existed, until the Arduino / Pi devices started getting traction, I did not see a viable method for combining the disparate elements into a usable format...at a minimum cost of weight / power.

The electronics for something carrying passengers would hopefully be a bit more rugged than an arduino or a raspi. I suspect that you're optimizing for the wrong variables here. Aduino and raspi are not groundbreaking for capabilities or format and inventions are rarely stopped by the price point of the development platform, if anything they are stopped by a lack of market, timing or physics.

Single passenger, and initial versions will not be self-powered but rather towed. I already have a very close friend who pokes holes in my ideas and innovations, and I certainly don't expect most people on here to understand the short, medium, and long-term goals of my concept. The innovation is one of physics, I'm simply mentioning the tools with respect to this discussion / item being shared.

Frankly it's actually more of a proof-of-concept for a highly efficient wing design - one that only recently was discovered within the past five years. Hence, even if everybody nipping at my heels thinks it could have been done already / 10 years ago with "off the shelf" parts and such, well, you're wrong. Like I said, I'm very protective of my IP at this point and don't mind fielding this type of criticism, it's just somewhat laughable to me because there's so many disparate concepts being put together that the only person who could be this crazy and innovative is me, because it's one of those inventions that only comes from a unique mind.

There's a lot of criticism on here for the OP because they aren't going into enough detail. I'm guilty of that too. I really don't care if you feel the same, because I like making connections with other big thinkers and dreamers. Critics are a dime a dozen. Liberal arts majors with a lifetime of aviation industry experience? Much more rare.

Let's see:

> I certainly don't expect most people on here to understand the short, medium, and long-term goals of my concept.

Does not expect to be understood by others.

> Like I said, I'm very protective of my IP at this point


> it's just somewhat laughable to me because there's so many disparate concepts being put together that the only person who could be this crazy and innovative is me, because it's one of those inventions that only comes from a unique mind.

Self describes as having 'a unique mind'

> Professional Writer, Musician and Intellectual

> The innovation is one of physics

Not schooled in the field in which he's making a 'breakthrough invention'

> Liberal arts majors with a lifetime of aviation industry experience? Much more rare.

Well, obviously, yes, liberal arts majors tend not to have lifetimes of aviation industry experience.

Beware, you're sounding suspiciously like the majority of all crackpot 'researchers' and 'inventors' who are coming up with new ways to make energy/spacecraft/airplanes/AI etc in their garages. I've been pretty active on an alternative energy forum and there were quite a few people there that exhibited most or even all of the symptoms above, I never saw them produce anything.

Word to the wise: if you're serious then don't bother commenting on HN teasing the world with your invention without a show and tell, chances are that your breakthrough has been looked at many times before and has been discarded for good reasons. If you have found something original then more power to you, in that case just go out and build it, don't talk about it at all.

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


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:


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

Try starting with a simulator, like Phoenix. You plug in your transmitter to your computer's USB and it's like a video game where you're in a field flying whatever model you choose (plane or multirotor). You can change the conditions (increase the wind, for example) and crash all you want without having to make repairs.

Once you feel comfortable in the simulator, start with a big foam flyer like an EasyStar or Bixler. It's easiest if you start with 3 channel (no ailerons) so there's less you have to worry about. Progressively move to smaller and faster planes (first in the simulator, then in the field).

For reference, the plane in the article appears to be a Bixler.

Wow, scrolling through that article was really disturbing. I guess I need to get used to this kind of presentation.

I felt the same way. I really wish we didn't have to get used to that though. It's like the worst combination of a video and a website, and ends up as something like an annoying guided tour.

I thought it was awesome, and it worked perfectly on my 2008 macbook.

What do you mean by disturbing? To me it felt sort of like a slideshow, but a little smoother to navigate.


Is this sort of thing usually done with RC planes? I've been watching a few RC plane videos lately - there seem to be a lot of pilots out there who could benefit from electronics to help land their planes - especially those who've spent a ton of money on really nice setups like this guy: [1]

[1] http://youtu.be/nQJ3TzSZkpo

Yes, stabilization systems are increasingly common among the so called "ultra micro" models.

I just bought a E-Flite Radian UMX, which is a stabilized and miniaturized (29" wingspan) version of a larger model (the 2M wingspan Parkzone Radian). The stabilization makes it much easier for inexperienced users to fly in gusty conditions. Like the OP's home-built system, it has a rate-sensing gyro system that compensates for any uncommanded movement. The plane flies perfectly straight regardless of wind and updrafts unless you give rudder or elevator inputs.

I am still amazed it was only $80.

There are products out there with names like "EZ Fly" and "SAFE mode" which do exactly as you describe - fly the plane for you so that you can get your wings stretched as a new pilot. My kids often have to engage SAFE mode on final approach so they don't cartwheel into the ground - its fantastic for that sort of situation where you really do have a thin line between flight and boom.

Yes, most hobby grade planes and almost every multi-rotor out there now comes with an IMU on board for stabilization. Many of the more expensive multi-rotors will also come with a GPS and auto-pilot which will enable loitering (i.e. stay in this place in 3D space unless I tell you to move) and RTL (return to launchpoint).

Also, there is a ready-made autopilot for new fliers called the uThere Ruby. They have some neat videos of fully autonomous landings in crosswinds on their site.

The OP's DIY approach looks much more fun though!

Hmm, on Firefox 33.0.3 on CentOS 6, it is just a lot of white space with some text interspersed. I'm guessing I'm missing something :-)

That said, the availability and usability of these 9 DOF modules has really made this sort of stuff doable for folks. Opens up a lot of possibilities and for me at least I think it is the single biggest reason the quadcopter market exists :-)

Love this kind of presentation! Do you use any external libs or tools to build the page?

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 stabilization? Predictive filtering and all that?

(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!

What's your background? Are you an engineer, or self taught?

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.

Very, very cool.

* How much payload can you put on the vehicle?

* Are you planning on adding some sort of forward scanner / camera to check for safety while flying autonomously? ("Eyes" to accompany the brain)

* How are you using the feedback from the IMU and gyroscope? Does it have a kalman filter? Or are you just looking at the instantaneous IMU data and just reacting to it.

* Where does the stability code reside? You mention a stable platform .. I am curious as to what it is.

I wish the project had more internal nit bits. Like algorithms, controller info, and so on. A bit disappointed but have my upvote regardless.

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:


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:


I'm a programmer who'd never tried electronics till an year ago but have now managed to build a few things - that even involve homemade PCBs and SMD soldering.

1) I started by buying an arduino, a starter kit and some simple sensors and actuators - ultrasonic, gyro, servos, motor driver - on ebay.

2) read Pratt's "Make Electronics" and Wiley's "Electronics for Dummies"

3) started making. Understood theoretical concepts by doing.

4) I regularly watch DIY youtube channels and follow RSS feeds of sites like Instructables and Hackaday.io

5) I'm not yet capable of building a UAV, but I've already built a couple of robots.

It's not really tough, and it's a fantastic side hobby. It's also turned me into a more careful software programmer, constantly double and triple checking everything, because electronic circuits are not as forgiving of mistakes as software.

So I'd say get started right away. It's gonna be fun!

Can you share which components you bought to start with, i.e which starter kit, which sensors / motors, etc? Thanks!

There's no dearth of starter kits. Just search for arduino starter kit on Ebay or Sparkfun. They come with an assortment of components like resistors, capacitors, diodes, transistors, 9V battery connector and a few sensors.

Additionally, I bought a couple of the widely available HC-SR04 ultrasonic sensors, a couple of turnigy small servos, an L293 motor driver, couple of L-shaped BO DC motors, and robot chassis. Just search for those terms on ebay.

[1]: https://www.sparkfun.com/products/9065

I didn't see your reply until today.

Thanks! I'll take a look at those books.

Any good links you could throw my way while we are at it?

For purchasing, just search "arduino starter kits" in ebay, adafruit or sparkfun.

For learning, check out :

[1] https://learn.adafruit.com/category/learn-arduino

[2] https://learn.sparkfun.com/start_a_project

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 little better because their "specific context" is a bit more broad than most (in the air, minimal turbulence, and nothing to hit). If you want a similar interesting problem where you could feel efficacy look at robotic blimps or boats, you can get kits!

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.


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.

I started to work on last year's offering of this embedded systems MOOC, but couldn't commit the time required to finish it: https://www.edx.org/course/utaustinx/utaustinx-ut-6-02x-embe...

It seems like a great introduction to embedded systems for programmers without any hardware/electronics experience. The course is being run again in January.

If you're looking for something with AI then ros.org is a great resource. You can do a lot with a Kinect and an old laptop.

You might want to take a look at AnkiDrive and track their progress on their API and such. That would be a very fun platform to start working with limited AI that would be readily visible in the real world.

Have you looked into http://ardupilot.com/ ?

This is really cool. I wish he'd have gone into more detail about how he built the rest of the plane - was it purchased off the shelf, or did he build each part himself?

Also, how does the microcontroller pass on the commands to the motors, and how do they carry it out?

I'd love to read this article with x100 details.

How do you deal with the feedback loop? How do you avoid over adjusting making the plane go crazy?

I don't know about this particular project, but the standard approach is to use a PID controller, which uses the derivative term to control overshooting and oscilations.

(Jonny the author here)

At the moment the control is proportional - the microcontroller works 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). This error signal is then scaled and sent to the aileron servos.

The USB flight-controller I am using has a spare knob on it so I can adjust the scaling coefficient in flight. It still isn't perfect (as the video at the bottom demonstrates) - it veers to the right, probably because the IMU isn't held down very well!

I'm dying to see some more details! What model plane, how does your stabilization algorithm work, how is everything placed on/in the plane, how do the ARM microcontroller and the original controller work together, etc!

That was interesting.

Layout didnt work so well on my note 3 with chrome, the image sections were pretty flawless but the text parts were a tad difficult to focus onn at times.

Definatly going to look it up on the pc though :-)

I love this!

Any advice on finding people to work on projects like this with? I've tried to do electronics projects in the past and get bored when I realize no one cares about it :-(

Okay, this is truelly awesome! I would like to know how you connected your ps3 controller through a radio module (without watching the Chinese manuals)....

I'd really appreciate that!

Nice capture of a one word domain on the new .glass TLD. Although I was expecting it to have something to do with Google Glass and it didn't.

Is it possible to get the components already soldered into your PCB at a reasonable cost? Doing surface mount components seems like a nightmare.

Laggy pop-in scrolling, autoplaying sound with no way to disable, yep this article ain't for me.

Very cool project and website design!

Which shop did you use to print the PCBs and how much did each of them cost?

I can't use the website since Firefox just freezes and I have to kill it manually.

Def interested in story.glass. Hopefully open source in its future.

interesting - my windows machine throws a blue screen of death to me (tried it 3 times) when I try to open the link with firefox... no problems with IE...

Makes FF33 crash on my win7 machine.

Super super nice web page design.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact