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
’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
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
‘Generate the spacing which will determine the state of motor 6
‘This pulse and spacing is not used?
‘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
counter = counter + 1
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: