ping))) output weak
dear Sir,
I experinced that the output of PING))) is too weak
to drive uC port even if there no pull up resistor.
The ping))) can only drive
port P3.6 or/and P3.7 of AT89S51, the output
more severe when more ping))) added.
None port AT89C51 could be drive by ping)))'s output.
When observed with oscilloscope when the sig pin is connected the uC port,
the echo voltage only around 0.9 volts.
Please send me suggestion, or additional
circuit between ping))) and the uC port.
Thank you very much in advance
Kurnia Brahmana
b_unix@yahoo.com.au
·
I experinced that the output of PING))) is too weak
to drive uC port even if there no pull up resistor.
The ping))) can only drive
port P3.6 or/and P3.7 of AT89S51, the output
more severe when more ping))) added.
None port AT89C51 could be drive by ping)))'s output.
When observed with oscilloscope when the sig pin is connected the uC port,
the echo voltage only around 0.9 volts.
Please send me suggestion, or additional
circuit between ping))) and the uC port.
Thank you very much in advance
Kurnia Brahmana
b_unix@yahoo.com.au
·
Comments
The PING has a shared half-duplex control line using TTL (not CMOS) levels which defines a low as 0-0.8V and a high as 2-5V. You should see a higher voltage for the echo pulse. There must be something about how the PING is connected to your microcontroller. Perhaps you're not switching the port from output to input mode.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thank you for quick response,
The Ping))) Sig pin is connected directly to the uC port, and only one ping))) sig to one port
eg. the first ping)))·sig pin is connected to port P3.7, and the second ping))) sig pin to port P6.7 of the at89s51.
code like:
sbit signal = P3^6;
signal=0;
while(1)
{
···signal=1;
·· _nop_();
·· _nop_();
·· _nop_();
·· _nop_();
·· signal=0;
·· _nop_();
·· _nop_();
·· _nop_();
·· _nop_();
· while(!signal):··· // waiting for echo
· TR1=1
· while(signal);···· // counting the width of echo
· TR1=0;
· waitms(100);··· // take a rest
}
The int 3 subroutine will count the length of the echo;
A 100 ohm to 1 Kohm resistor has been inserted between the signal pin and the uC port but
the result still the same, the echo only could only be read if one ping))) is connected
either to P3.6 or P3.7. we need to use 8 ping))) to help our robot to know the position.
Perhaps my code need to be corrected,
I'm using Keil C51
thank you in advance
Kurnia Brahmana
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
It almost sounds like you're having a problem powering the 'ping's, like your power supply can power up to 2 pings, but after that you don't have enough current.
The 8 ping))) are connected to 8 diffrent I/O pin, so I don't think that an I/O expander may necessary,
Dear allanlane5,
It has been tested with the Lab. Power Supply "LEADER" product, so the current will be sufficient.
Dear Parallax Tech Support,
It has been programmed sequentially,
when the first ping))) connected to P3.7 it works fine,
then the second ping)) is added to P3.6 still works fine, // sequential programming
·········································································· // the second reads after the first is finished
after the third ping is added to any port, it works fine for about 10 rounds, then hang,
when obserbed the the problem is one of the port remain high or remain low
therefore the while(signal); or the while(!signal); could'nt be passed,
when another ping))) is added to a diffrent I/O pin, it works only at the first ping))) // P3.7
Someone says the ping)))s will work with AVR uC such as ATMEGA8535L,
but it will·take quite a lot of time to learn that device, mean while our robot will need to be ready soon.
But if no other better solution, we will take Mr. Green advice to use I/O expander
Any way, thank you very much, all comments have been helpfull.
Kurnia Brahmana
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen