1
\$\begingroup\$

I (theoretical physicist, all the basic theory, no further electrical engineering background) am just diving into Arduino and I have a very basic question:

I am playing with a Zilog ePIR motion detector (https://www.sparkfun.com/products/9587) in hardware mode. I would like to use a fixed resistor to supply a voltage of, say 0.2V to Pin 3 (DLY), to set a delay for the motion detection switch-off (the whole thing runs on 3.3V). From Kirchhoff's voltage law I would think that I need the internal resistance of the module to calculate a ratio with the series resistor. I am getting R = R_Module*(3.3V-0.2V)/0.2V. However: I don't know any internal resistance, nor can I measure any between GND and DLY. How do I calculate the needed resistor? Am I thinking totally wrong?

I am using the circuit from http://macherzin.net/article17-Arduino-Sensoren-Infrarot-ePIR Bonus question: How did the author know that he needs an 80 Ohm resistor if he connects the module to 5V?

\$\endgroup\$
  • \$\begingroup\$ Thanks to all, high impedance is indeed something that is not common in Physics courses, so I really missed that. Well learned something today :) \$\endgroup\$ – mcandril Aug 6 '12 at 20:40
1
\$\begingroup\$

If you read the section regarding DLY in the datasheet for your sensor you'll see that it suggests using a simple resistive divider to set the delay. Normally, you want to drive your ADC with a low output impedance compared to your ADC's input impedance. Your resistive dividers output impedance would be R1 || R2 (assuming your voltage source is perfect with no output impedance) - so approximately 580 Ω for the circuit below - this should be OK.

But let's suppose you want to set the delay to 15 min - which corresponds to 1.8V from the datasheet. To drop 1.8 V with the divider, R2 would have to be around 5.6 kΩ. The output impedance would then be 3.5 kΩ. This might cause problems if your ADC's input impedance is just 10 kΩ.

But since the datasheet suggests a resistive divider is OK and also states that the input impedance is high, I think you'll be OK with the following (don't quote me on this, though!)

This means something like this: enter image description here

R2 will drop a voltage of 0.2 V across it. Rest of the voltage (3.3 - 0.2) will be dropped on R1. If your input voltage is 5V instead of 3.3, R2 will have to be around 400 Ohms.

If you do have issues due to the output impedance you can buffer the output of the voltage divider with a unity gain buffer. A unity gain buffer has a very low output impedance and should drive your ADC very well.

\$\endgroup\$
  • \$\begingroup\$ Thanks! Another small question: Do I want to connect DLY to GND if I want to achive 0V? (Probably using a pulldown resistor then?) \$\endgroup\$ – mcandril Aug 6 '12 at 20:50
  • \$\begingroup\$ @mcandril yes, I believe so. \$\endgroup\$ – Saad Aug 6 '12 at 21:04
  • \$\begingroup\$ @mcandril You can connect it directly. I don't think you will need a pulldown. \$\endgroup\$ – Saad Aug 6 '12 at 21:11
1
\$\begingroup\$

As you correctly figured out, using a single series resistor to drop voltage requires knowing the resistance of the input it will be driving. Not only that, it requires that resistance to be fairly constant. You generally don't know or can't rely on either of those things.

Somewhere there should be a spec for input resistance of the pin you are trying to drive. Sometimes that is defined in terms of maximum leakage current instead of a resistance. In either case, that is usually only a minimum resistance (or maximum leakage current).

You need to add a second resistor to ground to form a voltage divider, with the output impedance of the divider being significantly less than the minimum resistance of the input so that the input resistance doesn't matter. For example, let's say you have a 0-5 V digital output. If you put 1 kΩ in series with that followed by 2 kΩ to ground, the output will be 0-3.33 V unloaded. Converting this to a Thevenin equivalent voltage source, you have a 3.33 V source with a impedance of 1kΩ//2kΩ = 667 Ω. As long as the effective resistance of whatever this divider is driving is significantly more (like 10 kΩ) than the 667 Ω, the voltage will be predictable and about 0 to 3.3 V.

\$\endgroup\$
1
\$\begingroup\$

If you look at the datasheet for the module you can see that the pin 3 of the device is considered high impedence:

pin 3 high impedance description

This means that you can assume that very little current will enter this pin (ie, a high resistance in the pin).

To achieve the voltage you desire of 0.2 V on the pin, just create a simple voltage divider circuit with resistors:

simple resistor divider

Again, since the datasheet says the pin is high impedance, you can assume no appreciable amount of current will flow into it. Using the mighty Kirchhoff you can now get some approximate resistance values to achieve the voltage division you need.

Vo= Vin*R2/(R1+R2)

Choose a value of R1 or R2 that you have on hand, and see if you have another resistor for the remaining one that will closely give the desired voltage.

\$\endgroup\$
  • \$\begingroup\$ Vo = Vin*R2/R1+R2 \$\endgroup\$ – EM Fields May 26 '14 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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