Concerns about using 1K resistors to protect IO pins

Free Open Source Hardware discussion forum. Post your Free Open Source hardware projects here!
Post Reply
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Concerns about using 1K resistors to protect IO pins

Post by ababkin »

Contrary to suggestions i've received, I personally experienced problem using 1K series resistor to protect an IO leg.

While not on freeEMS MCU, but on ARM, even though spec'ed as 5V tolerant, i tried to protect an SPI input leg of the 3.3V MCU while connecting it to an 5V device (so 5V to 3.3V levels), through a 1K resistor. The result was that i was not getting high levels through as i should have. So i added 240 ohm resistor in parallel to the 1K one (basically just temp soldered it right on the 1K' legs) and everything worked as it should.

So, the moral of this story is, keep this in mind and don't go overboard with the resistor value - this can cause erroneous behavior

Alex
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Concerns about using 1K resistors to protect IO pins

Post by Fred »

Alex, it is not intended that these are used between on board chips for comms, the frequency and capacitance and inductance do not allow fast enough rise and fall times with an inline resistor. These chips are designed for direct connect possibly with a low value to ensure no short conditions are present. Additionally there are wired or modes available to ensure that this does not occur in a comms environment.

It is only intended for driving low frequency devices like injectors and coils etc.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Concerns about using 1K resistors to protect IO pins

Post by ababkin »

Ah, makes sense now

don't have oscilloscope, but perhaps the signal was simply 'slewed'. I would be surprised to find out that carbon resistor would introduce significant amount of inductance or capacitance
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Concerns about using 1K resistors to protect IO pins

Post by Fred »

Check out the wired or mode settings for your pins. Perhaps the SPI module takes care of it natively? I haven't read up on it but you can do it manually at the least on the xdp anyway.

Heres a link that shows the effects :

http://blog.vacs.fr/index.php/2008/04/2 ... c11-output

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Concerns about using 1K resistors to protect IO pins

Post by Fred »

That article is the opposite of course (sorry).

The way you set it up is to have a pull up resistor on the line and both devices pull down. Thats for two way comms on the same pin though. If it's dedicated I and O then you can probably just drive it directly, check the specs anyway, it should go into some detail about it.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Concerns about using 1K resistors to protect IO pins

Post by ababkin »

Thanks for the link (maybe this convinces me to finally get some scope solution)

my specific case had a 5V part (MCP2515) outputting the signal into 3.3V part (AT91SAM7) through the 1K res. In addition, i am thinking i had data rate of about 10Mhz at the time (which may helped the negative effect)

I really doubt the MCU would have that much capacitance on the IO pin. Different situation to the power transistor in the link.

Scope should show what's happening tho.
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
Post Reply