PNP output to sound/light alarm

Thread Starter

flyingsock

Joined Oct 21, 2017
16
Hello guys,
I wanna use an ultrassonic sensor outputs to alarm, but I'm not sure if it has enough current.

Description:
I have an ultrassonic sensor which features 2 individual NO PNP outputs. It's a diffuse sensor and I'm using it to alarm the distance to a wall. The sensor will be stuck on a moving object.
Having 2 individual outputs (A and B) means that I can program the sensor so A outputs 24V within a 3m range from the wall and B outputs 24V within 1m range from the wall.

So I wanna use output A to light a light emitter, and output B to sound an alarm.
Both sensor and alarms work with 24V CC.

The issue is:
Max. output current of the sensor is 100mA.
Light emitter needs 110mA. Sound alarm needs 120mA.
I can't run a test right now because I still haven't received them yet.

Here's the "schematic":


I'm guessing I'll need "something" between the outputs and alarms so I have enough current to power both at the same time when needed. Relay? 1 or 2? Auxiliary contactors? I don't much about them. Can you suggest a product?

I need a light. Please help.
Thank you!
 

AlbertHall

Joined Jun 4, 2014
8,504
You could use two simple transistor circuits between between the sensor and each alarm/light. Connect the +24V supply directly to the alarm and light and connect the alarm/light 0V to the collectors of the transistors. The base resistors of the transistors connect to the sensor outputs. The resistor in the circuit below should be 2.2k and the LED and its resistor is replaced by your alarm/light.
 

Thread Starter

flyingsock

Joined Oct 21, 2017
16
You could use two simple transistor circuits between between the sensor and each alarm/light. Connect the +24V supply directly to the alarm and light and connect the alarm/light 0V to the collectors of the transistors. The base resistors of the transistors connect to the sensor outputs. The resistor in the circuit below should be 2.2k and the LED and its resistor is replaced by your alarm/light.
Albert, I really appreciate your response, though I didn't understand at all what we are doing, but I'm scribbling on a paper.
I was expecting sort of a product oriented reply, but your answer is just as good, if not better.
Just a question, what would change if the sensor outputs were NPN?
 

AlbertHall

Joined Jun 4, 2014
8,504
If the outputs were open collector NPN then you would use a PNP transistor to switch the +24V to the alarm/light - same as previous circuit but sort of upside down.
 

Thread Starter

flyingsock

Joined Oct 21, 2017
16
If the outputs were open collector NPN then you would use a PNP transistor to switch the +24V to the alarm/light - same as previous circuit but sort of upside down.
So this circuit will provide enough current? Thank you.

Could you help me with another one?
I have a sensor that is PNP NC. That means it's always outputing 24V, and will output 0V when it detects something.
I want to use it to sound an alarm as well, but apart from providing more current I should be able to invert the output so it provides 24V to the alarm when it detects something.

I thought about putting an NC relay between the sensor and the alarm, but whenever the sensor gets turned off (thus outputing 0V), the alarm will keep ringing.
It would be a waste to use a PLC.
 

AlbertHall

Joined Jun 4, 2014
8,504
Yes, that circuit is correct.

For the circuit inverting the PNP NC output, consider when the output is being pulled up to 24V then the added transistor will have 24V on both base and emitter and so will be switched off - the alarm be off. When the sensor PNP transistor switch in the sensor switches off, the resistor, R1, in post #6 supplies base current to the transistor so it is switched on and supplies +24V to the alarm.
 

Thread Starter

flyingsock

Joined Oct 21, 2017
16
You could use two simple transistor circuits between between the sensor and each alarm/light. Connect the +24V supply directly to the alarm and light and connect the alarm/light 0V to the collectors of the transistors. The base resistors of the transistors connect to the sensor outputs. The resistor in the circuit below should be 2.2k and the LED and its resistor is replaced by your alarm/light.
I'm sorry to bother you again, but can you explain what happens in this circuit?

Could you describe it like you described the other circuit?

I really appreciate all your help, thanks a bunch.
 

AlbertHall

Joined Jun 4, 2014
8,504
OK, let's suppose OutB is 0V. Then is no base current for the transistor and so there is no collector current so the alarm is off. When OutB goes to 24V, current is fed, limited by the resistor, to the transistor base and so the transistor is on and connects the 0V of the alarm to 0V and so the alarm sounds. Likewise for OutA and the light.
 
Top