Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

servo with quadrature encoder with duino board

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO
View previous topic :: View next topic  
Author Message
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 43

PostPosted: Mon Nov 19, 2018 7:05 pm    Post subject: servo with quadrature encoder with duino board Reply with quote

Hello

it is not strictly to Bascom although code was written in Bascom. I ask because maybe someone had similar issue? Below short description:
Some time ago have bought from China small servo with quadrature encoder on the rear side. Encoder is powered with 5 VDC. When I connected:
- pins (channel A and B) from this encoder to the pins (2,3) of Arduino Uno
- Arduino Uno pin 5v to encoder's Vcc
- Arduino Uno pin GND to encoder's GND
and manually rotate this servomotor my program counts encoder ok. By manually rotating I understand that servo is not connected to the power (30 VDC), so it can be rotated in a hand. By saying ok I mean it counts in left direction and right direction and gives correct values.
The problem starts when I connect power (30VDC) to the servomotor and rotate it with a generated signals setp/dir. Servo rotates ok (left,right dir) but while reading encoder I get chaotic values. It doesn't matter in which direction I rotate the servo. I get in serial monitor chaotic values. Encoder is conneted to the Arduino pins 2 and 3 without capacitors. Maybe should I use some?
When I connected encoder from Lika.com (l-41) or Agilent (previously HP) then I got correct values as well. So reading encoders without powering servomotor is ok. Something is disrupting signals from encoder during powered servomotor. How to avoid it?

servo controller :
https://www.alibaba.com/product-detail/M545-2-phase-Stepper-motor-driver_1713657055.html

Maybe someone had something similar?

Regards,
Martin
Back to top
View user's profile
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 43

PostPosted: Tue Nov 20, 2018 2:27 pm    Post subject: Reply with quote

Thread to close. Simply have changed servo controller to dedicated one and problems disappeared.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum