Creating a Delay Circuit

Thread Starter

mattd860

Joined Jan 9, 2016
58
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:

AnalogKid

Joined Aug 1, 2013
8,487
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
 

ScottWang

Joined Aug 23, 2012
6,909

sailorjoe

Joined Jun 4, 2013
363
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.
 

ScottWang

Joined Aug 23, 2012
6,909
I've recently become a fan of the Adafruit Trinket boards. At $7 and $10, they're pretty nice.

https://www.adafruit.com/categories/261
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.
 

ScottWang

Joined Aug 23, 2012
6,909
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.
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
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.
 

djsfantasi

Joined Apr 11, 2010
6,503
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.
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
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?
 

djsfantasi

Joined Apr 11, 2010
6,503
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.
 

ebeowulf17

Joined Aug 12, 2014
3,274
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?
Yes, when set as an output, each pin is either connected to 5V or ground, never left floating.
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
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.
 

wayneh

Joined Sep 9, 2010
16,398
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.
 

ebeowulf17

Joined Aug 12, 2014
3,274
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.
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
You could use a transistor and flyback diode, which should be more compact than most relays.
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
 
Top