PDA

View Full Version : Help! What are the ports of usb? and how to control the remote control through the usb?


u1988
Jun 14, 2007, 03:55 PM
Hi how are things going?!

I will like to know 2 things please:

1) what are the ports of usb?(that control in (in & out) remote control)

2) how to control the remote control of helicopter
that connected to the USB !
(and what are the commands to control?)

Because I want to control the remote control by the language c.
(#include<stdio.h>....void main...) you know what I mean!!
for my project in college!

Thank you very much on the help!
I realy appreciate that!!! :)

AndyKunz
Jun 15, 2007, 09:30 AM
It doesn't work like that. You need a good tutorial on USB. It's a lot more complex than that. If you are going to make your own USB device, start with the code generator from www.tracesystemsinc.com

Andy

u1988
Jun 16, 2007, 07:08 PM
thanks!

but there is another way?!

and mabey there is a way to control the remote control of helicopter

by srial ports you know (by SERIAL COM) 9 pins I think so!

and what are the commands to control?!

thanks for helping! :)

jeffs555
Jun 16, 2007, 10:43 PM
You need a hardware interface to control a RC transmitter from a PC.

This is a serial port design that you can build.
http://www.mp.ttu.ee/risto/rc/electronics/pc2rcv2.htm

Here is a comercial USB interface.
http://www.endurance-rc.com/pctx.html

There are probably others.

The commands would be different for each interface.

Malc C
Jun 17, 2007, 05:26 AM
thanks!

but there is another way?!

and mabey there is a way to control the remote control of helicopter

by srial ports you know (by SERIAL COM) 9 pins I think so!

and what are the commands to control?!

thanks for helping! :)

Things you need to think about.

1) - Reaction time. When flying a model helicopter via traditional radio control, the time it takes for your brain to register a movement, input the corrective control on the transmitter and for the model to receive it and adjust the servos to correct it, happens really quick. - Whatever means of control you embark on needs to run at the highest transmission rate, and IMO standard serial baud rates would not be quick enough. USB2 or Firewire would be better.

2) - you don't send commands via USB / Serial.. you send data packets These are then converted into the required movements of the control servos etc. - If you google "servo controller" or "SSC" you will find many hits for serial servo controllers that allow you to hook up a PIC micro based interface that plugs into the PC and drives 8, 16 or even 32 servos. These are often used by guys building robots such as the LYNX 6 arm. Here you enter three values to identify which servo you want to move, what direction and by what amount into the comms software and it gets sent to the interface which moves the servo. However I still feel that for controlling a heli this is not practical as by the time you type the values in and sent it to the heli it would of crashed !

3) - Cost - Ideally you need high quality sensors to provide the data on the attitude of the heli, which could then be used to send data to the PC for processing, and then the PC sends the control input back to the heli. However for this sort of automation you would need a lot of expensive sensors, a fast PC and interface / servo driver. There is a forum dedicated to un-manned self flying aircraft on RC groups - try posting over there as they might be best equiped to help.

u1988
Jun 18, 2007, 05:30 AM
thank you for the big help!

but you tell me that:
"you don't send commands via USB / Serial.. you send data packets "

so there is a way to record the pwm pluse from the cable that exit from the radio controller

and send that pulse back to the radio controller!

you know to recode like 7 records :
back,forword,right.....

becase I looking the simple way to do that!!!

:cool:

Malc C
Jun 18, 2007, 07:40 AM
thank you for the big help!


Do I detect a note of sarcasum in that comment ?


but you tell me that:
"you don't send commands via USB / Serial.. you send data packets "

so there is a way to record the pwm pluse from the cable that exit from the radio controller

and send that pulse back to the radio controller!


Yes there is, but it will involve hardware such a a PIC Microcontroller to read the PWM signals and convert them to the data stream that fits the USB standards, and then send them to the PC for interpretation by what ever software you write to provide the control. You will then need to reverse this process and convert the data sent back to the external hardware back into a PPM signal that can be used by the servos on the model



becase I looking the simple way to do that!!!



There is no "simple" way to do what you want

MarkusN
Jun 18, 2007, 09:59 AM
1) - Reaction time. When flying a model helicopter via traditional radio control, the time it takes for your brain to register a movement, input the corrective control on the transmitter and for the model to receive it and adjust the servos to correct it, happens really quick. - Whatever means of control you embark on needs to run at the highest transmission rate, and IMO standard serial baud rates would not be quick enough. USB2 or Firewire would be better.

Dunno about that. Basically the old PPM encoding is also a serial channel, and not a very fast one at that. How many packets does it encode in a second? 50, if I'm not mistaken. With a resolution of 10 to 12 bits, for about ten channels. I'd assume USB 1.0 can manage this much bandwidth.

Malc C
Jun 18, 2007, 11:15 AM
True, but I would still opt for the fastes possible transmission speeds, just to be on the safe side :)

AndyKunz
Jun 18, 2007, 11:20 AM
The problem isn't one of bandwidth, it's of simplicity. Apparently u1988 has no concept of what goes on in USB, not realizing that it's a totally different animal than async. His first question points out that ignorance, which is why I referred him to look into what USB really is.

His second question concerns application. IMHO, USB is not the correct tool for the job. Unless he's flying a virtual heli in a sim.

Wireless USB might be useful to him, but he still needs to get the grasp on Question 1 first. Or get a FTDI wireless USB chip.

Andy

Malc C
Jun 18, 2007, 12:49 PM
Andy, you hit the nail right on the head. I think u1988 has a concept that if he connected his helicopter to his PC via a long cable and typed "hover" on the keyboard it would take off and sit there in a perfect hover three foot off the deck !

bluesky123
Jun 18, 2007, 02:21 PM
Take a look at the new USB interface from MileHighWings:
http://www.milehighwings.com/
In 'Output PPM' mode, it does exactly that: controls a transmitter from a PC. You can even play back a pre-recorded flight.

Boris, MHW R&D

u1988
Jun 18, 2007, 02:29 PM
O.K

2 thing:

1) Malc C- i'm realy a respect all the help that you guys give me!! I realy do!


2) I want to be more precise about waht I want

O.K I am doing a project in my college it's about a chip HM2007

http://www.imagesco.com/articles/hm2007/SpeechRecognitionTutorial02.html

and I want to control the remote control by commands like: back,forward......

and after I he recognize my command!

he will control the remote control by commands in c++ (#include<stdio.h>,
void main()..... you know)

And the remote control can be hook up the usb!!! or the serial!

and have for now only the usb but I can bay the other!

so that is why I need to your help!

I hope that things is more understood! :)

Malc C
Jun 18, 2007, 03:01 PM
So you want to have something like a headset on with a microphone and enter commands verbally, have the chip encode that command and send a command via usb (or some other means of transmission) to a helicopter....

Good concept, but if my flying is anything to go by you wouldn't have time to draw breath between issuing the commands, unless the helicopter was extreamly stable. The thing is you would need to add "stop" after each command, and with a helicopter you can't use simple words like "left", "right" etc as the attitude of the helicopter is in full 3 dimensions and not just in two planes.

For example lets say the heli is hovering perfectly level in all directions, with its tail pointing directly towards you. Now a gust of wind causes the heli to be blown to the right, and it banks over and points slightly down and towards the right. You would need to say "left" "up" "rotate" "stop" "stop" etc all at the same time in order to correct it. In other words you need to replicate what every pilot does with the sticks, and if you watch the sticks when someone flys a helicopter you'll see that they are constantly making small inputs in all directions.

Now I'm not saying it can't be done, and I don't mean to offend, but given the lack of knowledge you have shown on how USB works, feel that you are jumping in the deep end with this project and you're way out of your depth.

sfsjkid
Jun 18, 2007, 03:24 PM
u1988, this is an interesting project but I too believe it is not possible with our r/c helis without a lot of extra stability hardware in the heli itself. The time it takes to say "forward" can be too much of a delay. And what are you going to do if you need a little cyclic, yaw, roll and pitch all at the same time, then in different directions and combinations? If you still don't believe us, try to find a local hobby shop with a demo flight simulator and ask to fly a heli.

You might try something like the heli in the attachment. If you are not familiar with this, all it does is fly in a circle. If you limit yourself to up, down, foward, reverse and hover, the project might become more managable.

Endurance
Jun 18, 2007, 03:30 PM
I have a lot of experience with this subject so I thought I would chime in. These guys are right, you are looking at a very hard task if you plan to go about this from the ground up. You will need to know:

1. microcontrollers/electronics to design your hardware
2. firmware programming for the mcu
3. pc programming for communicating with the mcu
4. how r/c transmitters work and the ppm protocol

you know to recode like 7 records : back,forword,right.....

It doesnt work like this. Flying a helicpter is very difficult for even a human. The dynamcs involved will not allow you to just record and playback movements. Ive been able to get a co-axial helicpter to "hop" but thats about it.

I had another student use my device to fly his helicopter with a pc joystick so that is possible.

sfsjkid
Jun 18, 2007, 03:33 PM
I just had another thought, forget the USB port all together and use your voice command interface to control a flight simulator. You will still have the issue of stability and control response speed, but it will reduce the complexity a great deal (don't forget that heli setup and flying is not a trivial task in itself), and reduce costs greatly.

Here's a link to a free simulator,

http://n.ethz.ch/student/mmoeller/fms/index_e.html

Malc C
Jun 18, 2007, 04:35 PM
I had one of those helicopters on a wire - excellent fun :)

Now making a voice activated controller for that would be more of a possibility as sfsjkid recommends

u1988
Jun 18, 2007, 04:45 PM
soory but I don't want to use simulator!

I want to control the real hlicopter!!


And about early:sfsjkid in page no. 1 in the end:
I want to limit my self to:

back,forward..... in low speed

becase I don't want to crash to hlicopter to the ground!

O.K!

And to bluesky123 the link is more or less what I have looking for thanks!

but you guys have more ideas??

maby something cheapr?!

thank you guys a lot!!!:)

Malc C
Jun 18, 2007, 05:07 PM
maby something cheapr?!



Got a feeling that you're winding us up. You want to develope a system of voice command to fly a real helicopter (OK a model RC helicopter not a full sized one :) ) and you want to do it all for less than $42 !!

P.l.e.a.s.e.... !!


you guys have more ideas??


Yeah... wake up and smell the coffee.... you're obviously deaming ;)

sfsjkid
Jun 18, 2007, 05:26 PM
u1988,

Said in another way, the very first problem you must solve is how to stabilze a heli that normally requires simultaneous, multiple, and frequent inputs that also vary in magnitude using simple voice commands otherwise you are doomed for failure.

Here is a demo version of a simulator that can be flown with your keyboard.

http://www.realflight.com/free-g3-demo.html

This one is too easy in that the yaw is overly stable, and generally too stable. Try to fly the heli, this should bring home the point we've been trying to make.

Don't knock a simulator, they are generally 60%~80% true to life, will save you much money in repair costs, and probably good for a beta version.

Here's some more info on heli setup and flying (at least read the part about learning how to fly)

http://www.raptortechnique.com/

sfsjkid
Jun 18, 2007, 05:46 PM
I had one of those helicopters on a wire - excellent fun :)

Now making a voice activated controller for that would be more of a possibility as sfsjkid recommends

Hehe, yes, I agree whole heartedly!! One of my favorite toys as a kid. Recently, one of the guys at the field got one for Christmas, I should say his kid actually did, and brought it by. We forgot our r/c stuff and fought for turns for an hour!

Malc C
Jun 18, 2007, 06:21 PM
Hehe, yes, I agree whole heartedly!! One of my favorite toys as a kid. Recently, one of the guys at the field got one for Christmas, I should say his kid actually did, and brought it by. We forgot our r/c stuff and fought for turns for an hour!

When they first came out (too many years back to mention !) my parents couldn't afford one, so I improvised by using a small motor removed from a battered up scalextric car, a small high pitched prop, 6 foot length of dowel rod and my old Hornby model railway controller for controlling the altitude. The only thing I couldn't do was get it to control the forward / reverse motion without wrapping the wires around the mast, and often the batteries taped to the dowel to counterbalance the model would drop off too :eek: (well I was 7 at the time :) )

I bought one of the commercial units a few years back for my son as a Christmas pressy... honest ! ... and it was great fun picking up the accessories with the little hook... would of been very frustrating trying to do that by voice... would of sounded like that old TV series the goldern shot... left a bit... right a bit, up... stop... hold it, hold it - hooked ! :) :)

u1988
Jun 18, 2007, 06:23 PM
I have the HM2007 that recognize my voice

what I'm looking for is:

how to control the remote control through the usb?

or other ports!?

with the c++ program

how to control the PWM signal in the remote control?!

thanks for helping my so quickly!!! :)

sfsjkid
Jun 18, 2007, 07:33 PM
Malc C, that sounds like the slot car set I bought for my kid;) Just kidding. Yes, I was hooked by the hook too (sorry, I couldn't resist either). You know, by building your own, I think you have a better childhood memory, and I'm impressed that you did it so young!

betson
Jun 18, 2007, 10:53 PM
I dont' like your chances of being able to actually fly a heli, but if I were doing it I would build an interface that plugs into the trainer socket and takes over like a trainer pilot would. So you would
1. program the voice recorder module to react to different commands.
2. link those commands to the required servo movements


But as endurance says if you don't know this
1. microcontrollers/electronics to design your hardware
2. firmware programming for the mcu
3. pc programming for communicating with the mcu
4. how r/c transmitters work and the ppm protocol

Don't even bother.

jeffs555
Jun 19, 2007, 01:53 AM
Since you have obviously never flown a helicopter, and refuse to take advice from those who have, I would rate your chances of success at about zero. To know how to control anything by a computer, you have to know how to control it manually. You seem unwilling to even try a simulator, which would immediately show you how difficult it is to control a helicopter. It is not like driving a car. There is no command to go forward, backward, left, right and stop.

MarkusN
Jun 19, 2007, 02:47 AM
Agree completely. What you want to do is basically to control a heli with the equivalent of a tip-tip RC (dunno what they were called in English, RC devices that used switches for input, so binary signals. Rudder was full left, ful right, or neutral, you get the idea.)

Only the advent of fully simultaneous, fully proportional RC made the model heli possible in the first place.

Malc C
Jun 19, 2007, 04:00 AM
Since you have obviously never flown a helicopter, and refuse to take advice from those who have, I would rate your chances of success at about zero. To know how to control anything by a computer, you have to know how to control it manually. You seem unwilling to even try a simulator, which would immediately show you how difficult it is to control a helicopter. It is not like driving a car. There is no command to go forward, backward, left, right and stop.

Well put... this guy is just trolling.... he's not taken on board any of the advice and comments we've given and clearly hasn't got a clue. So he has the voice chip.. wow ! - I've got a P4 processor in the draw here, but that don't mean I can design and build a computer !

Guys, may I suggest that we let this one rest and let it dissapear in to the archives

u1988
Jun 19, 2007, 10:34 AM
Actually I have a advancement (Good progress) thanks to you guys!!

slowly slowly of course!

for example all the link that you gave me! and the ideas!

look I'm soory that I don't want to use the simulator!

I using with it to practice flying of course!

but I want to control without a computer!

by pulse (pwm) or somehow!

so please don't be hurt if I don't think that this idea isn't what I think is good

or other!

like I have told before there is a great ideas but I still can't found something
that I can do without a computer! you know with c++ after I burn the commands to chip like 8051!

the HM2007 chip isn't the real problem! it's the control with the a pulse-PWM or some how?!

thank you very mach!
I hope that nobody is hurt becase of me! soory!!!! :(

Endurance
Jun 19, 2007, 06:26 PM
u1988,

What you are doing is trolling....

but I want to control without a computer!

What do you plan to use then? We have stated many times what you need to be doing IF you are to accomplish what you want. My advise is to NOT start from srcatch and build off others work.

I would also say not to use a single blade helicopter but a co-axial instead (maybe a bladrunner). This helicopter is able to fly without an onboard IMU system. This is your best bet besides the other suggestions offered.

Use the parallel/serial port to tap into the remote control. Look on the site "instructables". Someone did this with an r/c car.

You need to start small. Start learning how to program a microcontroller.

u1988
Jun 20, 2007, 09:53 AM
First of all I want to control by computer!!

and after that I want to burn the progream on a chip!!
(like 8051 it doesn't matter right now!)

But forget about the after (burn) for now!!

I'm talking about control with the computer!!!

how to control forword,right,up...???

don't forget I want to control one at a time the roemot control!

(expmle: if up so up and after he get up in the air I want to right!!)

one at a time!!!

thanks you! :)

MarkusN
Jun 20, 2007, 10:30 AM
don't forget I want to control one at a time the roemot control!

(expmle: if up so up and after he get up in the air I want to right!!)

one at a time!!!

See, and here's the problem:

When you control a heli like that, it has its own ideas. E.g. you say up. Up it goes, but it also wags its tail and probably adds a little bit of roll to the movement. The tail wagging has been improved with gyros, but you cannot remove it completely. So you have to enter corrective control inputs.

Flying a heli means constant regulation and control of at least 4 if not five functions: (up/down, tilt forward/backward, roll left/right, yaw left/right, (engine))
So, unless you add some very sophisticated closed loop functionality to that control which stabilises the heli around all axes it's not going to work due to the limitations of the language input system.

Malc C
Jun 20, 2007, 12:47 PM
Guys, take my advise and let this thread drop down the list - U1988 has no concept on how the model flies, even after several of us have tried to direct him in the finer details of controlling one.

let him waste his money on a nice new heli, a hand full of microchips, and a crash course in assembly (or C++ etc), it will never work !

u1988
Jun 21, 2007, 05:23 AM
O.K thank you guys!!

I will take into consideration everything !!

:)

bluesky123
Jun 24, 2007, 01:08 PM
We have decided to open the communication protocol of our USB v.4 interface:
http://milehighwings.com/manual_usb_v4.htm#cmds

Now, everyone, who has enough knowledge to modify Jan Axelson's "Usbhidio_vc6" example:
http://www.lvr.com/hidpage.htm
can develop software to control a TX from a computer.
Beware: Jan Axelson's code is written very poorly, but it works; you should study how it works, and then develop your own code!

Boris
MHW R&D

Norman Adlam
Jun 25, 2007, 10:00 AM
Guys, take my advise and let this thread drop down the list - U1988 has no concept on how the model flies, even after several of us have tried to direct him in the finer details of controlling one.

let him waste his money on a nice new heli, a hand full of microchips, and a crash course in assembly (or C++ etc), it will never work !

Malc,

I suspect what U1988 needs to do first is to try to control a model helicopter using a normal RC kit. That would then give him some understanding as to how difficult it is!

U1988,

As the guys here say, you are trivialising the problems you have to face. You are also thinking that the structure of a programming language means that you can somehow quote the words 'C languauge' and that will mysteriously handle voice commands like 'forward, right' etc.

You have a whole set of problems to address, and would need to break them down into manageable parts, for example.

1. Learn about what forces etc need to be handled in the object you are intending to control. If it's a heli, learn to fly one first (as you can't simply visualize the complexity without experiencing it - torque effects, translational lift, pitch / revs relationship, stability problems, gyro effects etc).

2. Learn / find out what hardware you intend to use, for example - is any of it even feasible (weight, power, speed, available inputs / outputs)

3. Learn about how to handle ports on a PC - in whatever OS that you choose, as they all manage ports different ways.

4. Learn how to program - probably both a 'high' level language (like C) to handle the voice recognition etc, and an MCU programming Assembly language in order to get speed.

You have years of work ahead of you, unless you simplify what you are attempting to do!

Have fun! :D

(A typical example - I believe the US have developed a 'model' helicopter that will position itself, and will maintain it's position. I think it takes something like a GPS system, triple gyros, and multiple MCUs to handle that - and it doesn't even respond to voice! Oh, and it cost millions of $$ to do it!)

u1988
Jun 25, 2007, 12:02 PM
Thanks guys!!!!!
:) :) :) :) :)

googlymoogly
Jun 25, 2007, 04:26 PM
hmm, tool alert.

GWFAMI
Dec 05, 2007, 11:00 AM
If its not too late for this project, check out http://www.phidgets.com/index.php they may have exactly what you need.

Good Luck.

Brandano
Dec 06, 2007, 03:18 PM
Check the UAV forums, see what their budgets are... and they are just getting the things to fly on their own. An helicopter flies because it fears the parts bills when it hits the ground. Get your voice activation to fly a sim first, then you might try moving it to the actual hardware. This is not a thing that can be made in a single step. It's not impossible, but awfully difficult, and it's the sort of thing that people at DARPA ersearch on.

DIYMark
Dec 06, 2007, 10:07 PM
Look to control a heli you need a fair bit on input just to get it to hover - you would have to be the worlds fastest rapper to fly it half decently via voice commands.

Brandano
Dec 09, 2007, 08:05 AM
Well, no, but you'd need a different control setup. You'd need the helicopter to be able to autohover, which somebody has already done several times over. This usually means at least 4 gyros, a suit of accelerometers, a rather powerful and lightweight cpu or microcontroller, and possibly a GPS receiver, and a frame capable to lift all of this stuff. Then you'd control it by telling it "heading south, 3 meters north, hover 5 minutes, heading 25, forward 2 meter per second..." etc, and the computer would translate this in instructions to give to the helicopter. As I was saying, not impossible, but really difficult and expensive. I saw recently some cheaper approaches where an helicopter was controller by a computer actually seeing it through high speed cameras, using a series of pingpong balls as tracking reference, testing landing procedures on an inclined surface. This makes the bits that smash in the ground cheaper, but it's much harder to get it working successfully.

Swash McHover
Dec 09, 2007, 10:32 AM
That website is killer, perhaps deserving of its own thread.

I still need to peruse the site but starter kit #2 (http://www.phidgets.com/products.php?product_id=2004) looks interesting. Even includes a servo controller and 4 hitec servos it appears.

Note: I'm not trying to control a heli via PC, I have a hard enough time doing it manually. :rolleyes: