| Electronics > Beginners |
| RGB circuit help |
| << < (3/4) > >> |
| Ian.M:
--- Quote from: hamster_nz on July 17, 2018, 09:39:06 am ---The problem would be easy to solve if you had a 74LS157 IC available to you. It is a quad 2:1 multiplexer, allowing it to switch the 4-bit output between two 4-bit inputs. However you would still need 7 resistors, to act as either pull-down or pullup resistors, so component count would be much the same. --- End quote --- 74LS logic wont work reliably if powered direct from a single cell LiPO as its minimum specified Vcc is well above the 3.0V to 4.1V range (mostly below 3.7V) the cell will provide. 74HC logic is specified to operate correctly with Vcc between 2.0V and 6.0V so is well suited to running direct from a single cell LiPO. However with a 74HC157, you'd still need the seven pullup resistors. The 74HC4053 triple SPDT analog switch I suggested earlier could do the same job with only four pullup resistors, one on the control pins (connected together) and the others on each switch common pin. However it does have the disadvantage of a fairly high On resistance when operating at 3.0V, so the pullups would need to be at least 10K and the control transistors for the LEDs would need to be low Vgs threshold P-MOSFETs (for a common cathode RGB LED). |
| Ian.M:
--- Quote from: undescriptive on July 17, 2018, 10:29:12 am ---Hi, If the LEDs would sink all of that current, would the dip switches still have issues? especially if the dip switches are on the positive side of the LED? Each LED will sink 1A (on a single die) and are heatsinked. --- End quote --- The dip switches certainly wont be specified for 1A so will fail. They may even melt after you've operated them a few times. --- Quote from: undescriptive on July 17, 2018, 10:29:12 am ---Ignoring the high power for now, and assuming that there is just a standard common cathode RGB LED, how would you switch between 2 different colours momentarily when a button is pressed? Preferably using only discrete components and nothing more "clever" than a transistor/mosfet Thanks again! --- End quote --- Its already been described to you several times - use a low Vgs thrshold P-MOSFET to feed each individual LED in the RGB LED, with all their source pins connected to +batt. You'll still need some sort of current limiting so you don't blow up the LED or MOSFETs. Cheap and nasty would be a series resistor between each MOSFET drain and its LED anode. Then you just have to switch the MOSFET gate voltages, which can be very low current. Put a 10K pullup (to +batt) on each MOSFET gate and they will default to off. Pull one down to ground and its LED will turn on. Its *MUCH* easier to use a MCU or logic chip, but if you insist on fully discrete, it can be done. Connect the gates to two banks of dip switches via Schottky diodes, and use a SPDT push button to ground the common of one bank, but swap to grounding the common of the other bank when pressed. Without a SPDT pushbutton its a bit harder - the button can ground one bank direct, but the other must be driven by a N-MOSFET, acting as an inverter with a 10K pullup on its gate and the button between gate and ground. Don't even think about trying to do it with BJTs - it would be a whole lot messier with a far higher component count. |
| hamster_nz:
--- Quote from: Ian.M on July 17, 2018, 10:51:08 am ---Its already been described to you several times - use a low Vgs thrshold P-MOSFET to feed each individual LED in the RGB LED, with all their source pins connected to +batt. You'll still need some sort of current limiting so you don't blow up the LED or MOSFETs. Cheap and nasty would be a series resistor between each MOSFET drain and its LED anode. Then you just have to switch the MOSFET gate voltages, which can be very low current. Put a 10K pullup (to +batt) on each MOSFET gate and they will default to off. Pull one down do ground and its LED will turn on. Its *MUCH* easier to use a MCU or logic chip, but if you insist on fully discrete, it can be done. Connect the gates to two banks of dip switches via Schottky diodes, and use a SPDT push button to ground the common of one bank, but swap to grounding the common of the other bank when pressed. Without a SPDT pushbutton its a bit harder - the button can ground one bank direct, but the other must be driven by a N-MOSFET, acting as an inverter with a 10K pullup on its gate and the button between gate and ground. Don't even think about trying to do it with BJTs - it woul be a whole lot messier with a far higher component count. --- End quote --- Oh, just saw they are wanting to switch high power LEDs, not a 3mm or 5mm RGB LED like in your graphic - missed that on the first read. Switching that sort of load actually requires a real design and careful engineering, not just playing with the bits you might have to hand :D Either that or just buy a compatible LED controller that allows switching between preset colours, It will cost you far less in money, time and effort. |
| StillTrying:
You could simplify it quite a bit by limiting the choice to just 3 colours each, when viewed by themselves there's often not a lot of difference between green/yellow or blue/cyan anyway. >:D |
| undescriptive:
So, I did a bit more playing and I'm pretty sure this will work - forgive the bad eagle cad layout, I'm just learning it The transistor types are wrong as I couldn't find the ones I'm going to use in EagleCad. NPN should be: SS8050DBU - https://uk.rs-online.com/web/p/products/7390307P/ PNP should be: SS8050DBU - https://uk.rs-online.com/web/p/products/7390325/ the colours for the LED are selected by the dip switches and they trigger a further NPN to turn on the high power LED (there is a deliberate spare channel) This tests fine, does anyone see anything glaringly obvious that would cause issues? Thanks! |
| Navigation |
| Message Index |
| Next page |
| Previous page |