Otto diy not working

Hi guys,
Iam working the otto diy bot with 4 servos , whose pins i soldered onto a perf board and am controlling them via the arduino nano digital pins. The problem is that, whichever battery i try , the program doesnt execute properly. The servo movements are partial and only around 2 servos move at a time. I tried using 4 x 1.5v aa batteries , 2 x 3.7v 18650 cells and also a 7.4v 2200 3 cell lipo battery yet, no results. The only time it works properly is when its connected to the usb port on my computer. Here is the code that i am running:

//----------------------------------------------------------------
//-- Otto All moves test
//-- Otto DIY invests time and resources providing open source code and hardware, 
//-- please support by purchasing kits from https://www.ottodiy.com/
//-- Make sure to have installed all libraries: https://github.com/OttoDIY/OttoDIYLib
//-----------------------------------------------------------------
#include <Otto.h>
Otto Otto;  //This is Otto!

#define LeftLeg 2 
#define RightLeg 3
#define LeftFoot 4 
#define RightFoot 5 
#define Buzzer  13 
#define DIN A3 // Data In pin
#define CS A2  // Chip Select pin
#define CLK A1 // Clock pin
#define Orientation 1 // 8x8 LED Matrix orientation  Top  = 1, Bottom = 2, Left = 3, Right = 4 

///////////////////////////////////////////////////////////////////
//-- Setup ------------------------------------------------------//
///////////////////////////////////////////////////////////////////
void setup(){
  Otto.init(LeftLeg, RightLeg, LeftFoot, RightFoot, true, Buzzer); //Set the servo pins and Buzzer pin
  Otto.initMATRIX( DIN, CS, CLK, Orientation);
  Otto.sing(S_connection); //Otto wake up!
  Otto.home();
    delay(50);
  Otto.playGesture(OttoHappy);
}

///////////////////////////////////////////////////////////////////
//-- Principal Loop ---------------------------------------------//
///////////////////////////////////////////////////////////////////
void loop() { 
  Otto.walk(2,1000,1); //2 steps, "TIME". IF HIGHER THE VALUE THEN SLOWER (from 600 to 1400), 1 FORWARD
  Otto.walk(2,1000,-1); //2 steps, T, -1 BACKWARD 
  Otto.turn(2,1000,1);//3 steps turning LEFT
  Otto._tone(10, 3, 1);
  Otto.bendTones (100, 200, 1.04, 10, 10);
    Otto.home();
    delay(100);  
  Otto.turn(2,1000,-1);//3 steps turning RIGHT 
  Otto.bend (1,500,1); //usually steps =1, T=2000
  Otto.bend (1,2000,-1);     
  Otto.shakeLeg (1,1500, 1);
    Otto.home();
    delay(100);
  Otto.shakeLeg (1,2000,-1);
  Otto.moonwalker(3, 1000, 25,1); //LEFT
  Otto.moonwalker(3, 1000, 25,-1); //RIGHT  
  Otto.crusaito(2, 1000, 20,1);
  Otto.crusaito(2, 1000, 20,-1);
    delay(100); 
  Otto.flapping(2, 1000, 20,1);
  Otto.flapping(2, 1000, 20,-1);
    delay(100);        
  Otto.swing(2, 1000, 20);
  Otto.tiptoeSwing(2, 1000, 20);
  Otto.jitter(2, 1000, 20); //(small T)
  Otto.updown(2, 1500, 20);  // 20 = H "HEIGHT of movement"T 
  Otto.ascendingTurn(2, 1000, 50);
  Otto.jump(1,500); // It doesn't really jumpl ;P
  Otto.home();
     delay(100); 
  Otto.sing(S_cuddly);
  Otto.sing(S_OhOoh);
  Otto.sing(S_OhOoh2);
  Otto.sing(S_surprise);
  Otto.sing(S_buttonPushed);       
  Otto.sing(S_mode1);        
  Otto.sing(S_mode2);         
  Otto.sing(S_mode3);  
  Otto.sing(S_sleeping);
  Otto.sing(S_fart1);
  Otto.sing(S_fart2);
  Otto.sing(S_fart3);
  Otto.sing(S_happy);
  Otto.sing(S_happy_short);                   
  Otto.sing(S_superHappy);   
  Otto.sing(S_sad);               
  Otto.sing(S_confused);
  Otto.sing(S_disconnection);
    delay(100);  
  Otto.playGesture(OttoHappy);
  Otto.playGesture(OttoSuperHappy);
  Otto.playGesture(OttoSad);
  Otto.playGesture(OttoVictory); 
  Otto.playGesture(OttoAngry); 
  Otto.playGesture(OttoSleeping);
  Otto.playGesture(OttoFretful);
  Otto.playGesture(OttoLove);
  Otto.playGesture(OttoConfused);        
  Otto.playGesture(OttoFart);
  Otto.playGesture(OttoWave);
  Otto.playGesture(OttoMagic);
  Otto.playGesture(OttoFail);
    Otto.home();
    delay(100);  
  Otto.putMouth(zero);
  delay(100);
  Otto.putMouth(one);
  delay(100);
  Otto.putMouth(two);
  delay(100);
  Otto.putMouth(three);
  delay(100);
  Otto.putMouth(four);
  delay(100);
  Otto.putMouth(five);
  delay(100);
  Otto.putMouth(6);
  delay(100);
  Otto.putMouth(7);
  delay(100);
  Otto.putMouth(8);
  delay(100);
  Otto.putMouth(9);
  delay(100);
  Otto.putMouth(smile);
  delay(100);
  Otto.putMouth(happyOpen);
  delay(100);
  Otto.putMouth(happyClosed);
  delay(100);
  Otto.putMouth(heart);
  delay(100);
  Otto.putMouth(angry);
  delay(100);
  Otto.putMouth(smallSurprise);
  delay(100);
  Otto.putMouth(bigSurprise);
  delay(100);
  Otto.putMouth(tongueOut);
  delay(100);
  Otto.putMouth(confused);
  delay(100);
  Otto.putMouth(21); //diagonal
  delay(100);
  Otto.putMouth(27); //interrogation
  delay(100);
  Otto.putMouth(23); //sad open
  delay(100);
  Otto.putMouth(24); //sad closed
  delay(100);
  Otto.putMouth(vamp1);
  delay(100);
  Otto.putMouth(vamp2);
  delay(100);
  Otto.putMouth(xMouth);
  delay(100);
  Otto.putMouth(okMouth);
  delay(100);
  Otto.putMouth(thunder);
  delay(100);
  Otto.putMouth(lineMouth);
  delay(100);
  Otto.putMouth(culito);
    delay(100); 
  Otto.putAnimationMouth(littleUuh,0);
  delay(1000); 
  Otto.putAnimationMouth(dreamMouth, 0);
  delay(1000); 
  Otto.putAnimationMouth(dreamMouth, 1);
  delay(1000); 
  Otto.putAnimationMouth(dreamMouth, 2);
  delay(1000); 
}

Welcome to the forum

Please post a clear schematic of your project showing where the servos get their power. A photo of a hand drawn circuit is good enough

just consider the Arduino Uno as a Nano.

Also, before you ask I connected the battery to the 5v pin and also checked the battery voltage. The voltage read 5.35. all the changes did not change the result.

Feeding 4 x AA to Vin is too low voltage for an UNO. What does the Nano specs say about minimum Vin voltage?
Anyway, using the controller 5 volt pin as a power supply is a disaster. Servo need direct power from a good supply.

1 Like

If you connect the 6V to the 5V pin of the Arduino there is a risk that you have damaged the Arduino.

6V on Vin is probably OK, 7.4V should definitely be.

Your big problem is that the onboard voltage regulator that brings Vin down to 5V can not deliver a lot of current.

You can probably power the servos directly from the 6V (not 7.4V); check the specs. You can try to power the Arduino with that 6V on Vin; as said it's below spec. Don't forget the common GND.

1 Like

Hey Guys,
Thank you for all the suggestions. Is it ok if i supply 5 volts directly to the servos and connect the servo ground to that of the arduino nano ? Note that the ground terminal of the battery will also be connected to the ground pin of the arduino. T

Where are you going to get 5V from?

I suggest that you create a schematic / wiring diagram (photo of pen/paper drawing is ok) of what you intend to do and post it here.

Your Nano might not like the 6V on Vin; it's a little low according to Arduino Nano — Arduino Official Store but you can try.

Sure. Thanks/

Ensure your shield wiring (the board where all the wires are connected inside the body) is correct... and the power supply situation is correct. The code works NOOB (new-out-of-box)...

I aint using no shield here brother. Its just 12 male gpio pins soldered on a perf board and connected to the nano and the servos.

This verifies the problem is in your wiring. I showed the code works correctly.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.