Inverter circuit

LeonR

Member
I've done some research and it appears that the best solution for my project is to use some form of an inverter IC...

What i'm trying to do is use more than 1 IR receiver on 1 input pin.
As i've said in other posts i'm a bit of an electronics noob (but learning quickly and enjoying it!).

The IR RX seems to drop low when it detects anything which makes it harder to connect multiple sensors together and 'drop to low' when any of them detect an IR signal..

So my thoughts were to somehow invert the lows to highs, then join the highs with diodes and then detect 'highs' in my code rather than lows.

Does this sound like a good idea? also, the hard part for me is finding an IC that will do this , I only really need 4 inverted in/out max, and was looking here http://www.bitsbox.co.uk/semis.html at the 74xx range (or 4000?), the problem is i'm unsure of the terminology, do I need hex inverter? (6?) 74HC04 looks ok to my noobness?
I'm using no more than 5v.

If anybody gets time to have a quick look that would be awesome, if not I think I can manage, just after a little reassurance.

I did see that I can use some resistors and a transistor to do the same thing, but it seems neater to use a premade IC??

Thanks,
Leon
 

westaust55

Moderator
It might be worth posting a schematic diagram of exactly what you have in mind.
I think I get the idea but to try to be 100% sure a schematic diagram of the proposed circuit would help folks here.
 

Buzby

Senior Member
Please post a link to the datasheet for your IR detector. The solution maybe much easier than you think !.
 

hippy

Technical Support
Staff member
What i'm trying to do is use more than 1 IR receiver on 1 input pin.

The IR RX seems to drop low when it detects anything which makes it harder to connect multiple sensors together and 'drop to low' when any of them detect an IR signal.
Or it can make it far easier to connect multiple sensors - if they can be used in a multidrop-OR configuration and many IR Receivers are designed for that.

If each output is an open collector output ( or has a weak pull-up ), all wired together with a pull-up resistor, then any one going low will make the signal to the PICAXE low. If you have one IR Receiver and a pull-up, then adding more is simply a case of connecting their outputs together.
 

Goeytex

Senior Member
What i'm trying to do is use more than 1 IR receiver on 1 input pin.
Why?

A "diode OR" circuit does not necessarily need positive going signals.. Since the output if the IR sensors is an internal open collector circuit you can diode OR the signals by reversing the diodes and then using a 4K7 pullup instead of a pull down on the diode outputs. Test this on a breadboard, because the internal pullup in most IR receivers is about 33K ohms meaning the current output capability is quite low when the signal is High. Also use small Schottky diodes instead of standard 4148's. The BAT85 should do nicely.

The 74HC40xx HEX inverter will also work, but I would use a 74HC14 Schmitt inverter instead of the standard 04.

Given a choice between the two, I would probably include the 74HC14 because: 1. It will sharpen the edges of the IR Receiver output and 2 .Because I have a bucketful full or them laying around here.

But with open collectors why not just tie the outputs directly together ?
 

LeonR

Member
Why?

A "diode OR" circuit does not necessarily need positive going signals.. Since the output if the IR sensors is an internal open collector circuit you can diode OR the signals by reversing the diodes and then using a 4K7 pullup instead of a pull down on the diode outputs. Test this on a breadboard, because the internal pullup in most IR receivers is about 33K ohms meaning the current output capability is quite low when the signal is High. Also use small Schottky diodes instead of standard 4148's. The BAT85 should do nicely.

The 74HC40xx HEX inverter will also work, but I would use a 74HC14 Schmitt inverter instead of the standard 04.

Given a choice between the two, I would probably include the 74HC14 because: 1. It will sharpen the edges of the IR Receiver output and 2 .Because I have a bucketful full or them laying around here.

But with open collectors why not just tie the outputs directly together ?

Thanks for this info, it all helps my electronics learning curve!
I'm not sure what an open collector is.... thats how basic my electronic skills are, however, now that it's been mentioned I can look it up and find out more :confused:

I'm working on a project similar to 'laser tag' (if it actually works i'll post some pics/info of the finished project), however I don't need to know which sensor received the IR signal, therefore it made sense to me logically to try and link the RX's together on 1 input (meaning I can keep the 08m2 picaxe).
 

hippy

Technical Support
Staff member
I'm not sure what an open collector is....
Basically a transistor output, emitter to 0V and collector left floating, not connected. Much like the Darlington Drivers found on the PICAXE project boards.
 

LeonR

Member
So does that mean that the 'signal' terminal from the RX is kept high as default with the resistor on the diagram and when the output goes low its because the RX is dropping the current to ground? Which in turn makes it go low on the signal leg?

Or did I just make that up!! ;)

If that is how it works, then I think I understand!
 

LeonR

Member
That's what I'd go with !

Well thats convienient!! :cool:


So is there some kind of resistor built into RX? as otherwise it would just be shorting + with ground? (thats the only part that confuses me.. why the signal is not always high or has at least some small current flowing).

Cheers,
Leon
 

hippy

Technical Support
Staff member
There is an external pull-up resistor to +V. It's the bottom of that which the open-collector transistor pulls towards ground, and that's the point which the PICAXE takes as an input; floats towards high when not being pulled towards ground, reads low when pulled towards ground.
 

LeonR

Member
There is an external pull-up resistor to +V. It's the bottom of that which the open-collector transistor pulls towards ground, and that's the point which the PICAXE takes as an input; floats towards high when not being pulled towards ground, reads low when pulled towards ground.

Yep that makes sense, I just always thought there was the rule of 'current takes the easiest route' and that made me think that the RX must have an 'easier' route to ground rather than through the picaxe?

Thanks for the quick reply!
 

MPep

Senior Member
Ah ok, so the picaxe doesn't need 0v for example, it just needs to see a significant drop to register low?
Not quite, as the voltage change is with respect to 0V.

I wouldn't worry too much about halving the 330R as it is there for decoupling. Together with the 4.7uF, they are a low pass filter.
Seeing as the IR-receivers take little current, no need to recalculate. If you find that the supply voltage droops too much with many receivers attached, then reduce a 330R, but not proportionally. Try 270R, 220R, i.e. a little at a time until acceptable results are found.
 
Top