Combining 339 Dark Sensor Circuit with Counter Circuit

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
OK, I tried another trial run with the kids and realized the 10K pot I was using to set the ref voltage was causing the setup to be crazy sensitive - meaning the laser had to hit the LDR almost perfect to keep the buzzer/counter off. I am still in the "balance all available mirrors on stuff" stage so any movement in the room was causing me major headaches. I "borrowed" a glass light fixture from my bathroom to provide some help so now the laser just has to hit the fixture anywhere and the LDR stays bright enough. I also took some more realistic measurements of the LDR's to help decide the resistor values. The current setup, as shown - with NO siren or buzzer, works really well. I can even open my hand/fingers apart and pass my entire hand through the laser - the counter picks up each finger!

I am an admitted total and complete NOOB, but isn't R10 (10K) a base resistor coming out of the 339? I am confused ... :(

No base resistor is needed. LM339 has an open collector output.
I am beginning to think I may have to pass on the siren/buzzer. After I changed out the 10K pot for the 2 resistors, the siren would cause some counts to jump. Not every time, but not good. I am not sure why the 10K pot setup worked with the siren. I also used a 2N3904 transistor at Pin 3 of the 555 for the siren. Please take a look at the circuit below to see if I understood your instructions correctly. It worked, but did have the same count jump problem as when the siren was wired to Pin 3 directly. Also, the Pin3/transistor/siren setup def. sounded whimpy compared to the Pin3/siren. I suppose that is the purpose though - to take the foot off the gas so to speak.

I am also getting nervous because I realize the flexibility of using the protoboard is almost over - getting closer to trying to really "make" this thing.
 

Ron H

Joined Apr 14, 2005
7,063
I think you may need a separate threshold adjustment for each comparator. My understanding is that LDRs are notoriously poorly matched from unit to unit. If you are getting several volts change across the LDR, then you might be OK with a single reference.
Also - do you have the LDRs on the ends of long wires? If so, electrical noise pickup will probably be a major problem.
 

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
Ron - You are killing me man!!! Just kidding:D. Actually, I have some pin headers (I think that is what they are called) that I will be soldering to a few LDR's tonight and trying out. I really hope the use of the long wires doesn't throw everything on its head. I am counting on being able to position 4 LDR's around the room besause it looks like I will need more than just my 1 laser. If I can get at least 3, maybe 4 reflections per laser/LDR, the maze should be pretty cool - and visible.

I am hoping to avoid individual reference voltages. When the laser gets blocked, it REALLY causes the LDR to increase in resistance. I think my 10K pot was not even close to what I needed and that is why it was so sensitive.

The added shock of a siren would be great, but def. not a show stopper.

I think you may need a separate threshold adjustment for each comparator. My understanding is that LDRs are notoriously poorly matched from unit to unit. If you are getting several volts change across the LDR, then you might be OK with a single reference.
Also - do you have the LDRs on the ends of long wires? If so, electrical noise pickup will probably be a major problem.
 

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
I know 4ft isn't super long, but I just soldered one of the of LDR's to approx. 4ft wire leads and placed my fancy pants glass fixture over the top.

Laser on - lights off - worked just like when the LDR was plugged into the protoboard. So, hopefully that is a good sign.

Also - do you have the LDRs on the ends of long wires? If so, electrical noise pickup will probably be a major problem.
 

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
elec mech - I'm not going to lie, it isn't quite as exciting without some sort of sound to get your attention when the laser is triggered. So, I have a couple of questions for you ...

1) What in particular did you/should I be looking for on the 555 datasheet that would cause concern?
2) Is there a way I could measure/test the siren to see what it requires/draws? I may have to email Futurlec for more info.

Quick comment - I am not sure if you saw my description of what happened when I went to 2 resistors instead of the 10K pot, but the siren now causes the counter to jump. It seems to depend on when I light the LDR back up (with respect to the timing of the pulse).

So, my question number 3 is - If I try your suggestion of adding another 555 to keep the siren on for a set time (assuming I find out that the 555 and siren will play nice), do you think it may solve the jumping problem?

I just thought of something and it might be completely stupid, but hey, you never know unless you ask. So the circuit works great without any siren. When I add the siren (Pin 3 only or with a transistor, it seems to send noise to the 4553 and I assume it has to be because I am coming out of Pin 3 to both the 4553 and the siren. This may not be the correct term, but could I place a diode? on the siren line so any noise from the siren cannot backtrack to the clock pin? Am I grasping? ... YES!!!

Took a quick look at a 555 datasheet - definitely add a transistor between the output of the 555 and the input of the siren, especially since we don't know what the current draw is.
 

elec_mech

Joined Nov 12, 2008
1,500
Whoa, you guys are night owls. I'll try to respond to everything, but let me start with:

Based on his earlier description, I believe he is using Futurelec part number DSS110MP12VIP67, found here: http://www.futurlec.com/Sirens.shtml - fourth item down.

Okay, apparently I can't read the 555 datasheet. Finally found the total available output current is 200mA, so you should be fine hooking it up directly. I read somewhere that power dissipation was 600mW which I took to mean at 12V, output current was 50mA and worried me a little. Why they put the current output in the description and not in the electrical characteristics chart like every other chip I've seen, I know not.

Since Futurelec does not have the current info available on the siren, it's probably a safe bet it's not taking more current than a mechanical buzzer which is rated about 20-30mA. You can check this with your meter if it can read current. There will be a terminal marked A and a position on your dial marked A as well.

If you haven't done this before, connect the red probe to the terminal on the meter marked A, usually the left-most terminal on your meter. FYI: For all your other measurements, voltage, resistance, etc., the red probe is connected to the terminal marked V/Ω/etc., usually the right-most terminal. The black probe stays connected to the ground terminal of your meter. Make sure the meter dial is set to A. Connect the positive lead of the siren to +12V. Connect the red probe to the negative lead of the siren. Connect the black probe to GND for the 12V. Turn on your 12V supply, your siren should sound, and see what the meter reads. Some meters have a mA setting too. I always start with the A setting just in case. Once you're sure the current is below the maximum mA the meter can handle, you can switch to the mA setting to get a better reading. For most meters, the max mA rating is usually 200mA, it should be printed on the meter somewhere, usually next to the mA setting and/or A terminal.

Perhaps it's too early in the morning, but I don't see a 10kΩ pot on your schematic. What is its designation, i.e., R10, VR#?

R10 is used as a pull-up resistor, originally for your 4553 clock input, but now for the Q1 transistor. Its purpose is to keep the voltage high until the 339 is tripped and pulls the signal low. If not connected, you leave the output signal floating which will cause your transistor/clock to go nuts since it won't know when it is supposed to be triggered or not. At least, that is normally the case for logic ICs I've worked with which do not have open collectors. Since the output of the LM339 is an open-collector, I do not know if outputs are normally high or floating. If they are high, you probably don't need R10. If not, then you do.

It is not serving as a base resistor, that is placed in series between the transistor's base and the input signal. It is used to limit current to a transistor's base so it knows how much current to allow to pass between the collector and emitter as they are designed to serve as amplifiers but work well as switches too. These are still unfamilar territory to me, so someone with more knowledge in this area may better explain it than I.

When I add the siren (Pin 3 only or with a transistor, it seems to send noise to the 4553 and I assume it has to be because I am coming out of Pin 3 to both the 4553 and the siren.
Hmm, since this is described as a pulse siren, does the sound change, e.g., go high to low, on and off, etc.? If yes, then perhaps the current draw is changing somewhat rapidly and introducing noise that way. Alternately, the siren may have something in it that is introducing noise when on. I would think adding the transistor would help isolate it if that was the case, but perhaps not.

First, try removing the siren from pin 3, test the circuit to make sure it performs as you expect, then connect the siren directly to the 12V being used by the circuit and test the circuit again - yes the siren will need to sound continuously while you test, so have some ear protection handy. Does it continue to operate as expected or does the count jump? We're trying to determine where the noise is coming from, the siren itself or the way in which we're connecting it to the circuit.

Also, the Pin3/transistor/siren setup def. sounded whimpy compared to the Pin3/siren. I suppose that is the purpose though - to take the foot off the gas so to speak.
Not quite, the purpose of the transistor was to provide more than enough current to the siren and limit the current draw on pin 3 of the 555. Unless the siren is drawing more than 100mA (to be safe, verify by checking the current draw of the siren), you can hook directly up to pin 3 of the 555. Let's say for a moment it is a power hog and the 555 couldn't provide enough current, you'd need to decrease the base resistor value of the transistor. In your diagram, likely per my instruction and faux pas, there is a 10kΩ resistor connected at the base. This would severely limit the current output of the transistor. There is a calculation for this, but since we don't know the current draw at the moment, you should be safe to try a 1kΩ or even a 470Ω base resistor value for Q2. So, the transistor is supposed to serve as the opposite - increase current to the siren, not decrease it. The devil is in the details . . .

After I changed out the 10K pot for the 2 resistors, the siren would cause some counts to jump. Not every time, but not good. I am not sure why the 10K pot setup worked with the siren.
Again, I'm still waking up, so bare with me - what? I don't see a pot in your last schematic and I'm not sure where it is/was and why/where you replaced it with two resistors. I'm sure you mentioned it earlier, but allow me to ask you to post a schematic with the 10KΩ pot shown and without (with the two resistors) and the reason for the change. Perhaps we can better deduce the reason for the added noise when the pot goes away.

You are unusual - you give circuit good advice, yet you were unfamiliar with open collector, or at least with open collector comparators. What is your background?
I thank you. I have a degree in Mechanical Engineering, but have worked with electronics, circuits, and programming throughout my career. I've taken some core EE classes, but didn't see the need to pursue another degree, so I'm learning as I go, so to speak. I haven't done much circuit design, so all the stuff regarding transistors, open-collectors, and the like which where covered in my core EE classes, didn't stay with me. As I've built and worked on several basic circuits at home and at work, troubleshooting is slowly becoming an art form I've picked up. Plus you learn and remember a lot more from troubleshooting and failures than from designs that work right the first time - not that that has ever happened. :rolleyes:
 

Ron H

Joined Apr 14, 2005
7,063
Since the output of the LM339 is an open-collector, I do not know if outputs are normally high or floating. If they are high, you probably don't need R10. If not, then you do.
For your edification, open collector means the output is the collector of a transistor (an NPN, in this case). By definition ("open"), there is no pullup. So, when the +input is higher than the -input, the output will be floating unless you add an external pullup resistor.
See the attached schematic from p.15 of the National Semi datasheet.
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
Regarding power dissipation in the 555 (or any other device) when driving a load, the driver dissipation in the output stage will not be Vcc*Iload. In most cases, the load will dissipate most of that power. The driver's dissipation will be Iload multiplied by the voltage drop across the driver's output stage. Of course, the chip will also dissipate some power due to the remaining internal circuitry.
In the case of the 555 driving a grounded load, this voltage drop (typical) can be seen in the graph (attached) on p.5 of the datasheet.
 

Attachments

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
Based on his earlier description, I believe he is using Futurelec part number DSS110MP12VIP67, found here: http://www.futurlec.com/Sirens.shtml - fourth item down.
This is exactly what I have.

Okay, apparently I can't read the 555 datasheet. Finally found the total available output current is 200mA, so you should be fine hooking it up directly. I read somewhere that power dissipation was 600mW which I took to mean at 12V, output current was 50mA and worried me a little. Why they put the current output in the description and not in the electrical characteristics chart like every other chip I've seen, I know not.

Since Futurelec does not have the current info available on the siren, it's probably a safe bet it's not taking more current than a mechanical buzzer which is rated about 20-30mA. You can check this with your meter if it can read current. There will be a terminal marked A and a position on your dial marked A as well.

If you haven't done this before, connect the red probe to the terminal on the meter marked A, usually the left-most terminal on your meter. FYI: For all your other measurements, voltage, resistance, etc., the red probe is connected to the terminal marked V/Ω/etc., usually the right-most terminal. The black probe stays connected to the ground terminal of your meter. Make sure the meter dial is set to A. Connect the positive lead of the siren to +12V. Connect the red probe to the negative lead of the siren. Connect the black probe to GND for the 12V. Turn on your 12V supply, your siren should sound, and see what the meter reads. Some meters have a mA setting too. I always start with the A setting just in case. Once you're sure the current is below the maximum mA the meter can handle, you can switch to the mA setting to get a better reading. For most meters, the max mA rating is usually 200mA, it should be printed on the meter somewhere, usually next to the mA setting and/or A terminal.
Thank you for this info. I will get a reading as soon as I can. I did forget to mention that I also tried a standard Radio Shack Piezobuzzer as well - it barely, and I mean barely made a sound (it has 12V on it as well)

Perhaps it's too early in the morning, but I don't see a 10kΩ pot on your schematic. What is its designation, i.e., R10, VR#?.
Sorry about the confusing talk. On all of my circuits before, I was using a 10K pot to set the reference voltage for the 339. The 10K pot is no longer there, instead I switched to R5 and R26 to set the reference voltage.

My question about R10 was just because I was confused as to whether that was considered a base resistor, pull-up resistor or what ... thanks for covering that.

Hmm, since this is described as a pulse siren, does the sound change, e.g., go high to low, on and off, etc.? If yes, then perhaps the current draw is changing somewhat rapidly and introducing noise that way. Alternately, the siren may have something in it that is introducing noise when on. I would think adding the transistor would help isolate it if that was the case, but perhaps not.

First, try removing the siren from pin 3, test the circuit to make sure it performs as you expect, then connect the siren directly to the 12V being used by the circuit and test the circuit again - yes the siren will need to sound continuously while you test, so have some ear protection handy. Does it continue to operate as expected or does the count jump? We're trying to determine where the noise is coming from, the siren itself or the way in which we're connecting it to the circuit.
Good stuff! I will try these tests the next time I work on the circuit.

Not quite, the purpose of the transistor was to provide more than enough current to the siren and limit the current draw on pin 3 of the 555. Unless the siren is drawing more than 100mA (to be safe, verify by checking the current draw of the siren), you can hook directly up to pin 3 of the 555. Let's say for a moment it is a power hog and the 555 couldn't provide enough current, you'd need to decrease the base resistor value of the transistor. In your diagram, likely per my instruction and faux pas, there is a 10kΩ resistor connected at the base. This would severely limit the current output of the transistor. There is a calculation for this, but since we don't know the current draw at the moment, you should be safe to try a 1kΩ or even a 470Ω base resistor value for Q2. So, the transistor is supposed to serve as the opposite - increase current to the siren, not decrease it. The devil is in the details . . .
No, actually the 10K at the base was my call. You had mentioned I would need a resistor at the base as well as to Vcc. You offered 10K for the collector to Vcc, so I figured, "Hey, if it works there, I'll try it at the base as well." That would be my blind dart throw - I will tone it down per your suggestions above.:D


Again, I'm still waking up, so bare with me - what? I don't see a pot in your last schematic and I'm not sure where it is/was and why/where you replaced it with two resistors. I'm sure you mentioned it earlier, but allow me to ask you to post a schematic with the 10KΩ pot shown and without (with the two resistors) and the reason for the change. Perhaps we can better deduce the reason for the added noise when the pot goes away.
:rolleyes:
See comment above. I replaced the 10K pot because the LDR had to have almost direct hit by the laser. I took some better measurements to come up with the current resistor values that work really well.

Thanks again for taking the time to help out so much ...
 

elec_mech

Joined Nov 12, 2008
1,500
I did forget to mention that I also tried a standard Radio Shack Piezobuzzer as well - it barely, and I mean barely made a sound (it has 12V on it as well)
What is the RadioShack part number? If it is a true piezo, they require a driver circuit, applying a solid 12VDC supply won't do it. If it is a mechanical buzzer, then it should be working unless you just tried it with Q2 and the 10kΩ base resistor. I can let you know with the part number.
 

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
If you haven't done this before, connect the red probe to the terminal on the meter marked A, usually the left-most terminal on your meter. FYI: For all your other measurements, voltage, resistance, etc., the red probe is connected to the terminal marked V/Ω/etc., usually the right-most terminal. The black probe stays connected to the ground terminal of your meter. Make sure the meter dial is set to A. Connect the positive lead of the siren to +12V. Connect the red probe to the negative lead of the siren. Connect the black probe to GND for the 12V. Turn on your 12V supply, your siren should sound, and see what the meter reads. Some meters have a mA setting too. I always start with the A setting just in case. Once you're sure the current is below the maximum mA the meter can handle, you can switch to the mA setting to get a better reading. For most meters, the max mA rating is usually 200mA, it should be printed on the meter somewhere, usually next to the mA setting and/or A terminal.
Done.
I used the procedure above on both the pulse siren and the Radio Shack buzzer. It must be a standard buzzer because it worked fine with direct set-up to the 12V supply.
Radio Shack Buzzer @ 12V - 9.1 mA
Pulse Siren @ 12V - 22 mA - 30 mA (jumped like crazy during test due to "pulses"

First, try removing the siren from pin 3, test the circuit to make sure it performs as you expect, then connect the siren directly to the 12V being used by the circuit and test the circuit again - yes the siren will need to sound continuously while you test, so have some ear protection handy. Does it continue to operate as expected or does the count jump? We're trying to determine where the noise is coming from, the siren itself or the way in which we're connecting it to the circuit.
I tested the circuit with the siren tied into the 12V supply, but separate. The display brightened/faded during the pulses, but the counts were not different.

Now, this is where my frustration increases considerably. When I say the displays counted no different, I need to offer some more detail. In an earlier post, I excitedly told you how the circuit could even pick up/count the gaps between my fingers if/when I passed my hand past the laser. I obviously thought is was awesome. The circuit performed in the same way even when the siren was hooked to Vcc - Ground.

BUT, I think I take 1 step forward and 2 back sometimes. As I tested the circuit again, I realized the kids would not be blocking the laser as quickly as I was - unless maybe they just ran through, but that isn't any fun. In fact, they may even keep a laser blocked for several seconds before they can determine their next move. SO, I cover the laser with my hand and wait. Approx. 4-5 seconds later, I move my hand. UGH!!!! Counters JUMP!!!!! UGH!!!! So, this whole time I thought the siren/buzzers were causing the counters to jump, but it seems to be the length of time the LDR is blocked or something. When I was trying out the siren, I guess I was just leaving it blocked that extra bit to get the siren to sound. Appears to be a long hunt up the wrong tree!:mad:

This is even with the 555 in place. I even played with the timing cap on the 555. One quick swipe of the laser ... delay, delay, delay, delay - 1. I purposefully made the delay painfully long. Sure enough, held my hand over the laser for the same 4-5 seconds, moved my hand and the stupid counters JUMPED still.

Please help me before my head explodes!!!!
 

thatoneguy

Joined Feb 19, 2009
6,359
DSO Nano, $70 would help IMMENSELY!

If you know somebody you can borrow an oscilloscope from, that'd be great. It doesn't need to have much bandwiddth, 20kHz would be enough. Digital storage would help, which is why that nano is handy for quick stuff, and cheaper than a good DMM, though the accuracy isn't engineering grade, it's real close for the price.

A Scope will allow you to "see" the signal on the inputs and outputs, in realtime, or captured as a still. A few captures and we'd be able to point out pretty much exactly what is wrong where. One of Gnd to power rail, one to the input of the counter circuit, and one to the output of the comparator (all while running). You will be able to see the glitches yourself.

It may seem a chunk of change, but it is a very good hobby level scope for under $100, that functions well from DC up to around 75kHz with auto measuring functions. WAY better than any PIC or AVR scope could hope to do.

Once you have a scope, you'll find yourself wondering how you lived without one. That's what I like about the one above (I have one). It's easy to carry to the problem for a quick check rather than move a few thousand dollars of scope around. Many problems can be seen when voltage is shown in reference to time, rather than just a number as on a DMM.
 

elec_mech

Joined Nov 12, 2008
1,500
I used the procedure above on both the pulse siren and the Radio Shack buzzer. It must be a standard buzzer because it worked fine with direct set-up to the 12V supply.
Okay, then it probably sounded weak due to the high 10kΩ base resistor used on Q2 originally. One problem addressed.

So, this whole time I thought the siren/buzzers were causing the counters to jump, but it seems to be the length of time the LDR is blocked or something. When I was trying out the siren, I guess I was just leaving it blocked that extra bit to get the siren to sound. Appears to be a long hunt up the wrong tree!:mad:
The good news is you discovered this and in relatively short order. Problems like this are the most difficult when you can't get them to reliably repeat or you do, but you don't have the right variable. Take heart, this is good news! It is often more frustrating finding the root cause of a problem than finding the solution. Now we know what to focus on.

Okay, to clarify, if the sensor is blocked
a) For roughly 1 second or less, the counter counts correctly
b) For roughly 3 seconds or more, the counter jumps

These two statements are true whether or not the siren/buzzer is connected?

As a quick check, try disconnecting the LDR and 555 circuits and using the momentary switch as the clock input to the 4553.

What happens when:
a) You quickly press and release the button?
b) You press the button and hold it for 4-5 seconds then release it?

I suspect the problem lies with noise from the LDR, but using the switch will help us verify this.

Next, use the 555 debouncing circuit with the switch connected between pin 2 and ground (replacing Q1).

What happens when:
c) You quickly press and release the button?
d) You press the button and hold it for 4-5 seconds then release it?

For kicks and giggles, let's try increasing the delay of the 555. Replace the 150kΩ resistor with 1MΩ.

What happens when:
e) You quickly press and release the button?
f) You press the button and hold it for 4-5 seconds then release it?

Remove the button and reconnect the LDR.

What happens when:
g) You quickly press and release the button?
h) You press the button and hold it for 4-5 seconds then release it?
 

Ron H

Joined Apr 14, 2005
7,063
The siren may have been weak when driven by the transistor because C and E were swapped, or the tranny was damaged. Reverse beta on most transistors is very low. Most transistors are specified for full saturation with a forced beta (Ic/Ib)=10, so three mA of base drive is ideal here (≈3kΩ base resistor), but a 2N3904, correctly connected, should still saturate with forced beta (Ic/Ib)=30, i.e., with the 10k base resistor and a 30mA load.
 

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
Okay, then it probably sounded weak due to the high 10kΩ base resistor used on Q2 originally. One problem addressed.
That's the same thing I was thinking - happy whenever I can get at least 1 thing to make sense!

The good news is you discovered this and in relatively short order. Problems like this are the most difficult when you can't get them to reliably repeat or you do, but you don't have the right variable. Take heart, this is good news! It is often more frustrating finding the root cause of a problem than finding the solution. Now we know what to focus on.

Okay, to clarify, if the sensor is blocked
a) For roughly 1 second or less, the counter counts correctly
b) For roughly 3 seconds or more, the counter jumps

These two statements are true whether or not the siren/buzzer is connected?
Your summary is exactly right. The siren would obviously not sound off with the quick action - just start to squak.

As a quick check, try disconnecting the LDR and 555 circuits and using the momentary switch as the clock input to the 4553.

What happens when:
a) You quickly press and release the button?
b) You press the button and hold it for 4-5 seconds then release it?
No real surprise here - the counter jumped even with a single, quick push of the NO push button. This is what I noticed before and what confirmed the need of a debounce circuit. Per your suggestion the 555 was used.

I suspect the problem lies with noise from the LDR, but using the switch will help us verify this.

Next, use the 555 debouncing circuit with the switch connected between pin 2 and ground (replacing Q1).

What happens when:
c) You quickly press and release the button?
d) You press the button and hold it for 4-5 seconds then release it?

For kicks and giggles, let's try increasing the delay of the 555. Replace the 150kΩ resistor with 1MΩ.

What happens when:
e) You quickly press and release the button?
f) You press the button and hold it for 4-5 seconds then release it?
I will summarize the craziness below. 150K, 325K and 1M resistors were used in the 555 circuit.

150K
Quick Push: 20 times - PERFECT COUNT
Push and Hold 5 Seconds: 1st and 2nd cycles - counter jumped, next 12 cycles counted perfectly. I reset the counter and repeated this same test again: The first 10 cycles counted perfectly, the 11th cycle JUMPED!:mad:
Push and Hold 10 seconds: First 4 good, fifth cycle jumped.

325K
Quick Push: 20 times - PERFECT COUNT
Push and Hold 5 Seconds: Cycled a total of 20 times, jumped 2 or 3 times throughout, all others counted correctly.
Push and Hold 10 Seconds: Same as above.

1M
325K
Quick Push: 20 times - PERFECT COUNT
Push and Hold 5 Seconds: Cycled a total of 20 times, the first 19 were GOLD! No lie - the 20th and LAST cycle JUMPED!!!!:mad:
Push and Hold 10 Seconds: 1st, 10th and 19th cycle jumped (out of 20)

I ran 1 other test with the 1M resistor. Up to this point, I would push/hold the button and release. As soon as I noted the response, I would start the next push/hold cycle. For this last test, I would push/hold for 10 seconds then release. Instead of starting the next cycle right away, I would delay another 10 seconds before I would push/hold the next cycle. Is that clear as mud?

Push and Hold 10 Seconds with 10 second Delay: 7th cycle out of 10 jumped, all others counted correctly.

To say I am confused by these results would be an understatement! I thought the 555 would stop the bounce/noise from the switch. And it does on every quick push/release. Regardless of the 555 resistor, it is somehow giving the clock more than 1 pulse.

Is the problem really coming from the 555? Or is there a better option than the 4553?
 

elec_mech

Joined Nov 12, 2008
1,500
Doh! :eek: I should have caught this sooner - don't hold your breath, but add a 10kΩ pull-down resistor between the 4553 clock input and ground. According to your last posted schematic, you have nothing holding the clock input low when there is no signal. This leaves the clock input pin floating which would explain the inconsistent results you're having.
 

Ron H

Joined Apr 14, 2005
7,063
Doh! :eek: I should have caught this sooner - don't hold your breath, but add a 10kΩ pull-down resistor between the 4553 clock input and ground. According to your last posted schematic, you have nothing holding the clock input low when there is no signal. This leaves the clock input pin floating which would explain the inconsistent results you're having.
If you're referring to post #81, the 555 pulls down the clock. You don't need a pulldown resistor.
 

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
OK, now I need you to clarify a few things. This is where the gap between what I think I know/understand and what I actually know/understand may become painfully obvious!

General Terms:
Pull-Up Resistor: Resistor placed between device and Vcc to keep device "high" until forced low.
Pull-Down Resistor: Resistor placed between device and Ground to keep device low until forced high.

If those descriptions are whacked, then my previous tests are equally whacked. When I tested the NO swich at the clock pin (no 555 or LDR), I was using the description from someplace in this thread (several pages back) to hook a 10K pull-up resistor to the clock pin and the NO switch from clock pin to Ground. The "jumpy" results are the one reported earlier.

Then, when I hooked the NO switch to the 555 through Pin 2 and ground, Pin 3 was going to the Clock Pin. With this setup, you want me to place a 10K resistor at the clock pin to ground? You are correct in saying I currently do not have any sort of pull-down resistor at the clock pin (or have I ever). If that is the fix I will JUMP FOR JOY!!!!!

Doh! :eek: I should have caught this sooner - don't hold your breath, but add a 10kΩ pull-down resistor between the 4553 clock input and ground. According to your last posted schematic, you have nothing holding the clock input low when there is no signal. This leaves the clock input pin floating which would explain the inconsistent results you're having.
 

Thread Starter

CoachKalk

Joined Sep 20, 2011
141
If you're referring to post #81, the 555 pulls down the clock. You don't need a pulldown resistor.
Ron - We must have been typing at the same time with our last posts.

After I posted I went off to add the pull down resistor to the clock pin and I came back to report the findings and saw your post before mine.

Anyway, either the 555 I have is not working correctly or it isn't able to "pull down" enough, because I added a 10K resistor between the clock pin and ground and changed the 555 resistor back to the 150K. I tested a total of 40 cycles (20 first, reset the counter and did another 20). I used the push/hold for 5 seconds version and the counters worked perfectly.

I do know the original problem is intermitant so I cannot say 100% that it won't jump, but in my previous tests, I have never reached 20 good counts (close with 19), and definately never 40 error free.

It looks promising. I am off to a birthday party, but unless I come back here and read of a better next step, when I get back I think I will hook my LDR back to my 555 with the 10K pull-down still at the clock pin. What do I have to lose???

Does that make sense? It wouldn't hurt anything would it?
 
Top