# Translate low logic level to higher voltage range

I need to shift a digital signal from an MCU to a higher voltage range. The MCU outputs 0-5V and I need to give this Signal inverted to a higher voltage rail.

In the picture you can see what I try to achieve. The blue graph is the output of the MCU. The yellow graph is the Output I would like to generate. Here the HIGH Signal is 20V and the LOW Signal is 15V.

The voltages given are 0V(gnd), 5V and 20V.

I thought of using a opamp to shift the Signal to a higher voltage but I am confused on how to generate the 15V I need

EDIT

I need the level tranlation in both directions!

• Can you explain what you mean by level translation in both directions? May 3, 2017 at 8:28
• On the 15-20V Rail the digital data is sent in bi-directional. So I need to be able to receive data with the MCU and also send data via the MCU. For receiving data I was thinking of a Z-Diode in series blocking direction (e.g. ZPD12) and a simple resistor voltage divider or even use a ZPD15. May 3, 2017 at 8:33
• Why don't you convert data to FSK and use phantom power methods for AC coupling data in and out? May 3, 2017 at 9:02
• The 15-20V data Rail is from an existing System. I would like to connect a MCU to control the System with my own Software. I need to stick to the given conditions. Unfortunately there is no chance to use FSK and AC coupling :( May 3, 2017 at 9:14
• First question is..DO you have 15 and 20V rails to play with on your side.. May 3, 2017 at 12:33

Use a transistor as level shifter, as:

simulate this circuit – Schematic created using CircuitLab

Transition from higher voltage level to lower uses a PNP transistor in similar fashion (and there are other variants, that allow a level translation without signal inversion).

• How would I do it if I don`t have 20V as supply? When I only have a MCU Signal from 0-5V and the dataline of the other system that is on 20V when Idling and I want to drop the voltage by 5V to 15V so that get a binary signal between 15V and 20V? May 30, 2017 at 12:52
• Without a 20V supply, the problem can be solved with a battery in series with the output signal. Or, you can utilize the 'when idling' 20V as your power supply, IF you know the impedance of that 20V "source". Really, the above schematic uses 20V with 2.3k ohms in series as the "source". May 30, 2017 at 20:13

use a simple npn BJT in an inverting circuit like so:

simulate this circuit – Schematic created using CircuitLab

• That will produce a 20 volt p-p output. Read the question. May 3, 2017 at 8:26