Shop OBEX P1 Docs P2 Docs Learn Events
Controlling 2 RC devices at once — Parallax Forums

Controlling 2 RC devices at once

balsibalsi Posts: 4
edited 2012-08-24 18:37 in Accessories
Is there a way to program the device so that I can operate two RC vehicles with the same remote. For example, using P8X32A on one remote transmitter so that I can operate one RC vehicle, and while using the same remote operate another RC vehicle on a different frequency? Obviously the first RC vehicle would be shut off, but I don't want to have to toggle anything on the remote. Just start the second RC vehicle and the remote would immediately be ready to respond. How would I code the SPIN file or is this possible?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2012-08-10 07:54
    I'm sure it is possible but you need to supply us with more info about your project. What controls do you need for each vehicle and what kind of feedback do you expect? you could just add more buttons/joysticks to the controller and have both vehicles on a different set of controls.
  • PublisonPublison Posts: 12,366
    edited 2012-08-10 08:23
    Could you run them both at the same frequency, since only one unit is going to be on at a time?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-08-10 09:25
    As others suggest, this will depend on what you're using as a transmitter.

    I think you can do this without a microcontroller with normal RC equipment.
  • PublisonPublison Posts: 12,366
    edited 2012-08-10 10:18
    I think, either way, the MCU is not going to matter. The frequency is determined by the transmitter output stage.

    I'm sure the frequency on the transmitter could be hacked, but it would not be easy, and probably would not fall into FCC specifications with the Propeller.
  • SRLMSRLM Posts: 5,045
    edited 2012-08-10 10:55
    balsi wrote: »
    Obviously the first RC vehicle would be shut off, but I don't want to have to toggle anything on the remote. Just start the second RC vehicle and the remote would immediately be ready to respond.

    How would you start the second RC vehicle? I'd imagine the easiest solution would be to have a switch on the remote, but that's directly against your criteria. Can you post a link to the RC vehicle and equipment you are using?
  • balsibalsi Posts: 4
    edited 2012-08-10 11:56
    I don't want to hack the transmitter, I want to create a new one. I want to use the P8X32A to create my own custom remote that I can control 2 or even 3 RC vehicles if want with the same transmitter if needed. My friend is sourcing the parts to build the remote and I'm sure it can be accomplished with the P8X32A but I don't know how to code the SPIN file so that it works.

    Ultimately we're going to work towards collision avoidance and GPS integration but for now we just want to get multiple frequencies transmitting simultaneously of the board.

    Publison - I want to avoid interference with other RC devices so I want to use my own custom frequency for each vehicle. "The frequency is determined by the transmitter output stage. " which is controlled by the SPIN file so this is really what I need help with coding.
    Duane Degn - I just want to use a simple tx connection to i/o pins on the P8X32A
    SRLM - That's just it, I don't want to toggle between frequencies. I want them all transmitting in a loop.

    If somebody could give me a basic coding script (or point me to the right tutorial), that would helpful as I have no experience in programming this. Also can I run the antenna of an RCA jack on something like to Quick Proto board feature here http://www.gadgetgangster.com/find-a-project/56.html?projectnum=258 or will a simple 6 or 8" wire to the onboard jack pin connection (solder side) work for transmission.
  • balsibalsi Posts: 4
    edited 2012-08-10 21:11
    Thanks for all the responses. I replied earlier to all of you but the response was never posted. Not sure why. Do they not accept links here?

    Anyway, without repeating everything again, bottom line is I need info on the code for the SPIN file more than anything else.

    Publison - The point is to run them on different and unique frequencies and I will be adding collision avoidance, gps and other features later on.
    Duane Degn - The P8X32A would be the transmitter. The goal is to create a new transmitter with the P8X32A not hack the existing.
    SRLM - I don't want a switch for toggling. I want the frequency to transmit in a loop. The vehicles can be turned on remotely as well. One car dies, the other can take over.

    So I basically need two or three frequencies constantly transmitting from the remote when it's turned on. There will only be one receiver at a time and the other frequencies will just be looping until the second car kicks.
    Does anybody know a person here who can supply the code to make this happen?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-08-11 07:22
    balsi wrote: »
    Duane Degn - The P8X32A would be the transmitter. The goal is to create a new transmitter with the P8X32A not hack the existing.
    The Propeller (P8X32A) isn't a transmitter. While it's possible to use the Prop to send radio waves, it not very good at doing so. Usually when one wants to make a transmitter with the Propeller one would use some sort of transmitter or transceiver module.

    XBee's are popular and are relatively easy to use transceivers. I like to use Nordic nRF24L01+ modules as transceivers with the Propeller (see post #1 of my index for an ebay link (see my signature for link to index)).

    I've also hacked a Spektrum RC transmitter to allow a Propeller chip to communicate directly with the transmitter module. Using the hacked Spektrum transmitter, I can fly my RC helicopters with a Wii Nunchuck.
    balsi wrote: »
    So I basically need two or three frequencies constantly transmitting from the remote when it's turned on. There will only be one receiver at a time and the other frequencies will just be looping until the second car kicks.
    Does anybody know a person here who can supply the code to make this happen?

    Each car will need a receiver or transceiver to recieve the signals. Each car may also need a microcontroller to communicate with the transceiver and control the car functions.

    I don't know of anyone who has code to do just waht you want. There are lots of examples on the forum where people (including myself) have done some of the things you want to do. Post #2 of my index has a list of my projects. Post #12 has a very incomplete list of other robot and robot controller projects.
  • balsibalsi Posts: 4
    edited 2012-08-11 12:56
    Thanks for your response Duane. I did see that you can make it into a more effective transmitter by integrating the transceiver device. The Nordic nRF24L01 looks very interesting. Can it effectively translate lower frequencies in the 27-50Mhz range which is what most of my cars operate at? Now shouldn't the propeller be able to transmit on it's own? I thought this was part of what it was designed for. If you attach a 6 or 8" antenna of i/o pin, shouldn't it transmit whatever frequency is set. Couldn't you even connect to an antenna to a simple RCA jack and get it to transmit? Obviously the transceiver would be for effective as this is what it's designed for, but ultimate I'm confused on your statement that the propeller is not a transmitter.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-08-11 13:05
    The Propeller can generate an RF signal, but it's very noisy with lots of jitter and harmonics. It's impossible for it to meet emission standards except at very specific frequencies in relation to its system clock frequency and, even then, requires a lot of filtering to clean up its output. At other frequencies, it's impossible to filter the spurious signals out.

    The fact that the Propeller can generate a video modulated carrier with audio mixed in or an audio modulated FM or AM signal doesn't mean that this signal is useful for anything other than a demonstration of the Propeller's capabilities.
  • Metal Gear REXMetal Gear REX Posts: 3
    edited 2012-08-24 18:37
    Hi Balsi! I'm a RC hobbyist that is just getting in to code writing with the propeller. I really don't know why you would want to do this but you can do what your talking about with the Propeller but you would have to write a code that would put out a PPM or PCM signal in to the input of the Tx in side your RC Controller to put out a powerful RF signal that the Rx in the cars would receive. The Rx in the car would have to have the same Frequencies as your Tx RC Controller. So with some relays, the propeller can then switch the crystals that would go in to your Tx for what car you want to be controlled at the desired time.
Sign In or Register to comment.