Controlling a servo DIRECTLY from USB

Hello everyone! This is my first post on these forum. Just recently, I found out about arduino. I'm not an electronics expert. The only experience in electronics I know is that equivalent to A / level standard. My question is about controlling servos. From what I've read, a servo required signals of specific frequency to be send to it in order to know which position to maintain. (i.e Pulse width modulation). My question is about why the Arduino must be used as an intermediate device between the PC USB port and the motor. If the arduino is capable of producing the required signals, shouldn't a PC processor also be able to send those same signals directly from the USB port to the Servo ? Thanks.

  1. The USB port can't provide enough current.
  2. Unless you write your own hardware drivers (which need to be rewritten for every computer), you can't actually manipulate the data lines independently on the USB port.
  3. You can get at most 2 servos.
  4. It's a LOT easier to use an Arduino than to write the customized software.
  5. low-level PC programming is somewhat painful.

tl; dr: It's theoretically possible but not worth the effort of saving $10 in parts, and it has some significant restrictions.

Thanks for the info.
@KE7GKP Could you please clarify on point number 2?

Could you please clarify on point number 2?

Google is your friend on broad complex technical questions.

From what I've read, a servo required signals of specific frequency to be send to it in order to know which position to maintain. (i.e Pulse width modulation).

The Arduino produces PWM signals at close to 500Hz, whereas R/C servos require PPM at 50Hz.

Some servos may work with appropriate low duty-cycle PWM at 500Hz, but it may damage the servo and may run at much higher current consumption than it would at the correct frequency.

mahela007: Hello everyone! This is my first post on these forum. Just recently, I found out about arduino. I'm not an electronics expert. The only experience in electronics I know is that equivalent to A / level standard. My question is about controlling servos. From what I've read, a servo required signals of specific frequency to be send to it in order to know which position to maintain. (i.e Pulse width modulation). My question is about why the Arduino must be used as an intermediate device between the PC USB port and the motor. If the arduino is capable of producing the required signals, shouldn't a PC processor also be able to send those same signals directly from the USB port to the Servo ? Thanks.

No. USB is an entirely different beast. You could possibly bit-bang the serial port on your PC (if it even has one) and then make the PWM signal for a servo, but it would be VERY processor intensive, and the PC would grind to a halt, not to mention, if the PC does something just for a moment, the servo would jerk all over the place if the PSM signal isn't steady.

USB is not controlled by the operating system on your PC. The USB controller resides in the chipset, and you control USB by writing registers with data, and reading them again. USB works on the LVDS principle (Low Voltage Differential Signaling) This means that when Data+ goes high, Data- goes low, and vice versa. Using this system eliminates quite a lot of electrical noise, and that is what makes USB work over longer distances and still keeping the speed up. Ethernet works on sort of the same principle.

The problem is, you cannot control the DATA+ and DATA- pins in the USB plug independently, the controller only supports sending data packages over the USB link. not bit-banging like you can on the serial port.

// Per.

Thanks for the info Zapro .. that was very useful.

KE7GKP: Perhaps if you tell us what you are trying to do, it will be more helpful than abstract questions.

I'm trying to think of a way to control a Servo from the PC by sending the required pulse width modulaiton signals DIRECTLY

by sending the required pulse width modulaiton signals DIRECTLY

sp. "by sending the required pulse position modulation signals DIRECTLY"

Have you thought of using a good old-fashioned parallel printer port? (do they fit those any more?)

Ok.. now I get it. Thanks for all the help.