Shop OBEX P1 Docs P2 Docs Learn Events
I/O pin(s) and Pull up resistors — Parallax Forums

I/O pin(s) and Pull up resistors

Hello All,

I've always stuck by the book and used the 10 k / 220 ohms combo. Works Great. But my current project (Sensor with 2 relays built in) is having me layout/think about my PCB differently. So far in my mind it is not working.

Short of testing and maybe blowing out some I/O pins to figure it out. How would/does and I/O pin respond without the 10 K resistor bypassed and only the 220 ohms resistor receiving the 5 VDC to I/O pin? I know it there for protection, but a constant 5 VDD may be to much....don't know. I've gone through the section in "Whats a MC" and other locations but can't find anything directly related. MY original concept still may not work but this will be a learning curve getting me their.

1) Can a Parallax BS2 family handle VDD on a I/O pin with ONLY a 220 ohm resistor in place?

Comments

  • kwinnkwinn Posts: 8,697
    Short answer is yes. The 220 ohm series resistor is there to protect the pin from program errors. If the pin was connected directly to +5V or GND and made an output it may be damaged if it was low and connected to +5 or high and connected to GND.
  • MikeDYurMikeDYur Posts: 2,176
    edited 2017-05-15 20:51
    hmlittle59 wrote: »
    1) Can a Parallax BS2 family handle VDD on a I/O pin with ONLY a 220 ohm resistor in place?



    My take on this is that the BS2 is a 5V microcontroller, and the pins in theory can handle five volts, the 220 ohm resistor is for current limiting, and the 10k is to keep the pin floating between states.
  • Here is some important info to know about the BS2.
    1920 x 1080 - 338K
  • MikeDYur wrote:
    ... and the 10k is to keep the pin floating between states.
    The 10k pull-up is to keep the pin from floating between states. IOW, when the pin is not being driven internally or externally, the resistor will hold it at 5V. As long as the pin is being driven one way or another, you can omit the pull-up.

    -Phil
  • The 10k pull-up is to keep the pin from floating between states. IOW, when the pin is not being driven internally or externally, the resistor will hold it at 5V. As long as the pin is being driven one way or another, you can omit the pull-up.

    -Phil

    Yes my fault, you want the pin to be one state or the other, not oscillating between the two.
  • Thanks to All for the clarification.

    I guess that I will have to use a Current Comparator after all. Gonna have to make two more chips fit.

    Thanks again
  • ercoerco Posts: 20,244
    A current comparator? Gotta see that.

    If you share more details about what you're trying to do, someone will probably have a workable solution for you.

    Yes, I speak in rhyme, all the time.
  • kwinnkwinn Posts: 8,697
    erco wrote: »
    A current comparator? Gotta see that.

    If you share more details about what you're trying to do, someone will probably have a workable solution for you.

    Yes, I speak in rhyme, all the time.

    You are the man. The rhyming robotocist and poetic propellerist.
  • Q: what rhymes on Propeller?
    A: no, it doesn't.

    Enjoy!

    Mike
  • hmlittle59hmlittle59 Posts: 404
    edited 2017-05-30 04:24
    Update:
    Have to pick up new parts from Fry's tomorrow (NTE 941 and 938), suppose to be in stock. Ordered LM358 from Parallax along with other parts today also.

    One (1) question for now. Does best the LM741 best operate from a Single or Dual supply voltage? Could not to get it working like I wanted today. Using the BS2 BOE for my test bed.

    Thanks
  • Update:
    Forgot to attach Schematic. Not ALL values are current, kept changing them when things did not go as planned, but the layout is still the same.

    Basically trying to detect when the 10k resistor is bypassed by the K1 relay. K2 will remove the 5 V source and both I/O pins will be Zero (0). It's the voltage change across the 4.7 k resistor into the OpAmp that I want to detect.

    Thanks again
    838 x 649 - 43K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2017-05-30 04:33
    The LM741 is such an old design and requires at least a +/-10V power supply. If you really want to operate from a single 5V supply, the LM358 would be a better option. Better still, check out one of the newer CMOS op amps with rail-to-rail inputs and outputs.

    In short the LM741 belongs in a museum, not in a new design.

    -Phil
  • Thanks Phil

    On my way to Frys to see what they have. Parts are on order from Parallax and Mouser.
    Wasted a day of my life trying to get the LM741 to work like I wanted

    Thanks again
  • Update:

    Thanks Phil for the info and insight on new better parts. I did get 3 different types from Fry's this morning (NTE 889M, 938M, and 922M). The 889M is up and running with a .5v loss differential, hope that's normal. Haven't found on the data sheet if thats normal or not. Will test the other parts here soon. Had to make one layout change and 3 resistor values to ensure all voltage variations are detected, so far they are working.
    Test program detect all 3 variations on the 2 I/O pins also.

    Thanks again
Sign In or Register to comment.