Hi Group,
My friend designed a circuit to light up an LED when a switch is pressed. The led lighted would be duplicated to another identical circuit board via RS232 link (2400 b/s). When an LED is lighted, the LED would flash at 1 Hz interval. One would acknowledge by pressing the corresponding switch on the board. Once acknowledged, the LED would be on permanently until another switch is pressed.
The switches and LED are arranged as 2 rows of 12 . Only one switch is allowed per row so there can only be 2 LED lighted and 2 LED in flashing condition.
After he completed the circuit and fabricated the PCB, he wanted to add a dimmer so he could control the brightness of all the LEDs (the circuit is used in a boat). As you can see from the circuit below, he turned the LED on by sourcing the LEDs and all the LEDs were common at ground through 220 ohm resistors. So what I did is gathering all the cathods and connected them to the drain of a MOSFET BUZ71A. This worked fine when the brightness is high. But when the LEDs were dimmed, the permanent lighted LED danced with the flashing LEDs and I couldn't find a simple solution to solve it.
If instead he had sinked the current to switch on the LEDs, I would have combined all the anodes of the LEDs and connected them to a LM317 and supplying 2V to 5V to the LEDs. But that would be major work for him and also rewriting the PIC software.
Can someone help?
.-------------------------------------------. | | | PIC | '-------------------------------------------' VCC VCC VCC + + + pulsed dc at 1Hz | | | | |LED |LED |LED V -> V -> V -> V ->
-LED - - - VCC | | | | + | | | | | .-. .-. .-. .-. | | | | | | | | | .-. | |220 | |220| |220| |220 47K| | '-' '-' '-' '-' | | | | | | '-' o-----------+-----+------ | |D | ||-+ .-. 100 ||