Boost 4.625V PWM signal to any voltage between 5v-12v - CNC SHIELD V3

Dear community members,
Today i have a problem that may not be a problem.

I have built a diode module laser CNC machine.

My machine runs off of an Arduino CNC shield V3, powered by a 24v, 25A PSU.
My laser module is a 12v, 5Vto12V PWM/TTL 4A Diode Laser, powered by a 24v-12v 5A Buck Converter.

My arduino can only run on "grbl 1.1h" because I am cheap and didn't get the more pricey updated cnc shield. Because of this my spindle control(Laser control) pin is Z+ Endstop pin instead of the marked pin.

When testing the output with a multimeter I am getting a maximum reading of 4.625V from the Z+ Pin. I am running the laser in M3 - Constant power mode (LASERGRBL), I have also checked the cnc shields configs to ensure that S255 = 100% power.

Am i being stupid (Probably) . My thought is that 100% power should mean 100% duty cycle meaning any multimeter measurement should read a full +5V between Z+ and GND.

The laser I am using requires between 5 - 12V PWM input for it to function correctly.
It does function from the 4.625V PWM signal. But i believe i may be limiting its full potential power output or even causing it "skip steps" by not providing it the correct voltage. If my multimeter readings are correct.

Any help in demistifying my conclusion would be appreciated.

If your controller voltage is 5V then I suspect that the voltage drop is caused by a BJT. Then a pullup resistor may help. Measure again with the laser attached.

If nothing helps use a PNP transistor or optocoupler as level shifter. The transistor will invert the PWM signal, the optocoupler can be connected with or without inversion.

Where did you find the "TTL"? This would mean a TTL signal of at least 2.4V is sufficient.

So the signal is from an arduino uno through a shield. The shield itself has no extra components aside from a single resitor and fuse and 4 capacitors for the stepper drivers.

This made me think to test the 5v/gnd voltage from the arduino. when first plugged in its at 4.9v then shortly drops to 4.7v. Do you think the arduino failing to reach +5v could be culprit with extra voltage lost in the traces / shield?

I remember reading TTL and PWM are two words for the same tech? Where TTL is the method of signal generation and PWM is the function of usage? This laser is only labelled as PWM control input.

Then check your Arduino Vcc.

Not at all :frowning:

PWM denotes a Pulse Width Modulation signal shape, while
TTL denotes a universal logic technology with specified signal levels.

so pwm is like AC frequency and ttl is a varying voltage level?

No i found a schematic and that resistor is for Enabling stepper drivers
https://blog.protoneer.co.nz/wp-content/uploads/2013/07/Arduino-CNC-Shield-Scematics-V3.XX_.jpg

For future reference. So this kind of circuit is called a level shifter and is safe for increasing PWM voltages while maintaining signal cohesion?

See Wikipedia for details.

If you disconnect the LASER from Z+ do you still measure 4.625V at Z+?

I have only measured the voltage with the laser disconnected. Measuring between z+ and gnd - Unsure if this is best practice.

So all is OK now?

No its still outputting low voltage 0_0 I have a rubbish unbranded DSO shell osciliscope and connecting it up to z+ is also showing near the same voltage.

Circuit Probes

laser low power = M5 S100 - Duty cycle is accurate, Vmax is definatley low (Its actually 4.8v but i had the oscil set 0.5V)

laser High power = M5 S240 - Duty cycle is accurate, Vmax is definatley low here as well.

On the bright side i finally found a manual for this oscilliscope..! It doesn't read 0% or 100% duty cycle but it does everything inbetween!

Is 0.2V/0.4V difference really going to be a issue. Does it all depend on whether the laser manufactureres allowed for a margin or error in input voltages?