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