Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer Circuit Help Needed

Status
Not open for further replies.

originator

Industrial
Dec 12, 2004
71
0
0
US
posted a version of this last night, I don't see it so hopefully it wont be a duplicate post:

What is the best solution for a circuit where you hold two switches for a duration(ie 2 seconds) and a latch gets fliiped via the data input.

My plan is 2 have an AND on the two switches, when both are high, the AND turns on and then turns on a series of 555's, one to control the initial fixed duration(20ms) which then turns on a 555 set to 2 seconds, that output triggers another 555 which is tied to one pin of an AND, the other pin from the original AND, therefore if the two switches are still help high when the 2 second timer completes, they turn on the AND that hits the data on the JK.

Is there an easier way with less parts?

Thanks
 
Replies continue below

Recommended for you

Let's see if I understand it correctly:

If both switches are on simultaneously for two seconds
a latch turns on.

I think the simplest would be using a 555 in mono mode
with 2 sec. delay: trigger it with NOT(IN1 AND IN2)
-- using e.g. 7400 or any CMOS variety. The trailing/
falling edge of the 555's output inverted can clock the
ANDad signal into a D-FF -- output from Qnot




Plesae read FAQ240-1032
<nbucska@pc33peripherals.com> omit 33 Use subj: ENG-TIPS
 
Thanks for that info, much simpler than my plan. Here is a drawing from what I understand. It seems there my be a slight possibility that the Data input can be turned on while the 555 is changing states when triggered, I may need to mask that trigger edge to the Data input somehow in case there is a micorsecond that timer may still be seen before it changes state.. My breadboard is tied up at the moment unfortunately.


Thanks for checking it out.
 
Thanks for that info, much simpler than my plan. Here is a drawing from what I understand. It seems there my be a slight possibility that the Data input can be turned on while the 555 is changing states when triggered, I may need to mask that trigger edge to the Data input somehow in case there is a micorsecond that timer may still be seen before it changes state.. My breadboard is tied up at the moment unfortunately.


Thanks for checking it out.
 
Use 4011B - quad NAND --
output of first gate triggers 555 directly. 555's output
connected to second NAND's inputs, the output clocks D-FF.
The output of first gate is connected to D-input of FF,too,
and the Qnot output is the output used.


I don't think you have to worry about a glitch coinciding
with the edge.



Plesae read FAQ240-1032
<nbucska@pc33peripherals.com> omit 33 Use subj: ENG-TIPS
 
In testing the circuit, I find that when you hold the switches for the duration longer than the timers pulse as required, the timer re-triggers on release of the switch as well. Maybe there would not be a problem with false triggers though.
 
Two questions:
1) What is the application for this circuit? Is is something to do with safety? With large caps and large resistors, 555s become less reliable. If the accuracy of the 2 seconds is important you might think about that.

2) Is this a 'one off' circuit, or something headed towards production? This can be done cheaper, with less parts, and more flexible with a microcontroller.

-Bill
CE Designer Forum
 
Fore-shore kf6bbl! I agree! Once you have the slightest bit of micro capability you will never ever screw with 555's again. Micros are more reliable in this realm, more precise, more flexible, predictable and are more likely to do the job the way you really want it done.

Keith Cress
Flamin Systems, Inc.- <
 
I have limited knowledge of micro stuff. It is not a safety applicadtion. It is an application where there are only 4 metal surfaces used as touch panel input for door opening and closing, locking, left, right move etc all using Q-prox touch sensor chips. I am using a 6 input chip with adjacent key suppression.

Rather than add more metal panels to control other parts of the motor this is all hooked up to, I decided to combine some of the panels, press two and get an additional output off an AND gate so to speak, but in case of accidental touches, I want to time it so the user has to intentionally hold it for approx 2 seconds, no need for precision at all, if after 2 seconds they are still touching the two panels, an output occurs that I can use to clk a flip flop.

Thanks for the tips, I will look into a micro, but this need to be quick and dirty learning curve to go that route, plus cheap too!

 
on a tangent-- i just looked at the cedesigner forum to check out what you guys are doing, that stove in the picture---I'd love to find the manufacturer of the conductive plastic for that surface, and get that made in 4' x '8 pieces or on a roll, gloss in various colors, even clear(ITO?)

If you guys could easily point me to a souce for info on the micros that would be great.

My assumptions are about micros:

1. a chip with a number of inputs and outputs

2. a processor built in with capability of storing a program that can be written and simulated on a computer, then sent to an eprom on the micro?

3. a crystal either on board or external that gives you a clock to meassure time by



Q. can the micro be modified in the field and by what means? For my current application, I am having ana pp written that the user can run and connect a rs232 and phone calbe to my motor controller, and have access to modify parameters, or enter parameters I send my email or post online. Basicallyjust sending out asci strings.



 
Hiya-

"Q. can the micro be modified in the field and by what means? For my current application, I am having ana pp written that the user can run and connect a rs232 and phone calbe to my motor controller, and have access to modify parameters, or enter parameters I send my email or post online. Basically just sending out asci strings."


In general, the safe answer is maybe. There are several
methods of modifying (micro)computer code in the field.

There are usually two methods of modifying memory.

Non-volitle RAM. Electrically eraseable ROM. Either will
work. There are two other questions that you might ask.

Am I modifying parameters or am I modifying program code?

What happens when it does't work right?

The first question (parameters/code) is if the program
can accept data, and store it away somewhere to use
during its normal operation. This means that the code
doesn't change, only the (nonvolitle) data does. The
program only has to read and store the data. OTOH, if
the code itself is to be modified then one is talking
about some sort of "bootstrap" loader program that runs
in place of the normal code. This requires the code to
go in a mode completely seperate and away from the
normal code space and the bootstrap loader writes OVER
the normal code space.

The second question, that of something going wrong is
a little more difficult. Retrying downloading
program/data, error detection/correction and a whole
raft of otherwise achieving reliable communications is
most likely more than we want to go into during this post.

But I hope that this little snippet helps!

Cheers,

Rich S.

 
Hi originator. Interesting task you have going there.

As for micros there are kinda 3 camps:
Atmel,
Pic,
Zilog.

Atmel and PIC are battling neck and neck because they both cover pretty much the same markets. They both have great stuff. It's fortunate that they both exist because that makes them both better.

Zilog fell through the cracks when it went from being the most useful/powerful micro to be had,(long ago and far far away), to making some real odd ones. But a few years ago they jumped back in the little micro realm to attempt a battle to the front. They aren't even close yet but because of this they have outstanding deals, dev kits, cheap parts and you can talk to a human. Nice company.

I have gone the PIC route. They have every conceivable offering you could want. All the offerings have similar look and feel so you always know you could hop about to solve any specific problem.

They have 5 pin processors and up to umpteen pins. They have internal oscillators you can use so you could do any and everything you could do with a 555 without the cap and resistor games. (And the mind-screw you get with 555s)

I always put a standard tiny connector on every board that allows me to program the PIC after it's soldered on. You can program every aspect of most PICs, the program flash, the EEPROM (for stored program variables), and many logic aspects (things that don't change like oscillator style).

The cheap Microchip(PIC) development tool plugs directly into this same connector and allows debugging and programming.

You can get dev boards that have lots of stuff on them and the DEV tool "ICD2" and go from there.

You can modify in the field very easily. WAAAAAAAAAY more easily then you can modify a 555 like circuit.

More info in this active thread, the next one below yours!
thread240-148698
 
itsmoked said,
"...And the mind-screw you get with 555s"

No doubt. It's always a bad sign when to the standard method to explain how to use the 555 timer starts with a transistor level schematic of what's inside...

OK, I will wave the Atmel flag, just for equal time. :)
My limited experience with PIC was 10 years ago, so I can't really compare the two.
Atmel has several micro lines, 8051 based, ARM based, and their own little AVR family, an 8 bit RISC processor, which is where I'm at. In the AVR family, there are AT-Tinys, AT-Megas, and there are some oddball leftovers from previous years. On the lowest end, the micros have 33 instructions, on the higher end maybe 150 (which are more or less variations of the base 33). So if you learn AVR assembly, you can change processors on a whim. They also have some other crazy parts with a built in FGPA, a part with USB, etc. If you invest your time into the AVR family, you have places to go.
Most have internal RC oscillators, so a Xtal is optional. The RC osc. runs at 1MHz, and some of the newer parts can go up to 2, 4, and 8MHz on the RC osc.
The development kit you should start with is the STK500, $79 at Digikey and Mouser. It has several DIP sockets for different micros, and comes with a sample micro or two. It has LEDs and buttons to get you up and playing around quickly. Included with that is AVR Studio, which is an IDE, simulator, and assembler. I'm not much of a C programmer, but there are free C compilers, as well as commercial ones for about $300. I bought the Imagecraft C compiler, and it has a sweet application builder that build all the init code for you and inserts it in your project.
If you don't want to bother with building a protoboard, and the STK500 is not enough for you, google Olimex. They are on the other side of the planet in Bulgaria, but I believe there are some US distribs of their project boards. Either way I have given them my CC #, and no issues. They have been around for a while.

For a project of your scope (very small), I would consider just going for it in assembly. There is plenty of example assembly code on AVRFreaks.net that you can get started with. Your time spent in reading the micro's datasheet, and reading the AVR instruction set will be well invested.

Programming the part is done with ISP, In System Programming. You can use the STK500 as your ISP programmer, but even cheaper than that, you could buy one of the dev boards from Olimex, and their ISP dongle. Atmel also makes an ISP dongle (AVR-ISP), which is $29 at Digikey and Mouser.

To field program, you use a laptop, your ISP dongle, connect the header to the board, and load the new program code into the part. Takes about 5 seconds for a small program.

I think both PIC and Atmel AVR are extremely similar lines. Six of one, 1/2 dozen of the other. It's just a matter of which one you learned first. I hear dev tools on the PIC are more pricey. Not sure but I hear the JTAG setup for PIC is $1K. Atmel's is $300. No that I ever use the dam thing.





-Bill
CE Designer Forum
 
originator said,
"that stove in the picture---I'd love to find the manufacturer of the conductive plastic for that surface"

That's a solid glass top. The images for the buttons are printed on the glass, and the capacitive sensor PCB is adhered to the back side of the glass.

The Qprox technology is really cool. Your button surface can be plastic, glass, wood, granite, anything non metallic, and can be up to 2 INCHES THICK on some sensors! The Qprox chip builds and electric field in the substrate, and can tell when a finger touches the surface.

Recently I did a touch keypad through 1/8 acrylic, one layer of adhesive, a 1/8" of ABS sheet, another layer of adhesive, and finally the PCB with the sensor layout. Works like a charm.

-Bill
CE Designer Forum
 
That is some good info, thanks fellas. For now I just need to finish what I have that is working and get this thing in some show rooms, I can make changes any time after that. I like the idea of a board with a processor, some optos in and out, a motor controller and a power supply. I wish I could get a look at some code to see what it looks like.

When I talked about mods in the field I was referring to the motor speeds, accesl/decel, positions in mm. I have a software that will be supplied with my product that the user can hook up with a rs232 the motor controller and make the changes needed very easily. Usually it is a one time thing, then it never needs further changes unless there is a problem.

In the case of using a micro to replace my logic board(logic circuits), I would still use the motor controller, no need to tackle the job of controlling the servo directly, I can just send it start, stop, a 4 bit address for position and so forth using the micro.

Is there a software)shareware-freeware) that I can look at to get an understanding of how to write the code?

Thanks

Todd Chapman



 
Status
Not open for further replies.
Back
Top