Shop OBEX P1 Docs P2 Docs Learn Events
Navigation with Whiskers with Arduino shield: Why are 220 ohm resistors needed? — Parallax Forums

Navigation with Whiskers with Arduino shield: Why are 220 ohm resistors needed?

pdxpdx Posts: 2
edited 2014-10-26 12:00 in Learn with BlocklyProp
Hi there,

I'm going through the tutorials for the BOE shield for Arduino kit, and I just added the whiskers. The robot is working great, but I can't figure out why the 220-ohm resistors shown below are needed in the whisker switch circuit. (Circuit diagrams from this page: http://learn.parallax.com/node/237 )

inside.jpg


Isn't something like this all you need:


5182b949ce395fbe1d000000.jpg
(Image from this Sparkfun tutorial: https://learn.sparkfun.com/tutorials/switch-basics )

Since I couldn't figure out any reason for the 220-ohm resistors to be there, I tried replacing them with wires like in the Sparkfun diagram, and everything still works the same. So why are those resistors there?

thanks!
Carol

Comments

  • Hal AlbachHal Albach Posts: 747
    edited 2014-10-25 16:59
    The 220 Ohm resistor is there to protect the MCU I/O pin. If, for what ever reason, the I/O pin should become an output and was commanded to output a High, the resistor will protect the pin from excessive current. What do you think would happen in the lower circuit above if the pin became an output and was placing VCC on the pin and you press the button?
  • pdxpdx Posts: 2
    edited 2014-10-26 12:00
    Thanks, Hal. That makes sense.

    Carol
Sign In or Register to comment.