Let's Make Robots!

Understanding the "Explorer" PCB

Provides Rover 5 chassis with motor drivers, power supply and IR sensors
Rover5_Explorer_Mega.zip7.9 KB
Explorer_Schematics.zip87.17 KB

The Explorer PCB was designed specifically for the 2 motor / 2 encoder version of the Rover 5 chassis. The Explorer provides all the basic features required to turn your Rover 5 chassis into a working robot.




The first and second videos shows the Explorer mounted on a Rover 5 chassis using the Arduino Mega.









The third video shows the explorer on an RP5 chassis using an Arduino Nano mounted on a breadboard.









  • Power supply with +5V @ 1A, +3.3V @ 500mA, Servo power @ 3A trickle charging circuit for NiMh batteries.
  • Dual FET motor controller rated at 4A per motor with current monitoring circuitry.
  • IR sensors on the corners to assist in object avoidance.
  • Large prototype area for adding custom circuitry.
  • Mounting holes for Arduino and Arduino Mega development boards.
  • Mounts for 2x small breadboards allowing experimental circuits and other MCU's such as Picaxe or Propeller to be added.
  • Mounting holes for a pan / tilt kit at the front of the robot.
  • Both male and female headers for servos, sensors, encoders, motor control and power.




I have written an instruction manual that can be downloaded from my product support site here:

To help beginners who are still having trouble after reading the manual, I will try to explain in more detail here.


Mounting the board onto the Rover 5:
The PCB is designed to mount on the Rover 5 chassis using 4x self-tapping screws. The motors, encoders and battery pack all need to be connected to the bottom of the PCB before you mount it.

Pay attention to the polarity of the battery connection and power connections for the encoders. Red wires are +V, Black wires are ground. Ignore the colour of the motor wires as the polarity depends on the direction of the motor.

It does not matter if you swap the yellow and white wires of the encoders. This will only reverse the sense of direction and can be easily corrected either in the software or the wiring on the upper side of the board.

Once you have the wires connected and 6x AA NiMh batteries installed you can mount the PCB onto the chassis. Note the chassis has 4 mounting points, 1 in each corner.

Click on the image for higher resolution.



The Explorer is designed to work with 6x AA NiMh batteries (7.2V). This is the best option as NiMh batteries maintain a constant voltage over almost the entire discharge cycle. In comparison, a 7.4V (2S) LiPo or Li-Ion battery will have 8.4V when fully charged and steadily drop down to 6V as it discharges. Alkaline batteries should not be used as the initial voltage of 9V is too high for the motors and they will struggle to supply enough current causing your processor to shut down or reset unexpectedly.

It should be noted that some brands of NiMh battery can deliver higher currents than others. Although I have not tested every brand, the two brands I have found suitable are Sanyo (Eneloop) and Varta. These batteries were capable of delivering higher currents (5A or higher from a single AA cell where as some cheaper brands struggled to deliver 3A under the same test conditions.

To test the batteries, I took a single AA cell (1.2V) that had been freshly charged and shorted it for a few seconds with a multimeter set to 10A. Do not perform this test unless you know what you are doing and never do it with a Lithium Battery!

Some people prefer to use two battery packs, one for the motors and one for the processor. This is not recommended or necessary as the power supply circuitry will filter any electrical noise from the motors and servos.

If you use the 6x AA NiMh batteries as recommended then you can use the built in trickle charger to recharge the robot overnight. This saves having to remove the PCB in order to recharge the batteries.

Do not attempt to charge lithium batteries using the built in charger as Lithium batteries cannot be trickle charged and may catch fire or explode!



The Explorer has both 5V and 3.3V LDO regulators built in. LDO regulators (Low Drop Out) can work with lower input voltages than standard regulators which helps ensure a consistant output even if the battery voltage drops as low as 5.5V due to a stalled motor.

The 5V regulator can deliver up to 1A of current. The 3.3V regulator is rated for 500mA. As the 3.3V regulator gets it's power from the 5V regulator you must allow for this when calculating the total current throught the 5V regulator.

Servo power is supplied from the battery through 3x 3A diodes. Each diode reduces the battery voltage by about 0.6V. This brings your battery voltage down below 6V (assuming a battery voltage of 7.2V or 7.4V) to prevent damage to the servos.



V1 and V2:

All pins marked "Vcc" on the board are +5V. To use the other voltages you can connect them to V1 or V2. These power rails each have 4 pairs of male and female 3-pin headers making them ideal for connecting servos or sensors.

Note that the GND pins are closest to the edge of the PCB, the power rails are the middle pins and the inner most pins are for signal wires. The Signal wires for each pair of headers only connect to each other. This allows the servo control signals to be easily connected to your controller or the breadboards using a jumper wire.

Each power rail has it's own filter capacitors and can be connected to any voltage up to 15V. Each rail can be connected to servo power using a jumper on J18 for V1 or J9 for V2. Battery voltage, +5V, +3.3V or voltage from another battery can be connected to V1 using J22 or V2 using J21.

Please note that all grounds are connected through the PCB. This means that connecting another battery on J21 or J22 will automatically connect it's ground to the ground of the main battery.

Click on the image for higher resolution.



Motor drivers:

All electric motors will have a "nominal" or "rated" voltage and in most cases the manufacturer will specify a maximum voltage. Exceeding the maximum voltage can drastically reduce the life of the motor and in some cases the motor controller.

Electric motors also have a specification called "Stall current". This is the current drawn by the motor when it is prevented from turning while powered at the rated voltage.

The motor drivers on the exporer PCB are designed for the Rover 5 motors and can handle a maximum stall current of 4A. The Rover 5 motors have a nominal voltage of 6V, a maximum voltage rating of 7.5V and a stall current of 2.5A.

For each motor there are 2 control pins, DIR and PWM. There is also an analog output called CUR plus Vcc and ground connections. The Vcc and ground connections are simply +5V and ground which could be used in cases where each motor is controlled by a separate MCU or experimental circuit that needs power.

The direction control pin, DIR connects to a digital output of your controller. When your controller output is high, the motor will turn in one direction, when the output is low the motor will turn in the other direction. If the digital pin of your controller is in the high impedance state (open circuit or input) then the motor controller will treat this as a low input.

The speed control pin, PWM connects to a digital output of your controller that is capable of generating Pulse Width Modulated control signals. These signals control the amount of power supplied to the motors by controlling the percentage of time that the motor has power.

For example if your PWM output is at 60% then the motor will have power 60% of the time and no power for 40% of the time. This cycle of ON and OFF repeats very quickly (at least 100 times a second) so that the motor's momentum keeps it spinning during the time that the power is OFF. 

The current sensing pin, CUR is an analog output. The voltage on this pin is proportional to the current drawn by the motor and is calibrated so that 1V is aproximately equal to 1A of current. This pin should be connected to an analog input of your controller. Your software can monitor this voltage to determine if the robot gets stuck.




The Rover 5 chassis can be supplied with or without encoders. This section assumes your chassis has encoders and they have been connected as previously shown. The encoders are terminated in headers next to the motor headers. Vcc and ground can be used to power external circuitry if required.

Output A is switches between high and low 1000 times for every 6 revolutions of the output shaft. Output B is Identical to output A except that it is 90° out of phase.

If you only want to know speed / distance then you can count the pulses from either output. Counting the pulses from both outputs will double your precision giving you 1000 pulses for 3 revolutions. As the outputs are 90° out of phase you can also tell the direction the wheel is turning by looking at which input rises first.

It is recommended that you connect the encoder outputs to external interrupt pins on your controller. This should ensure that all pulses are counted. If you configure your interrupt to be triggered on the rising edge of a pulse then the direction can be determined by simply looking to see if the other input is high or low.

If then encoder tells you you are going backward when you are actually going forward then you can simply swap the A and B outputs either by swapping the wires or changing the code.


IR corner sensors:

On each corner (numbered 1-4) of the PCB is a clear IR LED and a black photo-transistor. By turning on the LEDs and reading the reflected IR light with the photo-transistors we can detect nearby objects. Because our eyes cannot see the IR light, a small green LED is wired in parallel to the IR LED to indicate that the IR LED is ON.

Align the LED an photo-transistor so that they are roughly parallel to each other as shown in the photos but do not push them too close together otherwise the photo-transistor may detect the LED directly. Adjust their distance and angle so that each corner gives roughly the same readings.


On the left side of the PCB you will see 4 digital inputs for the LEDs. They are numbered 1-4. Connect these to your controllers digital outputs. These pins drive NPN transistors that supply the current needed for the LEDs. Each IR LED draws as much as 50mA so they should be turned off when not used to extend the life of your batteries.

On the right side of the PCB you will see 4 analog outputs also numbered 1-4. Connect these outputs to analog inputs of your controller. As an object gets closer and reflects more IR light, the voltage on these pins will increase.


As sunlight includes a lot of IR light these sensors will be blinded by direct sunlight and work best indoors or at night. To prevent false triggering from ambient IR light your code should work like this:

  1. Turn on IR LED and wait at least 50uS for the photo-transistor to respond to the change in IR light.
  2. Read the apropriate analog input and store the value. This value is the Ambient IR + LED IR light reflected from nearby objects.
  3. Turn off the IR LED and wait again while the photo-transistor adjust to the change in IR light.
  4. Read the same analog input again. This value is just Ambient IR light.
  5. Subtract the second value from the first. The result is equivalent to the LED IR light reflected by nearby objects only.
  6. Repeat these steps for each corner.




Wiring it up:

Below is a typical wiring diagram using an Arduino Mega. If you are using a processor with fewer I/O pins then you may need to leave out some features such as the encoders or replace the eye with a sensor such as an ultrasonic range finder.

In the example below, V1 is connected to servo power and V2 has been connected to 3.3V to power some optional 3.3V sensors. Although the Arduino Mega is a 5V controller it can still accept digital and analog inputs from 3.3V devices.

Click on the image for higher resolution.



Sample Code:

I've attached sample code. When you open the folder you will find several files inside. Using Arduino 1.04 or later, open Rover5_Explorer_Mega.ino. This is the main program. All the other files will open into tabs at the top of the screen. I have put various functions into seperate tabs because it makes the program easier to read and edit.

The IO_pins.h tab is your wiring map. In this case it matches the wiring diagram above. If you want to change the wiring of your robot then you must change the pin definitions to match. The reason for defining the wiring like this is to make it easier to change. Changing the one value in this tab changes it throughout the entire program.

The Constants tab includes many values that can be changed to adjust the robot's behavior. For example, changing the value bestdistance will change the distance that the robot tries to mantain between itself and an object detected with the compound eye.

My sample code does not make use of the encoders however I have written an encoder ISR (Interrupt Service Routine) that increments the values lencoder and rencoder when the wheels travel forward and decrements the values when the wheels go backward. Swapping the wires for encoder inputs A and B will reverse the sense of direction if required.





Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Most likely the problem is your wiring. Make sure you have not accidentally swapped the PWM ,DIR and CUR wires. To test a motor or motor driver individually just swap the wires for left and right motors or left and right motor drivers. If the wiring is the problem then the motor that did work will stop and the faulty motor will work. Also make sure you are using good quality NiMh batteries. Alkaline batteries are pretty useless because they cannot supply high currents.
Thanks I have checked my wiring three times and all seems okay. I am using eneloop NiMH AA rechargeable batteries, which are rated at 2000mAh, with it. The Explorer PCB has 2 battery terminals on it. One is 7.2V which looks to be for using a LiPo batteries or some such by the connector style and the other is a blue screw terminal not sure if that one is an input or output for supply voltage so I am not using that one. I will swap the motor wires and see if the problem follows. also one other thing I have noticed the power switch does not seem to work. the charge led1(yellow) comes on, but when the switch is placed into the power on mode, led2 (red) does not light, and nothing seems to happen. the left motor only works if I place a 9V battery right into the Arduino Mega 2650 supply port. sorry I guess I could have been more clear on the failure mode. this is such a cool design and I really want to get it working.
Please post a photo of the power connections as the PCB may heve been changed since I originally designed it (about 5 years ago). There should be a blue screw terminal on the underside of the PCB. That should be the battery input. Originally it was a white connector because the battery holder used to come with a white connectors attached but then they started shipping with no connector on the battery holder.

As you can see in the photo. I have it connected to the white connector. so I should be using the blue connector? if so what is the maximum input for the batteries on this terminal? is it copnnected to the DC 12V input jack? Is there a Schematic and some troubleshooting available so I can check the logic of the board. Honestly I'm not sure if I shorted any of the circuitry during my inital connections as I got nothing but the board when it was shipped to me. I'm looking online and can find nothing of this nature available. if it is proprietary I can understand. but I would assum there must be some kind of info to check voltages or current levels on test points of the circuit board. I've seen your postings and videos of this Rover 5 and that's what hooked me to buy it.

Check the attached files. I have added some schematics. The blue screw terminal is the battery terminal (note the BT printed next to it). The board was designed for 6x NiMh batteries only (7.2V). The 9V-12V jack is for the built in battery charger. When the switch is in the off position the charging circuit will trickle charge the batteries. Do not use any other type of battery with this charging circuit. If you got nothing with the board then you should have contacted the sales person before connecting power. This tutorial is basically the same as the manual.

Hello OddBot,

I received the new Explorer PCB board today. I connected the 6 AA NiMH batteries to the new board using the blue terminal block labeled (BT) and turned the switch to the on position. I thought at least the LED's would light up but nothing happened. So then I recennected the batteries to the old board. I think I may have discovered some of my problem.

in the schematic you show a red wire leading from the 3.3V terminal to the +V2 of the servo jumper near J1 on the right side of the PCB. I removed that and at least i got the right side to respond on occasion. I'm now wondering if the IR eye and the object detection LED's are getting too much interference. As sometimes when I really block the eye up close the right motor will kick in and move the Rover 5 in reverse to get away from the obsticle. All the GREEn power LED'S are flashing. So what I was thinking is should I put a small piece of shrink tubing over the IR Clear Transmitters as they may be causing feedback interference with the receivers. You had metioned that with the Mr. General Robot.

I'm still only getting it to function if I place a 9 V source in the Arduino Mega 2650 power port. I did some continuity testing and confirmed that the power switch is connected to the UB and GRD ports of the blue screw terminal block on the top of the PCB as the BT solder joints cause the tell tale BEEP when the switch is turned to the on position.

I'm not going to give up on this, I'm determained to figure the bugs out. my next stage will be to check some of the Aruino sketch out. maybe something has changed since your initial design and the sketch needs adjustment as well. I have to admit being only a newbie for robotics. been doing it for 1 year abouts. I find teh mental challenge rewarding.


Okay I have rewired it using the blue screw terminal with the NiMH AA batteries and now when I turn the power switch on nothing even lights up. I know the batteries are fully charged as well. I get power when I put a 9V battery into the Arduino Mega power port. I def think I may have shorted some of the circuitry of the supply. both motors are also functioning as I've switched the motors and the problem is def on the board not with the motors. I may just purchase another board and see if it works then. if not I'm wondering if the Rover 5 motors will work with a diferent motor driver, such as an Arduino motor shield from Adafruit.

I would still like to know if any circuit testing information is available so I may make an attempt tp track down my problem.

thank you for all your help even if it hasn't solved my problem

I have recently purchased and assembled the Rover 5 2 motor chassis using the Explorer PCB and an Arduino Mega 2650. Using the tutorial from OddBot which the wiring diagram is very helpful thank you. My question is I've only got one motor is working. I'm hoping I did not short out any of the circuitry and was wondering. Is there was any trouble shooting information on the Explorer PCB? This way I can trace the logic and see if all is working correctly. Also can the motors be tested for function individually with a battery or some such without shorting out the driver boards? I would appreciate any help that can be given. thank you kindly in advance

It should be relatively simple to test if a motor works or not. Just directly connect the motor to a power supply such as a 6V or 7.2V battery pack.

BTW, I've checked wiring three times myself many times and missed my mistake. We become blind to things we've checked multiple times. If you post a good photo showing how the various connections are made, someone might be able to spot a problem you've missed.

I've learned there are lot more ways to connect thing incorrectly than there are ways of connecting things correctly.


I have a question about the mA draw of the Explorer PCB - how much Power does all the Stuff on it need?

 Is there a way to disable something to save power?

And does anyone have example Code for Pathfinding or even creating a grid Map? ;)


Is there a Shop where to get another 2 Motors+Encoders as Addon? Because i ordered only a 2 RW Version but my Robot seems to be too heavy for only 2 Motors :(


Thanx and btw very nice Work! :-)