I have an electronic counter that is using a spare contact set on a relay that does other stuff. The counter has a lifetime battery and just uses a make/break to count. The cycle count is
- posted
17 years ago
I have an electronic counter that is using a spare contact set on a relay that does other stuff. The counter has a lifetime battery and just uses a make/break to count. The cycle count is
Most counters have a debounce built in or programmable
the simplest electronic debounce is to make the electronics wait x number of miliseconds before COUNTING
so the switch changes state and the counter waits say 1/4 of a second before registering the count
Even BIG relays dont usually bounce for more than 1/8 of a second
otherwise you put a capacitron thingy in across the relay contacts (assuming it is a DC relay)
but your counter MIGHT have an option to debounce itself anyhow
Tom
A capacitor in parallel with the contacts will probably work, the correct value is dependent on several thing:
1) switch bounce time (assume to be 10 milliseconds ) 2) switch open time ( assume to be > 10 sec if it gets close to the bounce time it may not be possible to make this approach reliable ) 3) contact current sourced from your counter ( assume 5 microAmps, 5 V and 1 meg pullup) 4) the logic thresholds internal to the counter (assume TTL of 3.0 V high)try 10 uF rated at least twice the voltage across the contacts when they are open (or anything even remotely close that you have on hand, motor run or start caps may work)
Carl
A simple and reliable debounce can be made with an NE555 (or better, one of the cmos equivalents) set up as an edge-triggered one-shot with a pulse duration just shorter than your shortest time between (deliberate) switch closures.
With the cmos version, you'll be able to power the thing off of a couple of coin cells for pretty much of several years. Be judicious in selecting the timing resistors and capacitor for low current drain in the discharged state.
Total cost should be in the range of $6.00 to $10.00 including the batteries.
The old National Semiconductor Applications notes are full of 555 apps circuits. There's a LARGE chapter devoted just to that one circuit.
LLoyd
If he does that, Carl, he'd better use a tantalum cap, or later down the road, leakage will start to swamp the (probably) large pullup resistor's charging current. Then the 'ghost' will be missed counts instead of bounces.
LLoyd
Yeah your right, I didn't think about the leakage, I've never done battery powered stuff. The 555 is a good idea, but I think he is giving us a message here with the "buzzistor" "capasatron" and "megaschmeds" that he is not exactly comfortable in the electrical realm.
Carl
Someone ought to tell him that the "capasatron" will be polarized and he'll need to connect it in the correct direction...
Pete C.
Good Mnemonic. Must be something about the psychology of that phrase as I haven't forgotten it since I was told it about 30+ years ago.
\ I thought my humor would be appreciated, I like my phantom parts! I am very comfortable with electronics (roygbiv). I just couldn't remember how to debounce a switch. I remember seeing it 30 years ago but never had the problem
Bad boys rape our young girls but Violet gives willingly. ;->
Jon
That Voilet gal sure gets around. The spectrum guys (light that is) have another one: Roy G. Biv. Red, orange, yellow, green, blue, indigo and Violet. Long wavelengths to short.
Mike Eberle> "Tom Gardner" wrote:
"Tom Gardner" wrote in news:ANcTh.2000$2v1.1148 @newssvr14.news.prodigy.net:
Tom, Phoenix Contact makes some really thin DIN solid-state relays (pretty inexpensive also), If you ran your machine control voltage through your big relay contacts, an used that to trigger the solid state relay, that may cure the problem.
I'd use a triple nickle. Cheap, simple, works fine. It might need a jellybean transistor to interface to the counter. Say more about percentage of time your relay contacts are closed vs open, and what battery(s) the counter uses.
Maybe you're getting multiple counts because of noise from the contactor or relay coil, or your giant solenoids or whatever else is getting switched? Don't run the wires to the input near any other wires.
Best regards, Spehro Pefhany
On Wed, 11 Apr 2007 20:57:36 GMT, with neither quill nor qualm, "Tom Gardner" quickly quoth:
That's the color spectrum (colors of the rainbow), Tawm. bbroygbvgw is the resistor color code.
I remember that (vintage WWII) as; bad boys rape our young girls behind victory garden walls
Bill K7NOM
I'd stay away from tantalum as they can catch on fire. And if stressed do. They cannot handle reverse voltage well at all. Spikes do that.
A .1 or a 10 uf cap - likely you might find 3's that are not tants and can handle long term. Perhaps the contacts are just dirty or pitted. Maybe a very light buffing - 400 to 800 grit paper on each side. Just a little.
Remember the table top PC's that kept catching on fire - Tants.
Martin
Martin H. Eastburn @ home at Lions' Lair with our computer lionslair at consolidated dot net TSRA, Life; NRA LOH & Endowment Member, Golden Eagle, Patriot"s Medal. NRA Second Amendment Task Force Charter Founder IHMSA and NRA Metallic Silhouette maker & member.
Lloyd E. Sp>
According to Tom Gardner :
You've gotten several suggestions, but not the one which I would use -- assuming that the relay has a SPDT contact set free, instead of only a make or a break pair.
You get a quad two-input NAND IC (TTL if you have 5VDC available with power source to keep it there, or CMOS if you need a more flexible range of voltage (up to 15V and down to 3V IIRC). The TTL version is the SN7400, and the CMOS *might* be the CD4000, or I might be mis-remembering which is which -- look it up before trusting my memory on this. View with a fixed-pitch font to avoid distorition of the image. Courier is a good choice. ___ +---------| \ | | )O--+-----------oA | +-|____/ | V +--------+ | +--O------ +-------\|/-+ | ^ | ____ | ___ | +-| \ | _ | | )O--------------oB +---------|____/
Note that I have ignored the power connections to the logic chip, and what to do with unused inputs. On TTL, you can pretty much ignore them, but on CMOS, you want to tie them high. And you will want pull-up resistors from each of the inputs to the positive supply voltage. The ground that the relay center contact is connected to is the logic ground (the negative power supply), not the system's safety ground.
The pull-up resistors should be on the order of 2.2K for TTL, and probably 10K for CMOS. They are a bit too much of a pain to draw using ASCII graphics at 2:00 AM.
What happens is that when the relay moves the contact to the lower point, it will pull down the input of that side, and the output (marked 'B') in the sketch will go high. It will then stay this way until the relay moving contact closes the upper connection instead, pulling 'B' low and 'A' high. You can pick whichever output gives you the right behavior from your counter. At least this will only give bounce still if the relay moving contact actually moves back to the other side, or the other electrical operations generate enough noise to trigger the gates in spite of the pull-up resistors. I would suggest that this be put as close to the relay as possible, in a small metal box, and that you run shielded wires to the counter if it is not immediately by the relay.
The wires which cross only connect at points marked '+' (which I have also used for turning corners). The two outputs from the NAND gates cross over each other without touching. I tried to show one arching over the other.
Obviously, you will need more details, such as pin numbers. If you can find those on your own, fine. Otherwise, I'll have to look things up. :-)
Good Luck, DoN.
Um... Tom? That mnemonic is for the colors of the rainbow, not the resistor color code! (BBROYGBVGW)
LLoyd
This sounds like one of those Red Lion CUB3 or CUB4 counters. They already have a debouncer built in, but it will only handle bounces that settle down in about 4 milliseconds, which is perfect for a reed switch.
However, one can extend this settle-down period by putting a capacitor across the switch.
How big a capacitor? The open circuit voltage of a CUB3 is 2.95 volts, and the short-circuit current is 13.5 microamps. Together, they imply that the pullup resistor is 2.949/13.5uA= 218,444 ohms, or 220 Kohms.
Now, the built-in 4 mS debounce almost works, so if we make the period ten times longer, or 40 mS, it should solve the problem:
0.040 = 220000 C, so C = 0.18 microfarads.This is well within the range of small tantalum "drip" capacitors, an film capacitors, either of which will work. The exact value will not be critical, so grab a handful and try them. Film is more robust than tant, and is unpolarized.
Put the capacitor near the counter, not the switch, so the capacitor can also filter out noise picked up on the wires between switch and counter (which wires should be twisted together to reduce pickup).
Joe Gwinn
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.