Instructables
Picture of How to Program the Vexplorer Using Arduino
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!!
http://www.instructables.com/id/My-Space-Balloon-Project-Stratohab-Success-High/

vexplorer

arduino

 
Remove these adsRemove these ads by Signing Up

Step 1: The H-Bridge

Picture of The H-Bridge
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

Step 2: Combining the Vexplorer

Picture of Combining the Vexplorer
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.

Step 3: Program

Picture of Program
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);

}

Step 4: Continued

Basically this instrucable has started you off. Depending on how courageous you are you can add sensors, ect. in the future.
robotkid249 (author) 3 years ago
http://www.instructables.com/answers/Would-You-Guys-Like-a-Wireless-Power-Kit/
t.rohner6 years ago
Why don't you take a L293D or a L298 for the H-bridge? These are dual H-bridges on a chip. This way you could control the speed with the pwm function in the Atmega.
can you help me, how would I use an l298nh for controlling 2 dc motors with an arduino?
See here http://www.st.com/stonline/books/pdf/docs/1773.pdf I guess that there are newer circuits for the task, but the L298 is tried and true. You can use it with almost no external components.(Maybe a large capacitor to flatten current load spikes) For deeper insight into the matter, you could look here. Although they go pretty deep into servo technology, farther down there is a L298 in use as a PWM driven H-bridge. http://homepages.which.net/~paul.hills/Circuits/PowerServo/PowerServo.html You can drive up to 160 Watts, if you use parallel channels.
right now I'm to much of a beginner for servos (plus I don't have any..) the first link isn't working for me :(... all the datasheets I've looked at are very confusing.. the l239d is very common, but i could not find it for sampling. i was able to sample the l298nh from STMicroelectronics. but isn't very common so all i could find was the useless ddata sheet... Thanks A bunch!
Here, you should find what you're looking for (solarbotics links). http://letsmakerobots.com/node/10199 I do know the Atmega chip, but not the arduino specifically. So i can't say which pin they use for outputs
thanks a bunch.. one last question (hopefully) are the diodes necessary? I have a 7805 v reg, and capacitors, but not the diodes that they used in the PCB.
You definitely need the diodes and they need to be fast recovery types <=200ns. It's not enough to take 1N400X, they are too slow. In order to have the same current capability as the L298, they should be 2A types. I don't know what types you can lay your hands on. We often have different suppliers here in europe. (PR2002 was found at digikey...)
anything i can find in radioshack? i'm making a trip there soon for a new soldering tip..
I don't think their selection is what you are looking for. I would suggest some mail order will make you happier. They may have 1N4148 or 1N4001-1N4007 which are general purpose and rectifier diodes. None of them has enough forward current capability, let alone reverse recovery speed. If you switch off the current through a coil,(a motor winding in your case and you want to do that a couple of thousand times per second in a PWM) the current wants to keep on flowing. So if your H-bridge transistors switch off, the voltage goes up, higher than the supply voltage and in the end it kills them, if you don't clamp this voltage with fast enough diodes. I was looking up the PR2002 on Digikey for you. Or i have another link for you, which blows into the same horn, as i am ;-) http://www.electro-tech-online.com/general-electronics-chat/29713-1n5819-equivalent-use-l298.html
haha! i think im saved.. i sanpled the l298HN. the HN has inbuilt diodes :) score!! thanks a bunch
hmmm... after messing around a bit with the chip.. i found i cant get the motor to reverse direction.. maybe it's something im doing wrong..
You need to drive the two inputs of the l298 H-L or L-H for forward and reverse. If they are H-H or L-L the motor is in break mode. All above is true, while the Enable input is H. When the Enable input is L, the motor will stop, but not brake, no matter what the other inputs state is. See here:
l298.jpg
oh ok.. i think i had the enable pin mixed with one of the input pins.. thanks!
any chance you can give me a circuit diagram for arduino pins and 2 motors?
robotkid249 (author) 6 years ago
Sure, i've been able to go up 40 degree climbs with the vexplorer. I'll test my robot to see how much force it can carry. I'll be able to tell you in the next day or so.
for uphill, make sure to use front wheel drive as it will aid in traction...
clarenceum5 years ago
I recently used old Vex components with an Arduino for a project in the lab I am involved in. I was able to get most components to interface with the arduino, except the ultrasonic range finder. Has anyone tried to use the ultrasonic rangefinder from VEX wihtout using the VEX microcontroller?
zanshin6 years ago
great work can you tell me, how much weight can the vexplorer pull on top of it? it seems rugged, and i think of buying it, but i dont know if it could hold the weight i need on it (some 2kg, or 4.4lb)??? thanx!
mr.cletus6 years ago
Interesting work