January 5, 2008

Programming VEXplorer for Computer control

Filed under: Daily — profmason @ 11:32 pm

vexplorerinterface.jpgWARNING! What is described here will certainly void your warranty and cause your vexplorer remote to cease to function in the original fashion. Proceed at your own risk!

I have developed a module that can be soldered into the Vexplorer remote that allows computer control of the Vexplorer robot.

First you need to hack into the Vexplorer remote. Open it up and remove all screws so you can expose the back side of the PCB. You will need to cut (destructive) or desolder (Potentially reversible) the top pin of the large IC from its pad. Solder a wire to the small surface mount resistor pictured. You will input your pulse train to the RF section of the electronics at this point. The required pulse train is discussed here.

Next a Picaxe 08M is prepared to translate the serial stream into the appropriate pulse stream. The Picaxe is programmed to take “&&&123457″ Where 123456 are the six channels on the Vexplorer. A value between 0 and 9 is sent for each channel. This is decoded as follows. 0 is full forward, 5 is zero and 9 is full reverse.

Here is a schematic for the Picaxe circuit used:


The only trick used in this circuit is that when the program switch is pressed, the Picaxe can be programmed through the serial port. When the program switch is released then the picaxe received input on pin3. (I realize I am playing pretty fast and loose with the voltage when programming the picaxe (The programming voltage is less then 5 volts) but it still works just fine.

Here is the code to generate the appropriate pulses for the Vexplorer. Note the vexplorer protocol is discussed here.

  • setfreq m8
    symbol endtime = w0
    symbol motor1 = b2
    symbol motor2 = b3
    symbol motor3 = b4
    symbol motor4 = b5
    symbol motor5 = b6
    symbol motor6 = b7
    symbol counter = b8′Pulspin is tied to the Vexplorer Remote
    symbol pulspin = 1
    ‘Dum is a dummy pin to do the timing
    symbol dum = 2′These are values to make the timing work
    symbol stoptime = 2160 ’2120′Input 6 values corresponding to motor ports 1 to 6
    ‘Each value is between 0 and 9. 0 is max forward 4 and 5 are off 9 is max reverse
    serin 4,N1200,(“&&&”),motor1,motor2,motor3,motor4,motor5,motor6
    serout 0,N1200,(motor1,motor2,motor3,motor4,motor5,motor6,13,10)
    ‘Process inputs:
    ’170 is off
    ’93 is full on forward
    ’253 is full on reverse
    motor1 = motor1 – 48
    motor1 = 18 * motor1 + 93
    motor2 = motor2 – 48
    motor2 = 18 * motor2 + 93
    motor3 = motor3 – 48
    motor3 = 18 * motor3 + 93
    motor4 = motor4 – 48
    motor4 = 18 * motor4 + 93
    motor5 = motor5 – 48
    motor5 = 18 * motor5 + 93
    motor6 = motor6 – 48
    motor6 = 18 * motor6 + 93
    ‘serout 0,N1200,(#motor1,#motor2,#motor3,#motor4,#motor5,#motor6)
    counter = 0main:
    ‘We need to send the pulse stream multiple times in order for the transmitter and receiver to sync properly
    ‘This statement controls the number of times to send the pulse stream.
    if counter > 8 then getdata
    ‘These next three commands generate a 300 us pulse
    high pulspin
    high dum
    low pulspin
    ‘Generate the spacing which will determine the state of motor 6
    pulsout dum,motor6
    high pulspin
    high dum
    low pulspin
    pulsout dum,motor5
    high pulspin
    high dum
    low pulspin
    pulsout dum,motor4
    ‘This pulse and spacing is not used?
    high pulspin
    high dum
    low pulspin
    pulsout dum,170
    high pulspin
    high dum
    low pulspin
    pulsout dum,motor3
    high pulspin
    high dum
    low pulspin
    pulsout dum,motor2
    high pulspin
    high dum
    low pulspin
    pulsout dum,motor1
    high pulspin
    high dum
    low pulspin
    pulsout dum,170
    high pulspin
    high dum
    low pulspin
    ‘Calculate how much spacing is required to give a minimum of 20ms between pulse trains
    endtime = motor1 + motor2 + motor3 + motor4 + motor5 + motor6
    endtime = stoptime – endtime
    ‘Finish the 20ms
    pulsout dum,endtime
    counter = counter + 1
    goto main

Once the link is implemented, you can use this a serial device in RoboRealm to implement computer vision using the camera build into the VEXplorer.

Here is a link to some video of the VEXplorer following a path of checkers.
Here is a view from the VEXplorer Camera:


  1. [...] the remote was hacked and a microprocessor provides a serial to PPM interface.  Details are here.  Once the VEXplorer could be treated as a serial device, the camera could act as a sensor.  A [...]

    Pingback by » Integrating the VEXplorer with Roborealm — January 11, 2008 @ 10:56 pm

  2. [...] under: robots hacks[kernsy] sent in this nice little PICAXE based hack to provide computer control of a VExpolorer kit robot. The PICAXE [...]

    Pingback by Vexplorer computer control — January 25, 2008 @ 4:14 am

  3. hi…


    Trackback by link — January 25, 2008 @ 1:57 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress