Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

Voltage divider question

Status
Not open for further replies.

xmen_xwk

Full Member level 3
Joined
Sep 12, 2014
Messages
172
Helped
2
Reputation
4
Reaction score
2
Trophy points
18
Activity points
1,373
I have following voltage divider in which I want to sink its voltage down to nearly 0 directly from arduino uno 5V GPIO. But I have few questions.
If I set pin mode to OUTPUT and pin to LOW, it will sink all the divided voltage(4.857v) and max current will be 1.2mA. Right ? but will that be problem to uC because R1 is pulled high by 12v.

Also if I set pin to HIGH, what would happen ?


gpio.png
 
Last edited:

Hi,

but will that be problem to uC because R1 is pulled high by 12v.
Why do you think this could cause a problem?
The controller datasheet specifies allowed pin voltage range. Does your circuit somehow violate it?
The controller datasheet specifies allowed pin current range. Does your circuit somehow violate it?

Also if I set pin to HIGH, what would happen ?
Tell us: What do you expect?
 

Hi,


Why do you think this could cause a problem?
The controller datasheet specifies allowed pin voltage range. Does your circuit somehow violate it?
The controller datasheet specifies allowed pin current range. Does your circuit somehow violate it?


Tell us: What do you expect?

If I knew the answers I wouldn't have asked :)
 

Also if I set pin to HIGH, what would happen...

Is that such a difficult problem?

If the output point (OUT) is in high-impedance mode, the voltage will be 4.9V (the voltage set by the voltage divider)

If the output point is set to 5V, the pin must supply some current (in real life, the default value is 5V and very little has to be done)

If the output point is set to 0V, the pin must sink 1.2mA (this is possibly a bit high and you should increase the R1 and R2 values)

Perhaps I do not follow the real question!!
 

Is that such a difficult problem?
I do not understand why you guys are being rude just because I asked this question. Maybe its nothing for you, but since I didnt know I asked. Also its in elementary section of forum, so I believe it should be okay.

Thank you for all your help.
 

I do not understand why you guys are being rude ...

I did not realize that I am being rude: sincere apologies. I am still teaching students and that is perhaps the reason (for a hammer, everything appears to be a nail)- but perhaps that is not the reason.

You have already calculated correctly (the voltages and the currents) but still asked the question. To me, it appeared to be case of lack of confidence (I am being honest and not rude).

If the pin can drive a LED then perhaps it can source or sink 1 mA without fuss. But sometimes the pin can source current but cannot sink (an equal amount) but that is the reason you should check with specs.
 
You have already calculated correctly (the voltages and the currents) but still asked the question. To me, it appeared to be case of lack of confidence (I am being honest and not rude).
The reason I asked because lately what I've been calculating turning out not to be very correct. Since I do not have much electronics knowledge, even little things can be confusing. So I asked here to be sure that I'm not mistaken.

Thank you and sorry if I made you feel bad.
 

Hi,

If I knew the answers I wouldn't have asked :)
Nobody is rude.
But either one of us or you need to read the datasheet and compare it with the given values.

I expect that there will be no problem. But an expectation means I don't know for sure.
And with the same meaning I asked for your expectation.

When I design a new circuit and do some tests on the circuit....I first consider my expectation, and then do the test.
If then the test results doesn't match my expectations I need to decide where the mistake lies.
If I do the tests without prior expectations, then there is the chance that I don't verify the results and I don't find out if there was a measurement error.

Klaus
 

I expect that there will be no problem. But an expectation means I don't know for sure.
And with the same meaning I asked for your expectation.

Okay let me clearify more, I want to create a 5V output for logic operations using 12V, I do not want to use uC to create 5v, but I want to use uC to sink the created voltage by 12V. Since my knowledge is limited in electronics, I had doubt I would be feeding 12V to uC by sinking but I also thought some current would flow through R2. And if uC can sink, I thought what would happen if by mistake in software/code, the uC start sourcing current, maybe it would be push pull fight between 2 different voltages. It was a bit confusing for me, however before reading 100s pages of datasheet I thought its better to ask the experts. Which I did.
 

Simple answer -

When your GPIO is LOW, output will be low. No problems. Your uC will sink the current.
When your GPIO is high, output will be high (upto 4.857v) , but ONLY if your load sinks MUCH less than 1.2mA.
However this depends on your uC's output port configuration. If it can source, then higher loads can be supported.
Since I see you are using Arduino, which implies AVR chips, then these can source around 20mA at least (within some limits). So it should be fine.

So the final question is - what is the load on this output ?
 
Last edited:

Hi,

It was a bit confusing for me, however before reading 100s pages of datasheet I thought its better to ask the experts.
No need to read 100 pages.
Each datasheet contains a section called "electrical specifications".
The "Absolute maximum specifications" usually is smaller than one page.
There you will find max pin voltages and currents.

Klaus
 

Arduino UNO can easily handle 20 mA current. Check this single page guide on their website: http://store.arduino.cc/usa/arduino-uno-rev3

As far as I know the internal resistance of Arduino is approximately 10 Mohms, so 0.486 uA current will be flowing in this case. I have not worked with Arduino for a long time. However I did the calculations from this voltage divider calculator by using R1 = 10k, R2 = 6.8k, Vin = 12 V, Rl = 12 Mohm. Hopefully it helps you. Sorry if I did any mistake.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top