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 PWM circuit modification  (Read 3329 times)

0 Members and 1 Guest are viewing this topic.

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7513
  • Last login:July 17, 2025, 05:36:09 pm
  • I break stuff...then fix it...sometimes
LED PWM circuit modification
« on: June 22, 2011, 02:42:12 pm »
I have an existing RGB controller with a typical common 12volt positive and a PWM controlled ground to each color.

the issue i'm having is the LED strip i have was designed the other way around... PWM the 12 volts and a common ground.

i propose the following circuit changes, feed 12 volts directly to the transistor collector and have the the positive of the LED color feed on the emitter side. ground the other.

attached is the original and the modified circuit for discrimination


BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re: LED PWM circuit modification
« Reply #1 on: June 22, 2011, 03:05:10 pm »
The standard controllers go to ground to enable the LED so on your circuit it would go to ground and the LED would not light when it turned off the LED would probably light as you would have voltage on the input.

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7513
  • Last login:July 17, 2025, 05:36:09 pm
  • I break stuff...then fix it...sometimes
Re: LED PWM circuit modification
« Reply #2 on: June 23, 2011, 08:01:17 pm »
The standard controllers go to ground to enable the LED

yes, they switch the ground path

so on your circuit it would go to ground and the LED would not light when it turned off the LED would probably light as you would have voltage on the input.

uhm...


i would think that it would work..

you see, the original circuit rapidly connects and disconnects the ground path from the LED's... the LED's ALWAYS have 12vdc running to them.

what i need to do is the opposite... i need to rapidly connect and disconnect the 12Vdc power to the LED's and always have the ground hooked up.

do you suppose my modified schematic would work?  i'm just not sure if there is a current or voltage drop through a transistor operating in this configuration that is going to be an issue. does anybody suppose i substitute the NPN transistor for maybe a MOSFET? possibly a TIP102??

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: LED PWM circuit modification
« Reply #3 on: June 24, 2011, 01:22:25 am »
I think what BobA meant is that the PWM, in the standard non-transistor configuration, is functioning inversely. The controller holds the pin low (ie ground) and this lights the LED. The controller pulls the pin high (applies voltage) and the LED turns off. A lot of microcontrollers do it this way because it's usually easier to sink a current rather than drive it.

In both of your drawings, you're negating the inverted signal so when the controller goes high, the LED goes on and when it goes low (or "off") the LED goes off. It's more intuitive but it also means that any scripts involving that controller will be be inverted in relation to your set up and you'll need something to invert the commands.

I really couldn't find any reliable sources for the 8505. Is it EOL?

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: LED PWM circuit modification
« Reply #4 on: June 24, 2011, 01:31:45 am »
That won't work right with a BJT since you need to source current into the base of the transistor and get it to flow out the collector (for an NPN).  This means you need a voltage ABOVE the input rail to have the load on the emitter with an NPN.

You can, however, use a PNP for this.  When the signal on the base is connected to ground, current flows from the emitter (which is connected to the power rail), through the base, and into the signal source.  This causes a bunch of current to flow out the collector and into the load.

If you can't change the transistor, put a pull-up resistor on each output and use a 74xx04 to invert the signal and feed that into the strip as-is.

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7513
  • Last login:July 17, 2025, 05:36:09 pm
  • I break stuff...then fix it...sometimes
Re: LED PWM circuit modification
« Reply #5 on: June 24, 2011, 01:47:32 am »
okay i understand what you are saying now...

i don't think whether the signal is high or low isn't going to matter in my case as the R,G, and B LED's are just going to be in a "random" color cycle. (fading constantly through all the combinations of all colors possible)

BTW, here is the datasheet on the 8505 8050  ;D it is likely SERIOUSLY EOL (cheap ass china made deal)

edit:

add schematic with PNP instead

OR

we yank the base resistor and replace the NPN with a FET???

edit2 for reverse dyslexia  ;D
« Last Edit: June 24, 2011, 10:39:34 am by lilshawn »

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: LED PWM circuit modification
« Reply #6 on: June 24, 2011, 10:27:59 am »
Yeah, that looks more reasonable. The only datasheet I could find is for the Motorola MJ8050 in that monster 700 volt package (TO-3 I think?) I was wondering how LEDs you were going to game together with something that beefy. That datasheet was in worse condition, looked like it was photocopied a couple of times then scanned by someone who hadno clue how to use a scanner.
« Last Edit: June 24, 2011, 10:32:00 am by SavannahLion »

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7513
  • Last login:July 17, 2025, 05:36:09 pm
  • I break stuff...then fix it...sometimes
Re: LED PWM circuit modification
« Reply #7 on: June 24, 2011, 10:41:42 am »
Yeah, that looks more reasonable. The only datasheet I could find is for the Motorola MJ8050 in that monster 700 volt package (TO-3 I think?) I was wondering how LEDs you were going to game together with something that beefy. That datasheet was in worse condition, looked like it was photocopied a couple of times then scanned by someone who hadno clue how to use a scanner.

yah it's pretty rough, still better than some schematics I've had to try and read.

well... i guess i'll dig up some parts

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: LED PWM circuit modification
« Reply #8 on: June 25, 2011, 07:50:10 am »
What's the signal voltage on your PWM?  If it's only 5V, you'll need to translate it somehow.  An NPN and (large) pull-up resistor is common.  An open-collector output that can handle 12V (such as from an LED-Wiz or Pac-Drive) is fine, too.
« Last Edit: June 25, 2011, 07:51:49 am by MonMotha »

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7513
  • Last login:July 17, 2025, 05:36:09 pm
  • I break stuff...then fix it...sometimes
Re: LED PWM circuit modification
« Reply #9 on: June 25, 2011, 01:16:43 pm »
i'm not sure, i'll have to test it on monday, its at the shop.

the circuit was part of an LED strip, it's wiring was the common 12v circuit type. the leds where stripped out for another project.

typical of "made in china" not even the controller chip has any markings... it's blank  :dizzy: usually they have someone grind off the markings so you don't copy their crappy design, but to go through the hassle of having a chip produced or sourced with NO markings at all?

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7513
  • Last login:July 17, 2025, 05:36:09 pm
  • I break stuff...then fix it...sometimes
Re: LED PWM circuit modification
« Reply #10 on: June 28, 2011, 10:43:02 am »
the output of the chip outputs is 4.78 volts under load so i would assume it is 5 volts no load.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: LED PWM circuit modification
« Reply #11 on: June 28, 2011, 12:15:55 pm »
Then you'll need to drive an NPN with that and have it drive the PNP.  Pretty common way to do high side switching with a logic signal.  They actually make parts with both an NPN and a PNP (or an NMOS and PMOS) in one package for just this purpose.  Any ol' NPN like a 2N3904 of 2N4401 will work.

You could also use a diode if you prefer.  1N4148 or similar should be fine.  You want to allow current flow from the base of the PNP to ground (somehow), but allow the base of the PNP to rise all the way to 12V when "off".