Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Drop 12 V sqaure wave to 5 V sqaure wave

Not open for further replies.


Full Member level 5
Aug 29, 2011
Reaction score
Trophy points
Activity points
Hi all

I want to drop a 12 V square wave to 5 V square wave. This 5 V square wave will be fed to PIC18F4620.

I know of clipper circuit , but I need something very simple as I have very limited electronic/electrical resource with me ( only few resistor ) :???:

Is the link below going to work?


Yes a resistor divided can do the job.

An alternative is a resistor in series from 12v to the mcu pin with a Schottky diode (clamping), anode to the pin and cathode to Vcc (5v)

1400 and 1000 yield 5V.

In case you don't have a 1400 (nor do I remember ever seeing one)...

Or in case your resistors are at the cusp of their tolerance range...

Or in case the 12V is a little above or a little below spec...

2200, 1500 yield 4.8 V.

3900, 2700 yield 4.8.

4700, 3300 yield 4.81.

5600, 4700 yield 5.28.

6800, 5600 yield 5.19.

8200, 6800 yield 5.16.

10k, 8200 yield 5.07.

12k, 10k yield 5.05.


There is a 1.4 value in E96 1% tolerance series.

it will definitely work... voltage divider is indeed the most cheap way !!!

You can also use a variable resistor for one of the resistors and adjust the resistance as required.

For example, you can use a 2.2kΩ and 1.57kΩ resistor. Use a 1.2kΩ resistor in series with a 500Ω resistor instead of the 1.57kΩ resistor. Or you can even use a 2kΩ (or thereabouts) variable resistor and adjust its resistance.

Another example. It has been mentioned above by BradtheRad that 1.4kΩ and 1kΩ can be used. So, you can use a 1kΩ resistor in series with a 500Ω variable resistor. You could also use a 2kΩ resistor and adjust its resistance.

Using a variable resistor will allow you to compensate for errors in resistance for both resistors.

Hope this helps.

You can but you will get more than 5v and the zener is not the best solution.
Use either a clamping Schottky diode or the resistor divider

voltage divider
resistor network.PNG
Last edited:

Thanks all for your ideas. Im sticking with a simple voltage divider ( 1kohm and 1.5 kohm ) to give me 4.8 V square wave out.

Ok I have experienced a problem. What I forgot to mention was that the 12V output is coming from an "open drain output". Its acting funny. The voltage divider works fine but when I connect my sensor to the CPU using a rs232 I get a constant 5 V output. When I disconnect the RS232 my output resumes to 5 V square wave.

So firstly im not sure why that is happening. Also please suggest me a way to drop 12v square wave from open drain output to 5v square wave to feed it to a PIC pin.

V=12 R=1K+1.5K = 2.5K I= V/R =.0048 A
V=12 R=15k+22K = 37K I= V/R =0.000325 A

lower resistance waste more power.

Not open for further replies.

Part and Inventory Search

Welcome to