Ir detector to activate an led strip

Thread Starter

smithy27

Joined Feb 9, 2025
9
Hi,

I'm having a few issues,
Electronics ain't.my strong point as an electrician, but I want.to build a circuit.

Can anyone advise me please.


I am building a circuit, that is to activate a led strip.
The activation is by an ir receiver, it don't need a specific code, just to recieve ir light at 38khz.

So fit this is a list of my components and the wiring.

Can any confirm whether I am correct in my design or I am making a school boy error.

Many thanks

Circuit Design Overview:

IR Sensor (TSOP98438): Operates at 5V and detects IR signals.

PNP Transistor (e.g., TIP42): Used to switch the 12V power to the LED strip.

LED Strip: Rated for 12V operation.


Wiring Details:

1. IR Sensor (TSOP98438):

VCC (Pin 3): Connect to +5V.

GND (Pin 2): Connect to ground.

OUT (Pin 1): Connect to the base of the PNP transistor through a 1kΩ resistor.



2. PNP Transistor (TIP42):

Emitter: Connect to +12V.

Collector: Connect to the positive terminal of the LED strip.

Base: Connect to the IR sensor's output via the 1kΩ resistor. Additionally, place a 10kΩ pull-down resistor between the base and ground to ensure the transistor remains off when no signal is present.



3. LED Strip:

Positive Terminal: Connect to the collector of the PNP transistor.

Negative Terminal: Connect to ground.
 

SamR

Joined Mar 19, 2019
5,470
It would help if you showed us your circuit design. I do notice that you have an IR detector. Just what is the IR source it is supposed to detect?
 

sghioto

Joined Dec 31, 2017
8,633
[QUOTE="smithy27, post: 1966455,
Can anyone advise me please.
Base: Connect to the IR sensor's output via the 1kΩ resistor. Additionally, place a 10kΩ pull-down resistor between the base and ground to ensure the transistor remains off when no signal
[/QUOTE]

Connect 10K resistor between base and emitter not base and ground
How much current does the LED strip draw?
 

Thread Starter

smithy27

Joined Feb 9, 2025
9
It would help if you showed us your circuit design. I do notice that you have an IR detector. Just what is the IR source it is supposed to detect?

Hello

Thank your for your reply.


The ir is not receiving a signal, it only is to recieve ir from a laser tag gun

So as long is it is hit at the appropriate 38kHz it will operate the circuit

I hope
 

DickCappels

Joined Aug 21, 2008
10,661
You need to switch your IR source on and off with a 38 kHz square wave. It is needed to get the signal through the 38 kHz band pass filter within your IR receiver.
 

sghioto

Joined Dec 31, 2017
8,633
[QUOTE="smithy27, post: 1966909, member:
The ir is not receiving a signal, it only is to recieve ir from a laser tag gun
So as long as it is hit at the appropriate 38kHz it will operate the circuit
I hope
[/QUOTE]
What info do you have on the laser gun?
 

Thread Starter

smithy27

Joined Feb 9, 2025
9
[QUOTE="smithy27, post: 1966455,
Can anyone advise me please.
Base: Connect to the IR sensor's output via the 1kΩ resistor. Additionally, place a 10kΩ pull-down resistor between the base and ground to ensure the transistor remains off when no signal
Connect 10K resistor between base and emitter not base and ground
How much current does the LED strip draw?
[/QUOTE]


I have tried this,

And still the led strip is permanently on

Yet it flickers when thr ir source is activated.


How would you build this circuit
 

Thread Starter

smithy27

Joined Feb 9, 2025
9
[QUOTE="smithy27, post: 1966909, member:
The ir is not receiving a signal, it only is to recieve ir from a laser tag gun
So as long as it is hit at the appropriate 38kHz it will operate the circuit
I hope
What info do you have on the laser gun?
[/QUOTE]


At the moment, I am proving the circuit design with a 38khz ir receiver, and a remote control as the source of ir.

Once I establish the ir frequency of the laser tag gun, I should be able to swap out the ir receiver to the appropriate frequency.
 

sarahMCML

Joined May 11, 2019
695
Your PNP transistor is always on, because its base never gets higher than 5 volts (the output voltage of the IR sensor), and so cannot switch off. You need an NPN inverting stage between the two as a level converter!
 

Thread Starter

smithy27

Joined Feb 9, 2025
9
Your PNP transistor is always on, because its base never gets higher than 5 volts (the output voltage of the IR sensor), and so cannot switch off. You need an NPN inverting stage between the two as a level converter!


Aeroplane above my head...


Ok

An npn I know as another transistor,
And I believe normally closed right,
Where I thought a pnp is normally open


Excuse my terminology.
Am an electrician not an electronics guy, hence my trouble.

Please elaborate a little more Sarah.

I assume you are.saying I use the npn to activate the pnp.

Ypu see the thing is,

My original circuit, started with just a npn transistor, and I had the exact same outcome as I have with thr pnp.


Spell it out for me if you can.
This is twisting my melon man
 

sarahMCML

Joined May 11, 2019
695
Aeroplane above my head...


Ok

An npn I know as another transistor,
And I believe normally closed right,
Where I thought a pnp is normally open


Excuse my terminology.
Am an electrician not an electronics guy, hence my trouble.

Please elaborate a little more Sarah.

I assume you are.saying I use the npn to activate the pnp.

Ypu see the thing is,

My original circuit, started with just a npn transistor, and I had the exact same outcome as I have with thr pnp.


Spell it out for me if you can.
This is twisting my melon man
All NPN or PNP transistors are high resistance (closed) until their base/emitter junctions are driven by enough forward voltage to get current flowing, at which point they start to conduct between their collector/emitter terminals.

You need something like this:

BiMOSSwch2.jpg

But with the MOSFET replaced by your PNP transistor, with its base resistor connected to the collector of the NPN transistor!
 

twohats

Joined Oct 28, 2015
607
Hi smithy27,
Please give us a hand drawn circuit diagram/schematic.
sarah is on the ball,
Are you giving the PIR time to settle?
Re; sarah, RB = base resistor, RC = collector resistor.
 

Thread Starter

smithy27

Joined Feb 9, 2025
9
All NPN or PNP transistors are high resistance (closed) until their base/emitter junctions are driven by enough forward voltage to get current flowing, at which point they start to conduct between their collector/emitter terminals.

You need something like this:

View attachment 342435

But with the MOSFET replaced by your PNP transistor, with its base resistor connected to the collector of the NPN transistor!

ok, that kind of makes sense Sarah, however where does the IR sensor sit.
 

Thread Starter

smithy27

Joined Feb 9, 2025
9
Hi smithy27,
Please give us a hand drawn circuit diagram/schematic.
sarah is on the ball,
Are you giving the PIR time to settle?
Re; sarah, RB = base resistor, RC = collector resistor.

Hi Billy,

so far this is my wiring schematic, i will try now to draw it.

Connections:
IR Sensor:
  • VCC (Pin 3) → 5V
  • GND (Pin 2) → Ground
  • OUT (Pin 1) → One end of 10kΩ pull-up resistor (other end to 5V)
  • OUT (Pin 1) → Base of NPN transistor (through 1kΩ resistor)
NPN Transistor (2N2222 or BC547):
  • Emitter → Ground
  • Collector → Base of PNP transistor (through 4.7kΩ - 10kΩ resistor)
PNP Transistor (TIP42C or similar):
  • Emitter → 12V
  • Collector → Positive terminal of LED Strip
  • Negative terminal of LED Strip → Ground
 
Top