Main > Main Forum
Coin Mechs - Multiple credits
Druin:
I can do it...let me think about it - I'll try to come up with something non-microcontroller based so exact parts can be bought and no programming hassles.
Druin:
Ok 20 seconds later I have the general concept in mind so I'll post my intention in case someone else may want to work on it too.
You look through available CMOS and TTL chips (4000 series and 7400 series) either on a manufacturer website (like www.fairchildsemi.com or www.ti.com), or on a supplier website where you know you can obtain the parts (digikey, all electronics, Jameco.....)
Look for chips that are counters with a reset pin....
This way suppose you power on the circuit and it's in reset with a count value of 0, and you start increasing the count, you have a decoder circuit added on that waits for a certain number...and when that number is reached, it strikes the reset pin and the counter goes back to 0.
Now comes the funky stuff....and I'm just talking off the top of my head, this may be very elaborate beyond necessity, overkill..but it's the concept I'm conveying...
Suppose you have an oscillator circuit (555 timer or whatever) that is always running, nothing fancy about it...and running at a rate of a few pulses per second or even slower, however fast you want credits to appear. This is just sitting there clocking all the time you have power on.
Take the output of this and feed it into something like an AND gate input....and keep the other AND gate input set aside as an enable signal.....the output of the AND gate would feed to the clock input of that counter chip....as well as to the Keyboard encoder coin input...
Now whenever the AND gate enable input is high....the oscillator pulses will pass through the AND gate and allow the counter to receive a clock and it will start counting up.
I think it would be nice to maybe use a flip flop as the AND gate enable input. Take the output of a flip flop and send it to the AND enable. The input to the flip flop maybe should be connected to the coin switch.....then when you drop a quarter, the flip flop will latch this signal to the output, which enables the AND gate and allows the counter to start clocking.....keep in mind the RESET pin on the flip flop....
Now the decoder circuit...there may be a fancy decoder chip that can do this but just thinking with logic gates alone....figure out how many credits you want to generate...say it's 4....that means you want the counter to count up from 0 to 4 (keep in mind that the counter's clock is also fed to the Keyboard coin input so those 4 pulses are also inserting the coins)...and when you reach 4 deposits, you want something to detect this and shut off the AND gate (reset that flip flop)....
So 4 is 100 in binary....figure out a network of logic gates that will detect 100 and produce a proper output high or low, whatever will assert the flip flop reset...
NOW what should happen is (aside from minor fixing up of hardware bugs and concepts).....you power on....by default the flip flop output should be low to shut off the AND gate that pipes the oscillator to the keyboard and the counter. Oscillator is constantly running but going nowhere. You drop in a coin, the flip flop toggles its output and holds it, the AND gate passes the oscillator on, credits start flying into IPac, and a counter starts counting. When it reaches 4, the flip flop is reset, shuts off, turns off the AND gate, and the oscillator is going nowhere again, you have 4 credits. This counter decoder circuit should reset the counter and the flip flop so the counter is back at 0.
I just remembered there are chips that can detect a certain input binary pattern and set an output when it matches...I don't remember what they are called though.... they usually are labeled as P and Q inputs, you use one set of inputs to manually set a binary value, then whenever those (a comparator maybe) match the other inputs, it goes BING on the output.... So P inputs connect to the counter bits, Q inputs are tied to binary 100, and when the counter reaches 4, you get a high or low whichever output. No messy logic gates. It should be easy enough to find some chip numbers if anyone is interested in proceeding with this.
acejas:
WOW thanks for the time taken for the message. It definitely gives me something to look at and think about. Ill let you know how I go (could be ages hahaha)
Cheers
acejas
Druin:
Some part numbers....chosen based on what Digikey has to offer in DIP package (the kind we can solder by hand, no surface mount). The letters in between the numeric areas of the part number (eg ACT, AC) may vary, or extra letter prefixes/suffixs depending on manufacturer or type of logic (cmos, ttl). I don't think there's an issue mixing and matching any combinations in something like this.
The P=Q comparator for decoding the counter:
74ACT521, 74ACT520, 74HC688
not sure of the differences, probably irrelevant
The counter:
74AC161 has asyncronous reset
D type Flip Flop:
74AC174
AND gate:
74AC08
Inverter gate (to patch any logic levels):
74AC14 has schmitt trigger inputs, good for minor filtering of noisy inputs
Oscillator can be almost anything. Not the biggest thing to worry about, leave for last. Lots of circuits on the internet.
Maybe I'll see if I can draw up a block diagram of some of this stuff. I don't want to spoil the fun for the exact circuit for anyone wanting to feel the accomplishment...plus my schematic entry stuff isn't installed plus I'm lazy...
acejas:
Mate
Id be stoked (aussie slang for happy) if you coudl do something like that. Dont worry, you wouldnt be spoiling my fun ;D
All this is over my head a bit but ill definitely look into it and fire you some questions no doubt ;D
Thanks again
acejas