SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By jeffcraighead
#158826
I'm trying to use a Panasonic AMN33111 digital output PIR sensor to trigger a device. The device is triggered by grounding a 3v signal line. The AMN has an active high output line. I was able to prototype the behavior I want using an mbed dev board, but I'd like to try and wire this using just a transistor. I've tried using several NPN transistors (BU806 and BU408) and it sort of works. The issue I'm seeing is that the output of the sensor does not behave correctly when wired in my circuit. Instead of being off when no motion is detected and on (3.2v) when motion is detected as it works when not connected to the transistor, it continually jumps between 0 and 3v, like the sensors internal circuit never stabilizes.

I have the emitter of the transistor connected to ground, the collector connected to the 3v signal line of the device I'm trying to trigger and the output from the AMN connected to the base.

Any suggestions for what I'm missing?

Thanks!
By Mee_n_Mac
#158870
jeffcraighead wrote:Any suggestions for what I'm missing?
A schematic or some wiring diagram that "we" can look at.
carnac-the-magnificent.jpg
For example what do you have for a base resistor ? Is the device you're connecting this to amenable to an open collector type output ? Do you need a pull-up resistor on that output ?
You do not have the required permissions to view the files attached to this post.
By Turbo
#159247
I guess the OP found his answer, but I am in a very similar situation and would appreciate any help on the following.

I am using a Panasonic PIR AMN42122, which has the same specs as the AMN33111. According to Panasonic's Napion Motion Sensor datasheet, on detecting motion the output current is 100uf and the output voltage is "Vdd -0.5." I am using it with a 3 volt input (and my test circuit below has the same 3 volt input).

The datasheet gives the following "how to use" wiring diagram for the digital output from page 6 of the datasheet:

http://datasheet.seekic.com/pdfimage/Pa ... 60pdf5.jpg

I have successfully used this diagram to create a simple circuit with an NPN transistor that turns a load ON (which in my case for testing purposes is just an LED) when motion is detected and goes OFF with no motion. So far, so good.

I would like, however, to create the opposite circuit. I would like the LED to go OFF when motion is detected (much like an "open" circuit) and go ON (i.e. "closed") when there is no motion. This will allow me to use the PIR and the circuit to trigger home automation devices that work when normally closed devices are "open."

Based my research, I thought that this would be possible by saturating a transistor to invert the output of the PIR to be compatible with the home automation devices, and I have spend days researching and experimenting with NPN and PNP switches, NOT gates, push-pull circuits, etc..

Based on the fact that the NPN circuit worked (when the base of the transistor was pulled high by the output of the PIR?), I though that I would be able to simply create a reciprocal circuit by using a PNP transistor, but for the life of me, I cannot figure out how to pull the PIR output to ground when there is motion (assuming that is what I should be trying to do?).

Nothing seems to work, and I am beginning to believe that this will not work with just a PNP transistor and I may need to do more (a NPN and PNP?). I think (but certainly don't know for sure) that the problem is the digital output from the PIR is high and there is no way to make it go low to trigger the PNP without more.

I don't have a lot of circuit designing experience but am a very teachable student, and would greatly appreciate any help or directions on what to do or try.

Thanks
By waltr
#159261
Post a schematic of how you are connecting the PNP BJT.
This should work just like the NPN example, just turn the circuit up side down. Use the base to emitter resistor to turn off the BJT.
By dlotton
#159264
Here are a couple of examples on how you can invert the LED state. One is using NPN transistors, the other uses N-Channel MOSFETs. Ther are possible combinations including PNP transistors and P-channel MOSFETs as well.

The stuff on the left is just representing what's in the PIR sensor. The circuit in the center is an implementation with NPN transistors, and the circuit on the right is an implementation using N-Channel MOSFETs. I don't know what your system voltages are, so the component values probably aren't correct for your circuit, but the topopology should work.
You do not have the required permissions to view the files attached to this post.
By dlotton
#159265
Here's a simpler solution if you are using the same voltage supply to drive the sensor and the LED. A single P-Channel MOSFET. You need to pay attention to the max gate voltage (Vgs) of your PFET. If it is less than the supply voltage the circuit should work as shown.

Note, the MOSFETs I used in these schematics are very, very small SMT parts. You probably don't want to use these specific parts if you're building the circuit by hand.
You do not have the required permissions to view the files attached to this post.
By Turbo
#159269
dlotton, thanks very much for the two schematics.

I'll give them a try and pull together what I have been trying to do in the next day or so....

One question: I was going to try MOSFETs, but as I was doing my research, I thought I read that they only work at higher voltages (>4?) so I dismissed them as a possible solution. Was I wrong to do so?
By dlotton
#159270
There are devices that will turn on at less than a volt. There's usually a balancing act between Vgs_th (gate-to-source threshold voltage... where it starts to turn on), Rds_on (ON resistance at a given Vgs), Vds_max (max drain-to-source operating voltage), and Vgs_max (max gate-to-source voltage). There are other parameters to balance as well, but are probably unimportant for your application.

Lower threshold voltage (turn-on voltage) probably also means lower Vds_max and Vgs_max ratings. So pay attention to say within the operating enevelope of the part you select.

If you can post more details of your system(schematics, etc) and have more specific questions, I'm sure people here will be happy to help.
By IdahoMan
#177883
Bump.

I've got me a FoxTech Mini DVR. (http://www.foxtechfpv.com/mini-d1-quali ... p-451.html)
And a NaPion PIR Sensor. (https://www.panasonic-electric-works.co ... sensor.pdf)


I'm in need of a little hand-holding here. I can't afford to break something. Let's see if I understand this..

If I'm reading this correctly:

The DVR:
1-2W
7-16V
100ma approx

I don't know the Amps or Volts at the Alarm-In/GND terminals or how to measure them there without the device running. I need to know.

The Sensor: (pg3 of the link)
standby current(lw) - 170uA Ave.
operating voltage(Vdd) - 3.0VDCmin-6.0VDCmax
output current(lout) - 100uA
output voltage(Vout) - Vdd-0.5V

I'm a noob and don't fully know what all the acronyms mean, but I think I get the idea. On the output voltage though, what does "Vdd-0.5V" mean?

It's a security project for in-the-field surveillance. The picture below shows the point I am at. Assuming the terminals on the DVR have a proper voltage, could I rig it as shown?

If not, I guess I would have to use some kind of means to drop the voltage down from the main source to 5v and then rig some kind of PIR/Transistor/Relay correct? That would be complicated and I imagine the relay would take up a good chunk of current too. Right now I am estimating (if I am doing my math correct) around 220ma on this setup(not including IR illumination) with -let's say- a 40aH, 12V car battery. That's a measly 7days of operation at the very best, not taking into account I probably wouldn't want to fully drain the battery. I am getting this?

On a related note worthy of its own Thread: Anyone familiar with the inner workings of commercial Trail/Game Cameras? Those things can go up to a year in the field on a dozen AA Lithium batteries.

Thanks to anyone can help me out here.


Sincerely,
IM
You do not have the required permissions to view the files attached to this post.
By dlotton
#177884
What is the actual model number of your sensor? Are you sure it is a 'digital output' type?

Vdd is your source voltage (between 3V and 6V according to what you posted). If your sensor is the 'digital output' variety, the sensor output is Vdd-0.5V when detecting. So if you have a 5V source voltage going to the sensor, the sensor output voltage will be 4.5V when something is detected.

The circuit at the bottom of your picture will short Vdd to ground when the output goes active. Not good. It needs to have a resistor between the collector (c) of the transistor and the power source (Vdd). You also need a resistor in series with the base (b).

I didn't find a document for the DVR that described its trigger input.
By Mee_n_Mac
#177886
IdahoMan wrote: I'm a noob and don't fully know what all the acronyms mean, but I think I get the idea. On the output voltage though, what does "Vdd-0.5V" mean?
Vdd is the PIR's supply voltage, 3-6 vdc. So the spec means that when it's detecting the sensor output is somewhere between the supply voltage and the supply voltage - 0.5v.
IdahoMan wrote:It's a security project for in-the-field surveillance. The picture below shows the point I am at. Assuming the terminals on the DVR have a proper voltage, could I rig it as shown?
Nope. The PIR output a +voltage when detecting and the DVR trigger input wants a ground to trigger the DVR.
See bottom of pg1.
http://www.foxtechfpv.com/product/minid ... manual.pdf
IdahoMan wrote:If not, I guess I would have to use some kind of means to drop the voltage down from the main source to 5v and then rig some kind of PIR/Transistor/Relay correct?
That's right. You need a voltage regulator to make 5v (?or maybe 3.3v?) from the ~12v battery. Then a simple transistor circuit (or relay) the "invert" the sense of the PIR output.

RE: your circuit - You need to add a 1kohm resistor between the PIR output and base. And then remove the connection between the PIR Vdd and the collector and replace it w/another "pull up" resistor (10k-20k) between the collector and, ideally, the DVR's internal regulated supply voltage. Since I don't see a DVR pin w/that on it, perhaps run the PIR off a 3.3v regulator (vs 5v) and the connect the "pull up" resistor to the PIR's Vdd. I'm guessing the DVR circuitry runs off 3.3v.

Or use a different PIR.
https://www.sparkfun.com/products/8630

All grounds should be tied to the 12v battery negative line.
By IdahoMan
#177972
UPDATE

First: I connected the DVR to power, then used a multimeter on the "Alarm-In" and "GND" terminals. It measured exactly 3.33v. I don't know what the current is, and I don't know if current or voltage will change once the terminals are closed.

Second: If you'll take this step-by-step with me... Let's say we have 3.33v to work with at the "A-In" and "GND". The objective is to close these two. How would I do that with a transistor? GND to E, A-In to C? Then just need a way to add a little "+" to the base, yes?
By Mee_n_Mac
#177974
IdahoMan wrote: Let's say we have 3.33v to work with at the "A-In" and "GND". The objective is to close these two. How would I do that with a transistor? GND to E, A-In to C? Then just need a way to add a little "+" to the base, yes?
From your measurement I'll say the A-In has some pull-up resistor to it's regulated Vcc (3.3v). That makes it easier. So let me amend my instructions above.

RE: your circuit - You need remove the hard wire between the PIR output and the transistor's base and replace it with a 1kohm resistor between the PIR output and base. And then remove the connection between the PIR Vdd and the transistor's collector. Leave the collector connected to A-In. Keep the ground connections as you have them. This will make an open collector driver.
By IdahoMan
#177986
Mee_n_Mac wrote:
IdahoMan wrote:RE: your circuit - You need remove the hard wire between the PIR output and the transistor's base and replace it with a 1kohm resistor between the PIR output and base. And then remove the connection between the PIR Vdd and the transistor's collector. Leave the collector connected to A-In. Keep the ground connections as you have them. This will make an open collector driver.
The picture below shows the amended diagram as you described.

What does the resistor do here? What values or factors did you use to decide on 1K?

If I understand the PIR sensor, it needs a constant power source connected to its GND(-) and Vdd(+). Then when triggered it outputs on the out(+). Looking at the diagram now shows the PIR without power. Is there no way to use the DVR A-In and GND terminals to power the PIR, or do I have to get it from elsewhere in the circuit (like off the mains)?
You do not have the required permissions to view the files attached to this post.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]