Maker Pro
Maker Pro

Experienced eyes needed. Finalizing my project.

Need some experienced eyes to look over my complete design and let me know of any major or minor mistakes I have made.

Description: This circuit is supposed to be a trip alarm circuit. When the photocell goes dark(R7) the buzzer should sound for a predetermined amount of time and then the circuit should automatically reset itself.

I will need to add in an EXCLUSIVE-OR logic gate to the reset of the flip-flop to make sure I don't get a race condition when both SET/RESET are true. If SET is true, then RESET must always remain false and the timer should keep counting till SET is false.

I should probably have a resistor on the base of the transistor(Q1) to limit current.

The one question I have is how do I initially set MR to HIGH on power-up? The flip-flop outputs on power-up will be false/false. I was thinking I could add another logic gate, but the logic behind it is eluding me, anyone have a brilliant suggestion? Does it even matter, does the 4060 consume more power when counting or in reset mode?

Thanks goes out to steve and nick, without them I would be nowhere!!!
 

Attachments

  • complete_project_2.PNG
    complete_project_2.PNG
    65.6 KB · Views: 1,592

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
D1 looks to be unnecessary, and perhaps even harmful. I would suggest you replace it with a 10K resistor and remove the switch in series with it. The push-button switch can connect the input directly to the supply rail.
 
D1 looks to be unnecessary, and perhaps even harmful. I would suggest you replace it with a 10K resistor and remove the switch in series with it. The push-button switch can connect the input directly to the supply rail.

I been trying to understand what you said all day. I want to be able to manually reset the circuit to stop the counting and kill the buzzer. The most logical way to me is to set the reset of the flip-flop high.

Why would I want to add in a 10k resistor and remove the pb switch? I see now D1 is useless with the switch I have, but am still confused on your other statements.

Are my other statements ok? use a current limiting resistor on the base of the transistor and to stop the race condition of the flip-flop use another exclusive-or gate on the inputs? I assume I was correct, but assumption is the mother of all mess ups.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
replace the diode with a resistor and remove the series switch contacts. That way the input of the CMOS NOR gate will always have a valid input. The series resistor will not affect operation. Use the momentary contact switch to pull the input of the NOR gate to the supply rail (as you are doing now). It will override whatever signal is being delivered to this input -- the 10K resistor will limit the current to a small value.

To manually reset at power up, you need an RC circuit that will hold the input high for a short time at power-up.

A base resistor is always a good thing, and I really don't see the need for an XOR gate. If you reset the alarm while the alarm condition is still active it will simply start alarming again and attempt to reset after another time period.
 
To manually reset at power up, you need an RC circuit that will hold the input high for a short time at power-up

The only way I can see this working is by using an inverter. As the capacitor charges the voltage builds slowly, this seems backwards to the functionality I require. I need the voltage to be high and slowly drop over a short period of time. Am I understanding correctly or is my inexperience showing again?

I still am not sure I understand you correctly, how close am I now? In simulation placing the momentary switch behind the resistor to input does not work. I am assuming the resistor is there to protect the output of the 4060????

I feel so stupid sometimes because I am not sure of exactly the role of the component in these situations.
 

Attachments

  • resistor_pb_no_switch.PNG
    resistor_pb_no_switch.PNG
    18.1 KB · Views: 229
Last edited:
I thought I knew how RC circuits worked, but after running a simple simulation using an RC circuit I see know that if I connect the cap to the DC power and the resistor to GND, the voltage starts high and ends low. Just what I wanted, even though I don't fully understand it yet, it works.

Now, if I could just wrap my head around that 10k resistor your talking about. What component am I supposed to be protecting? the output of the 4060 or the input of the NOR gate? The input of the NOR gate has a max current of 1uA, while the output of the 4060 will sink 15mA when low at ~10v supply. At least that is how I read and understood the datasheet, correct me if I am wrong.

Note: the simulation does not reset correctly if I place the resistor in between the momentary switch and the input of the NOR gate.
 

Attachments

  • complete_project_rc_reset_input.PNG
    complete_project_rc_reset_input.PNG
    59.8 KB · Views: 250
Last edited:
Here is where I got that both inputs should never be logic '1'. Which it seems that if both inputs are logic '1' then the system would not work as intended. The output of Q has to be HIGH for the buzzer to sound.

http://wearcam.org/ece385/lectureflipflops/flipflops/
When a 1 is applied to both the set and reset inputs of the flip-flop in Figure 2, both Q and Q' outputs go to 0. This condition violates the fact that both outputs are complements of each other. In normal operation this condition must be avoided by making sure that 1's are not applied to both inputs simultaneously.

Since I have 2 NOR gates left to use on my cd4001 IC, couldn't I use them to construct a XOR gate for the reset input to make sure that reset is always logic '0' when set input is logic '1'?

Note: I would need another cd4001 chip. http://en.wikipedia.org/wiki/NOR_logic#XOR to make one xor gate you need 5 nor gates. that only leaves me with 1 extra. But propagation time is is 3x as long.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I thought I knew how RC circuits worked, but after running...

That's pretty close. But don't connect C4/R10 directly to the input. Connect the junction of C4/R10 to the input via a diode.

The way you've drawn it, the capacitor is charged/discharged each time the level changes state. What you want is the RC circuit to activate once -- when the power is first applied.

Sorry, I'm 10000 miles from home and I can't easily draw the diagram for you.
 
That's pretty close. But don't connect C4/R10 directly to the input. Connect the junction of C4/R10 to the input via a diode.

I even thought about doing that. Ugh, the time I am supposed to use a diode and I choose to take the harder route.

Sorry, I'm 10000 miles from home and I can't easily draw the diagram for you

I just appreciate the help. This time I understand clearly what you mean as I had already thought about the diode.
 
Top