variable timed pulses with 555's

Discussion in 'The Projects Forum' started by gazz, Oct 30, 2009.

  1. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    I am building a token dispensing machine for my home games room,
    it's main component is a coin controls universal hopper, this is set up so that for each pulse on the input pin, it spits out 1 token, the hopper can take upto 5000 pulses in one go at 5ms appart, and does the counting out of the coins out it's self, so all i need to do is supply it with pulses to get coins out.. a push button repeatedly pressed can do this, but i want it automated.

    What i want is a few buttons for 10, 25, 50 and 100 tokens out.

    i was thinking a few LM555's would do the job, i dont need exactly the ammount of tokens requested out as it's just for home use,

    so i thought, one 555 running in astable mode that does the pulses, i'd go for 10ms pulses, 10ms appart so i'm not right on the limit of the hoppers input of 5ms pulses.

    Connected to the puls circuit would be 4 timer circuits, set to run the pulse circuit long enough to provide the requested number of pulses to the hopper.

    So pressing the 10 token button triggers a 555 running in monostable mode, powering the astable 555 for 100ms,
    the 25 token button triggers another 555 monostable, but that one runs for 250ms, and so on.

    i have downloaded Yenka, and have been playing about trying to design what should be a simple circuit, but so far i am blowing the ic's up more than getting them to work.

    i'd also need to ensure that none of the timers are triggered when first powered up as seems to be common from stray capacitance,
    input voltage will be 12 vdc, output pulses need to be below 0.6 volts to be an off time, and over 2.4 volts to be an on time,
    and the hopper is happy with 12 volt pulses on the input pin.

    or if there's another way to do what i want using other components, but i have only basic tools... soldering iron, multimeter, pcb etching stuff, but nothing like a pic programmer or a clue how to use one... so i'd rather have a 200 component circuit that i can build than a 2 component one that i'd have to buy in equipment to make.
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Actually, if I read your post correctly, you could do it with one 555. The button you push could be a resistor on a timer, the length of time for the timer is selected via the button. Maybe another 555 would be required to provide the solernoid (or whatever) pulse.

    How much of the mechanics do you already have done? You'll need to design the driver electronics around it.

    For me the electronics is easy, the mechanics not so much.
     
  3. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    the mechanics is all sorted, the hopper is self contained, heres the tech sheet for the hopper i have, i'm running it in mode 2, coin counting mode.
    http://www.international-gaming.co.uk/manuals/general/Universal Hopper Series Technical Manual.pdf

    Basicaly it's 24 volts in for the motor,

    12 volts in for the logic board which in mode 2, counts up the pulses given to it for the requested number of coins to spit out, tells the motor to turn on, counts the coins via a couple of infared beam breaks on the eject chute, and brakes the motor when the counter has been taken down to zero by the required number of coins passing the beams.

    so basicaly i just need to supply the required number of pulses by pressing the button for the number of tokens i want, and the hopper takes care of the rest, the current for the pulses is very small, will run on logic level or something like that, but can take upto the logic boards supply input voltage for the pulses,
     
  4. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    I think i may have come up with something, there are a few components i need to change like resistors that dont exist... but i will prolly use pots so i can get the exact timing right,
    and there are no doubt components that i have duplicated in the circuit, as basicaly i have used one astable circuit fed by 4 monostables,

    [​IMG]

    The 1 watt light bulb is the coin hopper.

    i did that in yenka, but i'm not sure how i can upload the circuit in the .yka format so it can be opened in someone elses yenka proggy,
     
  5. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    If I read the manual correctly it requires a switch or open collector transistor. This is pretty easy, and you're schematic looks sound. Let us know how it works out.

    There may be a problem if someone leaves the button depressed, but it isn't serious. As long as the button is press the timer is stuck in the high position, but (if it has timed out) will go low as soon as the button is let go.

    You can read about that here, and the solution if you feel this is a problem.

    555 Monostable
     
  6. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    brilliant, cheers for that,

    on my circuit, would i need all the 47μf decoupeling caps? or would just one accross the input power supply do,

    i guess i could also use 2 556's and one 555 to reduce component count slightly, and possibaly make track routing easier.

    as it's only for home use, i could just put a label on the machine saying to press the required button once, likewise telling people not to press more than one button at a time/per payout... tho i imagine pressing 1 button then another straigh away will just result in an extended time the astable operates for, so an odd number of tokens is spat out.
     
    Last edited: Oct 30, 2009
  7. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Given that the power supply environment is likely to be pretty noisy, you need decoupling caps. I would go with one large cap near the power supply input, another large cap where the mechanical assembly is connected, and a bunch of 0.1µF caps across the power supply leads of the 555's (one per chip). I would use similar caps from pin 5 to ground, you show them but don't define them.
     
    Last edited: Oct 31, 2009
  8. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    What would be classed as 'large caps' for the input and output?

    also, how do you mean 'a bunch of 0.1µF caps across the power supply leads of the 555's'??

    from the power in lead of the chip to earth, or something else like between pin 4 and 8,

    going to try and redesign the circuit to use a couple of 556's for the monostable parts, so i'll try and do that, then do another diagram to check everything is right before i etch the board.
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Pin 1 and Pin 8 are the power pins, put a 0.1µF caps directly next to each of the 555 chips. The 556 pins are different of course, but it needs them too. This is to surpress spikes the 555 itself makes as they switch.

    Large caps are in the range from 220µF to 1000µF. Interestingly, caps this size don't work very well for high frequencies, so they also need 0.1µF caps next to them to pick up the slack.

    The reason I'm suggesting going to these measures is electromechanical rigs like this generate lots of static, some of this static will wind up in the electronics. We want the digital stuff to react to correct signals, and not to stray noise.
     
  10. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    Gotya, still learning, forgot that pin 4 is the reset pin, and on my circuits that's tied to +ve.

    i'll put a 0.1μf cap between pin 1 and 8 on each chip.

    the caps from pin 5 to ground were 10nf caps, as thats what was suggested on the sites i read to get the circuit idea, will change them to 100nf caps (using yenka, and it changes 0.1μf to 100nf when i enter it... then it complains that theres 'no known equivelent to a 100nf capacitor'

    For these caps between the power input and pulses out to the hopper, and the ones between the 555's power pins, do they need to be electrolytic types?

    the ones suggested for pin 5 to earth were ceramic ones,
     
  11. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    In this case I don't think it matters. Go with what you have.

    ************

    On second thought, electrolytics have problems with high frequency. Use the small caps for the bypass for the 555's.
     
    Last edited: Oct 31, 2009
  12. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    okiedokie,

    done a revised circuit diagram for just the pulser part of the circuit:

    [​IMG]

    Owt else i should add?? this is the part that will be sending the pulses to the hopper, so most likely to recieve the hash,

    the 13.8 volt input will be from the timers, according to the simulator it's running at 10 pulses a second, which is way slower than the hopper can recieve, but not a problem to me, as it can only eject 3 coins a second, so will still be ejecting coins by the time the pulses stop.
     
  13. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Is this one of the inputs show as a open collector transistor? I'll have to study it a while, if it is you'll need to add a base resistor and transistor to completely interface it.

    **********************

    Pulling some stock images from my cookbook, something like this...

    [​IMG]
     
    Last edited: Nov 1, 2009
  14. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    i've just finished building the pulser part of the circuit, had to buy all new etching stuff as my old stuff had gone walkabout, but i imagine 5 year old ferric chloride wouldent be much cop anyway.

    used that sodium persulphate stuff, slow to etch, but nicer to use than the old stuff,

    made the pcb mask up on my vinyl cutter, i was really pushing it to get it to cut so fine, couldent do the solder pad holes properly, another reason for me to get the fine detail blade and holder for the vinyl cutter i guess.

    had to drill the holes using my 18 volt drill, as i only have a 2mm collet for the dremmel, must get one of those mini chucks for it... and a drill press adaprot, and build a vertical etching tank, add a fish tank heater and bubble stone etc.

    but i got the circuit to work, at first it wouldent occilate, then i found the solder bridge between pin 1 and 2 (and 6 as they are linked with a track under the ic holder)
    removed the bridge, and she started flashing, i've slowed it down to about 10 a second using a 1meg resistor for R2 for now, and tried it out on the hopper.

    just holding power to the board for the time i want atm, but it does it's job, i can just count 10 pulses of the led then remove power, and the hopper spits out 10 tokens,

    i havent got any filtering on the output at the moment, and may have been getting some feedback, if i held power on, the pulses bacame a little random, i.e. flash 10, then a pause, then flash 5, pause, flash some more etc, but i expected something like that to happen as i was told it would too,

    but my first proper circuit i've designed built that actually works,

    Now to get working on the timer part of the circuit, then find something a bit more challenging to make.
     
  15. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    i built a new version of the pulser today, adding the 220μh cap at the output, and a variable resistor to adjust the pulse speed.

    also got some new tips for my soldering iron, so no solder bridges today, worked first time, and i no longer get the randomness to the pulsing as the hopper motor is running,

    now to get on with making the timer part of the circuit,
     
  16. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    need some help,

    i've made up 2 seperate circuits to test the token timer,

    first one is the pulser bit which produces the pulses, second is the timer which turns the pulser circuit on for a set time.

    below is how the 2 circuits look together,
    [​IMG]

    the output from the pulser bit goes to the hopper,

    when all hooked up, i am getting feedback which is keeping the timer stuck on,

    i guess i need a way to isolate the common supply, it shares the 12 volt supply with the logic in the hopper, the motor is run from a seperate 24 volt supply, if i run the timer and pulser on a battery, it works fine,

    i found that if i remove the earth connection between the timer and pulser, it starts up on it's own and gets stuck on (earth still connected to the pulser circuit, as the hopper pulses work from connecting earth to the pulse line)
     
  17. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Your second oscillator is operating at 100Hz, seems a mite fast to me. How fast do you want it to run? Given this is a mechanical controller, I'd figure 1 Hz give or take.

    It can also be controlled with pin 4 only, connect pin 8 of the second timer and the 1KΩ resistor to the power supply. Also loose the diode connecting pin 4 to the first 555, this is a digital connection. It was likely sticking because you were trying to turn the power on off, and it has a capacitor. Better to turn pin 4 on / off.

    Is that a capacitor connected to pin 3 (output) of the second timer? Depending on the size of the capacitor, you could burn out the 555. A capacitor shorts out AC, which would mean the 555 is trying to drive a short.
     
    Last edited: Nov 5, 2009
  18. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    100hz is the max speed the hopper can accept input pulses, i've put a variable resistor in the pulser circuit now inplace of the 68k resistor, as whilst the hopper had no probs accepting the pulses, to get 10 coins i needed to be exact with the variable resistor setting on the timer part of the circuit,

    The capacitor on the end of the pulser was put there as a decoupeling cap... or i thought i was doing that, but maybe i shouldent have used an electrolytic, was there to try and stop any rubbish coming back on the pule output line,

    i was wondering about the way i was triggering the pulser circuit, didnt think it was right to be controlling the power to the entire circuit,

    i had the diode in the circuit as when i have 4 timers stacked, triggering one of them backfed the others blowing the ic's in the simulation,

    Thanks for all the help your giving me with this circuit, i'll go and make another pcb with the mods on them, and see what happens.

    [​IMG]
    Just modified my circuit, does that look better?
     
    Last edited: Nov 6, 2009
  19. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    If I understood your first post correctly, you want one circuit that produces a pulse which releases a token, and another circuit which only allows a predetermined number of pulses to pass. If this is correct, a counter will be more reliable than a 555 for the second circuit, especially when you get to the larger numbers like 25, 50, 100...
     
  20. gazz

    Thread Starter New Member

    Oct 30, 2009
    14
    0
    yup a counter would do the job better, but i wanted to start off slow with simple ic's like the 555, this is my first circuit not built from a kit (where all i am doing is following the instructions... stick resistor a in hole 1 and 2 etc)

    there's no need for my circuit to be precise tho, it's only for use in a home games room, so it's not the end of the world if i get 48 or 55 tokens for a 50 token button push,

    heck, in reality there's no need for the token dispenser, i could just store the tokens in a jar and reach in and grab a handfull :) but the dispenser adds another bit of realism to the games room.
     
Loading...