Electronic – Amplify PWM Signal from exactly 0-3.3V to 0-5V

pwm

I am converting a chinese lasercutter to be controlled using a Smoothieboard. The PSU is controlled by a TTL High / Low to "arm" the laser as well as several safety measures.

When the laser is armed, the power is controlled by a PWM signal. This PWM signal from the Smoothieboard is output at 3.3V, and then converted to a 5V PWM signal using the recommended Logic Level Converter (From SparkFun, we soldered our own circuit because we couldn't wait for delivery).

This all works like a charm apart from one little detail. The circuit on the logic level converters' signal side always has around 0.4 volts when not active. This means that when our laser cutter is travelling with a G0-command, it is still armed, thus burning with around 7mA (compared to 28mA full-power). It has to be 0 volt when travelling.

  • We already measured the signal from the Smoothieboard using a picoscope, and it shows 0 volt when low, 3.3v when high: without the LLC connected. So issue is supposedly to be found in the circuit.
  • In the name of "Logic" level converter, I kind of understand that 0.4 volts is a binary low, but this is not what I desire in my project.
  • The problem is temporarily solved by disarming and arming between G0-moves, but this seems like a bad way.

What kind of circuit can I use to solve this problem?
Thank you in advance.

our circuit

Best Answer

2N7000 won't be fully turned on with 3.3V Vgs so it is unable to pull the output to ground, there will be a residual voltage as you noticed.

You can use a 74HCT logic gate for 3.3V to 5V logic level conversion. Your can use any gate you want like a 74HCT08 AND gate with both inputs to the same signal.

schematic

simulate this circuit – Schematic created using CircuitLab

Depending on the output current you want, you can also put all 4 gates in parallel. If it's just to drive a logic level input, no need to.

If the cable is longer than a few tens cm, add a 33R resistor at the output of the gate to avoid signal reflection.