Using PIR Sensor on Psoc4 BLE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

   

i am stuck using pir sensor on Psoc4 BLE, I've found a documentation explaining how to use pir on psoc family, and set the necessary circuit to obtain low-pass and high-pass filter as external. Datasheet says that i need 2 opamps to amplify signal coming from sensor, and 2 opamps for comparing(even if 2 opamps are available for psoc4 ble, i've tried to make that circuit) . I also use adc and drive led with pwm for observing voltage change depends on movement. I may have some wrong points about using gpio pins. I am not sure and cannot understand which step is wrong. My circuit is not working. I am sharing my project file and circuit picture. I know circuit is so complicated to figure it out; but you may give me a clue about my wrong. I am looking forward to hearing your response.

   

 

   

Note: Circuit in DSC_0516 and 0517, resistors i used at above are for amplfication with opams, te other ones are for filter operations.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Now you are using OpAmp2 correctly.

   

Your level-shift is not correct, attached some advices from Dana

   

 

   

Bob

View solution in original post

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There is an error in the .zip file, I cannot open it.

   

At a first sight on your schematic in circuit.png I can see a pitfall:

   

The incoming signals to the amplifiers can be below GND due to the capacitor. Inputs to the PSoC must be >= GND and <= VDDA. So you'll need a level-shift R-network. Connect the output of your OpAmp to an analog output pin and control with a scope.

   

 

   

Bob

lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Thanks for your answer, i'am measuring the output with multimeter and there is no voltage though!, and when i look the input of the opamps there is no signal, do not understand why this happen, both the test circuit  of pir and datasheet i sent to you, show this diagram.

   

I am sharing my fixed zip file again.

   

Thanks!

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Your schematic shows an AC coupling, you cannot measure anything with a multimeter.

   

Can you post your complete schematic including your resistor and caps values?

   

The second OpAmp does not function as an amplifier, it will always output GND or VCC depending on the output of the first OpAmp. Would be easier to use a comparator instead, no ADC needed. Not quite clear what you want...

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

This is my actual circuit, can u please explain why i cannot use the second opamp as an amplifier, and if u have some advises to work this circuit in a different way, would be good to know that. I just draw that circuit based on the datasheet from cypress. (circuit.png)  i am new in to psoc/embedded systems, and u know, it's a bit hard to get used to psoc for beginners. I put the ADC because of converting analog amplified signal to digital value, and i take the value, send via uart to pc and want to observe change on voltage when i put my hands on pir sensor.

   

Thanks!

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Now you are using OpAmp2 correctly.

   

Your level-shift is not correct, attached some advices from Dana

   

 

   

Bob

0 Likes
Anonymous
Not applicable

I really thank u for your help, i gonna try to make a different level-shift network.

0 Likes