Joystick control of a servo without computer

Hello Arduino users! I have a question. Is it possible to connect a USB joystick directly to the Arduino, and have it control a servo?
Here is my joystick:

(ok two questions..)
And/or is it possible to connect a serial joystick to the Arduino, and have it control a servo?

The reason I ask, is because I have a rather large and expensive project.. Construct a personal VTOL, and use the Arduino to control the variable pitch propellers I'm going to be using.. and also start the engine, lights, and all the other fancy electronic doohickeys I use. I'm going to use 3 joysticks/sidestick controllers, and one throttle quadrant with 2 levers, one for the engine's throttle, and one for the pitch of the forward flight blades.

If not, I'll just use a stripped out PC to be the "master" or "host", as I saw it be called, using DSL (DamnSmallLinux), for its boot time. But if anyone has a better OS that works with the Arduino, and has a faster boot time, please tell me! I'm still in the development stages (drawing the design, looking for a job to fund my project, etc) There are going to be 4 ducted fans for vertical thrust, and 3 ducted fans for forward thrust.

NOTE: I do not have an Arduino yet, though I've got some of the code I'll use already (taken from principialabs.com - This website is for sale! - principialabs Resources and Information.)

I'll upload a picture of my design soon, when I have access to a scanner.. which shouldn't be long.

Yes, that should be possible. Be aware though that the Arduino can't act as a USB-master, so you can't use the USB to attach the joystick to it. You would have to open the joystick and get the signals you want from the pots/encoders/what-ever-reads-the-position inside. A bit more hacking than just attching a USB-cable, but most probably (I haven't ever seen a joystick younger than 10 years opened up, but I think they still look similar to the old ones...) it's going to work out.

Thank you very much, I'm pretty sure they just use 2 pots attached to a 2D swivel device, as I opened one last night.

One last question (at least for now): Is it possible to have it power hydraulics? I plan on using hydraulics to raise and lower the landing gear.

I'm nowhere into hydraulics I must admit. You can switch mains voltages with an Arduino, though (using relays of course, not directly through the Arduino). So if controlling hydraulics is just some sort of pumps-on-pumps-off-business (like switching your home lighting for example), then it should be possible.

Ah ok, thank you. I'm not sure how to use one, but I learn very quickly. Although I do have an idea of how to use one, from a simple search through Google.

By Personal VTOL, do you mean an aircraft you will be riding in?

Yes, I do in fact mean one that I will ride in. ;D

I made a program for my laptop for joystick/servo control and I would assume making one for the arduino would be similar. The pots in the joystick can provide an analog input to the arduino of ~0v-5v. I'd scale the analog input values to match 0-180 deg servo values for output. The spring return of the typical joystick can introduce some suprises of not accounted for in the design.

"I'd scale the analog input values to match 0-180 deg servo values for output."

Will do!

Khardreid:

First off, I applaud your drive and enthusiasm, but I want to inject a little reality here...

The reason I ask, is because I have a rather large and expensive project...[snip]...looking for a job to fund my project

You say you are in the planning and development stages; I assume you have selected the engines needed (and you know they are rated for vertical axis usage, perhaps), and I also assume you are aware of their total fuel consumption? You know their lifting capacity, and have a design in mind for your airframe to take the stress, while lifting the frame's weight, your weight, fuel weight, etc?

Are you an aviation engineer?

I am not certain that you understand the scale of what you are attempting to do, nor am I certain that you understand just what kind of funds will be needed to support such an endeavor. Moller has been attempting to do what you are saying you want to do for the past 40-50 years or more:

They've actually flown a prototype (tethered, though); but their claims have gone on for so long that it is any wonder -anyone- invests with them.

I think the world can only have one Moller-style company at a time...

Even if you did get something working, it would probably be longer than your lifetime before you would get FAA approval for flying it, assuming you could afford the fuel to do so.

I am not wanting to discourage you in your efforts, I just hope you are aware of the difficulties and expenses that surround this kind of project (really, any kind of home-built aircraft project). While there have been great strides made by hobbyists with multi-blade VTOL model aircraft using off-the-shelf microcontrollers, gyros, accellerometers, etc - scaling one of these up to "life size" isn't just a matter of changing the dimensions and adding a seat.

If you realize this, and you are confident that you have the engineering skills (or can find them), as well as the financial backing, then great. But if you don't have any one of these components, while having great drive, you could find yourself in financial ruin (with a lot of failed personal relationships along the way), with a small mountain of "scrap parts" rusting away. Its happened to many before, and will likely continue to happen; being able to see within yourself not only what you are capable of but also what you are -not- capable of is key to avoiding it (that doesn't mean you couldn't find investors and/or others to assist you - but like I said, the world can only have one Moller Sky-Car company at any one time, I think).

Good luck, and don't kill yourself experimenting!

:wink:

Yes, I know about the parts, the knowledge, the money, and the risk. I'm still looking for an engine (only one, the project is only about 2.5 meters wide, and 2.13 meters long, and one engine is going to power all fans, the way I'm going to get different thrust values out of each fan, is by using variable pitch props). I'm going to make my own blades, I do have a design that takes stress into account.
I'm no aviation engineer, but neither were the Wright brothers, and that never stopped them. :sunglasses:

I've no plans on becoming a company.. but if someone were to invest in me, I'd be happy to have a few people help me build one and sell it to the guy who invested.

I've known about the Moller Skycar for quite a while now actually.

I realize everything you say, (especially about the failed relationships lol..) but I have to disagree about the one Moller Sky-Car company thing.. as they would be monopolizing the skycar industry, and I think that's against the law..?

Thanks for the luck, I'm gonna need it sooner or later.. And no worries about dieing! I don't plan on it any time soon ;D

There is no law against having a monopoly, there are laws that prohibit you from enforcing a monopoly though.

Good luck on your plane.
Though crosh sounds rather pessimistic, as there are plenty of people who build kit airplanes and helicopters (relatively speaking, offcourse).. he is right about fully custom vehicles, goverments just don't like them.
I'd worry about the mechanical and electronic stuff worse, logic last.
Even if that means you won't get to the coding part for the next decade or so.

Though crosh sounds rather pessimistic

I am not being pessimistic, I am being realistic.

VTOL aircraft are an order of magnitude more difficult to build than an airplane; even a helicopter is simple by comparison. They are flying bricks, and require computer control of some sort just to get them hover out of ground-effect. They are anything but inexpensive to build, at least at the human-carrying scale.

It sounds like you understand what you are up against, Khardreid, even if you have a kind of "pollyannish" idea of what it will take; maybe that will carry you through, ultimately. Some of the best ideas have occurred because people didn't just think outside the box, and instead they didn't know the box existed. Some have perished in trying, too. I would rather see you in the former situation, rather than the latter.

Here's to your success!

:slight_smile:

Good luck on your plane.

Thank you lol
I usually do logic last anyways XD
And all I'm doing is really just combining the ideas of a four rotor helicopter and stationary Osprey.. so forget the government! This is what this country is about (the US).. Doing your own things and pursuing happiness. At least that's what it says in the constitution.. I don't think that applies anymore >.> :cry:

cr0sh types faster than me...
But thank you good sir for the enthusiasm in your last post!

Here's to your success!

Cheers!

You may want to look at the below discussion as it has a line of code for mapping analog values into servo positions. As to the project, a lot of study and proof of concept work can be done without a lot of $$$. You may want to start with a ground effect hover craft as they can be constructed fairly inexpensivly. Who would have thought someone could build a peddle powered airplane that could fly across the english channel.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1273799790/15#15

Thank you for the link Zoomkat.

A lot of people say it's going to be extremely expensive. I don't think it will be nearly as expensive as people think, as I will make my own parts/hull/props as much as I can. I'm going to make a mold for the carbon fiber out of wood, same with the props.

If you haven't already, you need to join the experimental aircraft association. You can get an idea there of what it takes to construct an aircraft.

Good idea! Thanks for the suggestion.