Shop OBEX P1 Docs P2 Docs Learn Events
bs2 and sharp gd2d120 IR sensor.. not detecting bs2 — Parallax Forums

bs2 and sharp gd2d120 IR sensor.. not detecting bs2

theloneducktheloneduck Posts: 20
edited 2008-07-07 15:59 in BASIC Stamp
Hi all.
Im having a problem getting a circuit built which I can use the GD2D120 sharp IR detector and have the Basic stamp editor detect the BS2 on the board.· As soon as I unplug the sensor, the stamp is detected.· When i plug it back in, it fails to detect it.

Attached is the circuit (Picture1.jpg·· sorry for the poor images).

I have tried it with a couple of resistors (10K, 1K and 10K variable resistor) but no luck.· If I hook the up the circuit as in·the second attachment it·works fine (Picture2.jpg)·.

Any ideas?· Do I need a second power source and just have the output pin talking to the BS2?
508 x 326 - 27K
205 x 330 - 8K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-06 22:44
    The sort of thing you describe usually is a result of miswiring. Make sure you have the proper pins connected to the power supply.
    The GD2D120 has an analog output and you need some kind of analog to digital converter. An ADC0831 works well and there is
    plenty of sample code available from Parallax. It is possible to measure voltage directly using the RCTIME statement. Look at
    www.emesystems.com. Select "app-notes", then look under RCTIME.
  • theloneducktheloneduck Posts: 20
    edited 2008-07-07 00:04
    the plan was to use a voltage comparator to set a threshold voltage to look for.· Problem is I cannot even get the stamp editor to recognize the stamp is there when I plug it in any circuit that is attached to the Vdd pins.·
    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-07 00:08
    The Stamp has to have power applied to it in order to be recognized by the Stamp Editor. If you attach something to it that shorts the power supply, it won't have power.
  • FranklinFranklin Posts: 4,747
    edited 2008-07-07 00:46
    Connect your stamp and make sure you can download something to it. Then without disturbing what you have connect the sharp power and ground, no signal. If that works try the signal. Like Mike says symptoms like this usually point to a power drain or short. Make sure your power to the stamp is fresh if it's a battery.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • theloneducktheloneduck Posts: 20
    edited 2008-07-07 01:35
    Would it be possible that the sharp would draw all the power from the battery and deny the bs2 any?· When i validate that the bs2 can talk to the editor (without anything plugged in), it·can ID the stamp.· When·I then attach the sharp power and gnd, the editor cannot ID the stamp.

    Would the sharp be able to pull all power from the battery and not allow any to the stamp?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-07 01:49
    Yes, if the Sharp device is connected wrong or if it was connected wrong at some time and damaged so it's shorted.
  • JonathanJonathan Posts: 1,023
    edited 2008-07-07 14:17
    I seem to remember being shocked at how much power the Sharp sensor uses, so it might well be your batteries. Here is a link to a page of mine about using this sensor.

    http://madlabs.info/gp2d12/sharp_gp2d12.shtml

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • MSDTechMSDTech Posts: 342
    edited 2008-07-07 15:59
    The power draw for the Sharp sensor is 35 to 50 ma. If you are using the onboard voltage regulator for the basic stamp module, it is only rated for 50 ma, so you could easily be exceeding the capacity of that regulator. Also the Sharp sensor is limited to a 7V input voltage, you may have damaged it connecting to the 9V battery with an LED on its output.
Sign In or Register to comment.