View the thread, titled "how would i calculate resistance using Vcc, input impedance and logic-high threshold?" which is posted in UK Electrical Forum on Electricians Forums.

1615840821216.png
 
Generally, unless you are really wringing every last microwatt out of something, it's very non critical.
Draw yourself a resistor (call it R2) alongside S1 and imagine the input is "infinite" impedance. You've then got a simple voltage divider which you can solve given that you know 3 of the 4 variables : you know the voltage you need at D1, you know R2 value (controller input impedance), and you know the voltage at the top of the divider.
So lets say that R2 is 1k, minimum voltage for logic high is 2V. So 2V across 1K means 1mA through R2. If Vcc is 5V then you have 2mA through R1 needing to drop 3V, so 1.5k.
Or you can do it as R1/R2 = (Vcc-Vin)/Vin, or R1/1k = 3V/2V, or R1=1k * 3/2
In practice you'd never work it so close as that, it would be prone to noise etc - especially when you start talking high impedance inputs and calculate R1 to be in megs rather than k.
 
Generally, unless you are really wringing every last microwatt out of something, it's very non critical.
Draw yourself a resistor (call it R2) alongside S1 and imagine the input is "infinite" impedance. You've then got a simple voltage divider which you can solve given that you know 3 of the 4 variables : you know the voltage you need at D1, you know R2 value (controller input impedance), and you know the voltage at the top of the divider.
So lets say that R2 is 1k, minimum voltage for logic high is 2V. So 2V across 1K means 1mA through R2. If Vcc is 5V then you have 2mA through R1 needing to drop 3V, so 1.5k.
Or you can do it as R1/R2 = (Vcc-Vin)/Vin, or R1/1k = 3V/2V, or R1=1k * 3/2
In practice you'd never work it so close as that, it would be prone to noise etc - especially when you start talking high impedance inputs and calculate R1 to be in megs rather than k.
sorry i dont understand how you got 1mA as wouldn't you get 2mA (2v/1k) i.e. ohms law?
 

Reply to the thread, titled "how would i calculate resistance using Vcc, input impedance and logic-high threshold?" which is posted in UK Electrical Forum on Electricians Forums.

OFFICIAL SPONSORS

Electrical Goods - Electrical Tools - Brand Names Electrician Courses Green Electrical Goods PCB Way Electrical Goods - Electrical Tools - Brand Names Pushfit Wire Connectors Electric Underfloor Heating Electrician Courses
These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then CLICK HERE and post a thread with who you are, and we'll send you some stats etc

Daily, weekly or monthly email

Back
Top