0

I am currently trying to control a simple servo motor using PWM generated by a MCU with a 3.3V output voltage.

However, this servo works with 5V, so I need an IC capable of "converting a 3.3V PWM to 5V". My question is: What are the pros/cons of level shifting an ouput between the 3 methods:

  1. using a MOSFET
  2. using an optocoupler
  3. using a simple 4.7k pull-up to 5V with output of the MCU being open drain.

Many thanks,

Duarte

ocrdu
  • 8,705
  • 21
  • 30
  • 42
  • 1) Do you mean FET as level shifting pass gate? 2) What kind of optocoupler, with what kind of output stage you mean? It would also depend on what kind of input signal the servo expects. Which servo is it? – Justme Jan 12 '21 at 11:30
  • 2
    Some hobby servos will work reliably with a 3.3V PWM signal, even when fed with a 5V or higher power supply; I would check first if yours does. Also see https://electronics.stackexchange.com/questions/118390/drive-a-4-8v-servo-signal-line-using-3-3v – ocrdu Jan 12 '21 at 11:50
  • Does this answer your question? [Drive a 4.8V servo signal line using 3.3V](https://electronics.stackexchange.com/questions/118390/drive-a-4-8v-servo-signal-line-using-3-3v) – ocrdu Jan 13 '21 at 00:49

1 Answers1

2

To answer your specific questions for this task:

  1. MOSFET - Pros: None Cons: High gate capacitance could lead to low switching speeds.
  2. Optocoupler - Pros: Electrical isolation Cons: Multiple components
  3. 4.7k Pull Up - Pros: Low cost and easy Cons: Only applicable if MCU has 5V tolerant inputs

You could also try option number 4: Use a discrete logic IC for voltage level translation e.g. NC7WZ17 - Pros: Low cost and easy Cons: None

Stefan Wyss
  • 6,471
  • 1
  • 11
  • 22