PSoC-Dark sensor.

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 making a dark detector sensor on PSoC3.  I am new to PSoC programing, so I need a little bit of help.     

   

If you look at my Topdesign (The attached file), I am using a transimpedans amplifier ( To convert current flow from my photo diode ( SFH213) ) and further more I am using a comparator to compare two voltages.  I want to make it so that, when it is dark (no or little current flow), the comparator output should be high, then I want to run an interrupts which should sets a pin high.  And when it is low, I want to run an interrupts which sets the same pin low.     

   

Info:     

   

When there is light the positive terminal end of comparator is around 2V.     

   

Negative terminal end of the comparator is 1V.

   

Thank you in advance. 

0 Likes
1 Solution
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

At least one problem is that you enter main(), do the init, then

   

fall out of main() into never never land. You need to place an

   

infinite loop after the init in main(), something like

   

for(;;){ }

   

or

   

while( 1 ) { }

   

 

   

Also consider posting project for rest to be looked at -

   

 

   

    

   

          

   

“File”

   

“Create Workspace Bundle”

   

 

   

Use firefox or IE, not chrome to post.

   

 

   

Regards, Dana.

View solution in original post

0 Likes
12 Replies