Step 3: Program

Step 4: Continued

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

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.

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.

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

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

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

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:

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?

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!