IR beam break detection with delay turn off

Discussion in 'Digital Circuit Design' started by Dirtyberti, Jan 2, 2018.

  1. Dirtyberti

    Thread Starter New Member

    Dec 15, 2017
    Ive been dessingen a tracer (a device that detects an airsoft bb and illuminats it)
    Ive had my fair share of troubles in desinging it and perfecting it and after lots of fails and adjustments to make it work i had a working desing that worked on a breadboard bud once i converted it to a pcb its fails me and i have no clue why. The supply is a simple buck boost converter. The detection is an IR led and an phototransistor thats inputs to an comperator with reference voltage by a potentiometer voltage devider. Then that output is put into 2 diodes to bring the constant output voltage from 1.3v to 0 and then into a 555 delay of circuit. On the breadboard it al works bud when i made it on a self desinged pcb it just makes a buzzing sound and the leds stay on or start to flikker. Does anybody got a better way of doing this or knows whats wrong with it new_UV_tracer_schematic-77772e5d23f146b68aaff5f24afa4b95.png
  2. bushrat


    Nov 29, 2014
    Sounds like you may have some problems with your PCB
    Can you post pics of your completed project? Can you post pics of your bare PCB? There could be a short or open somewhere on your PCB.
  3. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    It sounds as if the problem is with the power supply.
    Is the PCB version using exactly the same power supply circuit and components as the breadboard version?
    Can you supply 5V to the rest of the circuit from some other source and not power the power supply section of the circuit to confirm the location of the problem?
  4. philba

    Active Member

    Aug 17, 2017
    The first thing to do is a close visual inspection for solder bridges, pcb shorts, cold joints, mis-mounted components and so on. I assume you don't have an OScope. That would be the next step. Moving along, check your power supply to see if it's doing the right thing. Check the comparator reference voltage. Check the output of the comparator for the two conditions.

    Do you have the breadboard version still? If so, put the PCB and BB versions side-by-side and take measurements to see what is different.

    By the way, it's always a good idea for a beginner to test the board as you are building it. Build up the PS, test. Add on the IR LED and Opto, test. add on the comparator, test. add on the 555 and LEDs, test. Having the previous stages work before moving along makes it easy to know when you messed up.
    Last edited: Jan 2, 2018
  5. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    Q1 and Q2 both need resistors in series with the base.

    Q2 needs a resistor from the base directly to GND. Start with 10K.

    U2 and U3 need power supply decoupling capacitors.

    I'm surprised the circuit even works. Look at the datasheet for the LM201 for the worst case high output voltage when running on 5 V. There isn't one, because the minimum operating voltage is +/-5 V, not a single +5 V.

    The input common mode voltage range and the output voltage range also are not going to be sufficient for what you are trying to do.

    Depending on the forward voltage of the LEDs, a standard (as opposed to CMOS) 555 might not make a high enough output voltage to turn on Q2.

    Start with a signal spec, then choose a part that can handle it. With the diameter and velocity of the bb you should be able to calculate the approximate pulse width out of the photo-transistor. With that you can search for an opamp with enough bandwidth and slew rate to handle the pulse.

    How much current are you trying to pulse through the output LEDs?

    Please post photos of both sides of the pc board.

    Last edited: Jan 12, 2018
    MrSoftware, Dirtyberti and Kjeldgaard like this.
  6. Dirtyberti

    Thread Starter New Member

    Dec 15, 2017
    Ive tested the powersuply with a load up to 3A to test and then it workend fine and the rest i dint chech step by step bud i will do that nect time cause stats not a bad idee
  7. Dirtyberti

    Thread Starter New Member

    Dec 15, 2017
    Thanks for the feedback im gone take it with me in the redesing. The circuit has worked befor on pcb until i made a new version with the adition of the 555 timer for a delay of function. And it can switch Q2 cauze the leds only keeps burning.
    The power through the 2 leds is 1.4A through them combined. 20180103_154947.jpg 20180103_154917.jpg
  8. Janis Blahins


    Dec 10, 2017
    What is ``airsoft bb``???
    If it is kind of infrared security fence, one of best methods is NE567, what in oscillator section creates a meander signal steering the bjt what is steering the LED lamp making a ray, but in sensing chain use the voltage type biasing for LED sensing diode (I mean photovoltaic mode, into transimpedance operational input, what output is sent to 567 sensing section, thus having a PLL fantastical sensitivity, stability, foolproofness (burglar may not be able to fool the system), and nicely stupid simplicity.
    For example - the DC system You use may work few dozen of meters afar, while PLL AC system is able, in extreme, work at bright sunshine in tens of KILOmeters long range of ray (however with simplest systems it may be just several hundreds of meters).
  9. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    Try asking Mr Google.
    It is nothing to do with burglars (I hope!).
    Dirtyberti likes this.
  10. MrSoftware

    Active Member

    Oct 29, 2013
    Plastic BB's for guns designed for them (Airsoft guns). They use the word "soft" so it sounds safe to shoot each other with.