Moving servo motor itself

Streamable Video

The sensor name is Lora e32-ttl-100 20dc while sending message on the air , servo moves at the same time. I tried to give the servo power's exportly by using the voltage regulator which is 5v. But there is no solution. In that video the servo pull the power from Arduino nano, but as I say there is no problem with the power.But I don't understand why the servo moves itself. Some people says , it's about the library of the servo, they might be using the same cpp things that don't know.So, what do you think ? What can I do to solve this problem ?

Try to see your description from our point of view

I do not understand, do you want me to show you clearly the ciircuit or do you think that I did not explain the situation clearly to you? I just put a video that you can see. I'm sorry if there is a mistake
I'm new at the forum.

A nine second, shaky video?

Are you being serious?

I guess you're using some code. I can't see any. I don't know what Arduino you have or what servo.

Steve

Sorry about that video, you are truly right. Okay, I will show the circuit, and the code also.

#include "LoRa_E32.h"

#include <SoftwareSerial.h>
#include<Servo.h>
Servo servo1;

SoftwareSerial mySerial( 3 , 4 );

/*

Pinler Arduino Nano Lora E32 433T20d

*/

LoRa_E32 e32ttl( & mySerial);

struct Signal {

char type[ 15 ] = "Trying" ;

byte temp[ 4 ];

} data;

void setup () {

Serial.begin ( 9600 );

e32ttl.begin();

delay ( 500 );
servo1.attach(7);

}

void loop () {

ResponseStatus rs = e32ttl.sendFixedMessage( 0 , 44 , 23 , & data, sizeof (Signal));

Serial.println (rs.getResponseDescription());

delay ( 2000 );

}

dummy1

Yeah,might be.

There's no power anywhere in your circuit. USB? From PC? Battery? Something else?

Try powering the servo with 4 x AA batteries NOT from Arduino 5V pin.

If that doesn't do it then Servo.h is known to have problems with SoftwareSerial so try one of the alternatives or perhaps try ServoTimer2.h instead of Servo.h. Or just take the servo out since you don't do anything with it.

Steve

I tried that you said, It has decreased the moving. But still, it's moving.

// this sketch cycles three servos at different rates

#include "LoRa_E32.h"

#include "ServoTimer2.h" // the servo library

#include <SoftwareSerial.h>

// define the pins for the servos

#define rollPin 7

SoftwareSerial mySerial( 3 , 4 );

ServoTimer2 servoRoll; // declare variables for up to eight servos

LoRa_E32 e32ttl( & mySerial);

struct Signal {

char type[ 15 ] = "Trying" ;

byte temp[ 4 ];

} data;

void setup() {

Serial.begin ( 9600 );

servoRoll.attach(rollPin); // attach a pin to the servos and they will start pulsing

e32ttl.begin();

delay ( 500 );

servoRoll.write( 0 );

}

// this function just increments a value until it reaches a maximum

int i= 0 ;

void loop()

{

i=i+ 1 ;

servoRoll.write( 180 );

ResponseStatus rs = e32ttl.sendFixedMessage( 0 , 44 , 23 , & data, sizeof (Signal));

Serial.print(i);

Serial.println (rs.getResponseDescription());

delay ( 2000 );

delay( 10 );

}

So you tried one of the things I suggested. And you're using ServoTimer2 wrong...the write() takes microsecond values like write(1000) to write(2000) NOT angles.

How about the other suggestions? And an answer to how everything is powered.

Everything is powered by Arduino, but I already tried to give power from another source, as I said it doesn't change anything.

Don't power the servo from the Arduino 5V, this is never a good idea, even if it
appears to work, just avoid this and use a suitable power supply for the servo
capable of at least 1A.

Hi,
I believe this is the spec of your Lora Unit, it is not a sensor.

How are you powering your project?
Have you used a DMM to measure the 5V to the servo when the Lora Unit is transmitting?

Can I suggest you resolder your solder joints on the Nano, there are some very dry/incomplete joints by the looks of it.

Tom... :grinning: :+1: :coffee: :australia:
PS. When you supplied the servo with an external suppy, did you connect its gnd to the servo AND Nano gnd?

Eurgh, those solder joints all look dry and blobby. More flux, less solder, set iron to the correct
temp... Careful visual inspection after soldering too is always worth doing - any doubt: rework it.

Oh god, you are absolutely right. Guys, I'm very bad at electronics, there are terrible things that you see here for sure. I ordered an Arduino Mega from the web, I will try on it and write the results here. I hope it will be worked.