Forums » Discussion and support »
Invert PWM
Added by parag0n almost 12 years ago
I have hooked up PWM control of my LAOS v0.2 board to my K40-III laser cutter using two methods:
1) building the cable mentioned under "Enabled laser PWM" http://redmine.laoslaser.org/projects/laos/wiki/HPC_LS3020_connections_-_July_2012 and connecting it to my cutter. This gives full control over the laser's power from 0 to 20mA as expected, but the power output is inverted (so things that should be at 20mA are at 0mA, 15mA is at 5mA etc). When the cable is not plugged in at the LAOS end, the laser power is full 20mA as expected.
2) modifying the cable to change the direction from pull-up to pull-down. This corrects the inversion of the power rating, but causes it to be scaled down by 50%, so things that should be cutting at full power are only cutting at 10mA. I think this is because optoisolators arent really meant for use as a pull-up
I'd like to switch back to method number 1, so a config option for inverting the PWM signal would be perfect (so 100% power = 0 PWM Duty Cycle, 0% power = 100% PWM Duty Cycle).
I've logged this as a issue in the bug tracker [[http://redmine.laoslaser.org/issues/69]]
Unless anyone has any other ideas?
Replies (1)
RE: Invert PWM - Added by hugomeiland almost 12 years ago
Hi parag0n,
you should be able to modify the config file from:
laser.pwm.min 90 ; minimum pwm value [%]
laser.pwm.max 0 ; maximum pwm value [%]
to something like:
laser.pwm.min 0 ; minimum pwm value [%]
laser.pwm.max 90 ; maximum pwm value [%]
this should do the trick...
Hugo