Cypress技术论坛
直播中

乔占宽

7年用户 186经验值
私信 关注
[问答]

如何在PSoC3上做暗探测器

您好!
我在PSoC3上做了一个暗探测器。我对PSoC编程很新,所以我需要一点帮助。
如果你看我的TopDead(附加文件),我使用TrimSimes放大器(转换从我的光电二极管(SFH213)的电流),我还用一个比较器来比较两个电压。我想使它,当它是黑暗的(没有或很少的电流),比较器输出应该是高的,然后我想运行一个中断,应该设置一个引脚高。当它是低的,我想运行一个中断,设置相同的引脚低。
信息:
当有光时,比较器的正端在2V左右。
比较器的负端为1V。
先谢谢你。
触觉感受器
16.3 K

以上来自于百度翻译


     以下为原文
   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.


回帖(6)

乔占宽

2019-7-24 13:12:07
嗨,我又创造了一捆。我仍然有相同的问题与中断不工作,也在添加一个while循环。
设计01.CyWrk.Access 016.Zip
1.4兆字节

以上来自于百度翻译


     以下为原文
          Hi again I created a bundle. I do still have the same problem with the interrupt not working, also after adding a while-loop.   

举报

王琳

2019-7-24 13:21:28
我建议你在TIA的输出端加一个模拟管脚,测量电压。TIA正在倒转,我不太确定极性是否正确。
鲍勃

以上来自于百度翻译


     以下为原文
  I would suggest you to add an analog pin to the output of the TIA and measure the voltage. The TIA is inverting, I'm not quite sure if the polarity is right.
     
    Bob
举报

杨军

2019-7-24 14:09:05
TIA的转换g是反馈http://en.wikipedia.org/wiki/transimpedance_amplifier R.
你要衡量abvsolute光水平,或者只是简单地打开/关闭
基于一个简单的传感器,如反向偏置二极管?如果前者校准
传感器可从Avago,Rohm,VISHY等。如果后者只是一个比较器
TIA一般来说绰绰有余。事实上,你可以通过使用简单的方法来消除短暂性脑缺血发作。
一种基于R的光电池,如镉型细胞控制输入电平在分频器
比较器。在这个配置中设置比较器与歇斯底里。
HTTP://E.WiKiTo.Org/Wik/光敏电阻
问候,Dana。
代表性的例子(照片可能是镉或二极管或光电晶体管,显示W / O回)—

以上来自于百度翻译


     以下为原文
  The conversion G of the TIA is its fdbk R.                 http://en.wikipedia.org/wiki/Transimpedance_amplifier
     
    Are you trying to measure abvsolute light level, or just simply turn something on/off
    based on a simple sensor like a reverse biased diode ? If the former calibrated
    sensors are available from Avago, Rohm, Vishay, and others. If latter just a comparator
    and TIA is generally more than enough. In fact you could eliminate TIA easily by using
    a R based photocell, like a cadmium type cell controling input level in a divider to
    comparator. Set the comparator up with hysterisis in this configuration.
     
        
              http://en.wikipedia.org/wiki/Photoresistor
     
    Regards, Dana.
     
    Representative example (photo could be cadmium or diode or photo tranistor, shown w/o hysterisis) -
     
   
举报

乔占宽

2019-7-24 14:27:54
我想在PSoC3上实现整个事情。它应该相当精确,但基本上它的目的是打开/关闭灯。
ADC采样如何?

以上来自于百度翻译


     以下为原文
  I want to implement the whole thing on the PSoC3.  It should be pretty precise, but basically the purpose it turn light on/off.       

    What about sampling with an ADC?        
举报

更多回帖

发帖
×
20
完善资料,
赚取积分