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.

555 Based Ammo Counter Tweaking Problems

Status
Not open for further replies.
OK, well I've posted about this a few times, and I've gotten it working, but I'm having a problem with two things.

1. Accuracy of the pulses.
2. Random counting.

Here's the circuit.

**broken link removed**

The monostable side of the 555 should trigger for 435ms, allowing 3 pulses from the astable side to activate the counter. I've having a few problems though.

I know the 555 formulas to figure out the parts to use to achieve 435ms, but it's not accurate enough. Some times it lets 2 pulses through, sometimes as many as 5 make it through. I need this to be 3, every time. SO, could someone possibly recommend some high accuracy parts to achieve what I need? The average resistors and caps from Mouser have too high tolerances to be accurate enough.



For the second problem, it jumps to random numbers. Pressing the "Reload" button sets the counter to 36. Every time I press the "Trigger", it should count-down by 3. This normally works, though it's sometimes 4. However, if I hold the "Trigger" button just right when I push it, it counts down three then jumps again or all the way to 99. I assume this has something to do with micro-arching in the switch causing ripples in the circuit. Any ideas to fix this?

Also, it seems to get dramatically more errors when the four LEDs are plugged in. Any ways to fix this?
 
Last edited:
It would help if you provided part numbers for IC1, IC2, IC3, etc. It would also help if there was only one IC1 on the diagram. Which button is the reset button? You should debounce the Start Switch for starters. You can make a debouncer out of the redundant gates from IC5 (pins 4,3,12&13) and just tie pins 12 & 13 of IC3 high directly.
 
Alright, sorry about that. I fixed it, so now it shows my completed schematic.

Anyhow, so how exactly would I debounce the switch? I know how to do it with a simple resistor and cap, but IC5 is an inverter package and I don't know how to do it using inverters.
 
Bump! So could someone offer a bit of advice on the matter?

I need to know how to debounce the "Trigger" switch to eliminate flase button-presses, and how to better increase the accuracy of the 555.

ANy help woould be most appreciated.
 
sure sounds like switch bounce

here is a link that explains and has circuits for debouncing.
the parts may be working just fine, just to much switch noise so circuit is confused.

http://www.ganssle.com/debouncing.pdf
how did you draw your circuit?
I found using expresspcb an excellent tool for drawing schematics that are readable or easier to read.
some of the gates you have look like parts I never saw before. Took a second look and kinda figured it out.
curious what is this for??
just for fun I might just draw this out in express pcb then layout a pc board.
 
reviewing your circuit

it has several problems
you mentioned that connecting the leds the circuit does strange things
The transistor needs to be biased as the way you have it connected the leds are drawing 2.31 amps(ran a simulation in TINA
WHY is ic5 pins 5 &6 connected to the ic4 (pins 4,5,6)
ic4 is being used as an inverter then you reversed it with ic5.
ic5 would be better IMO using a 74hc14(schmitt trigger) then use to de-bounce the switches.
Will try and finish up tomorrow as its my bed time 10:30pm here in Idaho
 
The thing with IC4 and IC5 is suppose to work like this.

The count comes through the 6,5,4 gate in IC4 as low while it's open. IC2 needs a high count, so IC5 5,6 is there to re-invert it. The whole purpose of IC4 6,5,4 is so that once the counter reaches 00, the gate closes, stopping further counting. So, it's not just being used as an inverter.

Hope that helps.

Could you explain the transistor biasing a bit? Transistors aren't my strong suit, as I'm sure you can see.

Also, this is for a prop weapon. It's designed to mimic a digital ammo counter in the original, from 36 to 0 in bursts of 3 rounds.
 
Last edited:
A microcontroller would make this easy, considering you want some presets. eg: 36 rounds at a rate of 3 per burst till zero. Plus switch debouncing & 435ms pulse. No problem for a microcontroller.
 
Thanks. I figured it could be setup in a microcontroller, but I wouldn't have a clue where to start. I can make that next one like that though. Might you have some links I can read to get me started on that?
 
Check the links section of my site, lots and lots of PIC related sites including some of the best online tutorial sites I could find.
 
PICS are great BUT!!

one needs to learn how to walk before they can run.
Yes PICS will save alot of time and money IF one knows how to program AND has a pic programmer.
I myself would love to learn PIC programming BUT being on a fixed income and too busy to start from scratch and learn something new. Besides to use a pic one still needs to interface with the outside world using transistors or other old school hardware.
I have enough problems trying to get a stereo graphic equalizer with 2-10x10 leds displays designed and design the double sided boards to build the monster on.add a pocket TILT unit w/ 2- 10 led displays )a boy scout I have in my troop is building.I am scout master, Weblos den leader, electronics merit badge counselor etc))
the ammo counter that is in another post is one example.
the person has several errors in his/ her circuit involving basic digital logic and the use of transistors. YES a pic would work BUT he/ she still needs to have and learn pic programming. Its not something one learns overnight.
I don't mean to sound like a grumpy old man, I agree with you on the usage of a pic BUT??
 
GOkussj5okazu said:
Bump! So could someone offer a bit of advice on the matter?

I need to know how to debounce the "Trigger" switch to eliminate flase button-presses, and how to better increase the accuracy of the 555.

ANy help woould be most appreciated.

I think you mean increase the accuracy of the 556. I would change the values of your timing capacitors to a lower value and increase the timing value resistors. I have found by using good film capacitors and good quality trim pots the timing is reliable and repeatable. Sometimes high value of electrolytic capacitors have some leakage current the affects overall performance. Changing the 100uf capactor to a film may be a problem, but you might be able to use a 1uf and not have the timing resistor to large.
Another thing I have found is to put a electrolytic capacitor about 47uf very close to the 556 package. Connect this capacitor between Vcc and ground.
 
I may be wrong but tatinum caps are better suited for this? vers standard film cap??
 
MrDEB said:
one needs to learn how to walk before they can run.
Yes PICS will save alot of time and money IF one knows how to program AND has a pic programmer.
I myself would love to learn PIC programming BUT being on a fixed income and too busy to start from scratch and learn something new. Besides to use a pic one still needs to interface with the outside world using transistors or other old school hardware.
I have enough problems trying to get a stereo graphic equalizer with 2-10x10 leds displays designed and design the double sided boards to build the monster on.add a pocket TILT unit w/ 2- 10 led displays )a boy scout I have in my troop is building.I am scout master, Weblos den leader, electronics merit badge counselor etc))
the ammo counter that is in another post is one example.
the person has several errors in his/ her circuit involving basic digital logic and the use of transistors. YES a pic would work BUT he/ she still needs to have and learn pic programming. Its not something one learns overnight.
I don't mean to sound like a grumpy old man, I agree with you on the usage of a pic BUT??

After looking through Blueroomelectronics' links, this is exactly what I was thinking. I know a wee bit of VB C++, but I wouldn't have a clue where to begin on PIC programming.

k7elp60 said:
I think you mean increase the accuracy of the 556. I would change the values of your timing capacitors to a lower value and increase the timing value resistors. I have found by using good film capacitors and good quality trim pots the timing is reliable and repeatable. Sometimes high value of electrolytic capacitors have some leakage current the affects overall performance. Changing the 100uf capactor to a film may be a problem, but you might be able to use a 1uf and not have the timing resistor to large.
Another thing I have found is to put a electrolytic capacitor about 47uf very close to the 556 package. Connect this capacitor between Vcc and ground.

Thanks, I'll give that I try. I could get the pulses narrowed down to 3 if I had a high-precision pot instead of the crap one I'm using now. I'll stick another cap near the 556, hopefully that will clean it up a bit.



Thanks for the links, Blueroomelectronics. They were quite informative, but a good bit over my head. I may switch to a PIC design later on but for now I'll just stick with my logic circuit.

Anyhow, could someone explain the transistor biasing to fix the LED problem? I just updated the circuit to include the switch debouncing, but the LEDs are still causing problems.
 
TINA simulation

here is a simulation pic for the transistor resistors.
I think this will work, no guarantees
As I stated before without a resistor in series with the leds your drawing upwards of 2 amps!!
I put a resistor on the base and in series with the leds
I have most of the circuit drawn out in expresspcb.
need to add the gates in lower left corner.
subed a 74hc14 for the 74hc04's. then inserted a switch de-bounce circuit
 

Attachments

  • transistor leds.GIF
    transistor leds.GIF
    94 KB · Views: 313
  • ammo circuit.GIF
    ammo circuit.GIF
    76.3 KB · Views: 361
Have revised schematic

I have your circuit drawen out using expresspcb (can download off web for free)
the schematic has couple changes such as pull up resistors, 74hc14 ics.
different led read out.
was thinking about a VCO Oscillator ic instead of the 555 for better accuracy?
If you want the file then email me and I will sent .
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top