How to Program the Vexplorer Using Arduino

by robotkid249 in Circuits > Arduino

15383 Views, 23 Favorites, 0 Comments

How to Program the Vexplorer Using Arduino

ArduinoDiecimila01.jpg
This instructable will be about using arduino to control the revell vexplorer. Later you can add as many sensors you want. If you don't have most of the parts already this will cost you about $200 dollars. Most of the electronic bits you can find at radioshack and vexplorer at amazon, also arduino at the maker store.

Check out my new project on sending a balloon into space!!
https://www.instructables.com/id/My-Space-Balloon-Project-Stratohab-Success-High/

vexplorer

arduino

The H-Bridge

F7LV192F5HVPCSE_MEDIUM.jpg
This link listed below will show you all of the step in constucting the H-Bridge. A breadboard will be sufficient if you have trouble soldering. Leave the motor leads and also switch leads open which we will be using later.
Depending on how many of the vexplorer motors you will be using multiple h-bridges will be required.

H-Bridge

Combining the Vexplorer

FR6NHVTF5HVPCXZ_MEDIUM.jpg
The vexplorer has 4 motors, but for this instructable will only be using 2. The motors that go to the wheel assemblies. Take the right motor's positive and ground and attach the positive to one positive and ground from the h-bridge. Same with the ground. (See the first picture for details.) Then attach the wires that would normally go to the switch, to digital pin 13 and ground on arduino. Simply when we let the voltage go the motor will turn right and off for the motor to turn left. You can experiment by switching the polarity and getting different results. To power each h-bridge you can use the aux ports of the reciver. For powering the left motor you can use another h-bridge and follow the steps again. This is same with the arm and claw motors of the vexplorer.

Program

tm_blinkm_arduino_env.png
This simple program I wrote will move the vexplorer forward and then turn left. Basically we are controlling through programming the switch.

int lmotor = 13; //declares the two motors
int rmotor = 12;

void setup()
{
pinMode(lmotor, OUTPUT);
pinMode(rmotor, OUTPUT);
}

void loop()
{
digitalWrite(lmotor, HIGH);
digitalWrite(rmotor, HIGH);
delay(1000);
digitalWrite(lmotor, HIGH);
digitalWrite(rmotor, LOW);
delay(1000);

}

Continued

Basically this instrucable has started you off. Depending on how courageous you are you can add sensors, ect. in the future.