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.

enter image description here

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

Thanks for any advice :)


I need the level tranlation in both directions!

  • \$\begingroup\$ Can you explain what you mean by level translation in both directions? \$\endgroup\$
    – Andy aka
    May 3, 2017 at 8:28
  • \$\begingroup\$ 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. \$\endgroup\$
    – Hansel
    May 3, 2017 at 8:33
  • \$\begingroup\$ Why don't you convert data to FSK and use phantom power methods for AC coupling data in and out? \$\endgroup\$
    – Andy aka
    May 3, 2017 at 9:02
  • \$\begingroup\$ 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 :( \$\endgroup\$
    – Hansel
    May 3, 2017 at 9:14
  • \$\begingroup\$ First question is..DO you have 15 and 20V rails to play with on your side.. \$\endgroup\$
    – Trevor_G
    May 3, 2017 at 12:33

2 Answers 2


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).

  • \$\begingroup\$ 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? \$\endgroup\$
    – Hansel
    May 30, 2017 at 12:52
  • \$\begingroup\$ 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". \$\endgroup\$
    – Whit3rd
    May 30, 2017 at 20:13

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


simulate this circuit – Schematic created using CircuitLab

  • 1
    \$\begingroup\$ That will produce a 20 volt p-p output. Read the question. \$\endgroup\$
    – Andy aka
    May 3, 2017 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.