Maker Pro
Maker Pro

Review my circuit

Derftoy

May 9, 2012
7
Joined
May 9, 2012
Messages
7
Ok, I am a real noob and I am doing my best to learn on my own electronics. I am trying to create my first project without any guidance. I have an office and I want to create a simple motion detector where if someone walks through my front door it sounds a buzzer.

Now I have got this to work on my breadboard, but would like it if someone could look over my design and let me know if there are any potential problems.

I purchased the motion detector from here: http://www.adafruit.com/products/189

I am going to attempt to attach the PDF of my circuit design. I used iCircuit on the iPad to create it.

Not sure if the PDF upload worked on the iPad... So here is URL: https://www.dropbox.com/s/9qk0vrfsttrt4np/Untitled.pdf
 

Attachments

  • Untitled.pdf
    29.5 KB · Views: 179
Last edited:

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
May I asked why you put a 100KΩ resistor on the GND of the PIR sensor? No need for it, remove it...

Also is that an NPN or PNP transistor? It's late and I'm about to go to bed (thus the brain is a little slow), but it appears the logic is reversed from what I see, the transistor is 'switching' the positive rail (nothing wrong with that) thus indicating a PNP... Your schematic indicates NPN though? The motion sensor sends signal + when detecting movement that would shut off the buzzer not turn it on if it was a PNP, but if it's an NPN it's in the wrong location and should be 'switching' GND...
 
Last edited:

davenn

Moderator
Sep 5, 2009
14,296
Joined
Sep 5, 2009
Messages
14,296
hi there
welcome to the forums :)

not sure why you put the 100k resistor in the GND wire of the PIR board. ?
its not needed, take the GND wire of the PIR board direct to the negative of the battery
and put a ~ 220 Ohm to 1k resistor in the digital output line to the base of the transistor

cheers
Dave
 

davenn

Moderator
Sep 5, 2009
14,296
Joined
Sep 5, 2009
Messages
14,296
haha cocacola
my response was drawn out as I was cooking dinner at the same time
as you can see i was asking the same thing

Ohhh that was othe other thing I ment to comment on too

The load "usually" goes between the positive rail and the collector of the transistor
when using a NPN transistor as shown

Dave
 
Last edited:

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
haha cocacola
my response was drawn out as I was cooking dinner at the same time
as you can see i was asking the same thing

Dave

Maybe you can decode the transistor, my brain is already asleep :D
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,769
Joined
Nov 17, 2011
Messages
13,769
Note 1: Why do you connect the GND pin to - by a 100 kOhm resistor? This will block all current into the detector. I suggest you remove the resistor

Note 2: You should instead insert a resistor between theOUT pin and the base of the transistor to limit the current. The resistance is ~2.7 V / (100*Ibuzzer) where Ibuzzer is the current through the buzzer and a transistor gain of 100 is assumed. If the buzzer is not loud enough, experiment with this resistor.

Note 3: If you follow the link on the distributor's page you'll find lots of application information http://www.ladyada.net/learn/sensors/pir.html

Harald

BTW: the uploaded PDF I could not open. The linked PDF works.
 

davenn

Moderator
Sep 5, 2009
14,296
Joined
Sep 5, 2009
Messages
14,296
yup we covered your points 1 and 2 ;)

Dave
 

Derftoy

May 9, 2012
7
Joined
May 9, 2012
Messages
7
Ok, I did some changes to the circuit, here is the PDF... https://www.dropbox.com/s/b0axud0718tpycb/Motion Detector.pdf

The example on the website to test the detector uses an LED to indicate motion. My 6V buzzer will not work on the 3.? Volts coming out.... So I decided to put an NPN transistor. That way when there is motion, it will trigger the transistor to open up the 6V current to the buzzer. When there is no movement it turns off the 3.? Volts to the base of the transistor and no current flows.

It works on the breadboard no problem. I don't need a diode to protect my transistor do I?

And by the way thanks for all the input....
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
This may work, but you are running the buzzer off about 2.6V the way it is wired. This is because the base has to be about .7V above the emitter for a transistor to turn on. If the sensor is putting out 3.3V on the base, emitter can only go up to 2.6V.

If you switch to buzzer so that it is between the collector and the 6V, and connect the emitter directly to ground, you will get nearly the entire 6V on the buzzer.

Also the way you have it wired, the transistor is acting like a reisistor dropping 3.4V, so it will likely get warm if not hot. When connected the other way it will run cool.

Bob
 

davenn

Moderator
Sep 5, 2009
14,296
Joined
Sep 5, 2009
Messages
14,296
just so its easier for everyone to view....


attachment.php



you still didnt do as suggested and that was to put the buzzer into the collector leg as
I have shown in the above circuit. This results in less stress on the transistor


Dave
 

Attachments

  • PIR-BZ CCT.GIF
    PIR-BZ CCT.GIF
    7.8 KB · Views: 134

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
As said, you should move the Piezo buzzer to the collector. Also, I think 220 Ohms for the base bias resistor is much lower than needed but it will depend on what the buzzer draws @ 6V. What's the current spec? BTW, your schematic shows 6V powering the PIC. Is that correct? I'm not used to seeing PICs run above 5V Vdd but maybe I've not been staying current.

Edit: Another schematic was posted since I posted this. There's no PIC? I guess that was supposed to be a PIR. Disregard the PIC statements.
 
Last edited:

Derftoy

May 9, 2012
7
Joined
May 9, 2012
Messages
7
Amazing...

That Makes sense to me now... I appreciate it. Like I said, I am very new at this. I am going to try and do the math and see if I can run the numbers on such a simple circuit... I appreciate all the help...
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
just so its easier for everyone to view....


attachment.php



you still didnt do as suggested and that was to put the buzzer into the collector leg as
I have shown in the above circuit. This results in less stress on the transistor

Back from the dead that transistor arangment looks much better and doesn't give my tired brain a headache :D

There's no PIC?

It's a self contained Asian Passive Infrared Sensor, it has a small 3.3v regulator on board...
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I just realized that I think we're all assuming that the buzzer is a Piezo based tone oscillator. If it isn't and is electromechanical you will need a Diode reverse biased across it. Failing to do so will probably pop your transistor.

Not needed for a Piezo Buzzer though. ;)
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
I just realized that I think we're all assuming that the buzzer is a Piezo based tone oscillator. If it isn't and is electromechanical you will need a Diode reverse biased across it. Failing to do so will probably pop your transistor.

Not needed for a Piezo Buzzer though. ;)

I had considered that but I believe he stated it was a Radio Shack buzzer and they are piezo...
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I had considered that but I believe he stated it was a Radio Shack buzzer and they are piezo...

Ah, not all of them unless they dropped the electromechanical models that they sold. They were rectangular and as I remember 6V. ;)
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Ah, not all of them unless they dropped the electromechanical models that they sold. They were rectangular and as I remember 6V. ;)

I believe the only one they sell that is electromagnetical is their 12v one, all the rest are piezo...

The fly back diode won't hurt either way...
 
Top