another thing... there's something missing on GP0...
another thing... there's something missing on GP0...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Ok, yeap. Fast drawing. Missed that.
There should be 10K resistor tied between GP0 and +5V supply.
Meanwhile, IR LED will never work at the same time with TRIAC. Once there is a detection then TRIAC will be fired for the adjusted duration (by AN0 reading).
For IR encoding, I was thinking like 500Hz.
--------------
Last edited by sayzer; - 15th October 2006 at 09:47.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi,
You mentioned that you won't be using a ready IR detection moduleThen why stick to 38KHz you can simply use anything that suits your PIC. In fact you can turn-on the LED, immediately look for the transistor and if found on then do it in a loop to prevent ambient light trigger.If I want to add an IR detection feature to this circuit, then I need to assign a frequency to the IR LED, and read it through the photo transistor (not by traditional 38Khz or 56Khz IR detector modules).
And as I suppose its going to be a hand drier you can control the leakage of ambient light into your phototrans.
Regards
Sougata
Hi sougata,
Thanks for the comments. Yes the application is hand-dryer.
But, I am not quite clear about your idea.
Could you please be more specific?
BTW; The idea of not using ready IR modules is for cost purposes.
-------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi,
You know when you have turned on the LED, so you know technically when to check for a (0) in your app. So the frequency doesn't make any sense. Now there can be two conditions :
1. The LED is ON and you sense it via the photo
2. The LED is not ON still you sense by the photo (ambient light)
Use IR Filter to obviate the 2nd Issue now say you find the photo on against a LED ON then check it in a loop:
Turn off the LED and the photo should be OFF if not then ambient light (not likely if taken care of)
Turn On the LED and check again , do this turn on-off thing in a loop and if the condition satisfies reset your internal "off" counter. If you detect no object then turn off the TRIAC after the specified delay has elapsed.
You won't be doing Phase Angle Control I suppose so should not be very complicated. If doing a phase angle control then a little bit more complex. Choose the zero cross to set your fire angle and object detection. Cause anyway you would be firing the TRIAC a little later...
P.S. - For a cheap IR filter for your test , expose a colour film for about a minute in normal fluroscent light develop it and the black negative is your I.R. Filter. Read somewhere on the web never tested.
Regards
Sougata
I was thinking of using a PWM signal for the LED. 12F683 could be handy here.
Start the HPWM of x KHz, and use the internal timer to count in background. With a decent prescaler, it should reject most part of the ambient light.
Just an idea... in theory it works.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thanks for the details Sougata. I am definitely taking all info into consideration.
And For 12F683, I will check the price and see if it is any advantage over using 12F675.
I am currently working on this thing.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks