??? 05/01/10 22:06 Modified: 05/01/10 22:11 Read: times |
#175597 - Simple scheme... Responding to: ???'s previous message |
Chico said:
Kai, I want to make an RGB controller for some LED bars I have.
Each bar has many LEDs installed on it, but it is 12v, have the resistors on itself, each color draws 160mA, so 480mA per bar in full white! Just feed 12v to the bar and it lights! The bars are common anode! I want to control MANY of these bars, so I want to able to feed around 5A per channel/color. The microcontroller will be the 80S52, the PWM will be around 100hz. I would give this scheme a try (shown is only one colour): It works as follows: To prevent all the LEDs from flashing on during power-on reset, there's an OR-gate at the port Px,y. The LEDs can only be turned on, when both inputs are low. As the AT89S52 does not show an asynchronous reset (http://www.8052.com/forum/read/164933), the output of reset controller MAX1232 is directly connected to one input of OR-gate. If one input of OR-gate is high, the output is also high and the BC337 is turned on. This forces the gate of IRF640 to 0V and turns off the MOSFET. No LED will shine. If, on the other hand, both inputs of OR-gate are low, the output is also low and the BC337 is turned off. By this the gate of IRF640 gets +12V and is turned on. The LEDs in the bar will shine. So, the LEDs can only shine, when the power on is accomplished and the code of micro toggles Px,y low. The two 1k resistors at the gate of IRF640 provide rather slow switchings in the µsec range, in order to prevent EMI. If you plan a 120Hz/256steps PWM, then a minimum step lasts about 33µsec and there's no need to provide a faster switching. Take care that the two cables to the LED bar are twisted, to keep the loop area and by this the inductance low! How many LED bars can be connected to the IRF640 depend on the circuitry of LED bars and, of course, on the cooling of IRF640. If more than one IRF640 are needed, you can connect some more BC337/IRF640 combinations to the output of OR-gate, each via a separate 10k/4k7 voltage divider. Good luck, Kai Klaas |