• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I have a question for all the analogue boff's here

Status
Not open for further replies.

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I hadn't come across this before so a simple resolve it what I thought was needed... However!! It didn't work and I'm not quite sure why. The thing is, I really need to know..

Problem:

I have two serial sources ( coming from the same device ) One is wireless and the other is hard wired... The switch over works really well... The wireless transceiver is stopped and serial is transmitted via RS485 once plugged in..

But! At the receiving end I have to bring both signals into the same port! The second USART on a pic1845k22...

Here was my first resolve
upload_2017-3-24_22-27-33.png
Didn't work!!!!


upload_2017-3-24_22-22-44.png

I have alredy fixed the issue using two NPN's as makeshift OR gate, But!!! I still want to know why the diodes didn't work!!
 

crutschow

Well-Known Member
Most Helpful Member
What's the diodes' load resistor?
Too high a value will cause what you saw.
 

crutschow

Well-Known Member
Most Helpful Member
I didn't use a resistor!! I thought the voltage drop would be too much for the input... I'm not to sure of the port pin input impedance..
Something like 10kΩ should likely be sufficient.
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
Well the door has shut now as the makeshift OR gate works very clean.. The signal is spot on.. But I can use this info at some other time... Thanks for that... Why would adding a load resistor help?? I would have thought it would make the problem worse..
 

audioguru

Well-Known Member
Most Helpful Member
Without a load, the diodes are simply very low value capacitors that pass only high frequencies.
 

crutschow

Well-Known Member
Most Helpful Member
Why would adding a load resistor help??
Because there is nothing else to pull the signal low at the diode output except leakage current and any load resistance.
If those are insufficient to pull the output low in the time the input signal is low, then you will get the type of signal you observed.
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
So all I needed was a pulldown resistor... Like I said.... The input signal ( at a 3v3 level ) via the diode and a pulldown may be reduced too much any way !!!

Aha !! got it.. I see what you mean.. The input is floating!! I think that on a 5v pic the input threshold is @ 3v so it may have not worked anyway!!!
 

MikeMl

Well-Known Member
Most Helpful Member
pd1.png
pd2.png

The diodes have capacitance. The cmos input has capacitance. Without the pulldown, you have created a capacitive voltage divider which would be greatly effected by hanging a scope probe on the cmos input pin...
 
Last edited:

MrAl

Well-Known Member
Most Helpful Member
Hi,

I have to agree about the two diodes. Two diodes, alone, do not constitute a logic OR gate. A logic OR gate is made with two diodes and one resistor. The resistor is either pullup or pulldown depending on the logic used.

It might be interesting at this point to see the two transistor solution too and see the difference.
 

MrAl

Well-Known Member
Most Helpful Member
Too late... built and delivered.... Worked very well...
Hi,

Yeah i just wanted to mention that DRL (diode resistor logic) depends on both the diodes and the resistor, even if you dont intend to use it at this very point in time.

So you built your own TTL, he he, that's cool too. A little more like TRL, but hey that's ok as long as it works :)
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I can't help but notice the 1K to ground :D
Did I do it wrong? I thought it was good, Scope certainly showed the same signal on the base as the emitter!!

I think I could have used a 4k7 but the two signals will NEVER be there at the same time...
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
No, I was just referring to the fact that you fitted a resistor in the transistor version, but didn't fit one in the diode version.
Oh! I see what you mean... I was thick enough to assume the port would pull low once the 3v3 logic high was gone..

"How long have you been doing this" I hear you crying!! "Too bluddy long!!"
 

MikeMl

Well-Known Member
Most Helpful Member
I would be more inclined to use a diode OR if the diodes were Schottkys....

Notice the voltage offset...

30a.png

Does this make me an analogue boff...?
 
Last edited:

MrAl

Well-Known Member
Most Helpful Member
Hi,

Yes and strictly speaking this isnt analog exactly. The pure analog version of an OR gate would be made with two resistors and possibly if needed an amplifier like an op amp.
The transistor circuit is almost like an RTL logic creation. I actually have an RTL logic chip around or maybe it is a DTL chip. That's from the 1970's.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top