Current Limiting Resistor

Status
Not open for further replies.
I have my boards already. Just need to crank up the soldering iron.

The interfacing of the TM1637 and TM1638 are different. TM1637 uses a quasi-I2C protocol, while the TM1638 uses an SPI protocol. The commands are (mostly?) the same, but the mechanism to send them is different.

Also note: some of the TM1637 modules use much larger filter caps on the data lines than the datasheet suggests, therefore requiring much slower transmission speeds. Thanks to tumbleweed for figuring that out!
 
Nigel Goodwin & danadak Thank you, this is some good information!

My next question is with using PNP transistors to switch relays, is the MCU (PIC18F47K42) wpu strong enough or do I need to add a pullup resistor?
 
Nigel Goodwin & danadak Thank you, this is some good information!

My next question is with using PNP transistors to switch relays, is the MCU (PIC18F47K42) wpu strong enough or do I need to add a pullup resistor?
Since the week pull-ups are software controlled, they won't be active until the uC wakes up and executes it's setup sequence. A physical pull-up resistor is important to prevent glitches during initial power up.

As for the actual transistors, they are available with internal bias transistors. See https://www.rohm.com/products/faq-search/faqId/234

They are available from many manufacturers, in different configurations and resistor values.
Single, pre-biased transistors
Pre-biased transistor arrays
 
Last edited:
Nigel Goodwin & danadak Thank you, this is some good information!

My next question is with using PNP transistors to switch relays, is the MCU (PIC18F47K42) wpu strong enough or do I need to add a pullup resistor?

Why are you wanting to use PNP's?, it's usual to use an NPN and switch the low end of the relay - as in my tutorial page I linked to. Failing that I'm rather confused what you're actually asking?, perhaps post a schematic?.

Don't get too carried away by Danadak's usual method of complicating anything - he's not 'wrong', the suggested resistors have their uses, but the vast majority of the time they aren't required. The small diagrams on that tutorial page are deliberately as simple as possible, and 100% fully functional.
 

Yes complicating a design with 1 additional resistor is a terrible act of complication (TAC for short) :






Of course if safety concerns not an issue, or resistors become so precious no one can afford them,
or one simply does not care in a micro design that full 100% control is achieved over peripherals
like motors, hydraulic presses, rockets, escalators, nuclear controls, heart pump .......one can omit
the incredibly complicating solution solving single resistor.


Dana.
 
Nigel Goodwin it isn't you who is confused it is me. I am using NPN and configuring the GPIO as an open drain and sinking the base. Having said that is the wpu sufficient or do I need a pullup resistor.

Post a schematic - so we can see what you're trying to do - if it's the same as one from my tutorials, then tell us which one.

One of my tutorial circuits even shows a relay - what's wrong with that one?.
 
Thank you ALL for your input!

After a lot of reading and research I came up with the following in my design:



I change the transistors to PNP type and added the pull-up resistors.



For the relay as you can see, I sank the coil with a NPN transistor and added a pull-down resistor on the base.

Nigel Goodwin thank you for the tutorial, it was very informative.

Here is another article that I found to be very informative: How to Operate a Transistor as a Switch
 
Last edited:
You've missed out the far more important resistor from the I/O pin to the base of the transistor, the pull-down resistor is optional (and hardly ever required), but the series one (as shown in my tutorials is important, and should always be fitted).
 
You've missed out the far more important resistor from the I/O pin to the base of the transistor, the pull-down resistor is optional (and hardly ever required), but the series one (as shown in my tutorials is important, and should always be fitted).

Nigel Goodwin I went back and looked at your tutorial and indeed I did forget them. Thank you for pointing that out!

 
Last edited:
It doesn't matter 'that much', but the pullup/down resistor would normally be directly between base and emitter, and not directly on the I/O pin.
 
I hesitate to even post this since my previous comments have been ignored....

I happened to notice at the edge of your schematic 0.1uF and 10uF bypass caps connected between pins 8 and 19 and ground. Pins 8 and 19 are also shown connected to +5v. Pins 8 and 19 are Vss, which is GROUND. There goes the magic smoke!

Pin 20 is Vdd = +5v supply

Pins 8 & 19 are Vss = ground

You only need bypass caps between pin 20 and ground.

BOTH pins 8 and 19 must be connected to ground.



 
For The Popcorn I am glad you pointed that out as I have had some confusion on the symbols. One article I read said that Vss = Voltage source & Vdd = voltage drain. I will have to do some more research. Thanks for pointing it out!
 
For The Popcorn I am glad you pointed that out as I have had some confusion on the symbols. One article I read said that Vss = Voltage source & Vdd = voltage drain. I will have to do some more research. Thanks for pointing it out!

It does - but drain is positive and source is ground. The source and drain refer to the FET connections inside the chip (source, drain and gate are the three connections to an FET)
 


Booster Vlv St & Booster Vlv Op are inputs to the MCU for valve position, do I need a current limiting resistor on an input pin?
 
do I need a current limiting resistor on an input pin?
No, but you probably want to move those two lines to the other side of the 100R resistors.

Right now the input levels are just going to be the forward Vf drop across the LEDs (so about 1.6-2.2V, depending) which is likely too low to be a valid input logic high level.
 
tumbleweed thanks for the info
 
tumbleweed thanks for the info

I agree with tumbleweed, move the feeds to the other side of the 100 ohm resistors - and are you wanting the LED's particularly bright?, 100 ohm is fairly low, I usually use 330 ohm or 470 ohm for feeding LED's, and that seems plenty bright enough

Adding series resistors would do no harm though, but as long as the 5V feed to the opto-couplers is the exact same feed as the one to the PIC, there's no issue. However, if the 5V feed to the opto-coupler should increase (such as it's fed from a different 5V source that goes high), then that voltage will feed through the protection diode in the PIC and increase it's supply rail, possibly to destructive levels. A series resistor limits the current, and prevents this.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…