LaosLaser / Hardware

Hardware (Mainboard PCB designs etc.)
17 stars 10 forks source link

Laser ON at startup #7

Open pbrier opened 11 years ago

pbrier commented 11 years ago

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.

Springuin commented 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:

laos-board

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:

  1. initialize the I/O's as soon as possible
  2. don't place Q1 when you enable the laser via the optocouplers
  3. add an extra transistor before Q1/Q2 to invert the signal such that the transistor is off when the mbed pin is high.
  4. add some logic that uses the DriverEnable with to define the state of the LaserOn signal when the stepper drivers are not enabled. This assumes that you only ever want to enable the laser together with the stepper drivers.
  5. a simplified version of 4: add a small mosfet that pulls down LaserOn when DriverEnable is high. You would only place this mosfet when you connect enable the laser via Q1 and not via the optocoupler
  6. place Q1/Q2 after the optocouplers

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.

jegb commented 9 years ago

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.