PDA

View Full Version : Need to use the Parallax Ultrasonic Sensor ( Ping ) with Propeller



markuster
01-09-2009, 11:42 PM
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

SRLM
01-10-2009, 12:32 AM
Take a look at the Ping object in the OBEX. It should have the circuit diagram for you in the file.

sylvie369
01-10-2009, 12:39 AM
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.

markuster
01-10-2009, 01:13 AM
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

Kye
01-10-2009, 01:22 AM
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,

soshimo
01-10-2009, 01:54 AM
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.

markuster
01-10-2009, 02:07 AM
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

Kye
01-10-2009, 02:36 AM
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 Green
01-10-2009, 02:46 AM
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.