My advice would be to translate this into something modern using a PIC, PICAXE or ARDUINO which will be much simpler on the hardware side. If you are going to attempt to emulate this project as is using TTL, you should probably be some what experienced with electronics and understand basic logic because if you get in to problems building this, I am not going to be able to help you troubleshoot it remotely. I'm probably not even going to be able to help you if you live in Toronto because after all these years I probably can't even remember enough to fix my own version. AGAIN DON'T TRY TO BUILD THIS UNLESS YOU ARE SUFFICIENTLY SKILLED TO TROUBLESHOOT AND DEBUG IT YOURSELF. There you've been cautioned with the "here be dragons" statement. Brave soles may proceed beyond this point :-) .... ifIf you aifif iii :-): :::::fdfdfdf :
Step 1: Breadboard It
Step 2: Parts List
6 x tall glass jar from Ikea
4 x plastic pens ( remove the insides and just use the barrel)
1 x breadboard 2 x 3.75" x 5.5" Proto board
4 x MAN 6760 Common Anode 7 segment display
4 x 74LS47 BCD to 7 Segment decoder
9 x 74LS93 counter
6 x opto - gate Ti L888 or equivalent ( not sure if these will work as a substitute http://dx.com/p/sg-206-electronic-component-optocoupler-sensors-black-5-pcs-154294)
7 x 555 timer (if you want to make an optional manual clock you need 8)
2 x 74LS126 Quad tri-state buffer
1 x 74LS08 Quad 2 input And gate
2 x 1N4001 diode
18 x small signal diodes (optional for resetting the counter to zero - you can also use 1N4001)
1 x 100 UF 6V+ cap
9 x 0.01 or 0.001 UF 6V+ cap
6 x 470K resistor
6 x 1uf 6V+ cap
6 x 0.01uf 6V+ cap
1 x 100K resistor
6 x 100 ohm resistor
28 x 1K resistor
1 x 2.2uf 6V+ cap
1 x 6V battery (Lead Acid or alkaline lantern battery)
1 x SPST switch
1 x momentary push button switch (optional for resetting the counter to zero)
1 x fuse holder
1 x fuse (about 1A) you may need to experiment to find a good value depends on your cct
1 x 5V wall wart power supply
14 x 5mm LEDs (for lighting effects, counter pulse monitoring and power indication)
2 x power jack to fit you wall wart and to battery backup
2 x power plugs to fit the jack
6 x 5 pin DIN plugs (or an equivalent minimum 4 pins required)
6 x 5 pin DIN jacks (or an equivalent minimum 4 pins required)
6 x rubber grommets
4 x 2.75" Hex standoff
8 x screws to fit the standoffs
8 x 4-40 3/8" screws and bolts (to re-attach Ikea jar lid handles after you remove the rivets)
IC Sockets - assorted 8, 14, 16 pin sockets
hot glue gun
hot glue sticks
30 AWG wirewrap wire
22 & 24 AWG hookup wire
4 conductor telephone wire
* Note 1uf 6V+ cap means a capacitor with at least 6V working voltage, this would be the lower limit you can use 10 or 12V too.
Step 3: The Schematics - Display and Counter
On the first schematic you see the counter display. The 1000's counter and display is not shown because there was not room on the drawing, but you just repeat the circuit one more time, as you see each section 1, 10, 100, 1000 is identical. You can build it as shown and it will count to 999 or add another section to count to 9999.
How it works essentially is every time a pulse comes in from the coin counting section the display is incremented by 1, and if there are four 7-segment displays and counters it will be able to count up to 9999 before rolling over to zero again. The 74LS47 IC is a BCD to 7 segment decoder. The 74LS93 IC is a BCD Decade counter. When a pulse comes in to the 74LS93 on pin 14 (Clock - negative edge triggered) the counter increments one and a high (1) shows up on pin 12 (QA). This is seen as a one on the 74LS47 input and it interprets the one by turning on the correct segments of the 7 segment display to display a 1.
When 9 pulses have been received by the 74LS93, there will be a 9 on the first 7 segment display. When the tenth pulse arrives, pin 11 (QD) is already high, pin 9 (QB) will go high and pin 2 (R01) and pin 3 (R02) will both be high, this resets the counter to zero. when pin 11 (QD) goes to low, it also clocks the ten's 74LS93 counter as they are connected. Now a 1 shows on the tens 7 segment display and a 0 on the one's display. This process repeats until the counter reaches 9999. Note that the 100's 74LS47 RBI (Remote Blank in) pin is grounded. This supresses the display when it is at zero. It's RBO pin feeds the 10's 74LS47 RBI pin so that the 10's display is blanked appropriately. The one's 74LS47 RBI is not connected so that it will always show a zero at power on or zero count. It is good practice to tie the one's RBI to +5V to ensure that zero blanking is not activated, but you don't really need it.
Step 4: The Schematics - Coin Counter Circuit 1c, 5c, 10c
When a penny is dropped through the opto-gate U1, a pulse is generated on pin 4 which triggers the 555 chip via pin 2. In the photo you can see the gate below the coin slot. I also added an LED (again not shown on the schematic) which is just connected with a resistor across +5V and Gnd. This just lights up the jar at night and makes it look cool. The 555 is configured as a monostable because when the coin falls through the opto-gate it generates a noisy pulse (like switch bounce) which may trigger the counter multiple times. With the monostable only one clean pulse is sent to the 74LS93 counter and this filters out any false triggering. You could also use a 74LS121 or 74LS123 monostable chip here, but I used 555 because I had a pile of them in my supplies.
The pulse from the 555 clocks the 74LS93 which counts to 10 and then resets and clocks the following 74LS93 once. So you need to clock the first 74LS93 100 times before the second 74LS93 resets and clocks the main counter (in the first schematic). The ten cents counter works the same way but only needs to count to ten as there are ten in a dollar. The five cents counter is designed to count to 20 as there are 20 in a dollar and so on.
Step 5: The Schematics - Coin Counter Circuit 25c, $1, $2
Step 6: The Schematics - Coin Counter Circuit Summing the Counter Outputs
For example if you put in a single quarter, the display counter does not increment because you need 4 quarters for a dollar. If you now put in a loonie ($1 dollar) the master counter will increment and show a one. If you now put in 3 more quarters, the quarters counter will increment and the display will show $2. The only thing you can't do is drop in two coins simultaneously, this will result in a race condition and only one of the two will be counted. This is not very likely unless you are trying to do it, so no worries there.
Step 7: The Schematics - Additional Notes
If you know enough to build this circuit and get it working then you know enough to work this out on your own- (hint connect all master reset pins to to +5V via a diode and momentary push button switch) you don't really need this, most of the time the circuit works fine after power up.
The second thing is I built a 555 oscillator (Square wave) to manually clock the master counter circuit for me. This was built with 2 speeds so you can clock the circuit slow or fast - you don't need this it is just for test purposes, to help debug the circuit and also to be used if you already have a known amount of money in the jars and you want increment the counter manually from power up. You can find a million versions of a 555 square wave oscillator on the internet, so I won't repeat it here.
The third thing is I put in a battery back up circuit after losing my count in a power bump. A 5V wall wart is used to power this circuit. If you add 2 diodes going to a largish 6V lead acid cell you have instant back up, with 6V - 1.4V (2 diode drops) about 4.6V but it keeps it alive. Because the power rail is normally at +5V and the battery is only at +6V the diodes are reverse biased when AC power is on which stops the battery from draining.
Also not shown on this schematic are LEDs added to the output of each coin counting logic, to show when the counter increments, useful during the inevitable debug phase of these projects. And also not shown LEDs added under the counter jar lids only there to light up the jars at night. On the last schematic you will see the power supply cct. You should put a small capacitor across the power rail at the +5V and gnd pin of each 74LS93 IC to suppress switching noise.
Step 8: Building It
1. Layout the master counter and display circuit on one of the pcb boards. Make connections on the rear by soldering point to point with the 30 AWG wire wrap wire . Follow the first circuit diagram.
2. Layout the coin counter and summing circuit on the second pcb board. Make connections on the rear by soldering point to point with the 30 AWG wire wrap wire . Follow the second, third and fourth circuit diagram.
3. If you are using the same kind of Ikea jars used here, they have a plastic gasket in the lid to seal the jar. But for our purposes these are in the way. They are held on by the rivets which also hold the handles on the lid. Use a drill to drill out these rivets and remove the gaskets. Re-attach the lid handles using 4-40 nuts and bolts. Do his for all 6 tall jars and the large jar.
4. Cut a coin slot in the tall jar lids. I used a dremel tool to do this, or you can drill it and use metal nibblers. Drill a hole in the lid for the wire from the main counter too. Put a rubber gromet in the hole.
5. Attach the 4 conductor telephone wire to the photo gate and heatshring the connections. Optionally connect an LED to the +5V and Gnd wire for lighting effect. Run the wire out through the grommet. Connect the wires to the DIN plugs.
6. Mount the photo gates under the coin slot and hot glue into place. Also hot glue the LED to the bottom of the lid. Repeat these procedures for each of the 6 coin jars. Put a dab of hot glue on the edge of the lid at two spots across from each other (180 degrees apart) to make the lid fit tightly now that you have removed the gasket.
7. Drill holes in the large jar lid for the Din jacks, fuse, power jacks and switches and install this hardware. Connect wires to all of these items in preparation for connection to the circuit board, so leave 8 to 12" per wire length to give you enough slack to connect.
8. Connect the two PCB's together (display counter to coin counter and power). Next connect all the hardware on the large jar lid to the correct location on each PCB.
9. At this point use a DVM and check your circuit board connections are all correct. Next install all ICs into the sockets. Power up and test/troubleshoot the circuit.
10. Once working, fasten the two PCBs together using the 2.75" hex standoff spacers.
11. Disassemble the 4 pens so that you have just the outer plastic barrel. If necessary cut them to the right size (depends on what kind of pen you use, but you want the length to be such that the display board is close to or touching the inside bottom glass of the jar when it is assembled. Cable tie these plastic pens to the the hex spacers so that one end of each pen is aligned with the display board and make sure each is perpendicualr to the two pcb boards. See photo.
12. Hot glue the ends of the pens to the rear of the lid. See photo.
That's it congratulations, if all went well you have a fully functioning coin counter!!!