Challenging Projects - IR Object Detector with Transformerless Power Supply


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185

    Default Challenging Projects - IR Object Detector with Transformerless Power Supply

    Hi there,

    I am wondering if a project as in below circuit can be done.

    With the help of mister_e, I have already, well mostly mister_e, done the controlling of TRIAC as an ON/OFF gate to the load (motor/heater) using transformerless power supply.

    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).

    Thus, it becomes challenging while there is an ongoing sensitive interrupt process for the firing of TRIAC.

    I am thinking, since the code is being run by serial execution, IR LED will never be encoding at the same time with detection of photo transistor. Thus, I put photo transistor to Timer1 module in counter mode. So that, it can count in the background once the code starts encoding the IR LED.

    I would appreciate comments on this circuit.

    Doable?



    ------------------------------
    <img src="http://img10.picsplace.to/18/IR2.GIF" alt="Image Hosting by PicsPlace.to" >

    ------------------------------
    Last edited by sayzer; - 14th October 2006 at 22:45. Reason: Typo Mistake: 0.047 => 0.47
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    This Triac have a better di/dt than the first one we selected for sure.. but it has also one bug. The Current gate should be at least 30mA.. and usually we double it for safety sake.. i said usually. So a bit demanding for a single PIC i/o... but for a few ten or hundreds uSec of hold time it may work without stressing too much the i/o. Two i/o in parrallel is maybe a better choice OR external driver.

    Now you must filter the opto-transistor output as it will certainely pick-up more than the I/R spectrum. At least a high-pass filter will remove some mess. A simple R/C circuit on the PIC input? Maybe...

    Is the current enough for the I/R led and for this application... i may have some doubt on it. This bring this LED driver stuff once again or use i/o in parrallel... wich never turned me on. even if it could work in theory.

    all that new current need may probably be too much for the transformerless PSU.... but at the same time we still working with short pulses, and and and. Worth a try for sure. Keep the scope on the rails to see what's happen. Increase C3 (wich have to be 0.47uF and not 0.047 uF anyways ) if much current is needed. You know my opinion of transformeless PSUs anyways...

    So there's tons of maybe once again!

    PS, i would certainely add a snubber for this TRIAC or use BTA216 instead... without snubber.
    Last edited by mister_e; - 14th October 2006 at 22:12.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Talking

    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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 10:47.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  5. #5
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default One simple question

    Hi,

    You mentioned that you won't be using a ready IR detection module
    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).
    Then 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.

    And as I suppose its going to be a hand drier you can control the leakage of ambient light into your phototrans.
    Regards

    Sougata

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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

  7. #7
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Hope I am readable this time

    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

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.

  9. #9
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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

  10. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    More codespace
    1 Hardware PWM
    internal OSC up to 8 MHZ

    If i refer to digikey, the price difference for a single 8pin DIP is in the worst case 0.36$ mmm, i know, sometime it's enough.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  11. #11
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Sometimes I think that I can even sell parts to Digikey.

    If you know what I mean.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. Transformerless Power Supply of 1A at 5Volts!
    By Ioannis in forum Schematics
    Replies: 22
    Last Post: - 10th September 2016, 22:17
  2. Transformerless Power Suppply
    By ERIK in forum Schematics
    Replies: 75
    Last Post: - 3rd September 2012, 16:08
  3. PIC backup power supply: switchover ???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 18th April 2008, 18:05
  4. Transformerless Power supply
    By nikhil in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th January 2007, 08:07
  5. Transformerless Power Supply
    By volkov in forum General
    Replies: 15
    Last Post: - 3rd July 2006, 00:13

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts