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.

Clock pulse circuit

Status
Not open for further replies.

krisc

New Member
Hi, after a little help here if possible.

a friend has been helping me with this but is having alot of personal problems at the moment so is unable to help me for a while.

Let me explain a little and i'm sorry if this get's confusing or is all muddled up, i find it hard to explain this sort of thing unless i'm face to face

I have a device which has 2 external switch point wires on it, these control what program it's on (ie; P1, P2 up to P5)

These wires are Orange and Green (i know this isn't relevant it makes it easier for me to explain that's all)

When the orange wire is grounded it resets the device from whatever program it's on back to P1.

When the green wire is grounded it set's the device up 1 program, P1 to P2 ect..

-

I need a circuit to generate a sequence of pulses when a specific switch is actuated.

The circuit will have 5 switches and will need to ground the orange wire once then ground the green wire relating to what switch was actuated.

ie: if switch 1 is pressed then only the orange wire is pulsed
if switch 2 is pressed then 1 pulse on the orange wire and 1 pulse on the green wire
if switch 5 is pressed then 1 pulse on the orange wire and 4 pulses on the green wire.

I hope i have explained this enough, if not i have some details he sent me through on email to explain tho it's pretty much what i've said i think.

If anyone can help i'd be really greatfull,
Thanks
-Kris
 
Last edited:
Hi, after a little help here if possible.

a friend has been helping me with this but is having alot of personal problems at the moment so is unable to help me for a while.

Let me explain a little and i'm sorry if this get's confusing or is all muddled up, i find it hard to explain this sort of thing unless i'm face to face

I have a device which has 2 external switch point wires on it, these control what program it's on (ie; P1, P2 up to P5)

These wires are Orange and Green (i know this isn't relevant it makes it easier for me to explain that's all)

When the orange wire is grounded it resets the device from whatever program it's on back to P1.

When the green wire is grounded it set's the device up 1 program, P1 to P2 ect..

-

I need a circuit to generate a sequence of pulses when a specific switch is actuated.

The circuit will have 5 switches and will need to ground the orange wire once then ground the green wire relating to what switch was actuated.

ie: if switch 1 is pressed then only the orange wire is pulsed
if switch 2 is pressed then 1 pulse on the orange wire and 1 pulse on the green wire
if switch 5 is pressed then 1 pulse on the orange wire and 4 pulses on the green wire.

I hope i have explained this enough, if not i have some details he sent me through on email to explain tho it's pretty much what i've said i think.

If anyone can help i'd be really greatfull,
Thanks
-Kris

You can probably accompish what you're trying to do using a 555 and some 4017s but at first thought the solution wouldn't be that straighforward. The simpliest solution by far would be to use a microcontroller. Would you be willing to explore that option?
 
try the attached circuit, hope it would work as you said.
 

Attachments

  • program select.JPG
    program select.JPG
    24.6 KB · Views: 394
Last edited:
try the attached circuit, hope it would work as you said.

mbarazeen,

Interesting circuit. I had a similar idea but gave up on it when I realized that the button would have to be held down for the sequence to complete. The OP didn't specify if this was OK or not but I figured that if the user had to hold the button down the whole time, it would be just as easy for them to press the button muliple times and becasue of this I assumed that wasn't what krisc was after. Maybe that's an incorrect assumption.

There is one thing I'm curious about though. I have never used a 4017 like you are using in your circuit where an inactive output pulls low the master reset and clock enable inputs. Have you tried that before or at least simulated it? Would you have to use TTL over CMOS or does it not matter at all?

One last thought. I would sepeare P1 from P2 - P5 by one output on the 4017. Like this:

Q0 = P1
Q1 = NC
Q2 = P2
Q3 = P3
Q4 = P4
Q5 = P5

The reason I'd do it that way is becasue from the clocking diagram on the datasheet it looks like the falling edge of Q0 overlaps the rising edge of Q1. Without knowing anything about the circuit you are trying to control, it's hard to say whether or not that would create problems. I would think if you place a complete clock cycle in between the reset pulse and the program selection pulses it would give the greatest chance for success. Like I said without knowing anything about the circuit you're interfacing, it's impossible to say if it really makes a difference or not. Just a thought.
 
i tried to simulate it, but pulling to low by inactive outputs didnt work on the model, but i remember in practical i have succeeded to do so. i designed a selector switch long before and soldered it. it worked fine. (i used a clock more than 1kHz so once pressed the slection was there imediately before lifting the finger)

you are correct in the concept, that the states will continuously revolves since the reset also connected to enable input. so i sugest a modification to give Q6 as reset.
and P1 is to be connected to Q1.(may be ok to connect to Q0, i feel it has to be checked with the device)
see he attached, hope this will work. i have shown LEDs can be connected to show the last selection made. when another key is prssed it will go through reset, then will count the particualr number and stops. (not like the one i posted before), it will happen faster, clock can be set even faster if the device he is going to use can accept it. so fraction of sec is enough to set the correct P.


about TTL or CMOS i hope there wont be any issue.
 

Attachments

  • prog select..jpg
    prog select..jpg
    29.5 KB · Views: 301
Last edited:
You guy's are silly smart when it comes to these thing's, it's way over my head :)

in response to vne147, i am willing to explore any method's mate, so yes a microcontroller would deffinetly be an option.

Your reply's have reminded me of one thing, once one of the switches is activated it may be held down for an extended period of time.

Do those circuit's you have designed above allow for that? or would it be continuously pulsing for the entire duration the switch was closed?

Thanks alot for those circuit designs and thanks for everyone's input, :)
 
Last edited:
see he attached, hope this will work. i have shown LEDs can be connected to show the last selection made. when another key is prssed it will go through reset, then will count the particualr number and stops.

I think this would be true as long as you didn't press a lower button before a higher one. For instance, if you pushed the button connect to Q1 the first time, the 4017 would stop counting and leave Q1 high. But, if the next time you pressed Q3 the 4017 wouldn't reset before pausing again.

in response to vne147, i am willing to explore any method's mate, so yes a microcontroller would deffinetly be an option.

The micro-controller is the best option in my opinion. The circuit posted by mbarazeen is clever and would probably work with some tweaking but would have some limitations. The micro-controller option would only be limited by the programming. Do you want to be able to hold down a button without restarting the sequence, no problem. Do you want to not have to hold down the button for the sequence to complete, no problem. Do you want to have a pause in between the reset pulse and the program selection pulses, no problem. All of these things are easily changeable through programming without having to change components or the circuit. A micro-controller that could do the job would cost about $1 and would also be only 1 chip versus 3 for the logic IC solution.

The only catch with the micro-controller idea is that they don't come with a program pre-loaded. You have to write the program and then load it onto the micro-controller using a peice of hardware called a programmer. If you are a novice then you might not know how to do this. It is not difficult or expensive but it would require a little learning. If you want I can help you by providing you with a program, a circuit diagram, and anything else you'll need to finish the project. You can buy a programmer (about $20 on ebay) and load the program I write onto the micro-controller yourself or I can load it and ship it to you.

Once you learn the basics, it's vey easy to adapt the concepts for other purposes.

BTW, do you know of any limitations with the existing circuit. Is there a maximum rate at which the program selection input can be pulsed? Is there a minimum time the reset input must be held low? Is there a pause required in between the reset and program selection pulses? Will the green and orange wires source any current when they are pulled low? The more information you can provide about the circuit you are trying to interface the better.
 
I think this would be true as long as you didn't press a lower button before a higher one. For instance, if you pushed the button connect to Q1 the first time, the 4017 would stop counting and leave Q1 high. But, if the next time you pressed Q3 the 4017 wouldn't reset before pausing again.
.

Vne147,
you are correct, it will not reset, any how it will advance the device selection as required. as you suggest micro controllers are good solution, and its so generous from you to help him to load the program and send it to him:).

i am thinking from long time to have a start with microcontrolers....as you said programming wouldnt be such difficult to learn. when i see helping hands i really feel to have a GO.
 
PM sent to Vne147, Thanks

I think a microcontroller will be the way to go with this project, if anyone can suggest a suitable controller then it would be very much appreciated

Thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top