Having trouble wiring PIR sensor

Thread Starter

Anthony Malone 1

Joined Jan 27, 2018
18
So I don't know a whole bunch about circuits but I know general.information and i am new to PIR sensors but I've researched them extensively the past couple weeks. I am having trouble understanding why this is not working. I have order a pack of 5 PIR sensors off amazon. (Octagon pir sensors) I am trying to make it so when motion is detected it will activate a laser and a motor on a toy. I took the toy apart and have both positive wires (one from motor and one from laser) connected together and then the two negative wires connected together. Now the PIR sensor has three prongs. Vcc , output, and ground. So I have a 12v power cord positive end going to vcc, the ouput of the PIR sensor going to the two positive wires I have connects together from the laser and motor and then I have the ground from the PIR sensor connected along with the negative wires from the laser and motor all connected to the ground to the power cord. In my head this all makes sense and there is no reason why this should not be working. I even tried using 3 different PIR sensors thinking maybe they were broken. I hope you guys can understand this. Maybe later if I have time I will try and draw a wiring diagram of how I have it wired but I am on my phone so i don't know how well that will be. Please help. I am not understanding why this isn't working. I thought this would be simple. Thank you
 

ElectricSpidey

Joined Dec 2, 2017
3,334
Most of that type of PIR can only output 3.3 volts, and uses a supply of 5 volts.

That is only a guess without more info.

But you will probably need a transistor connected to the output to drive your devices.

EDIT:
Sorry, I didn't get the "somebody has already posted" warning.
 

Thread Starter

Anthony Malone 1

Joined Jan 27, 2018
18
Yes the PIR sensor has an output of 3.3 volts. But the toy was originally running off 3 AA Batteries. I assumed it would still run but maybe just the motor would move slower and the laser not as bright. But maybe not. How about this though... if I do the same set up but I have another laser and motor toy that was running off of 4 AA batteries but the batteries are set up in 2 groups of 2 so the batteries are in a series therefore the toy is running off approx 3.2 volts and i don't know how many amps that would be .. would this work?
 

Thread Starter

Anthony Malone 1

Joined Jan 27, 2018
18
Hi A,
Did you see the solution required for a motor drive on that link I posted.?
E
Yes I read the link you showed me. From that I got that I need a NPN transistor. Im not 100% sure how to wire it though. I know the positive wire from the power source goes to the motor and then the negative wire from the motor and the PIR sensor go to the collector on the transistor and the base gets connected to the output from the PIR and
Hi A,
Did you see the solution required for a motor drive on that link I posted.?
E
I see I need an npn transistor. Not sure how to wire it though. I understand my power sources positive needs to go to the motor first and then the negative from the motor goes to the collector and then the emmiter goes to the negative on my power source. Then I think my output on my PIR sensor goes to the base ? And the ground on the PIR sensor would just go to ground? Or does it go to somewhere on my transistor also?

Now also, since my PIR sensor needs 5v to operate I can't use a 5v power cord to operate the motor and the PIR sensor but a 12v power court should work for both correct ? How can I go about doing this?

Now also how about my laser ? Should I just connect that in series with my motor to my transistors collector or what?

I'm going to have to order a breadboard and transistor off the internet because I don't think they're are any stores around me that sell these kinds of things. Originally I thought i would just be able to do it by connecting wires but clearly not.
 

ericgibbs

Joined Jan 29, 2010
21,439
hi A,
The PIR will operate with a supply of 5V thru 20V.
The motor voltage will depend upon the motors operating voltage, do you have details of motor.? Voltage Current or a web link.?

A word of caution, when powered up the PIR it will always behave erratically.
ie: the output switching between +3V and 0V, for about 2 minutes.
It will then stabilise and then you can Set the Time and Sensitivity.
So whatever the motor shaft is driving will also driven erratically for that settling period.

E
 

Thread Starter

Anthony Malone 1

Joined Jan 27, 2018
18
hi A,
The PIR will operate with a supply of 5V thru 20V.
The motor voltage will depend upon the motors operating voltage, do you have details of motor.? Voltage Current or a web link.?

A word of caution, when powered up the PIR it will always behave erratically.
ie: the output switching between +3V and 0V, for about 2 minutes.
It will then stabilise and then you can Set the Time and Sensitivity.
So whatever the motor shaft is driving will also driven erratically for that settling period.

E
I believe this is the exact motor

https://www.robotshop.com/en/3v-hob...5nH9L1Qwrb8TxBK_CZu4q9Ye991LhAAwaArscEALw_wcB

I took apart a toy to get the motor but this is exactly what it looks like which leads me to believe it is this motor and I assumed it would run on approx 3v so I think this is the correct one
 

ericgibbs

Joined Jan 29, 2010
21,439
hi,
The datasheet says 1v thru 3v, so that is OK, but you must have transistor or FET driver between the PIR and motor.
The PIR cannot supply enough current to drive the motor directly.
E
 

Attachments

ericgibbs

Joined Jan 29, 2010
21,439
hi A,
The 2N2222 will run the motor on a light load, if you stall the motor the transistor could overheat.
The Stall current of the motor is 800mA and the 2N2222 max Continuous current is 600mA.

E

EDIT:

I guess you know that a diode is required across the motor connections, to protect the transistor .???
 
Last edited:

ericgibbs

Joined Jan 29, 2010
21,439
hi
That got a higher Ic max rating, if you have one on the bench give it a run.

It shows a gain of about 150 at approx 200mA
E

Dont forget that diode, its important,
 

Attachments

Thread Starter

Anthony Malone 1

Joined Jan 27, 2018
18
hi A,
Sorry your circuit is not right.
Do want me to do a circuit diagram?
What is your battery voltage.?
E

Yes please and I do not have any of these parts except the PIR sensor and the motor and the laser which I also need added in this circuit. Thats why I am trying to make sure I get the right diodes and transistor because I don't want to have to buy one and then it not.work and have to order a different one. That is why I am asking so many questions about if this will work or that will work.

And I was either going to use a 5v power source or 12v. I don't think 5v will work tho because it's won't be enough to power everything so let's go with the 12v power supply
 

ericgibbs

Joined Jan 29, 2010
21,439
hi,
OK, the only downside of using 12V, is that the motor is 3V, which means we have to drop 9V at say 200mA or 300mA, bit wasteful.
With 5V we could use use two 1Amp diodes to drop the 5V down to 3V.

E
 
Top