ser_send() write error with one servo, other works fine

Hi, all. New to the arduino/electronics. And I do hope that this is the proper forum.

I haven an UNO and a kit. Working through the projects and all has gone well with each one (from vilros).

Now I am trying something on my own, with a different servo. First one, with the kit is an SG90 (very common it seems). Everything works fine. I can compile the sketch/project and upload. It spins just like I want it to.

I picked up another servo, from of all places Radio Shack… it’s a little smaller and I can’t find any good information or reports of its use any where. The model number is 2730765 - its not the parallax from a few years ago. The specs seem very similar, though (4.8-6V, PWM control @ 50Hz).

When I swap the SG90 out for the new servo, I immediately get a warning bell from my laptop. The new servo makes one quick, short turn (going to 0 I guess), then nothing.

I’ve hit the reset button and done a new compile and load. I’ve set verbose output during compile and load ( compile is great - I’ll edit that out of the rest of the post), but I get that ser_send() error.

I can switch the servos out and the SG90 works like a champ.

I’m thinking it’s one or both of a) a bad servo; b) power for the servo is insufficient.

BTW, for the SG90 the light (L) is solid, for the RS servo it’s flashing.

Help/suggestions appreciated!


<compile deleted from post - ominoor>

C:\Program Files\Arduino/hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\jcv\AppData\Local\Temp\build6429504825624982692.tmp/Circuit_08.cpp.hex:i

avrdude: Version 6.0.1, compiled on Jan 15 2015 at 16:58:43

Copyright (c) 2000-2005 Brian Dean,

Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is “C:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf”

Using Port : COM4

Using Programmer : arduino

Overriding Baud Rate : 115200

avrdude: ser_open(): can’t open device “\.\COM4”: The system cannot find the file specified.

Problem uploading to board. See for suggestions.

avrdude done. Thank you.

can you share datasheet of both servo ???

Please connect 1st servo make ensure it working proper.Then again switch servo try .

If you getting error while compile share screen shot. Use quotes tags for posting error.code tags for posting your code.

which are indicate <> code tags next to code tag is quote tag

If you are getting a ding I would suspect you may be drawing two much current to the servo.

Amps-N : there is no compile error, only the upload error that I’ve included. I’ve tried with the working and non-working servo. In each case, the compile succeeds but the upload fails for one not the other.

The servo has very little doc other than

"Control the servo via pulse-width modulation (PWM) wave (50hz). The angle is (counterclockwise) is proportional tot he duty of Logic High."

Then a table of “Duration of Logic High (ms)” to “Angle”. For example:

Duration of Logic High Angle
0.6 0
0.9 30
1.2 60



After all that typing, and adding your comment to my suspicions, I went and found a fresh 9V that I could use. I’ve attached that to the Uno now

Lo’ and Behold… the servo now works as expected! So it is drawing more power than the board can supply when attached to the USB of the laptop or a dedicated USB wall wart. I might try a heavy duty USB power supply (2amp) and see if that makes any difference.

I guess it does make a kind of sense that the ser_send() error would manifest. AND that the “ding” from the computer would indicate a problem…

Thanks to both of you.


No problem, I am pleased it is working!