Nano GRBL pen plotter - issues with servo

Hello All,
I'm working on a simple to build A1 format pen plotter, using Nano clone on CNC shield V4 clone. 2xNEMA17 on X axis, 1xNEMA17 on Y axis, SG90 9g servo for pen lifting. Once ready and stable, I will publish it!
CNC shield was fixed according to https://www.instructables.com/Fix-Cloned-Arduino-NANO-CNC-Shield/, with additional trick to disconnect Arduino from Power barrel, so I can use 20v power supply safely.
Arduino is powered via USB cable, together with data transmission.
Basically everything works fine, until...

I struggled with issue, that when printing, at some point (rather sooner than later) the whole thing breaks. I use Universal Gcode Sender, the app shows some errors or no error at all. To issue commands, I need to reconnect, even if UGS shows still as connected. But never mind.

I narrowed it down to the fact, that it happens when servo is physically in use. Works well even is the servo movement are very small. But when servo should rotate >5 degrees, seems like sometimes it drags to much of energy (that's only assumption!).

With that discovery, I tried powering Arduino with USB charger via VIN pin. Cannot tell if that really worked, because my NEMA motors were not moving smoothly, seems like some interference or something?

Then, I tried powering from the charger servo only, while connecting ground to common ground of the whole system. Servo started to buzz, so I gave up.

Honestly, the last 2 checks I did a but on hurry, so I will redo them. But maybe anyone have already some ideas?

I had previously a smaller plotter (with BYJ28 motors), very slow, but there were no such issues. But it was different Nano board, so it will be another test to do, to swap the Nanos...

Please post schematics and datasheet for the servo.

Vin pin needs at least 6.5V, but that's not a solution for you anyway.

This is the correct way to do it, you power all motors from external power supply, Arduino is not PSU.
But your charger needs to be rated for the current your servo draws, Which you didn't tell here. What's the amps rating of your charger? You need at least 1A charger. And make sure you really have common ground between arduino and servo.

@Railroader @kmin Thanks guys for the responses. As I wrote, I will redo the tests (with charge for servo only) to make sure there is really an issue and it was not just a wiring problem.

Just made quick test, powered Arduino externally via VIN using 7V. It got indeed much better, but still got few hiccups.
I will later do a test to power servo directly with >=5V, since I read that they should really get at least 5V, or even better 6V. The buzzing I got using 4.5V from charger could be caused by that. The charger is rated for 2A so it was not an issue with current.

when your servo is connected to arduino +5V then you will get voltage drops and "strange" behaviour.

So I'm back with a good news, indeed connecting servo to 6V directly (and ground common to whole system) does work like a charm. Thanks @kmin

1 Like

@tmztmz I have the same Issu. I bought an external power booster which make my servo 7,4V external. How are you solved the common ground? Could you please give me a hint?

Most likely he used a wire.

@lineworkart just connect ground from external power booster to ground of arduino (or in fact any ground you can easily reach). And ground from servo connect to any ground, since ground is the same for whole system

I got it. I have arduino RAMPS shield which get 12V from external source. I connected my signal pin to Z+ (D11). And it get external 7,4V for high speed operation. And the servo is vibrating while I move freely the X/Y axis. The ground in this case the same because this Voltage booster get's the same 12V with common GND wire. You can see the picture.

@lineworkart on the foto I can only see the power module, not the connections further to servo, so it's hard to tell. Or maybe you have solved your issue already?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.