BCN3D / BCN3D-Moveo

Open Source 3D Printed Robotic Arm for educational purposes
MIT License
1.43k stars 471 forks source link

Servo Controll with Marlin and Ramps 1.4 isn't working #27

Open xy23 opened 6 years ago

xy23 commented 6 years ago

Hi Does anyone know how to controll the servo with g Code. Because I connectetd the Servo to the Ramps 1.4 and the command M280 P(0_3) S90 isn't working. I know that the servo is ok, because I cann open it with Command M42 P4 S1, but this command sets the Pinn Value only to high, so i can't controll it exactly and i can't Close it. Has anyone an Idea how to configure Marlin for the Servo to run it with M280 (g code). Or is there any other Command for M42, wich controls the Servo exactly instead of randomly?

I would be very thankfull for an Answer xy23

polumixail commented 5 years ago

Up this question. Get the same problem

xy23 commented 5 years ago

Hello. I have now solved this Problem. I will give you my solution, now the servo is perfectly working.

First you have to power the servo wit an 5V power supply, because the arduino has not enough Current to power the servo. Second you have to show into the Servo.h folder in your arduino ide. In line 97 is the "REFRESH_INTERVAL set to 2000. Change this Value to 4000. Now the servo refresh is a litel bit slower.

If you check the pwm signal with an oziloscope, you will see that the period duration is to short with 2000. So the withe noise disturbes the PWM signal. By 4000 the PWM is long enough that the with noise can't disturbe the ascending edge.

Hope this will help you.

Ps. I am now using repetir host instead of pronterface, becuase it is a lot easier and you cann writte big g code Programms. An explanation for g code is well explaint for especially ramps 1.4 at "reprap.org".

ilimogren commented 4 years ago

Merhaba sorunu nasıl çözdünüz? Bana yardımcı olabilir misiniz?