Shop OBEX P1 Docs P2 Docs Learn Events
Need to use the Parallax Ultrasonic Sensor ( Ping ) with Propeller — Parallax Forums

Need to use the Parallax Ultrasonic Sensor ( Ping ) with Propeller

markustermarkuster Posts: 184
edited 2009-01-09 19:46 in Propeller 1
Hi,

it seems that the Parallax Ultrasonic Sensor
communication PIN voltage is 5 and the
Propeller communications PINs have 3.3V

If I am right, what hardware I need to add to the Propeller
pines to use the Parallax Ultrasonic Sensor.

Thanks, Mark

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 17:32
    Take a look at the Ping object in the OBEX. It should have the circuit diagram for you in the file.
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-01-09 17:39
    SRLM said...
    Take a look at the Ping object in the OBEX. It should have the circuit diagram for you in the file.

    It does, and not surprisingly, what it asks for is simply a 1K resistor in series on the I/O line between the Ping))) and the Propeller. In general that's how you connect a 5V sensor to a 3.3V Propeller I/O pin.
  • markustermarkuster Posts: 184
    edited 2009-01-09 18:13
    Hi again:


    Are you sure I need only a 1K resistor ?

    Please remember that is communication not power supply.

    And, do you know if I need to add an only 1K resistor for the other
    sensors sold by Parallax to use them with the Propeller ?

    I don't understand why Parallax doesn't add a simple 1K resistor
    to Propeller microcontroller in order to use all sensors with the Propeller.

    Thanks , Jose
  • KyeKye Posts: 2,200
    edited 2009-01-09 18:22
    A 1k resistor will create a voltage drop great enough to lower the the voltage being seen by the propeller.

    Remeber, when the propeller has a pin set to input mode the current draw into it is low, very low. Techinccally its possible to connect a much higher voltage than the pin can handle as long as the current stays very low.

    I've sampled 24VDC lines with a BASIC Stamps I/O Pins. If the propeller uses the same kind of circuity the resitor is only needed as a precaution. I would use the resistor however.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • soshimososhimo Posts: 215
    edited 2009-01-09 18:54
    I can verify that the circuit diagram in the obex code works. I had it hooked up to my stamp, according to the diagram, and was outputting detected object distance on an LCD. No issues whatsoever.
  • markustermarkuster Posts: 184
    edited 2009-01-09 19:07
    Ok understood,


    Basic Stamps could be connected between them by the Pins using SERIN / SEROUT command .
    Some times one Basic Stamp is a master and the others are slaves.

    Then I could connect a Basic Stamp to a Propeller by a PIN using the Propeller
    like a master and one or more Basic Stamps like slaves just adding 1K resistor in each
    PIN .

    Is this possible ?

    Thanks Mark
  • KyeKye Posts: 2,200
    edited 2009-01-09 19:36
    It is, but it would be a waste of money.

    The propeller can do everything... Just use the 1k resistor as a current limitng (and voltage drop producing)·resitor as to not fry the propeller chip.

    Go to the object exchange and look around.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-09 19:46
    You only need the 1K resistor at the Propeller. Because the communication line voltage goes from 0V to 5V, you need to protect the Propeller input pin from the 5V. There's a diode built into the I/O pin structure connected so it conducts whenever the input voltage rises above 4V (3.3V+0.7V) and the 1K resistor limits the current flow.

    Note: The diode current must be less than 500uA, but the Stamp output voltage doesn't really reach 5V, so a 1K resistor is adequate.
Sign In or Register to comment.