# Calculating current limit resistor value

Discussion in 'General Electronics Discussion' started by Rajinder, Nov 13, 2018.

1. ### Rajinder

526
9
Jan 30, 2016
Hi
I have a 33R resistor and a 39pF cap to 0V. Note: First it is the 39pF connected the PIC I/O then to 0V. The 33R is then from the capacitor to a 3 pin header.
The 33R is connected to the TX line of a PIC. I think the PIC can sink or source upto 25mA.
If the output of the TX line was VIH ie. Typically 0.8VDD, then at 3V power to the PIC this would be 0.8x3=2.4V
To restrict the current to say 2mA
R=V/I = 2.4V / 2mA = 1.2K. Does that seem correct.
Also is it advisable to connect an internal weak pull up to one side of the 33R to VDD internally.

2. ### kellys_eye

4,275
1,147
Jun 25, 2010
The current will depend on the INPUT state of the receiving device, not the OUTPUT of the PIC doing the transmitting.

3. ### Rajinder

526
9
Jan 30, 2016
Hi
Please could you elaborate with the example above? Do you mean it will be different when the I/O lineis either teceivjng or transmittibg.

4. ### davennModerator

13,799
1,940
Sep 5, 2009

show us your circuit and it will be easier to explain

5. ### Rajinder

526
9
Jan 30, 2016
Ok. I will draw out the schematic for you today. Thanks for your help.

6. ### Rajinder

526
9
Jan 30, 2016
Hi
Here is a schematic showing only the TX line. The RX line is the same. They both go to the connector on the right hand side which is used to read data from a unit.
Do i need an internal pull up? The PIC can source or sink 25mA, i want to adjust the value of R1 to limit well below this current.
Look forward to hearing from you.
Raj

7. ### Rajinder

526
9
Jan 30, 2016
I cant seem to upload the file but this is what i have:

PIC ---TX-----------------------33R resistor-----------
|
|
-------
------- 39pF
|
|
----- 0V

8. ### BobK

7,682
1,688
Jan 5, 2010
You do not need either the capacitor or the resistor.

If you are trying to protect against a short, 33 Ohms is not gping to do it, it would allow nearly 1 Amp of current. 3.3K would be more like it.

Bob

9. ### Rajinder

526
9
Jan 30, 2016
Hi Bob
Thanks. Is there away to calculate this properly? I thought it would be R= 0.8VDD/ 2mA = 1.2K. Is that wrong? Also do i need an internal weak pull up on the PIC? I do not know what the point is by having it.

10. ### kellys_eye

4,275
1,147
Jun 25, 2010
The PICs ability to sink/source 25mA doesn't mean it WILL sink/source that current. The current that flows depends on either the load (connected to a port configured as an output) or the current that a port (configured as an input) draws from the source.

If you are connecting PIC-to-PIC to perform some serial data transfer then you don't need any limiting resistors.

11. ### BobK

7,682
1,688
Jan 5, 2010
Why don’t you tell us what you are trying to connect the output to and what you are trying to protect against? As @kellys_eye and I have already said, if you are connecting to an input, no current limiting is needed,

Bob

12. ### Rajinder

526
9
Jan 30, 2016
Hi Bob
Connecting the unit to a PC via FTDI lead, so we can download information from the units EEPROM.
Thanks.

13. ### kellys_eye

4,275
1,147
Jun 25, 2010
No current limiting required.