Continue to Site

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.

  • 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.

PIR to the transistor_to LEDs

Status
Not open for further replies.
Hello Electro Tech forum,

Working on a project that uses a signal from a PIR sensor (AM312)
to send a signal to an Arduino which sends and output to a
transistor that turns on power to an LED.

But could not get it to work and because the out put from
the Arduino looked normal it was suspected that the issue
was with or near the transistor.

So simplified the circuit by eliminating the Arduino and just
sending a signal from the PIR to the transistor_to LEDs.
PIR_to_Transitor_to_LED_200620.jpg


This circuit does not work.

So started testing. (Of all the things that have assimilated in
working with electronics, the most useful knowledge has come
from learning about testing. Use to be the circuit was constructed,
then powered up and if it didn't work [usually] I was stuck.
The only next step was to rebuild the circuit from scratch
and hope it worked the next time. If it didn't the second
or third time one starts getting into the idea about
doing the same thing over and over and expecting a different
result.)

Test 1. Built circuit according to PIR to Transistor to LED 200620
Result: Not working
1.1 Checked power at power board. Result +5.1v
1.2 Checked power at power input to PIR. Result +5.1v
1.3 Checked power at PIR output during PIR signal high. Result +3.2v
1.4 Checked PIR output at Control board during PIR signal high. Result +3.2v
1.5 Checked PIR output at Q1 side of R1 during PIR signal high. Result +3.2v
Test 2. Substitute BC557 at Q1 for BC547 (Rationale: Wanted to sub same transistor,
BC547 for existing to prove component not issue but had no more BC547s
so had to use BC557)
Result: Not working.
2.1 Checked PIR output at Q1 side of R1 during PIR signal high. Result +3.2v
Test 3. Substitute PN2222 for BC557 at Q1 (Rationale: Sub similar transistor)
Result: Not working.
3.1 Checked PIR output at Q1 side of R1 during PIR signal high. Result +3.2v
Test 4. Substitute 10 ohm for 25 ohm R8. (Rationale: Reduce resistance at transistor to
LED ground)
Result: Not working.
4.1 Checked PIR output at Q1 side of R1 during PIR signal high. Result +3.2v
Test 5. Substitute jumper wire for R8. (Rationale: Reduce resistance at transistor to
LED ground)
Result: Not working.
5.1 Checked PIR output at Q1 side of R1 during PIR signal high. Result +3.2v
Test 6. Substitute 220 ohm ar R1 for 470 ohm resistor . Replace R8 25 ohm for jumper wire.
Result: Working, That is, the LED is on for a period expected from the known good
high cycle of the PIR.
Test 7. Substitute 470 ohm ar R1 for 220 ohm resistor.
Result: Not working.
7.1 Checked PIR output at Q1 side of R1 during PIR signal high. Result +3.2v
Test 8. Substitute BC547 at Q1 for PN2222.
Result: Working,
Test 9. Substitute BD43R at Q1 for BC547. (Rationale: When the Arduino is refactored
in want Q1 to operate 18 LEDs so will need transistor with max collector current 4 amps)
Result: Working.out put

So the conclusion is from Test 6 is the the value of R1 was too high.

Next step is to put the Arudino between the sensor and the transistor. The output of the
Arduno is +5v, max 40mA. The output of the AM312 is 3 v but not sure the current is
understood. the data sheet
AM312 datasheet
says the max current is max high output is -10 mA. How can minus milliamps be a high signal?

Thanks.

Allen in Dallas
 
Hi

If I can believe the PIR datasheet, you really should do something like I've shown below.
The AM312 is spec'd with a supply of 3.3 volts max, so with a supply voltage of 5v it will eventually burn out.
The circuit below shows a regulator to drop the 5v supply voltage to 3.3 volts. The TLV431 is adjustable, so I would drop the voltage even further to 3.0v so its below max supply voltage to increase reliability. Add a base resistor to ground to ensure Q1 turns fully off.

The circuit below can easily modified to drive a string of LEDs. I would connect the LED strings in series and use a 12v supply, unless you really have to use a 5v supply.


1592713879524.png
 
Did you check the datasheet for the European BC547? Its pins are CBE which is the opposite to an American 2Nxxxx with EBC.
 
Hello eTech, AudioGuru and the AAC forum,

to eTech:
Wow! Thanks a lot. I have been stumbling around trying to get a circuit to work for weeks
for a project I call StairCase. I finally paid a guy fifty bucks on a web site called Freelancer
to design a circuit which is very close to the schematic titled 'PIR to Transistor to LED 200620'
copied in post #1 herewith above.
Looks like the fifty bucks should have gone to you are your favorite charity.

Will bread board this as soon as I can get the parts.

Thanks again. I am and will remain
Sir,
Your grateful servant
Allen

to AudioGuru
The difference in pinouts on the transistors was noticed.
Three_transistors_200621.jpg

Was using the BC547 because it was on hand. But the
data sheet says it 'Max Collector DC Current' is 100 mA.
But the Staircase project use case requirements call
for several groups of LEDs, some with eighteen LEDs.
(18 LEDs x 20mA = 360 mA) So would need a transistor
that will allow more amps. Thats why the BD437TG
has been ordered and received. Will substitute
the BD437TG in eTechs schematic so more juice can
be drawn.

This is where I am not sure the data sheet is being read
correctly. All the data sheets are different. (The data sheets
and the pinouts differ, except the base is usually in the middle.
Why can't these guys get together and standardize
the pin outs? I guess because the are competitors not collaborators.)
Most of the data sheets have something like
'Max Collector DC Current'. I think this means this the maximum
current that can be allowed to go from the collector to the emitter.
Right?
IS there a place where the transistor data sheets are explained?
But them again they are all different so it would be hard to explain them all.

Thanks.

Allen in Dallas


.
 
You do not understand that a BD437 driving a current of 360mA needs a base current of 36mA that the PIR cannot produce.
The datasheet for the PIR says it can produce only 10mA so you must make a darlington transistor with an added NPN little transistor. The darlington will have an output voltage loss of almost 1V.
 
As AG said, you need a lot of GAIN to go from the >10mA of the PIR to the 360mA of the 18 x 20mA LEDs. This is how you can do it with the pares you have and have on order.

3CC18C89-270C-43EF-8093-DEFAD8118A52.jpeg
 
As AG said, you need a lot of GAIN to go from the >10mA of the PIR to the 360mA of the 18 x 20mA LEDs. This is how you can do it with the pares you have and have on order.

View attachment 125535

Only issue with that, as with all standard darlington's, is lack of current drive to the BD437 base, due to the very low voltage on the BC547 collector, so a lot more power will be wasted as heat, than needs to be.

It can easily be improved greatly, by connecting the collector of the BC547 directly to the 5V supply, and inserting a suitable value resistor between the emitter of the BC547 and the base of the BD437.
 
The whole circuit is a heater regardless of how it is connected. I don't see any difference in heat produced in the to circuits.
The only way to reduce heat generated by the circuit is to use a higher voltage and connect LEDs in series (or a sub-optimal solution of a parallel series combination).
 
The whole circuit is a heater regardless of how it is connected. I don't see any difference in heat produced in the to circuits.

The difference is considerable, because the BD437 can't turn on fully, as there's not enough base drive, the simple modification greatly increases the available base current, and you really to squirt as much current in the base as you can (Hfe is lower at low Vce voltages).

The collector saturation voltage for a BD437 is 0.5V to 0.8V, for a TIP141 (NPN darlington with a similar configuration as above) it's 2.0 - 3.0V, a huge difference.

As for the LED connections?, I completely agree that series parallel and a higher voltage feed is the way to go - just turn the transistor on properly as well.

I was pleased to see your individual resistor for each LED though! :D

For a 'slightly' controversial method, if you can get the supply high enough to feed three LED's in series, then you only need one series resistor - as once you get three or more in series, you can then parallel the series chains without individual resistors (assuming you use the same make and type of LED's of course).
 
Hi

You could do something like this.

Use a darlington (or better yet, mosfet driver) driver IC and wire the LEDs in series as shown on attached.
Each series LED string draws about 20mA, so each IC output draws 40mA. This will require a 12v supply, however.


1592837292828.png
 
The ULN2803 is another darlington driver, so suffers the same drawback of high dissipation as the circuit in post #6. Also there's no need for all those resistors (R1 to R6) as you have three LED's in series, as I explained in post #9.
 
The ULN2803 is another darlington driver, so suffers the same drawback of high dissipation as the circuit in post #6. Also there's no need for all those resistors (R1 to R6) as you have three LED's in series, as I explained in post #9.

But the chip inputs are rated 2.4v input at 200mA output. Its only driving 40mA each(?).

If I remove the resistors, what will limit the current?


The other option is to use a Mosfet array.
 
Last edited:
But the chip inputs are rated 2.4v input at 200mA output. Its only driving 40mA each(?).

If I remove the resistors, what will limit the current?

He is saying that you can eliminate one of the two resistors on the parallel strings and use a single resistor because, statistically, the odds of one leg of a parallel string becomes over current are lower - his is a very minor point until production volumes of this circuit get to the point that a 2-cent resistor makes a difference.

Current limiting is still needed.
 
He is saying that you can eliminate one of the two resistors on the parallel strings and use a single resistor because, statistically, the odds of one leg of a parallel string becomes over current are lower - his is a very minor point until production volumes of this circuit get to the point that a 2-cent resistor makes a difference.

Current limiting is still needed.

Of course, and you are correct that I was referring to reducing the number of resistors.

However, you could reduce it to just one resistor, by simply paralleling the outputs of the ULN2803 as well as the inputs.
 
Of course, and you are correct that I was referring to reducing the number of resistors.

However, you could reduce it to just one resistor, by simply paralleling the outputs of the ULN2803 as well as the inputs.

but higher output current requires a higher input voltage level.
 
For a 'slightly' controversial method, if you can get the supply high enough to feed three LED's in series, then you only need one series resistor - as once you get three or more in series, you can then parallel the series chains without individual resistors (assuming you use the same make and type of LED's of course).
Can you explain why three or more in series is OK? Is it less likely to current hog than with shorter chains without resistors?
 
Can you explain why three or more in series is OK? Is it less likely to current hog than with shorter chains without resistors?

The three (or more) in series averages out the differences between the LED's, and allows the series/parallel conection to use just a single current limiter.
 
This circuit uses a TBD62003A DMOS array.

Update:
The PIR has an onboard 3.0 regulator that is spec'd at 24V max input. The PIR supply can be 12V, so the TL431 is not needed if everything is run from a 12V supply. The PIR sense output signal level, however, is 2.0V, The Mosfet array actually worked at this input level, but its spec'd at 2.7v min. so I've added a simple level shifter to raise the signal to 12V. The PIR will output a High level (2.0v) when motion is sensed, otherwise its at 0V. I haven't tested the level shifter yet but will tomorrow.

Update:
Tested Level shifter with PIR and Mosfet array. All is working correctly with 12V supply as shown in circuit below.

1592978845966.png
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top