Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Touch circuit sound, led. 555 timer

Status
Not open for further replies.
I'm repeating myself to be sure were on the same page.
A latch completes a cycle of the relay closing and opening on one press and release of the button.
A pulse would require 2 separate button presses to do the same thing.

sorry to keep repeating but I want to focus only on the 4013 part of the circuit for now because it is a critical part of the circuit. If it doesn’t work as expected, the rest of the circuit won’t work.

when I stated that the a button press causes a pulse, the release of the button should do nothing. The button connects to a differentiator that detects when the button output voltage goes from 0v to +5v and generates a pulse that clocks the first 4013 FF. The first FF then clocks the second FF causing it to toggle its state. When the button is pressed down again this cycle repeats.

So releasing the button should not cause the second FF to ever change state.
The second FF should only change state when the button is pressed downward.

Is it possible you are inadvertently pressing the button more than once?
Remember... this button is only for test and will be replaced with the sensor input.
 
Last edited:
So currently when the button is pressed and released pin 13 (depending on its current state) goes hi or low.

On power on, pin 13 should be low.
After power on:
When the button is pressed, pin 13 should latch high.
When the button is pressed again, pin 13 should latch low.
This should repeat every time the button is pressed.

The FF output can only have two states: low or high. I'm using "toggle" to mean it changes from its current state (initially low) to its next state (high). In either state, the output should "latch".

Is this how its working?

FYI-When we re-enable the timer, the 4013 circuit will operate a little differently, but we need to be sure this test is successful first.
 
when I stated that the a button press causes a pulse, the release of the button should do nothing.
It does this most of the time.

releasing the button should not cause the second FF to ever change state.
Sometimes it does this though. I dont mean to joke around but I'm getting a bit depressed.

Yes I will not pay attention to anything other 5hat getting pin 13 and this makeshift button to do what its supposed to do. I did try changing the power supply to a 5.0v 700ma wallwart. There was no change in function.
 
When the button is pressed, pin 13 should latch high.
When the button is pressed again, pin 13 should latch low.
This should repeat every time the button is pressed.

The FF output can only have two states: low or high. I'm using "toggle" to mean it changes from its current state (initially low) to its next state (high). In either state, the output should "latch".
Most of the time yes but every once in a while it will change its state when the button is pressed and then change state again (hi to low) when the button is released.
 
It does this most of the time.


Sometimes it does this though. I dont mean to joke around but I'm getting a bit depressed.

Yes I will not pay attention to anything other 5hat getting pin 13 and this makeshift button to do what its supposed to do. I did try changing the power supply to a 5.0v 700ma wallwart. There was no change in function.

If its any comfort, I have the circuit on the bench and it works perfectly.
Sometimes these circuit can be stubborn. :)

The 5.0v wallwart will be good to use. I recommend taking a break till tomorrow..
 
Good morning.

I discovered an issue with the 4013 test and its my bad.:banghead:
So...to fix this test.
1. reconnect power to the timer pin 8.
2. disconnect the wire at 555 trigger pin 2. This will prevent the timer from resetting the 4013.

This will correct the 4013 test procedure. I updated post #42.

In addition, add a diode (1N4148) from 4013 pin #3 to ground (cathode to pin #3, anode to ground). This will prevent a negative spike from triggering the 4013.

Sorry for the mixup.....
 
add a diode (1N4148) from 4013 pin #3 to ground. This will prevent a negative spike from triggering the 4013.
Just to be sure I connected the diode the right direction
 

Attachments

  • 20210120_114242.jpg
    20210120_114242.jpg
    1.6 MB · Views: 241
1. reconnect power to the timer pin 8.
2. disconnect the wire at 555 trigger pin 2. This will prevent the timer from resetting the 4013.
Ok. Ive done this and performed the test. It still has erratic behavior. Sometimes it goes only hi or low on a complete button press (5-10 times in succession) and sometimes it goes both hi then back to low on a single complete button press. (4-5 times in succession or at times just once).
I tried converting an mp4 to gif,zip but it would not attach to this fourm.
 
Ok. Ive done this and performed the test. It still has erratic behavior. Sometimes it goes only hi or low on a complete button press (5-10 times in succession) and sometimes it goes both hi then back to low on a single complete button press. (4-5 times in succession or at times just once).
I tried converting an mp4 to gif,zip but it would not attach to this fourm.

Did you reconnect power to the timer pin8? and disconnect timer pin 2?
Also connect timer pin 2 to +5v (nothing else connected to pin 2, except +5v) to be sure the timer is not triggering.

Hmmm...What are you using for a button? Can you show a photo of the button connections?
 
Did you reconnect power to the timer pin8? and disconnect timer pin 2?
Also connect timer pin 2 to +5v (nothing else connected to pin 2, except +5v) to be sure the timer is not triggering.

Hmmm...What are you using for a button? Can you show a photo of the button connections?

Also double check the connections to 4013 pin 3. Make sure the wires and components are properly seated.
Check the values of the resistors and capacitor X12,X13...both should be 0.22uf (220nF), 10v minimum. X11 should be 0.1uF.

If the values are correct, then I'm thinking there are loose connections at multiple points of the circuit.
The 4013 behavior seems to be changing in unexpected ways which is probably caused by loose connections.
 
Last edited:
If the values are correct, then I'm thinking there are loose connections at multiple points of the circuit.
The 4013 behavior seems to be changing in unexpected ways which is probably caused by loose connections
What i will do is check thoes components and if they are right ill put this board aside, leave as is and build a second one.
 
What i will do is check thoes components and if they are right ill put this board aside, leave as is and build a second one.

Suggestion.

if you rebuild this, build it in such a way that you can easily isolate sections and test each section independently.

For example, the 4013 debouncer and toggle can be tested independently without the other parts of the circuit.

That way, complete system test is just a matter of interconnecting each section and testing as a whole system. If you run into problems...well you already know how to isolate a section and test it. Your chances of success will be much greater.

I use this method myself and it works great. I call it the "divide and conquer" method. Divide the circuit into smaller parts. Build and test each one. Interconnect them and test as complete system.

At this point, its not the design. Something is causing problems like loose connections.

I know it can be frustrating, I've been there.
 
Last edited:
At this point, its not the design. Something is causing problems like loose connections.

I know it can be frustrating, I've been there.
I re tested all connections and they were sound. You mentioned the type of button and I remember reading something about button bounce. I looked it up and can see you have applied it to this circuit. I then changed the button to one of my no/nc mico pin switchs and it worked without fail 35 times in succession. I then shorted the (no) side and it now works (changes the 4013s state) when the switch is pushed or released. (Sort of like a latching pulse)That would simulate the pantry door opening or closing. That worked over 50 times without fail. That now eliminates the need for another switch circuit. If I only had a scope I would have seen the other buttons behaviour. I then attached the touch switch and set the output to pulse high. It works too. No fail
 

Attachments

  • 16112105509956736135685528691792.jpg
    16112105509956736135685528691792.jpg
    783.5 KB · Views: 228
I then shorted the (no) side and it now works (changes the 4013s state) when the switch is pushed or released. (Sort of like a latching pulse)That would simulate the pantry door opening or closing. That worked over 50 times without fail. That now eliminates the need for another switch circuit.
Maybe not. At this point I don't know what the 555 does to the 4013 to turn it off but I think if its not a signal to pin 3 we could use that along with a transistor or two to help determine if the pantry door is open or closed then it could pass or deny the pulse from the mechanical (on/on) switch. But I'm just talking out loud here.
 
OK...glad you got the 4013 working.

Remember we added a diode. We also added a 470u capacitor to increase filtering of the supply. The 470u cap is meant to replace the 100uf cap. You'll need to update the schematic.

We can move on and test the rest of the circuit....or did you already do that?

Nevermind.....just read post #78
 
We can move on and test the rest of the circuit....or did you already do that?
Ha ha. That i have not done. Im ready to continue as per your instructions. I updated the schematic. Im using the 5v wallwart and the modified micro switch.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top