Baby Orangutan Issue with driving Motors

Good day

I am working on a project in which I want to achieve variable motor speed control (through PWM) with the Baby O.
I am using two micro metal gear motors: and my Baby O is powered by a 9V battery.
When I make the necessary connections (Battery - Vin/GND and Motors - M1A,M1B and M2A,M2B) and upload the code to run the motors nothing happens; the motors however make a faint buzzing sound but the shaft does not move. It is also worth noting that when I connect the motors, the green LED losses its brightness/intensity and dims a little, when I remove the motor connections it returns to its normal brighter light.

I have been going through the forum and what I picked up is that the motor driver must produce a continuous current greater than the stall current of the motors and I believe that this condition is met as the stall current to my motors is only 0.36 A and the continuous current offered through the motor channels is approximately 1A.

[code]#include <OrangutanLEDs.h>
#include <OrangutanAnalog.h>
#include <OrangutanMotors.h>
#include <OrangutanLCD.h>


  • OrangutanMotorExample2 for the 3pi robot, Orangutan LV-168,
  • and Orangutan SV-xx8.
  • This example uses the OrangutanMotors and OrangutanLCD libraries to drive
  • motors in response to the position of user trimmer potentiometer
  • and to display the potentiometer position and desired motor speed
  • on the LCD. It uses the OrangutanAnalog library to measure the
  • trimpot position, and it uses the OrangutanLEDs library to provide
  • limited feedback with the red and green user LEDs.
  • Pololu - 5.e. OrangutanMotors - Motor Control Library

OrangutanLCD lcd;
OrangutanMotors motors;
OrangutanAnalog analog;
OrangutanLEDs leds;

void setup() // run once, when the sketch starts


void loop() // run over and over again
// note that the following line could also be accomplished with:
// int pot = analogRead(7);
int pot = analog.readTrimpot(); // determine the trimpot position

// avoid clearing the LCD to reduce flicker
lcd.gotoXY(0, 0);
lcd.print(pot); // print the trim pot position (0 - 1023)
lcd.print(" "); // overwrite any left over digits

int motorSpeed = (512 - pot) / 2;
lcd.gotoXY(0, 1);
lcd.print(motorSpeed); // print the resulting motor speed (-255 - 255)
lcd.print(" ");
motors.setSpeeds(motorSpeed, motorSpeed); // set speeds of motors 1 and 2

// all LEDs off;;
// turn green LED on when motors are spinning forward
if (motorSpeed > 0);
// turn red LED on when motors are spinning in reverse
if (motorSpeed < 0);

The above is just a template code that I am using to run the motors, I intend on modifying it for PWM control but before that I need to get the motors working which is where I really need the help.

I am not sure what I may be missing here but I would greatly appreciate your help and advise.



9 V PP3 batteries are totally unsuitable for powering motors. A brand new 9 V battery may be able to run one small motor for a couple of minutes, but it will die very quickly.

If you need 9 V, use a “wall wart” power supply capable of at least 1 ampere, making sure that it is voltage regulated (as many of them are not), or use a 6 cell holder for AA batteries.

Thank you for the speedy response.

I have taken your advice and gone ahead to buy a Lithium ion battery to use to power my Baby O.
This is the link to the battery: … dp/2401854
It provieds 7.4 Volts and has a capacity of 2250mAh and a power rating of 16.65Wh.
Good news is that this seems to have solved the problem, however a bit of concerning news is that I have realised that the AVR microcontroller seems to heat up after I connect the battery up for a minute or so. I am concerned that this battery is providing too high a value of amperes. I am not sure that this is the issue or that maybe I have overlooked something again.

I would really appreciate your help and suggestions once again.

Thank you in advance.


7.4 V is perfect for the microcontroller, and if connected correctly, the microcontroller will not heat up. Note that the battery input must be connected to Vin, not to Vcc, or you will destroy the microcontroller. Are you sure that it is the microcontroller and not some other chip (like the motor controller) that is heating up? Post a photo of the setup.

I hope you are aware that lithium batteries require special chargers and that great care must be taken to avoid overdischarge. They can be very dangerous if overcharged or completely ruined if overdischarged.

Hi again

Once again thank you for the response.

I have checked that I am using the Vin pin and not the Vcc pin as is shown in the picture below; moreover it is not the TB6612FNG motor driver that is heating up it was and still is the ATMEGA 328 chip that is heating up. I have to disconnect the battery after a short time as I can feel it getting hotter and hotter.

I am aware that lithium batteries require to be charged and discharged, I was thinking of getting this one : … %20battery

I hope that the 7.4V battery that I am using will be supported by this charger, if not please do advise and if you may have any recommendations I would appreciate it if you could mention them.

Thank you and I hope to hear from you soon.



Sorry, I can’t imagine why the uP should be heating up.
Are the motors running? Did you try disconnecting them?
Check the voltage at Vcc. It should be 5V.

Surprisingly the voltage at Vcc is 7.76V. The motors do work and the chip still heats heats up with or without them connected.

Then the voltage regulator and probably also the ATmega is damaged. Sadly, this Baby O should be considered useless.

Such damage can occur if a motor is disconnected and produces a high voltage inductive spike while the board is powered up. Always remove the power before rearranging any wiring!

I understand.

Thank you for taking me through the issues.

I will better know how to handle the Baby O the next time I have one.

Thank you again for your help.