Pages: [1]   Go Down
Author Topic: Does a diode delay the signal?  (Read 374 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I have a project with two ultrasonic distance sensors.
Each has a trigger and echo pin. The trigger pin is pulsed and the Arduino measures the time until the echo pin goes HIGH.

Since I dont measure both at the same time, I only need to know if echo1 or echo2 is HIGH.
I assume connecting two to one pin will shortcut them if one is HIGH and the other is LOW.
So I put two diodes between them to prevent that. This delayes the echo signal so I cant calculate the distance anymore.

Is there a way to get the two inputs on one pin without buying additional hardware?
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Combining two inputs on one pin in this way is very creative but unlikely to get you what you want.

Can you explain why it is a problem to code for echo returns on the two separate inputs?

-br
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you explain why it is a problem to code for echo returns on the two separate inputs?
Its not a problem, I was just wondering if I could save pins.
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11718
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

google for "wired OR" and "wired AND" gates...  With diode logic you will need a pull up or pull down resistor as
appropriate (this probably explains your impression of a delay)
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Works perfectly. Thanks!

Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2895
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Diodes such as 1N4148,1N914 are very fast, and won't delay signals as slow as those here. However,
if the R is missing from the wired-OR diode ckt, then the diodes are not really turning on. Try
R = 4.7K or 10K.
Logged

Pages: [1]   Go Up
Jump to: