You need to log in to create posts and topics.

Problems with servos RC simulation?

Page 1 of 2Next

I'm looking at the simulator may not work correctly with more than one RC servo. The same program fragment, in the short version (Prova_servo_simulator_1), operates correctly, and in the longer program, (Prueba_12_26_11_2023_Simulator) it does not do so well.

It is ok?

Thanks in advance

 

 

Uploaded files:

I don't see the problem:
If I add another servo to Prova_servo_simulator_1 it seems to work ok.

Prueba_12_26_11_2023_Simulator seems to be another program and I have no idea how it works and how to reproduce the issue.
But about 1 or 2 servos I don't see any problem.

The following code fragment, executed in the program Prova_servo_simulator_1 works fine, but implemented in the other program does not.

 

canal_9 = pulseIn(8, HIGH, 50000); //Lee posición del canal 9 - movimiento luz búsqueda

if (canal_9 <= 1400) { luz.write (angulo_inicio); }

if (canal_9 > 1400) {

delay (2000);

for (angulo_inicio; angulo< angulo_fin; angulo++){

luz.write(angulo);

delay (50);

}

if ((canal_9 > 1400) && (angulo=angulo_fin)) {

luz.write(angulo_fin);

delay (2000);

}

 

for (angulo_fin; angulo>angulo_inicio; angulo--){

luz.write(angulo);

delay (50);

}

}

 

The following code fragment, executed in the program Prova_servo_simulator_1 works fine, but implemented in the other program does not.

Ok, I see.

The problem is about connecting Servo V+ to Nano Vin Pin.
Just connect 5 V to the servos and don't connect anything to Vin.

Thanks for your answer.
But I see that the program keeps doing strange things.
I have attached a video where you can see it.

Uploaded files:

Where is the ground?

 

Sorry, I deleted it. It still has the same behavior.

Would the assembly be good so that it doesn't cause problems?

Uploaded files:
  • Esquema.jpg

Sorry, I deleted it. It still has the same behavior.

Ok, nice.
About the behavior I don't know what should it do.
If you can explain what is exactly the problem then I can test it.

 

Would the assembly be good so that it doesn't cause problems?

I don't understand, which assembly?

 

 

Would the assembly be good so that it doesn't cause problems?

I don't understand, which assembly?

 

I wanted to say that the ground is well placed in this way.

I attached a video. The servo "servo luz" can't oscile correctly should do it with the full route. They interfere with inputs that shouldn't. The servos in the upper move randomly and don't follow the program.

 

 

 

Uploaded files:

Have a look at the watchdog:

Page 1 of 2Next