Creating a Delay Circuit

ebeowulf17

Joined Aug 12, 2014
3,307
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??

View attachment 98978
Why is one contact on your relay tied to ground? Looks like when the relay is activated it will provide a dead short from 12V to ground. Am I misreading something there? Otherwise looks ok to me. Flyback diode connects in parallel across relay coil, reverse biased. See diagram in my last post.
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
Why is one contact on your relay tied to ground? Looks like when the relay is activated it will provide a dead short from 12V to ground. Am I misreading something there? Otherwise looks ok to me. Flyback diode connects in parallel across relay coil, reverse biased. See diagram in my last post.

That was a mistake. I removed the dead short. You and I posted our previous diagrams about the same time so I didn't see it before posting. I see where the diode goes now. Thanks!!!

Transistor Circuit.png
 

hp1729

Joined Nov 23, 2015
2,304
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.
So now instead of just learning electronics you need to learn programming, too. :)
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
So now instead of just learning electronics you need to learn programming, too. :)
Yup! But believe it or not I haven't completely forgot about the semester of computer programming that I took in college about 15 year ago - back when I was a young guy :).

I've already found a few Arduino program examples that I can use to start with. Usually I learn best by being given an example and then pointed in the right direction. I'm sure I will have plenty of programming questions here once I get to it.
 

hp1729

Joined Nov 23, 2015
2,304
Yup! But believe it or not I haven't completely forgot about the semester of computer programming that I took in college about 15 year ago - back when I was a young guy :).

I've already found a few Arduino program examples that I can use to start with. Usually I learn best by being given an example and then pointed in the right direction. I'm sure I will have plenty of programming questions here once I get to it.
Ah, congrats. You are farther along than I took you for.
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
I just can't wait to get started! I have a bunch of electrical components and breadboards on order from Digikey.com due in on Thursday.
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
To clarify my earlier suggestion, here's a pic that's close to what I'm recommending:View attachment 98975
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.

Ebeowulf17 - Out of curiosity, how critical is the diode in this circuit? Can it be omitted and what will be the consequences? Thanks!
 

ebeowulf17

Joined Aug 12, 2014
3,307
I'm still a novice, so I should leave it to someone more experienced to explain it properly, but I think the diode is fairly important for protecting various components, like the transistor and/or the Arduino itself.

My very loose understanding is that when power to the solenoid coil is cut after having previously been energized, the magnetic field which the coil had created collapses. When it collapses, it creates a voltage of polarity opposite to the charge that created it, and sometimes of much higher magnitude. Many circuit components have low tolerances for such reverse voltage and can be damaged rather quickly by field-collapse reverse voltages.

The diode, being oriented opposite the direction of normal current flow, plays no part in the circuit most of the time, but provides an alternate path for the reverse voltage as the field collapses. During this brief time it acts as almost a dead short across the temporary reverse voltage coming from the coil and the energy is quickly dissipated between the diode and the coil resistance. Ideally, the diode should be placed physically as near as possible to the coil, or so I've heard.

Hopefully someone more experienced can step in and clear up anything I got wrong there.
 

ScottWang

Joined Aug 23, 2012
7,409
Your circuit in #22 missed the flywheel diode as ebeowulf17 attached in #19.
You also don't need the 1K resistor from Pin 6 of DCU to Gnd, why will need it, because when the input can't provides a low level as you copied the circuit just used the switch, but it didn't provides the low level.

How much current(mA) does the 12V relay needed?
The calculation for resistor of Rb as :
1. hFe = 10.
2. Ib = Ic / 10 = I_12Vrelay/ 10
3. Rb = (5V - Vbe) / Ib = 4.3V/Ib
If personal application then the hFe maybe unnecessary to count as 10, it can be some more, but you have to choose the hFe of bjt case by case, if you count hFe = 10, then almost of bjt can be used when the current has exceed three times of relay.
 
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!!!

View attachment 98845
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!!!

View attachment 98845
ARDUINO:- Sledgehammer to crack a walnut.

IC 4060 will sort it!"
 
Last edited by a moderator:

ebeowulf17

Joined Aug 12, 2014
3,307
ARDUINO:- Sledgehammer to crack a walnut.

IC 4060 will sort it!"
While an Arduino may be overkill, it seems to me like it would take a LOT more than an IC 4060 to meet the TS's needs (recognizing current voltage levels to determine flash pattern, setting odd differences in flash timing, and using flash patterns that stop after a set number of cycles.) Of course it can be done with discrete components, but it seems like it would take a lot of them. I'd love to see someone put together an example schematic that gets it done. Maybe it's simpler than I think and I can learn from it!
 
While an Arduino may be overkill, it seems to me like it would take a LOT more than an IC 4060 to meet the TS's needs (recognizing current voltage levels to determine flash pattern, setting odd differences in flash timing, and using flash patterns that stop after a set number of cycles.) Of course it can be done with discrete components, but it seems like it would take a lot of them. I'd love to see someone put together an example schematic that gets it done. Maybe it's simpler than I think and I can learn from it!
Check out a typical circuit for the 4060!.......Google it!

Best!

While an Arduino may be overkill, it seems to me like it would take a LOT more than an IC 4060 to meet the TS's needs (recognizing current voltage levels to determine flash pattern, setting odd differences in flash timing, and using flash patterns that stop after a set number of cycles.) Of course it can be done with discrete components, but it seems like it would take a lot of them. I'd love to see someone put together an example schematic that gets it done. Maybe it's simpler than I think and I can learn from it!
 

Attachments

Last edited by a moderator:

ebeowulf17

Joined Aug 12, 2014
3,307
Check out a typical circuit for the 4060!.......Google it!

Best!
Yeah, already did that, and it appears to be a nice oscillator/frequency divider/counter. Did you read the specific list of desired functions that went with the initial schematic? The 4060 might help, but it seems to me like you'd need a separate one for each of the proposed output states, and still need a voltage detecting circuit to determine which output state should be activated.
 
Yeah, already did that, and it appears to be a nice oscillator/frequency divider/counter. Did you read the specific list of desired functions that went with the initial schematic? The 4060 might help, but it seems to me like you'd need a separate one for each of the proposed output states, and still need a voltage detecting circuit to determine which output state should be activated.
As far as his original post went. all he wanted was a delay circuit!
 

Thread Starter

mattd860

Joined Jan 9, 2016
58
Ken - thanks so much for your input! You are right in that I do need a delay circuit but I need one that reacts differently to many different inputs. it seems the IC 4060 can probably handle the various outputs I need (different delay times) but I'm not sure it can handle the proper inputs. I need the delay timer to blink the LED in a loop with a delay time based on one of the 6 voltage inputs from the potentiomenter. I need this loop to run indefinitely until the 2nd input is received which will begin a second loop that will only run for 3 second and then go back to the first loop. I'm being vague but this basically sums it up.
 
Ken - thanks so much for your input! You are right in that I do need a delay circuit but I need one that reacts differently to many different inputs. it seems the IC 4060 can probably handle the various outputs I need (different delay times) but I'm not sure it can handle the proper inputs. I need the delay timer to blink the LED in a loop with a delay time based on one of the 6 voltage inputs from the potentiomenter. I need this loop to run indefinitely until the 2nd input is received which will begin a second loop that will only run for 3 second and then go back to the first loop. I'm being vague but this basically sums it up.

O.K, I guess I didn't read your initial post properly.

Best.
 
Top