I can only guess that it is not a clear 0-5 volt state.
And that is why he simulates the trigger pulse with the two resistors. All the way wrong approach...
Ioannis
I can only guess that it is not a clear 0-5 volt state.
And that is why he simulates the trigger pulse with the two resistors. All the way wrong approach...
Ioannis
Thank you for the answers. The 2 resistors and the button simulate a photodiode, whose resistance increases when it is no longer illuminated by the IR emitting diode (communication is interrupted by the hand interposed on the route). There is NO button !
At work, we make a product that detects hand motion to light up a string of LED's. You can use a FET to drive the soap pump motor. We use the ADC in a 12F675 to detect fluctuations from a 5528 LDR. ADC has 47K pull down resistor, other side of LDR to B+.
IF you use the comparator its as simple as this.it won't re-arm itself until hand is removed
Code:#config __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON #endconfig DEFINE OSCCAL_1K 1 DEFINE OSC 4 CMCON = %00001110 TRISIO = %111011 vrcon=$88 ;about vcc on 2 ANSEL=1 tmp var byte Main: intcon=$40 pir1=0 PIE1=8 asm SLEEP nop endasm if CMCON.6 then gpio.2=1 pause 1000 gpio.2=0 endif goto main END
Last edited by richard; - 12th September 2020 at 12:25.
Warning I'm not a teacher
Thank you very much ! I think this is what I need ! I will tested and post the results. Regards !
Bookmarks