How to Program the Vexplorer Using Arduino





Introduction: 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!!



Step 1: 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.


Step 2: 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

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);
digitalWrite(lmotor, HIGH);
digitalWrite(rmotor, LOW);


Step 4: Continued

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



    • Science of Cooking

      Science of Cooking
    • Pro Tips Challenge

      Pro Tips Challenge
    • Pocket-Sized Contest

      Pocket-Sized Contest

    We have a be nice policy.
    Please be positive and constructive.




    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 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. 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). 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 ;-)