Creating a Delay Circuit

Discussion in 'The Projects Forum' started by mattd860, Jan 16, 2016.

  1. mattd860

    Thread Starter Member

    Jan 9, 2016
    57
    2
    Hello Everyone. I am somewhat new to creating circuits like this but I do have limited experience and plenty of will power :). I'm working on a project to create a delay circuit board (DCU as shown below)) that lights an LED for a variable rate of time depending on the input. Please see my schematic below as well as the description. To start, I need help determining if this can be done using a simple circuit board with resistors, capacitors, diodes, relay(s), perhaps a few NE555 timers, etc.? OR, Will I need a programmable I/O board like an Arduino? I know an Arduino board will work but I feel it's overkill for this project and I was also hoping the final product will be smaller than the Arduino board. Any help will be GREATLY appreciated. Thanks!!!

    Scematic.png
     
    Last edited: Jan 16, 2016
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    What are the limits of the delay time range? Is the range expressed in seconds, minutes, or hours?
     
  3. mattd860

    Thread Starter Member

    Jan 9, 2016
    57
    2
    Seconds
     
  4. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,531
    1,248
    While this can be done with a handful of comparators, a counter or two, and some logic, it pretty much cries out for a microcontroller - either a PIC or something higher level like an Arduino. 0.1 V resolution over a 5 V range equates to 9 bits, so a PIC with a 10-bit A/D can handle this with appropriate 12 V to 5 V regulation and logic signal translations.

    Interesting set of output requirements; what is this for?

    ak
     
  5. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,016
    3,789

    The Arduino Nano is great and smaller than a 40-pin DIP package. For $25 including shipping, you will be ready to go.

    http://www.digikey.com/product-detail/en/A000005/1050-1001-ND/2638989
    image.jpg
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
  7. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
  8. sailorjoe

    Member

    Jun 4, 2013
    361
    63
    Mattd, because of all the "if-then" conditions in your requirements, a programmable device is really the right answer as others have proposed. Your device needs to sense the 12 volt inputs as digital "on/off" inputs, and you need to read the voltage with an A/D converter. Then you have a lot of timing and counting steps to blink the LED correctly. Look into the low cost items described above, and see if one has a price you like.
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    It's really quite small, I just checked the price of online store in Taiwan, almost the price around US 10$ and some exceed that price about 16$ and they claimed that the board was designed for Raspberry pi , I'm not sure what does that means, it just said that Adafruit Pro Trinket - 5V 16MHz for Raspberry pi, but they didn't talk much about that.
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Too many process need to complete, and reading 6 different voltages for the CMOS logic IC could be the big challenge, so using uC is better, and the size will not that big.
     
  11. mattd860

    Thread Starter Member

    Jan 9, 2016
    57
    2
    Thanks All!!! I've ordered the Arduino Nano which should be the perfect size for my application. I do have another question...

    Since the only output for my device will be to ground the black wire going to PIN #6, can that be handled directly by the Arduino board? I.E. Can the programming designate one of the output pins as ground and if it can, will it be safe to handle the ground current that might flow through it? I was thinking it would be safer to use a relay in this situation. For example, PIN #6 would output 5v to a relay would would then connect the black wire previously going to PIN #6 in the image above to ground.
     
  12. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    The current limit for Arduino pins is 40mA. There is a total limit for all pins of 200mA. Hence, you could drive with 5 pins at 40mA or 10 pins at 20mA. If you need more, you'll have to drive the output through a transistor.
     
  13. mattd860

    Thread Starter Member

    Jan 9, 2016
    57
    2
    Alright I'll check the current on the existing system to make sure it's not more than 40mA. However, can the Arduino processor 'tell' one of the output pins to be a grounding source? Or can it only send voltage to the pin?
     
  14. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    It will send either a HIGH signal, which is Vcc, or a LOW signal, which is 0V or ground. Note that this is respective to the Arduino's power supply. If your connecting to another device, they must share a common ground.
     
  15. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    Yes, when set as an output, each pin is either connected to 5V or ground, never left floating.
     
  16. mattd860

    Thread Starter Member

    Jan 9, 2016
    57
    2
    Hmmm - well I will have to use the relay method then because the pin needs to be otherwise 'dead' until the processor is told to ground it. The black wire essentially is the negative side of a coil in a relay. When this wire is grounded then the coil properly energizes and opens the relay. Since there is already 12v on the other side of the relay coming from the battery (same battery that powers the DCU), I'm not sure I'm comfortable with the PIN #6 temporarily sending 5v to the negative side of the relay until it's told to ground the pin.

    I could add a relay which will ground the black wire when the relay coil receives 5v from PIN #6.

    Hopefully all this makes sense because I have a ton of whirling thoughts in my head that are hard to translate via keyboard. Ideally, I would not like to use the additional relay because I'm trying to make the circuit board a small and simple as possible.
     
  17. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    You could use a transistor and flyback diode, which should be more compact than most relays.
     
  18. wayneh

    Expert

    Sep 9, 2010
    12,103
    3,036
    You're on your way to a solution, but I though it would be worth mentioning the LM3914. It's a package of multiple comparators and it's often used to light a row of LEDs to make a bargraph voltmeter. Since you are triggering activities based on voltage, it would offer one way to do that. It obviously doesn't solve your timing problems.
     
  19. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    To clarify my earlier suggestion, here's a pic that's close to what I'm recommending: 00Akl.png
    In your case, you'd have your 12V where the diagram shows "Arduino 5V." More importantly, you'd need the 12V ground and the 5V (Arduino) grounds to be tied together. If you need complete isolation with the two "grounds" floating relative to each other, then this simple solution wouldn't work... although you could probably still get it done without a relay by using an opto-isolator.
     
  20. mattd860

    Thread Starter Member

    Jan 9, 2016
    57
    2
    Alright I studied up a little on using a transistor and found this article here - http://www.technologystudent.com/elec1/transis1.htm. However, I am unsure where to put the flyback diode. I quickly drew up the attached circuit below which basically describes what I'm looking to do but just focuses on the PIN 6 output from the DCU as can be seen in my first post above. Is this basically how to use the transistor and where do I put the flyback diode if it's applicable to my application??

    Transistor Circuit.png
     
Loading...