Maker Pro
Maker Pro

Calculating current limit resistor value

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
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.
Thanks in advance
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
The current will depend on the INPUT state of the receiving device, not the OUTPUT of the PIC doing the transmitting.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
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.
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
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.


show us your circuit and it will be easier to explain
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Ok. I will draw out the schematic for you today. Thanks for your help.
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
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.
Thanks in advance.
Raj
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
I cant seem to upload the file but this is what i have:


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

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
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
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
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.
Thanks in advance.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
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.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
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
 

Rajinder

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