Voltage Divider for Arduino Uno Digital Input

Hello! This is my first project using Arduino. So, I have a square wave signal with Vmax=6 volt and Vmin=0 volt. This voltage then goes to a voltage divider to reduce the voltage below 5 volt since from what i know, 5 volt is the maximum for Arduino. This voltage then goes to Arduino uno digital input in which then I use pulsein function to measure both HIGH+LOW time, which result should be the signal period. I currently have 2 circuit that I want to use which is the picture below. Most voltage divider use voltage follower to prevent collapse when the load is low impedance, which in this case would make R3 and R4 low and there will be little to no voltage at the output. But from what I have read, the digital input pin has high impedance, so there should be no need for the buffer right? I just don't understand what the purpose of this OP AMP on the right circuit is (the right circuit is from another people project, but they don't explain what it does). Can someone explain to me what is the purpose of this OP AMP? Is it to reduce noise? Thank you

Correct. You don't need the voltage follower with a digital input.

If the voltage source is low impedance, you can use a lower total resistance in the voltage divider. 1K for R1 and 5K for R2 will work to reduce 6V to 5V.

Thank you, in this case the source impedance I use is around 150k Ohm

If the source impedance is that high, the voltage divider you showed in the OP will load down the source and give very erroneous results.

You need to rethink the project.

Could you explain it more? I don't quite get it. Should I buffer the source instead to make it low impedance?

The source impedance is part of the voltage divider (adds to R1).

Look up Thevenin equivalent circuits.

Why not tell forum members what you actually have, and what you are actually trying to do?

Thank you, I'll look it up. And I solved the high impedance problem using UA741 to make it low impedance, and then it goes to voltage divider. Measuring the signal period and frequency using Arduino is what I'm actually trying to do, then show that measurement in LCD 16x2. But I haven't figure it out how to use LCD 16x2 yet

Where / what does the 6V signal come from?

From oscilloscope

You mean a signal generator? What is it's output impedance?

Yes, it has signal generator feature. I honestly don't know the output impedance is, i think I've read it somewhere it's 150k ohm or maybe i misremembered and that 150k was the probe impedance

Check by using a resistor as a load. If the voltage across the resistor is half of the generator open circuit voltage, the resistor value equals the generator impedance.

M. Thevenin explained why.

1 Like

That would be right, don't use the probe to supply the signal from the generator.

What is your scope?

Thanks.. Tom. :smiley: :+1: :coffee: :australia:

Hello Tom, Its not mine, but its fnirsi dso153

Will do🫡

The manual is available here - you'll need to search for 'DSO-153'.

Fnirsi don't quote the output impedance of the signal generator, but they say the amplitude is 3.3V.

Output impedance is likely to be low - maybe 50Ω.

1 Like

this is nonsense. All you need is a series resistor (say 10k) to protect the digital input from excess current. It also wont be affected adversely if the source is moderately high impedance.
If the voltage source was unpredictable you might need to add protection diodes.

I doubt that, unless you have seperate supplies as (partly) shown in your figure - note the centre point of the 9V batteries should be grounded. But using a 741 is silly.

1 Like

So i just swap the the op amp on the right cricuit into 10k ohm resistor then?

left circuit delete r2

You need a voltage divider.
Never apply a voltage higher than 5V to any Uno pin, you may damage the Uno.

Is the actual amplitude 6.0V or 6.6V?