Shop OBEX P1 Docs P2 Docs Learn Events
RPV Microcontroller Questions — Parallax Forums

RPV Microcontroller Questions

S. MartinS. Martin Posts: 5
edited 2007-12-29 14:00 in General Discussion
These questions have probably been asked somewhere, but after trolling search results for hours I still couldn't find answers. If so I apologize in advance.

I'm building a remotely piloted airplane with a large operating range (around five miles), and I'm hoping to use a microcontroller to solve a few of my problems. I'm not new to PLCs, or electronics in general, but I don't have much hands on experience. My idea is to use one uC to encode signals from a USB-based RC-airplane controller, and pass off the serialized data to an external radio modem. Then use another uC to receive the data from the radio on the plane and decode it into servo movements.
My question is how do I (can I?) interface a parallax microcontroller with a USB game controller?

Comments

  • Desy2820Desy2820 Posts: 138
    edited 2007-12-26 10:33
    The short answer is that you can't, as no Parallax micro can be a USB master device.· There are some chips that will act as a master for a flash-based device, such as a USB memory stick, but I don't think they support HID type devices yet.

    What about simply using a laptop with a USB port?· Write an application to read and convert the joystick value, then transmit that value over a radio link.· As a bonus, you have to PC's processing power to process, store and display returned data.· On the aircraft·side, almost any micro could be used, since it just gets the value·and moves the servos.· I can forsee a lot of other sensors though (on-board GPS, gyro, battery voltage, etc), so I would select a BS-2 "P" series or better yet, the Propeller.

    Back to your question,·why not use a standard joystick?· That way you can just read it as·two variable resistors.· Depending on your micro-controller choice, a PS2 game pad can·be interfaced to almost any·BS2.· With a Propeller, you could also use N64 gamepad/joystick or·original Nintendo game pad, but you may need to create your own code for the N64 controller.

    Which brings me to·what I see as the last fly in the ointment, I have no idea how you're going to get a five-mile range from any radio device or link, unless you are/have an amatuer radio license.· Maybe a pair of X-Bee Pro modules, but I don't think you can get five miles out of them.

    Anyway, I hope I've given you some ideas and information to run with.

    Post Edited (Desy2820) : 12/26/2007 10:41:38 AM GMT
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-12-26 19:36
    The Vinculum is a microcontroller that can be a USB host controller. Parallax sells the bare chip, but you can also get chip + carrier boards from Vinculum.com if you don't have the capability of utilizing a surface mount chip directly. You could then interface the Vinculum to a parallax micro.

    Edit: although Parallax only sells a USB data logger, there are other Vinculum setups that can be used with HID's.
  • S. MartinS. Martin Posts: 5
    edited 2007-12-27 05:41
    Thank you Desy, Dennis.

    I suppose if USB is that awkward to use for this, I should look elsewhere. I would use a standard controller, but i need to find one thats close to a real RC airplane controller, or one that will at least let me control four flight parameters with two thumbs. I may have to modify one that already exists.

    This brings me to another question. In order for the microcontroller to read the value of four pots. in almost real time and send it along, would I be better off with a Propeller chip (and split the task between the cores) or a regular BS chip (and read them sequentially), or maybe even the Javelin chip (and simply use different threads)? Im just worried that reading several variables at once might get read slow or intermittently.

    Actually, believe it or not Desy, 25 miles (in 'perfect' conditions, of course) is my upper limit using off-the-shelf electronics. Unless I want to use the regular radio sets sold by people like Futaba(without any modification), the FCC says I have to get an amateur radio license(minimum Technician class) to make my own. Then I may use any ham radio band to control remote controlled things, up to one watt. Here are the two radio links I'm using:
    - Data Modem: Digi XTend OEM Module (up to 40 Miles), will carry control signals and telemetry, I think
    - Video: AAR 05-4 (this particular model does only 5 miles, but they have others that broadcast up to 25)

    Any ideas on the what chip I should use would be appreciated.
  • Desy2820Desy2820 Posts: 138
    edited 2007-12-29 14:00
    I've never tried anything like this, so hopefully someone else will chime in with a better insight.

    Definitely the Propeller, depending on your learning curve and what else you would like to accomplish on your transmitter side.·

    It may also be possible to use a fast·BS-2 "P" series, but I'm really not sure about this, you'd need to experiment.· I'm thinking RCTIME, but you'd need to carefully pick the cap/resistor values.· Depending on cost/complexity, you could also use several ADC chips or·a multi-channel ADC chip, so each channel could measure a different axis.· This should also result in more repeatable/predictable sample times.· I'm not sure how fast you would need to sample each axis though........

    For a simple transmitter, you could also consider the SX-48, almost as fast as the Propeller, but you can use SX-B, which is similiar to PBASIC, as a programming language.· Downside, you need a special programming tool that costs about $50.· Link to the SX-48 Proto Board:· http://www.parallax.com/Store/Microcontrollers/SXDevelopmentBoards/tabid/141/CategoryID/54/List/0/SortField/0/Level/a/ProductID/362/Default.aspxTha

    Thanks for the info on the modems,·I·wasn't able to·find anything like that.· I may need to use these in the future for one of my projects.

    I realize this probably isn't helping you much, but the answer really depends on how much of a learning curve you're willing to accept, preferred programming language, cost/budget and what other features, tasks, etc you need on each side of the link.

    Hopefully, someone else will chime in with more practical/tested ideas.
Sign In or Register to comment.