Main > Main Forum
12 volt coin counter with I-Pac/4
clhug:
V_BE was 0.715 V. V_CE was 6.7 V (not a misread). I don't have a meter that can measure current. I don't know the official spec of the coil resistance of the counter but I measured it at 129.1 ohms. That with nothing else attached to it.
It's wired essentially exactly as the drawing I attached earlier, except only using a single input off the I-Pac, no diodes, and without that 100 ohm resistor. It's as you described where the output from the I-Pac goes through the normally-open switch to the base. 12V goes directly into one side of the counter and the other side of the counter goes to the collector. The emitter is grounded both to the I-Pac ground and directly to the power supply ground.
Regarding the pull-up resistor, I don't think I have any way to know what that is since it's internal to the I-Pac. I only see 3 resistors on the I-Pac's board, but it has 56 inputs. There are 2 big IC's on it though (I think each one drives half the inputs).
MonMotha:
Sounds like you're not getting enough current to drop all 12V across the counter (which would saturate the transistor). Two options:
*Place a 1-3.3k resistor from 5V to the IPAC inputs in question. This will parallel with the internal pull-up and increase the base current, consequentially increasing the collector current.
*Use a darlington pair type transistor (or build a pair yourself) for increased current gain. While your average 2N3904 has current gain of about 100, a darlington pair tends to have much, much higher gain: on the order of 1000-10000.
The former is probably easier, especially since you may have the required parts laying around (or a 5-pack is available at shadio rack for a buck).
clhug:
I did a google search for a darlington pair and when I see what that is, I actually think I'd prefer to do that. I can do that all in one spot for all 4 inputs rather than having to run 4 resistors, one to each input. Also, I don't have either laying around so I'll have to go purchase either another transistor or the resistors either way. So the question is, what do I need for transistors to build that pair? Can I just use 2 of the 2N3904 types? If not, can you give a couple of specific types to use (something I can hopefully buy at Radio Shack)? (I searched Radio Shack's web site and couldn't find anything that talked about darlington pair so it doesn't look like they sell any of these prepackaged.)
On a side note, I went ahead and tried the relay too. Since it was only $2.59 (and I can return it) I just bought it when I bought the 2N3904 transistor. The I-Pac won't drive the relay coil either. The relay works fine when I hook the relay coil directly to 5 V from the PC power supply but it won't trip at all when trying to drive it from the I-Pac. The input on the I-Pac still registers (I see the keystroke appear in Windows Notepad), but the relay won't trip.
MonMotha:
You can hook two transistors up to form a darlington pair (that's all the ones in a single package are). Just hook the two collectors together, the emitter from one to the base of the other. The commoned collectors are now known as "the collector" the unused base is the base, and the unused emitter is the emitter. It acts like a super-high gain transistor, with the downside discussed below.
However, I'd recommend using the resistor method first. A darlington pair will have a double BE drop (~1.4V) which may cause problems with the IPAC seeing the input as being low. You can test that before you try the darlington if you like by just putting a diode between the switch and the base (pointing towards the base as that is the direction of the current) and seeing if it still works.
clhug:
I did your test using diodes. I was able to hook up 3 diodes plus the single existing transistor and still got a signal. Adding a 4th diode caused it not to detect the input any more. (I had the diodes on hand because I bought them with the transistor based on that original drawing where I needed them before the switches.) But I think that gives me plenty of room to put the 2nd transistor in for the darlington pair.
I found the diagram of how to hook up the transistors from a google search and I think I understand that hookup. I just need to know what specific transistors to use. Can I just use two of the 2N3904 types?
Oh, if I do the resistor thing, can you clarify what you meant by a 1-3.3k resistor? Did you mean use anything from 1k ohms to 3.3 k ohms? Does it matter exctly what I use within that range, or are you just saying try different ones in that range until something works? Or does 1-3.3k mean something else? Also, do I need to run a separate resistor for each of the 4 inputs, or can I just use a single resistor to feed all 4 inputs?