Open pbrier opened 11 years ago
According to the LPC1769 usermanual: on reset pins are input with pullup (page 120 "All I/Os default to input with pullup after reset").
So when you are using the optocouplers to enable the laser you're fine; their leds are connected to VCC via a resistor with one side and to the IO pin with the other side.
However when you place a jumper on J41's 1-2 it may go wrong. See the schematic:
This jumper connects the input pin to R15 and Q1's B->E diode; this pulls down the input. Current flows from base to the emitter and therefore from the collector to the emitter. Or some current to flows from VCC through R32, the optocoupler's led, R15 and Q1's B->E, enabling the laser.
I see the following possible (partial)solutions:
These solutions assume that the laser is 'on' when the transistor or optocoupler is conducting.
Sidenotes: Since we're switching stuff maybe we should use a MOSFET instead of a BJT, this reduces the voltage drop over the transistor. The TIP110 has a collector emiter saturation voltage of up to 2.5V; a decent mosfet reduces this to practically 0.
The schematic lists Q1 and Q2 as TIP115 instead of TIP110, that's wrong; TIP115 is the PNP equivalent of the TIP110; TIP110 is the right one. I already corrected this in my working copy, it will be committed soon.
What does everyone else think? I assume 1 is already done; I think solution 5 is the nicest option, but it should be well documented so that a builder thinks before placing the mosfet. 5 is also a viable option.
It would be good to have a selectable logic high/low for Laser EN. Some HV PSU have reversed logic. This should be configurable on sw for P2.5
The second point is a possible solution to the current schematic, if you have internal pull ups on the mbed outputs, one trick could be add a cap (1uF may do) to ensure the signal LOW until the MCU is up booted up and bring the signal LOW. Note that the optos also reverse the logic, and not sure what the pull ups are on the side of the laser PSU.
If the MBED outputs are not initialized, the laser is turned ON. This may be due to significant pull-down in LPC outputs. Perform measurements, and maybe change resistor values, or add extra pull-up resistor.