Robot not drive properly with adapter

Hi,
I made my first robot and upload the code. When I connect both USB where I upload the code and adapter it works properly. But when I disconnected it from the laptop, and used the adaptor, it only performed one function at a time. In the code there were 9 functions to drive motions.
But it only moves forward other function can’t work. How to solve it ?

@ankitkumarmajhi18

Can you share the code that you have written?

Have you called the rest functions?

Yes sir I called the all the motion of the robot function.

@vinayak.joshi
Can you check this?

Hey, could you share your code in a file or paste it here so it is easier to have a look at it instead of screenshots of the same?

1 Like

void stop(){
digitalWrite(4,LOW);
digitalWrite(7,LOW);
digitalWrite(12,LOW);
digitalWrite(8,LOW);
}
void forward(){
digitalWrite(4,HIGH);
digitalWrite(7,LOW);
digitalWrite(12,HIGH);
digitalWrite(8,LOW);
}
void reverse(){
digitalWrite(4,LOW);
digitalWrite(7,HIGH);
digitalWrite(12,LOW);
digitalWrite(8,HIGH);
}
void left(){
digitalWrite(4,LOW);
digitalWrite(7,HIGH);
digitalWrite(12,HIGH);
digitalWrite(8,LOW);
}
void right(){
digitalWrite(4,HIGH);
digitalWrite(7,LOW);
digitalWrite(12,LOW);
digitalWrite(8,HIGH);
}
void left_forward(){
digitalWrite(4,LOW);
digitalWrite(7,LOW);
digitalWrite(12,HIGH);
digitalWrite(8,LOW);
}
void right_forward(){
digitalWrite(4,HIGH);
digitalWrite(7,LOW);
digitalWrite(12,LOW);
digitalWrite(8,LOW);
}
void left_reverse(){
digitalWrite(4,LOW);
digitalWrite(7,HIGH);
digitalWrite(12,LOW);
digitalWrite(8,LOW);
}
void right_reverse(){
digitalWrite(4,LOW);
digitalWrite(7,LOW);
digitalWrite(12,LOW);
digitalWrite(8,HIGH);
}
void setup() {
pinMode(5,OUTPUT);
pinMode(4,OUTPUT);
pinMode(7,OUTPUT);
pinMode(6,OUTPUT);
pinMode(12,OUTPUT);
pinMode(8,OUTPUT);
digitalWrite(5,HIGH);
digitalWrite(6,HIGH);
}
void loop() {
stop();
delay(5000);
forward();
delay(5000);
reverse();
delay(5000);
left();
delay(5000);
right();
delay(5000);
left_forward();
delay(5000);
right_forward();
delay(5000);
left_reverse();
delay(5000);
right_reverse();
delay(5000);
}

sure I copy paste the code above

What is the specs of the adaptor you are using?

Specs of Adapter is
INPUT:110-240V
f:50/60 Hz
OUTPUT:DC12V
This adapter is given in the kit box that I am using

What is the current rating? I think what is happening is the robot starts drawing too much power for a linear circuit to handle and hence the regulator cannot keep up with the requirements and shuts off power. Is the adapter heating up while the robot is operating?

Is it possible for you to attach a video of what exactly happens?

No sir Adapter is not heating

Hi @ankitkumarmajhi18,

Please place your robot on the box, and connect both the USB cable and the adapter to it at the same time and power both up.

Check if the robot wheels do what they are supposed to do.

Then power down the robot, remove the USB cable, and power the robot back up.

Report back here about what you noticed.

Sir this is the video link:
https://drive.google.com/file/d/1KobNYjWrlYPgYsFyD7IMjngovhSXvf7z/view?usp=sharing

Hi @ankitkumarmajhi18,

Please send this video link to support@boltiot.com using the email id you used to register for the course.

Ask them to have your motors and adapter replaced.

1 Like

Hi @ankitkumarmajhi18,
I am also facing the same problem, when I connect both USB cable and power adapter my robot does what it is programmed to do. But whenever I disconnect USB cable, it performs only reverse function.
If you’ve already solved this problem, please update me how did u do it.

@vinayak.joshi sir, if u can also guide me from here. It’ll be great.

1 Like

@vinayak.joshi sir, I am also facing the same problem.
When I disconnect the USB Cable the robot does not function properly. i.e. only 1 or 2 functions are performed, but with USB cable it works fine.

Please look into this problem. Majority of us are facing this.

1 Like

@vinayak.joshi sir, I had already replaced one of the motors, but still I am facing the same problem.
I think there might be some issue with either the MOTOR DRIVER SHIELD or BOLTDUINO.

Please find the main issue why the robot is doing so as I can’t continue the training and also the replacement takes a lot of time.

1 Like

Add stop and delay of 500 millisecond after each function call and it work properly