Longboard Inaccurate PWM output

I am experiencing issues with my PWM output on my Longboard on my Longmill Mk1

I have had to replace the Arduino due to a failed pin 11 output on the original, so this is a replacement board - however the issue existed on the original board as well.

When I have no spindle speed set, it will read around .2-.3v on my multimeter.

The moment I turn it on it will go up to around 1-1.2v, even on the lowest spindle speed setting.

Meanwhile, the maximum output voltage it can produce is 4.5v, not 5.0v

The output values do not seem to match the target spindle speeds.

When I have it hooked up to the variable frequency drive’s analog output for the spindle motor I have it will not go below 2.2v - however this could be a VFD thing more than the Arduino.

I’m wondering why this behavior is happening, and if it is possible to fix?

EDIT: I have unplugged the Arduino from the Longboard controller and the PWM output works fine. It seems the problem only occurs when the Arduino is plugged in to the Longboard. I have tested this with and without the 24v power. Even without the 24v power and just the Arduino being plugged in through USB, and the Longboard it will still produce a floating 0.6 - 0.85v and inconsistent PWM output.

For example, spindle parameters set that the min is 1 RPM and max 24000 RPM - M3 S1 will produce 1.46v on the SpinPWM output. M3 S24000 will only produce 4.6v, while unplugged will produce 4.92v.z. At the mid-way mark, S12000 will produce 3.41v, which is 0.91v, which is 31% higher than the expected value which is quite a lot.

EDIT 2: I have isolated the board entirely and connected only pins 11 and ground to the Longboard in their respective positions with jumper wires. Results did not change. Results also stayed the same after putting a 1K resistor between the ground of the Longboard and Arduino, as well as a resistor between the output terminal and the ground terminal on the Spind PWM.

Not really sure what’s going on here, but the issue seems to be faulty with the internal circuitry of the Longboard itself and I will not be able to get PWM control out of this thing. I have also tested running the ground back to the Arduino itself while the PWM is hooked up to the terminal on the longboard and it produces the same error. Not really sure what to do next. I have emailed Sienci support, but I am not hopeful. I’ve had so many problems with this thing since I’ve gotten it I’ve lost all hope.

@Blunderpunk, I posted this in another thread a long time ago. It may help you. I was dealing with laser then but the same info is true when using SPWM for a spindle. Also, it’s normal for the signals not to reach 5V or, for that matter, 0V. It should be close, but not quite.

you can check the output by measuring its voltage with a multimeter. You will get different results if you measure DC vs AC, but you can still tell.

The output is a PWM signal (Pulse Width Modulation). The signal ranges from about 0V to 5V. Off would be 0V and full on would be a steady voltage close to 5V. For intensities in between the signal will be a series of pulses. At low intensities the pulses will be more off than on (lower duty cycle) and at higher intensities the pulses will be more on than off (higher duty cycles). Off = 0V and on = ~5V.

Here’s an example of PWM.

image

image1251×541 10.8 KB

I made the following measurements (note $31 in the table should be $30):

image

image1143×227 8.69 KB

Essentially you are just looking for change on the outputs with a a change in power %. The GRBL “s” commands control the intensity as shown in the chart. In my case I have max spindle speed set to 1000 ($30=1000).

1 Like