# Logic level conversion for servos

I'm trying to spy on the state of servo communications with a RC receiver and optionally change the output. Unfortunately my controller is 3.3v while the servo logic is ~5v. I'm trying to figure out what the easiest way of doing this is.

The circuit I've come up with is as follows: reciever -> translator -> mux (translator/controller) -> translator -> servo

Does this make sense and will it maintain a reasonable level of signal integrity?

I know the Ardupilot does something similar but as far as I can tell, the whole device operates on 5v so no logic level shifting is needed

## 2 Answers

I would start off by converting your 3.3V signal to 5V. This can be fairly easy, depending on the input impedance of the servo's control line.

If you have several lines to convert from 3.3V to 5V, I would look for a single-chip solution. For example, the 74HCT244 is an 8-channel buffer with TTL input thresholds. A logic zero is an input voltage less than 0.8V and a logic one is an input voltage greater than 2.1V. This fits nicely with your 3.3V signals.

Note that the level translator chip is powered from the 5V rail.

If you have only a few channels (or only one), one simple method is to use a small N-channel MOSFET and pullup resistor as a non-inverting level shifter. You do this by connecting to MOSFET gate to the 3.3V rail, the source goes to your 3.3V signal, the drain goes to a pullup resistor from the 5V rail. Obviously, the 5V signal comes from the drain.

simulate this circuit – Schematic created using CircuitLab

This is inexpensive and can be very tiny - only two components per channel.

Simplest level shifter is a MOSFET and a resistor. Note that the specific FET is interchangeable, as long as it is N-channel. Also, you may want to lower the value of the 10k resistor, if the PWM frequency into your servo is really high.

simulate this circuit – Schematic created using CircuitLab

• Isn't this the opposite of what is needed? The OP has a 3.3V signal that won't drive his servo because it needs a 5V signal. Also note that this circuit inverts the signal. May 6 '15 at 16:28
• All modern RC servos work fine with 3.3V logic levels. They have to because modern RC receivers use chips that run on 3.0~3.3V. So the answer is:- you don't need any level shifters! May 6 '15 at 18:03
• My bad - I misread the question. Switching the 5V and 3.3V inputs/rails would do the trick. May 6 '15 at 23:15