12

I have a servo with an operating voltage of 4.8V. I want to drive the servo from a MCU running on 3.3V. I haven't tried it yet, but was wondering if I needed to drive the signal line to 4.8V using a MOSFET or NPN transistor. Is it possible to drive a 4.8V servo using 3.3V signal? Will the performance be impacted?

If I need to drive it with 4.8V how should I connect it? The gate obviously goes to the signal (with the necessary resistance) but how do I connect the servo's signal line? Should I connect the signal line to 4.8V and the ground to the drain? I'm guessing this wouldn't work. Is this even possible?

Ricardo
  • 6,134
  • 19
  • 52
  • 85
Matt Ruwe
  • 1,957
  • 7
  • 23
  • 35

2 Answers2

6

It will probably work with 3.3V as a PWM signal level as long as VCC is at the rated 4.8V. The Vcc label, as opposed to Vdd, suggests TTL level logic where logic high is 2V to Vcc. Just try it with a 3.3V PWM and see what happens. The important thing is to have the servo and microcontroller GND references connected.

Edit: You can also use a nMOS or npn BJT using an inverting configuration. Connect the gate/base to the MCU PWM pin, the source/emitter to ground. The drain/collector is the output and must also be connected to V+ through a resistor. When the transistor is on, the output is pulled to ground. When the transistor is off, the output is at V+, minus the voltage drop across the resistor. Since this is a control signal and the current small, that voltage drop will be insignificant.

Note that in order to use a pMOS to avoid the inversion, you would have to pull its gate to V+ to stop current flow. However, since your PWM from the MCU is only 3.3V you won't be able to do that. You are thus limited to using a n-channel MOSFET.

Evan
  • 923
  • 5
  • 9
  • I will give it a try, but I'm curious, is it even possible to drive the signal from a MOSEFT? – Matt Ruwe Jul 09 '14 at 00:05
  • @Matt, there is no need, but you could. Take a P-channel mosfet and drive the gate with your MCU (N-channel would invert the signal), ground the drain, and connect the source to Vcc through a resistor. Then take the output from the source terminal. The signal line is just a control line and all current consumption is drawn from Vcc, not the signal. Servos typically drawn large spikes of current as they move which would most certainly burn the output drivers of your MCU. – sherrellbc Jul 09 '14 at 00:51
  • @Evan I have a similar issue right now. Do I understand the answer correctly 1.that that if thee VCC is 4.8V and not 6V it the PWM signal will work? 2. The ground pin of the servo has to be attached to gnd of microcontroller? – Sathees Aug 13 '15 at 10:30
  • @Sathees the context of this answer is a PWM controlled servo rated at 4.8V. If your servo is rated at 6V, then that should be the Vcc, unless you are deliberately trying to limit the maximum voltage on the leads of the servo or you are level shifting voltages at some point in the circuit or there is something else happening in your circuit. Note that although similarities may exist between the original question and your case, the details are important. If you think your case is not the same, I would suggest posting a new question with as much information you think may be relevant. – Evan Aug 13 '15 at 14:29
  • @Evan well I just posted a questio http://electronics.stackexchange.com/questions/185534/run-a-servo-nimh-battery-vs-alcaline-batteries where I decided to make use of a 4.8V battery to run servo that might work with 4.8/6V ....so therefore I see the question to be similar...and wanted to ensure that the PWM signal coming frm 3.3 V microcontroller will be fine – Sathees Aug 13 '15 at 14:53
2

Depending on what microcontroller you're using for PWM they often have the ability to set the output pin as open drain so you can take you PWM signal and have it set as any voltage you want

Edwin Fairchild
  • 871
  • 13
  • 22
  • 2
    What about the protection diodes? they do turn on at some point. What about absolute maximum ratings? – Voltage Spike Feb 15 '17 at 06:19
  • Indeed, this would *only* be workable for an MCU rated to allow the output voltage to be higher than the relevant I/O bank supply, aka a "5v tolerant" pin. Otherwise, for an ordinary I/O not rated for overvoltage it's possibly that whatever pullup resistor you use may be large enough to limit the current to what the protection diode can safely tolerate **but that diode will limit the voltage to a diode drop above the rail** meaning the goal would be only partially achieved. – Chris Stratton Feb 15 '17 at 07:16
  • 1
    The 'goal' is unnecessary because all modern rc receivers output 3.0~3.3V pulses, so any servo sold today _has_ to work at this voltage. – Bruce Abbott Feb 15 '17 at 09:19