Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: Justin Z on November 30, 2007, 07:51:37 pm

Title: I need some kind of switch . . . I think
Post by: Justin Z on November 30, 2007, 07:51:37 pm
I have a bit of a conundrum, you see.  I have an IPAC4 and Novagem buttons.

I want the player 1 and player 2 buttons to flash.  The IPAC has that functionality.

But Novagems require about 100mA at +5v, and the IPAC can only drive about 20mA without getting overloaded.

So what I think I need is to connect the Novagems to my +5v power source via a switch.  This switch should only be open if receiving current from the IPAC4 . . . follow me?  That way, I can use the IPAC4's relatively low amperage to tell the switch when it needs to be providing the main, higher amp power to the Novagem buttons.

I am not at all an expert when it comes to electrical wiring.  Can someone think of a way to make this work?  Does my idea even make any sense?

Thanks,

Justin
Title: Re: I need some kind of switch . . . I think
Post by: MonMotha on November 30, 2007, 08:06:29 pm
So you want to have the lights ON when the signal from the IPAC is LOW (i.e. 0V)?  If so, you can use a PNP transistor or a PFET.  You can actually buy suitable ones (rated 1A+) from Radio Shack, believe it or not.

Connect the base of the transistor to your IPAC signal through a 250 to 300 ohm resistor, the emitter to 5V, and the collector to the high side of the lamp (other side grounded).

If you want it the other way, lamp on when the signal from the IPAC is high (i.e. 5V), you want a NPN transistor or NFET.  In this case, connect the base of the transistor to the IPAC via the resistor (again 250-300 ohms is about right), the emitter to ground, and the collector to the low side of the lamp (other side connected to power).

You can also use a relay for this, but they make noise, have limited lifespan, and require a diode to prevent inductive transients from damaging the output pin on the driver.

You can use any transistor whose Ic (collector current) is rated for the task. It's generally a good idea to overspec by a significant margin when possible - I usually go for at least a factor of 2.  Larger transistors are also in larger packages, which may be easier to handle.

Oh, I should point out that the NPN based solution is a bit more ideal.  There are some problems with the high-side switching if the micro's output does not fully reach 5V (which not all micros do).
Title: Re: I need some kind of switch . . . I think
Post by: polaris on November 30, 2007, 08:08:01 pm
im no expert either but i think the answer youre looking for is on the pac drive page (http://www.ultimarc.com/pacdrive.html)

third photo down
Title: Re: I need some kind of switch . . . I think
Post by: MonMotha on November 30, 2007, 08:10:20 pm
He said it's only rated for 20mA.  Given how low that is, I assume that's per channel driver and not the 5V source.  20mA is about right for a high-drive micro output, which is probably all it is.
Title: Re: I need some kind of switch . . . I think
Post by: polaris on November 30, 2007, 08:18:24 pm
i bow to those with superior knowledge and im tired so i may be getting confused.

he needs a relay then ? the pac drive would tell the relay to allow the power to come from the source to power the button light ?


edit, yes i am tired obviously as im looking at the pac drive not the ipac , sorry, but so far im standing by my relay answer
Title: Re: I need some kind of switch . . . I think
Post by: MonMotha on November 30, 2007, 09:34:51 pm
A relay really isn't the way to go here, especially if you want to flash things on and off a lot.  Relays have limited lifespan due to being mechanical, and they're noisy.  I kinda addressed this above.

Relays are good when you need to switch AC line voltages and reasonably high currents at slow rates of speed, but in this case, a transistor (either bipolar or a MOSFET) is the way to go in my opinion.  They are solid state (no moving parts to wear out), and they aren't much harder to wire up than a relay.  Depending on the transistor you choose, you may have to adjust the base resistor a bit (grab some 100 ohm and some 47 ohm too, in case).  A relay would still require a diode to provide protection against the inductive kickback at turn-off, so it's not exactly a single part solution, either.  As a bonus, transistors are generally cheaper than relays.  Not to mention that some relays need more than 20mA of coil current!

Most arcade games that turn small DC lamps on and off use low side NPN transistor switching, sometimes using arrays built into a single chip if they need several.

Radio Shack sells some of the TIP series, which would be fine for this application (if overspec'd).  The TIP31 is an NPN and the TIP42 is a PNP that Radio Shack sells.  You can use smaller transistors, too: the classic 2N2222 or 2N4401 would also work fine for low side switching.  These come in smaller cases and may be a little more difficult for you to wire up, though.
Title: Re: I need some kind of switch . . . I think
Post by: polaris on November 30, 2007, 09:42:59 pm
cheers dude i wasnt disagreeing i was kinda asking for confirmation on what someone else had told me, and it looks like they steered me wrong :cheers: 
Title: Re: I need some kind of switch . . . I think
Post by: MonMotha on November 30, 2007, 09:46:02 pm
I didn't mean to imply that you were.  I just wanted to make my rationale behind rejecting the use of a relay clear since the topic was brought up further (I only glossed upon it earlier).
Title: Re: I need some kind of switch . . . I think
Post by: polaris on November 30, 2007, 10:00:07 pm
its all good mate , i probably gained more from this thread than the poster :cheers: