Conveyor Alert System Circuit

Discussion in 'The Projects Forum' started by StiffCookie, Jan 18, 2016.

  1. StiffCookie

    Thread Starter New Member

    Jan 18, 2016
    8
    2
    Hi everyone!

    I'm having a bit of trouble here and I'm wondering if anyone can help me.

    I'm trying to design a circuit that is triggered by an object moving along a conveyor at a set point (via LDR/phototransistor etc.). When triggered, I want the circuit to light an LED steadily with a single repeated audible beep every 10 seconds or so. When it is triggered a second time I want that LED to turn off and a different LED to light steadily whilst the beep changes to 2 beeps at the same interval and stay in that state until reset by the operator, where it should start over. The objects being carried along the conveyor can vary quite a lot in size so I need to be sure each trigger only counts as one input, no matter how long time wise it's being triggered for (if that even makes sense).

    Now, I think I've pretty much got the input side down, using an LDR and variable resistor connected to a comparator so I can set the sensitivity. I've built this on a prototyping board and got it working. Now I'm just stuck on the part that makes stuff happen! I've been looking into logic gates, flipflops, 555's and PIC's etc and I really don't know which way to take this. I'm not very knowledgeable in any of these even though I did use them all in college! (Bad memory!).

    I guess what I'm trying to ask is what would be your recommendation as to which method to take? After messing about a bit making some circuits, I'm starting to think the PIC route might be the best idea. But I really wanted to make the circuit using separate components, more fun!.. Rather just using code (plus I would need to buy another PIC programmer, haha!).

    Anyway, any input at all would be massively appreciated!

    Thanks a lot!
     
  2. DNA Robotics

    Member

    Jun 13, 2014
    122
    26
    I am thinking a circuit with 555 or 556 timers that one would turn on an LED and trigger the other timer to beep every 10 seconds. Another identical circuit would also light & beep when triggered until reset.
     
  3. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Yeh a 556 and a cd4017 to count upto two would work, i would use a led and photo diode as a beam break sensor.
     
  4. StiffCookie

    Thread Starter New Member

    Jan 18, 2016
    8
    2
    Thanks guys I'll give it a go over the weekend and let you know how I get on! :)

    Any other input would still be appreciated if you have any other ideas :)

    Thanks!
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,368
    Not sure if you are up to going this route, but a Smart Relay would ace it, and you would have conditioned I/O.
    There are a few makes, most are just relabeled.
    [​IMG]
    Max.
     
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    This can be handled with a very small amount of digital logic. If you already are fluent in PIC or Arduino, then they are options. Otherwise, discrete hardware will be a faster solution.

    The description of the various logic conditions is not totally clear. Is "every 10 seconds or so" the rate at which packages are coming by, or do you want it to beep every 10 seconds even if nothing is going by?

    Is this correct:
    1. Reset condition - no sound, no lights
    2. First object detect - Green LED, beeper chirp once every 10 seconds
    3. Long time gap - Green LED, beeper chirp once every 10 seconds
    4. Second object detect - Red LED, double chip every 10 seconds
    5. Long time gap - Red LED, double chip every 10 seconds
    6. Third object detect - Red LED, double chip every 10 seconds
    7. Reset - no sound, no lights

    ak
     
  7. StiffCookie

    Thread Starter New Member

    Jan 18, 2016
    8
    2
    Yeah that's exactly right, though it might be nice to have say, a green LED in reset state, orange after the first object then red after the second and stay in that state until reset, regardless of extra triggers. Sorry I wasn't clearer on that. I don't know anything about Arduino, but yeah I think I could handle programming a PIC if it comes to it, I think I remember a little! Thanks for the input :)

    That seems like a very good option for what I want Max, thanks for that! But I think I'd prefer to create something myself, got the creativity bug at the moment :)

    Thanks again guys
     
  8. StiffCookie

    Thread Starter New Member

    Jan 18, 2016
    8
    2
    Hey again guys,

    Ok, so I had a little play around in a circuit simulator program and this is what I've got so far. I apologize in advance for the million broken rules and mistakes, it's been a long time since I did this kind of thing. :)

    So, I have a photo transistor input with a pot to set sensitivity into a comparator. The output of the comparator triggers the clock of the 4017 and turns on the amber LED (middle one) since the green LED (left one) starts active when the 4017 is powered up. The second trigger turns on the red LED (right side) and also the enable pin on the 4017 causing the count to stop. Subsequent triggers no longer change the state of the circuit. There is also a reset switch on the 4017 that the operator can use to reset the circuit.

    I just thought I'd check this out with you guys, again I'm sure I probably did a few things wrong (at least) but every critic/comment is very welcome. Once I get the ok with what I've got so far, I'll crack on with the timer circuit for the audible beep.

    [​IMG]


    Thanks again guys!
    Stiff
     
  9. bertz

    Member

    Nov 11, 2013
    238
    31
    What is the width of the conveyor? Will ambient light be a problem? I would suggest an infra-red emitter and photo-transistor to minimize the effects of ambient light. If the distance is too great you may need optics to focus the beam.

    You really don't need a comparator. All you are doing is measuring the voltage drop across the resistor in series with the photo-transistor and then amplify it if necessary to get it to logic level similar to the attached circuit.

    amplified photo-transistor.jpg
     
  10. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
  11. bertz

    Member

    Nov 11, 2013
    238
    31
    You must put a resistor is series with the LEDs. As shown, they will pop as soon as you apply power, or you can do a Dodgydave suggests and use a single resistor in a common cathode configuration. A 220 ohm resistor should do the trick.
     
  12. StiffCookie

    Thread Starter New Member

    Jan 18, 2016
    8
    2
    Hi Bertz, thanks for the reply. I've attached some images to give you a better understanding of the conveyor. I want the sensor to be where two conveyors meet. There is a gap of about 2-3 inches between them which I think should be enough. The objects are always aligned close to the front edge of the conveyor so they will always pass through the sensor.

    Also thanks for the tip about the comparator, I really appreciate that! I used a comparator in a similar circuit in college and kind of had the idea stuck in my head! I've simulated the new circuit and it works perfectly, so much cleaner and tidier now. Thanks!

    1. [​IMG] 2. [​IMG]

    1. This is the kind of conveyor that I'll be using.
    2. Here is the arrangement of where the two conveyors meet (where I want the sensor to be). It's miles out of allignment and scale, I just wanted to give you an idea with my professional MS paint skills! ;)

    Actually thinking about it, I might reverse the emitter and receiver positions as I think there will then be less interference from ambient light.



    Thanks Dave, I've modified the circuit as per your recommendation. Thanks a lot, it's so much cleaner now and less components! :)
    Did I get the power on reset cap correct? It looks right to me but I could be very wrong! ;)

    One question, is it feasible to add a capacitor (C2) like this to delay the trigger slightly and keep it high for a few seconds to prevent double triggers? Some of the objects can have gaps in them so I don't want that to trigger the circuit twice.

    Here is the updated circuit:

    [​IMG]

    Thanks again guys, I appreciate the help so much!
    StiffCookie
     
  13. StiffCookie

    Thread Starter New Member

    Jan 18, 2016
    8
    2
    Hi Bertz,

    Yeah I did realize that about 2 seconds after I posted it! I just didn't get around to modifying it :) But thanks for that yeah, updated!
     
  14. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Looks good to me, if you want to ensure a clean pulse, the capacitor C2 will hold the transistor on but its trial and error trying to get a pulse long enough to prevent double pulses, you could feed the opto into a 555 monostable with a pulse of 100msec, it would serve as a debounce trigger.

    Note the way you have the counter set up, it will stop counting on the 2nd pulse, and stay on 2 until reset.
     
  15. bertz

    Member

    Nov 11, 2013
    238
    31
    What is the distance between the emitter and receiver? You may need to boost the output of your emitter.

    Are you familiar with the Picaxe line of microprocessors? Super easy to program (even for a complete novice) and provides lots of flexibility.
     
  16. StiffCookie

    Thread Starter New Member

    Jan 18, 2016
    8
    2
    Thanks Dave I'll keep that in mind. I think I'll just prototype with the cap and experiment with values for the debounce and see how it goes for now.

    Yeah that's exactly what I want. Green light with no trigger, orange when there's one object and red when there's two or more objects, until reset.


    Not sure about the distance yet, but I could most likely fit the IR emitter between the two conveyors . The objects on the conveyor are never more than say, about 12-15mm high so I'll probably make the distance between the emitter and receiver about 100-150mm to give some decent headroom. I may even make the arm that holds the receiver on a vertical sliding adjustment for some flexibility.

    I'm not familiar with Picaxe, but I do have a little experience with the Microchip PIC family. I'll check it out! Thanks

    Cheers guys!
     
  17. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,368
    There are many industrial sensors that offer that distance no problem, for example Pepperl+Fuchs offer one which goes to 45m!!
    If this is used in an Industrial application, it needs to be industrial 'hardened'.
    Max.
     
  18. bertz

    Member

    Nov 11, 2013
    238
    31
Loading...