Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: LED button "on" on press with old IPac4  (Read 2640 times)

0 Members and 1 Guest are viewing this topic.

nvanvlymen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:November 06, 2020, 10:53:57 pm
LED button "on" on press with old IPac4
« on: August 05, 2020, 05:29:15 pm »
I'll preface this by saying i have some experience in electronics, but am always learning.

I have a custom 20 button CP i put together with some 12v LEDs. They draw approximately 46.2mA (white LEDS draw more from what i understand). I have been testing with a separate 3A power supply, but thats for testing purposes (final will be a 1.5A) as i'm only drawing around 1A if every light is on.

I want them to only turn on when the button is pressed.

I have wired my ipac4 from a bunch of years ago (has a PS/2 port to USB) to all the buttons so the CP at least works (retropie/retroarch).  Now i want to get the LEDs done.

I wired up the ground from the PSU to the ground terminal on the ipac (figuring i'd need a common ground to trigger the ipac and LEDs on button press) and supply 12v power to one of the buttons LED+ (as a test first) - the LEDs are labeled - and + to prevent errors.  Ground is going from the ipac to each buttons COMM in a daisy chain. The buttons signal wire (NO on microswitch) is wired both to the ipac and the ground for the LED, figuring on press you ground the button signal and LED lights up.

HOWEVER, while the LED lights up when i press the button, i see the ipac is getting current thru the signal wire and the grounded PSU attached to the ipac.  The ipac's led turned on (button not pressed) - which triggered my "wait what, thats not right" reflexes and i killed the power before i messed up more. I found this really odd. I know ground will carry some mA, but i was registering 9v at the signal wire.

I also did a continuity test on ground from the ipac to any of the signal wire terminals (the ipac was not connected to anything or the LED psu) and i was getting continuity. My assumption is the signal inputs on the ipac are high, and grounding them is what tells it a button was pressed.

Scratching my head...

I put my multimeter to test voltage, red probe clipped on the end of the signal wire coming from this test buttons NO, and black probe clipped on the ground attached to the ipac / psu.

LED psu plugged in AND the button is not pressed, i see 9vdc register... when pressed .01vdc?  i'm no electrical engineer, so i'm kinda stumped on what to do.

Ground is daisy chained to all button COMMs, then to the ground on the ipac.
Signal wire from NO on button is going to (-) on LED and input on ipac (like a jumper wire kinda deal)
PSU (-) is going to ground on ipac, (+) is going to LED (+).

The CP works without issue without the LEDs, so i know the button COMM and signal wires are connected correctly.  I read in another post that the ipac doesn't need a common ground from its PCB to the buttons to trigger the ipac?

Hoping someone can confirm, i don't want to damage my ipac with silly experiments if i can help it.
« Last Edit: August 05, 2020, 05:31:35 pm by nvanvlymen »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9674
  • Last login:Today at 01:08:07 pm
  • Designated spam hunter
Re: LED button "on" on press with old IPac4
« Reply #1 on: August 05, 2020, 06:38:51 pm »
I have a custom 20 button CP i put together with some 12v LEDs. They draw approximately 46.2mA (white LEDS draw more from what i understand). I have been testing with a separate 3A power supply, but thats for testing purposes (final will be a 1.5A) as i'm only drawing around 1A if every light is on.

I want them to only turn on when the button is pressed.
Consider using a 5v PSU instead.
- All 12v LEDs I've worked with will light up using 5v.
- The LEDs will draw less current.
- You won't run the chance of damaging the IPac due to overvoltage.   ;D

My assumption is the signal inputs on the ipac are high, and grounding them is what tells it a button was pressed.
Correct.  The IPac is an "active low" device -- ground applied to an input triggers the related output.

Ground is daisy chained to all button COMMs, then to the ground on the ipac.
Signal wire from NO on button is going to (-) on LED and input on ipac (like a jumper wire kinda deal)
PSU (-) is going to ground on ipac, (+) is going to LED (+).
Correct.  Just like #3 from WannabeJoy's button-pushing toy build here.




Scott
EDIT:  For anyone who noticed that something's missing, the diagram doesn't show the current limiting resistor found in wedge-base LEDs.
« Last Edit: August 05, 2020, 06:48:27 pm by PL1 »

nvanvlymen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:November 06, 2020, 10:53:57 pm
Re: LED button "on" on press with old IPac4
« Reply #2 on: August 05, 2020, 07:20:57 pm »
Thanks for the confirmation.

So passing the ipac some current/voltage isn't an issue? So long as it doesn't surpass some limit? Good to know. Cutting it all back by more than half, without doing an accurate measurement, each led will be pulling about 20mA and all "on" less than 500mA? I guess that's what a standard USB can handle.  Any idea if these old ipacs could handle supplying my LEDs with power or would a separate PSU still be warranted?

What about some of that current that was making its way when the button wasn't pressed? Is that normal?  And do I need a common ground? Or is ground off the PSU suitable?  This is going to a pi4, could I pull power from that via usb? Because a common ground going to the ipac/leds wouldn't be necessary as they share the same supply anyhow? The ipac and LEDs?

Maybe I'm over complicating it?


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9674
  • Last login:Today at 01:08:07 pm
  • Designated spam hunter
Re: LED button "on" on press with old IPac4
« Reply #3 on: August 05, 2020, 08:27:32 pm »
Cutting it all back by more than half, without doing an accurate measurement,
Don't assume.  Take accurate measurements.

Based on your earlier post mentioning a 46.2mA current draw, your LEDs are almost certainly different than the ones I've used.

each led will be pulling about 20mA and all "on" less than 500mA? I guess that's what a standard USB can handle.  Any idea if these old ipacs could handle supplying my LEDs with power or would a separate PSU still be warranted?
Don't try to pull 400mA (?) for LEDs through the IPac or through your RasPi4.   :scared
- Neither board is designed to provide that amount of current flow for LEDs.

Either use a separate 5v power supply or use a powered USB hub and hacked USB cable. (separate USB cable, NOT the IPac USB cable)
- Ports on unpowered USB hubs are only rated for 100mA per the USB spec, even though many will handle more current than that.

do I need a common ground? Or is ground off the PSU suitable?
If you're using a separate power supply, tie the PSU and IPac grounds together.

If you're using a powered USB hub for the IPac and hacked USB cables, you don't have to tie the hacked USB cable and IPac grounds together (the hub does that), but AFAIK it wouldn't hurt to tie them together anyways.


Scott

nvanvlymen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:November 06, 2020, 10:53:57 pm
Re: LED button "on" on press with old IPac4
« Reply #4 on: August 05, 2020, 09:49:33 pm »
Ok, I don't know what a hacked USB is, but I'll Google it. I was just going to run the ipac off the pi, and since buttons are "off" the risk of drawing even 400mA seems a stretch. I'll test one button off a usb since the draw won't be an issue and see what kind of measurements I'm getting.

*Update.
Found a 5.1v @750mA PSU.  One button pulls 11.3mA.  x20 = 226mA.
Think I'll use this. The buttons aren't crazy bright, which is ok since I'm going to underlight them as well later.

Even if 4 players are playing, only half the buttons would ever get used.

Will that be safe for the ipac?  Looks like voltage going to the ipac per signal will be 2.7v when the button isn't pressed ~ drops to zero when button is pressed. This is with the PSU (-) connected to ipac ground.

The voltage carried through PSU (-) -> what is that called? And why is there any voltage if the circuit isn't completed? 
« Last Edit: August 05, 2020, 11:31:51 pm by nvanvlymen »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9674
  • Last login:Today at 01:08:07 pm
  • Designated spam hunter
Re: LED button "on" on press with old IPac4
« Reply #5 on: August 05, 2020, 11:26:45 pm »
Ok, I don't know what a hacked USB is, but I'll Google it.
A USB cable has four wires: 5v, ground, and two data lines.
- Cut the connector off one end, trim the data lines (keeps them out of the way) and use the 5v and ground lines for LED power.

https://en.wikipedia.org/wiki/USB



I was just going to run the ipac off the pi, and since buttons are "off" the risk of drawing even 400mA seems a stretch. I'll test one button off a usb since the draw won't be an issue and see what kind of measurements I'm getting.
If you plug the IPac directly into the RasPi, any current drawn through the IPac comes through the RasPi.

Pretty sure that with that setup you can press enough buttons at one time to draw enough LED current to cause power problems (i.e. "lightning bolt") with the RasPi.

Your final build should allow plenty of wiggle room for maximum button-mashing.
- This will probably require either a powered USB hub or an external power supply.


Scott

nvanvlymen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:November 06, 2020, 10:53:57 pm
Re: LED button "on" on press with old IPac4
« Reply #6 on: August 05, 2020, 11:36:01 pm »
Got it (hacked USB). Never knew of them to be called that. Regardless I have a PSU wall plug that will fit the bill, more than double the mA needed for every light to be on simultaneously.

I was going to OC the pi for some atomwave ROM improvements, so it's probably better I don't abuse the pi for the sake of convenience of power.

nvanvlymen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:November 06, 2020, 10:53:57 pm
Re: LED button "on" on press with old IPac4
« Reply #7 on: August 05, 2020, 11:50:26 pm »
So I hooked up my PSU positive to my test button, PSU negative to ipac ground, and while I still read 2.4 going to the ipac, the ipac LED is at least not turning on.  I guess next is a full wire up with a notepad test to ensure It still works.

nvanvlymen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:November 06, 2020, 10:53:57 pm
Re: LED button "on" on press with old IPac4
« Reply #8 on: August 07, 2020, 01:31:37 am »
So, after putting everything together, it all works like a champ!  It's funny though, when the ipac isn't plugged in, but the LEDs are, there's enough current that they have a slight glow, but the minute the ipac is powered on, I guess the extra current is used by it. Regardless, thanks for your help PL1

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9674
  • Last login:Today at 01:08:07 pm
  • Designated spam hunter
Re: LED button "on" on press with old IPac4
« Reply #9 on: August 07, 2020, 01:45:42 am »
Glad to assist.   :cheers:


Scott