Shop OBEX P1 Docs P2 Docs Learn Events
IN command changed sensitivity — Parallax Forums

IN command changed sensitivity

EverQuriousEverQurious Posts: 48
edited 2010-11-06 21:36 in BASIC Stamp
I originally had bumpers on my bot that used the IN4 and IN5 commands for left and right collision detection and it worked fine with one side of the switches connected to ports 4 and 5 and the other sides connected to VDD with a 470 ohm pull down resistor. Then all of a sudden the bumpers stopped responding after I had been working on other systems on the bot. Now in order to get the bumpers to respond I have to connect the wires formally connected to VDD to the VIN connectors.
Battery supply to the BS2 is fine. Did I somehow damage the BS2 and could it cause further damage using the VIN supply voltage instead of the VDD? Has anyone else had a similar problem?. All seems to operate fine in this configuration, but it bothers me why the change.
Any feedback would be appreciated.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-04 08:13
    First of all, don't connect the bumpers (whiskers) to Vin. That can put 6V (or higher if you use some other power source) on the Stamp I/O pin which can damage the I/O pin.

    Remember that the whiskers are just springy contacts that are arranged to touch the grounded aluminum spacers when pressed. They work, but they're not resistant to corrosion or dirt or skin oils from touching. Clean up the areas where the whisker contacts the spacers. Clean up the connections to the whisker contacts. Make sure there's a good ground connection from the board to the spacers.

    Use a little piece of fine sandpaper lightly on the contact areas. A little bit of rubbing alcohol on a Q-tip can be used to remove the skin oils.
  • ercoerco Posts: 20,256
    edited 2010-11-04 14:13
    EQ: Per Mike, you may have damaged your inputs if you connected them to Vin. There are degrees of damage sometimes, so it is possible that they won't work reliably as inputs anymore. But it is also possible that the damaged pins may still work as outputs, so you may be able to swap some pins around to keep all 16 pins useable. Only testing will tell.

    PS: Lots of "fried chip" posts here lately. Baked is much healthier!
  • EverQuriousEverQurious Posts: 48
    edited 2010-11-06 05:27
    The bumpers I am using are roller micro switches I picked up at Radio Shack. They are activated by two sliding push bars which are in turn mounted to a formed 3/3" by 1/8" stock aluminum bar. Pushing the bar on either side keys the switch related to that size.
    What I don't understand is what changed that the VDD terminals quit working BEFORE I switched them to the VIN terminals. Then pins are still good as output pins so I may take Ercos advice and try switching pins and see if that works. Mike the bot seems to work normally now ( with bumpers connected to VIN. If I have already damaged those pins as inputs can I do any more harm leaving it this way?
    Thanks for the input from both of you. Let me know what you think Mike.
    Dave
  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-06 07:09
    You can damage the rest of the chip by leaving the switches connected to Vin. There are diodes connected to the chip's Vdd and Vss such that they connect voltages more than 0.6V above Vdd or 0.6V below Vss to the respective power supply rails. The power supply connections on the chip have some resistance and connecting something like Vin to an input pin without a series resistance can raise the overall supply voltage for all or part of the chip to nearly Vin and that can damage structures on the chip. I think the absolute maximum voltage is 6.5V.
  • EverQuriousEverQurious Posts: 48
    edited 2010-11-06 11:58
    Well, your gonna think I,m crazy but after trying switching the wire back and forth I tried one more time to connect the bumpers to the VDD line and it worked just fine. Ti is ttrying to make me crazy.
    Now I have another question. I am wanting to put the bot in a sleep stage by sending it through a loop at the beginning of the program so it just sits there until it gets a 1 from a parallax motion detector. Problem is, using the BS2 example program I downloaded which shows the status of whichever line you have the MD plugged into using the IN command (IN4,IN5 ect..) when motion is detected and the line goes from 0 to 1 it stays as 1 for a few seconds. This causes the loop to keep repeating my test program. Is there any way to make the response/recovery time more instantaneous?

    Thanks again Dave.
  • ercoerco Posts: 20,256
    edited 2010-11-06 21:36
    Aren't there 2 jumper-selectable output modes on that PIR sensor? Surely one of them must suit your needs! :)

    http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/555-28027-PIRsensor-v1.4.pdf
Sign In or Register to comment.