Shop OBEX P1 Docs P2 Docs Learn Events
$40 6-Channel RC System — Parallax Forums

$40 6-Channel RC System

JonnyMacJonnyMac Posts: 9,214
edited 2008-09-15 13:49 in General Discussion
Here's how: Buy a VEX Transmitter and Receiver kit for $30 (that's $100 less than what the VEX folks charge for it) from All Electronics (www.allelectronics.com) and add a $10 SX28 Proto Board to convert the PPM output from the receiver to usable servo pulses. I wrote two versions of the program; one that controls six servos, the second that converts channels 5 and 6 (controlled with buttons on the bottom side of the transmitter) to toggled digital outputs.

I used 5 volts to power the reciever.

Post Edited (JonnyMac) : 3/3/2007 6:18:11 AM GMT

Comments

  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-03 07:22
    The folks at VEX would like you to believe it's tricky, but it turns out the connections are easy and the output is a standard in the RC industry (the VEX site lists the connections and protocol as "proprietary"). If you have a PDB you can use the RJ-11 connector to hook things up; that's how I developed the code. Remove the RJ-11 jumpers, then...

    4 : N/C
    3 : Vss
    2 : PPM -- pulled up via 10K; connected to RA.0
    1 : Vdd
  • robotbuilder997robotbuilder997 Posts: 2
    edited 2007-03-06 00:15
    the source code you have what types of chips can it work with (AVR,PIC,STAMP ect...) also if it only works with sx chips then how do i program it without buying the develmonet kit $89 it is to expensive for me.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-06 00:38
    You'll notice that I did post this in the SX forum....

    I have no interest in PICs or AVRs so I can't help you much there, except to say that the source code is in Basic and doesn't use any clever tricks; anyone with a small degree of programming skill should be able to translate it to any processor of their choice.

    And the most one would have to spend on Parallax goodies is about $40: $30 for an SX-Blitz programmer and $10 for and SX28 proto board. Still, if you add these to the cost of the VEX TX/RX kit from All Electronics, it's cheaper than what the VEX folks charge -- and you have a tool for programming the SX chip which is fast and well-supported. And the language compiler I used, SX/B, is FREE.
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-03-06 00:43
    The source code as provided is strictly for the SX. But the protocol is simple enough that it should be easy to port to most processors. Check out the comments at allelectronics.com. There is conversion code also available for the DIOS micro-controller from kronosrobotics.com.

    - Sparks
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-06 00:51
    Note: I couldn't find any actual protocol details on the Kronos site; they seem to have simply added an interface to their library which means their code is only useful for their processors. This is why I wrote my program in Basic (SX/B) and as simply as possible: so that others could use it and translate it to their liking.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-06 02:11
    Per an offline request I posting a schematic (in PDF and ExpressSCH formats) for the SX20; this can be used as a quide for other processors (though I can imagine why you wouldn't just use the SX28 proto board....).
  • robotbuilder997robotbuilder997 Posts: 2
    edited 2007-03-06 03:18
    is J2 a resonator and at what frequency do i put it at
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-06 03:24
    Yes, J2 is the resonator socket -- I happened to use 50 MHz (you'll see that in the code listings; FREQ directive).
  • BenoitBenoit Posts: 47
    edited 2007-03-28 01:01
    Wow! sooo easy [noparse]:)[/noparse])

    I bought one of these RCs but was sadly disappointed when I found that these were using "proprietary" protocol, and just decided that one of these days I should try to decode the signals with a scope, but never got around to do that.

    Jon, what is the slowest I can run the SX using this program? I want the chip to consume as little power as possible, leaving that precious battery for the servos themselves.

    Man this forum is great, with truly great minds [noparse]:)[/noparse]
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-28 02:46
    You could probably get away with 4 MHz but the there may be a bit of granularity with PAUSEUS. Heck, you might even be able to get away with the internal oscillator. I tend to use 20 MHz as a good balance between speed and power consumption.
  • DosManDanDosManDan Posts: 179
    edited 2007-03-28 23:49
    Wow, Jonny Mac, the things I learn from your posts. Brilliant stuff. I read through your code everyday looking for little nuggets of stuff, and I've never been disappointed.

    Dan
  • BenoitBenoit Posts: 47
    edited 2007-03-28 23:50
    I was wondering about the speed since your example used the following:
    FREQ            50_000_000
    



    So, if I get it right, at 1us, that would basically be a NOP with the SX running at 1mhz? That would definitively not leave enough cycles for the pauseus command of SX/B .

    I guess I could use a 5mhz resonator, that should be enough, then.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-29 00:02
    At 50 MHz and Turbo mode (that the SX/B compiler uses) the clock is 20 nanoseconds (0.02 uS). At 4 MHz clock is 250 nS so a 1 us pause is four cycles.

    Try it at 4 MHz and see what happens. The compiler will complain if your FREQ setting is not compatible with the commands you're using. With 50 MHz, the clock timing is very fast so everything has better resolution -- but that doesn't matter here (I only had 50 MHz resonators in my toolbox when I wrote that program). Timing on this little project is not that critical since you're following an envelope after the break is detected.

    The import thing to do -- that so many seem unwilling -- is simply play! Thank Goodness that Thomas Edison decided to play as much as he did; had he wanted the built-in answers so many in this forum come looking for (not you), we would never have had all his wonderful inventions.
  • Mike CookMike Cook Posts: 829
    edited 2007-04-10 13:06

    Does anyone happen to know what the transmitting range, in feet, is on this RX/TX?

    Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • Tom CTom C Posts: 461
    edited 2007-05-25 19:22
    Hi all,

    I hate to reinvent the wheel. By chance, has anyone converted the SX/B code to Stamp PBasic? If not, this will make a good holiday project.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send someone to save the world, you·better make sure that they like it the way it is!
  • MrudisillMrudisill Posts: 3
    edited 2007-08-05 01:44
    I am having problems with the vex sx28 controller.· I'm new to the sx family, good bit with bs2.· Am i missing something simple.· I have the sx28 board, the blitz key (for the price diff, just buy the real one if your serious about learning new things) and a few 50 Mhz resonator and some three pin headers.· I loaded the code to the sx, verified that i have ppm input on the input pin.· All outputs are junk very low high frequency wave forms.· I'm not sure if I have the resonator / crystals connected in the right way.· I was hoping i could just load the code and go.· I'm 100% sure is something i'm doing wrong and overlooking.·
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-08-05 05:34
    The resonator socket on the SX28 Proto Board is marked X2; make sure you're using a 50; if you have 20, change the FREQ directive in the program.
  • MrudisillMrudisill Posts: 3
    edited 2007-08-05 20:52
    I've verified that it is a 50 Mhz resonator in socket x2. I noticed spots for a crystal? All i have done is plugged the resonator in, programmed the sx28 proto board, soldered pull up resistors and headers for the servos and connected the vex controller to the input and power with a 10K pull up from the input to vdd. Everyone is probly laughing about this because its so simple. I'm just new! [noparse]:)[/noparse]
  • MrudisillMrudisill Posts: 3
    edited 2007-08-14 10:41
    Ok, i've got the new key!· All works only when the key is in and getting the clock from the cpu.· This tells me that there is a problem with my resonator.· Time for the 555 i guess.
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-08-15 15:58
    I do not expect a 555 will be able to provide you with a 50MHz clock signal that is accurate and stable enough for this application.

    - Sparks
  • slashsplatslashsplat Posts: 63
    edited 2007-09-22 00:14
    See the posts on doing this with a BS2:

    http://forums.parallax.com/showthread.php?p=677332

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    slashsplat
    /* Ira Chandler */
    http://BotConnect.com
  • T'SaavikT'Saavik Posts: 60
    edited 2008-09-10 03:50
    I've modified the example code to provide 12 digital outputs rb0-5 and rc0-5. They go high (5v) on activation and reset (0v) upon control stick release.

    Here is the program: hellspark.com/dm/ebench/sx/dave/VEX_Analog_to_Digital.SXB

    I will also attach it to the post for the paranoid types [noparse]:D[/noparse]
  • JarrettJarrett Posts: 9
    edited 2008-09-14 01:45
    nOOb here... Is there a way to drive an electronic speed controller with a similar program? will this same program work?

    ESC: http://www.hobby-lobby.com/boatcont.htm

    (the bottom one is mechanically controlled and would work fine with a servo but i want to use the electronic controller) the generic hookup for the ESC's is 3-wire straight into the throttle axis connector on a mainstream RC reciever.

    Thanks, Jarrett
  • JarrettJarrett Posts: 9
    edited 2008-09-14 01:48
    JonnyMac said...
    Per an offline request I posting a schematic (in PDF and ExpressSCH formats) for the SX20; this can be used as a quide for other processors (though I can imagine why you wouldn't just use the SX28 proto board....).

    what is the J2 header for?
  • PARPAR Posts: 285
    edited 2008-09-14 19:51
    Jarrett said...
    JonnyMac said...
    Per an offline request I posting a schematic (in PDF and ExpressSCH formats) for the SX20; this can be used as a quide for other processors (though I can imagine why you wouldn't just use the SX28 proto board....).

    what is the J2 header for?

    Posted back on 3/5/2007 7:24 PM (GMT -8), JonnyMac said:

    "Yes, J2 is the resonator socket -- I happened to use 50 MHz (you'll see that in the code listings; FREQ directive)."

    Is that the "J2" you are asking about?

    par
  • JarrettJarrett Posts: 9
    edited 2008-09-14 20:24
    yes thats the one but i'm still a little confused. Isn't the resonator "Rx" already in the schematic? is the socket there so you can add another external resonator for other applications?

    -noob [noparse];)[/noparse]
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-09-15 13:49
    Hello Jarret,

    I think I can help clarify this. The "Rx" in the schematic is a resistor (usually 10K ohm) and not the resonator itself. It is very common to see a 10K resistor across the two OSC pins when using a resonator with the SX chips. On some you may also see a small (5pf cap) from one of the OSC leads to ground.

    You still need to install the resonator itself.

    Hope this helps.

    Robert
Sign In or Register to comment.