Faster Laser PWM/Fan PWM
Yeah, probably nothing new but I never found an answer.
So, I am using repetier on a RADDS. And the trouble I have is simply the frequency of the PWM output Way too low to control the laser I connected to the fan. I tried looking for it for quite some time but all I found was people saying that I should 1: control intensity by feedrate or 2: write an event thingy
The first one is not what i'm looking for and the second one is nothing i understand. I can code a little bit but that's it.
I know that the fan is connected to a pwm pin of the arduino so in theory it would just be read the Sxxx value and write as analogue from my understanding. But that's already way over what I can do without help.
Hope somebody knows how to help me.
So, I am using repetier on a RADDS. And the trouble I have is simply the frequency of the PWM output Way too low to control the laser I connected to the fan. I tried looking for it for quite some time but all I found was people saying that I should 1: control intensity by feedrate or 2: write an event thingy
The first one is not what i'm looking for and the second one is nothing i understand. I can code a little bit but that's it.
I know that the fan is connected to a pwm pin of the arduino so in theory it would just be read the Sxxx value and write as analogue from my understanding. But that's already way over what I can do without help.
Hope somebody knows how to help me.
Comments
For laser you should also use the laser driver not fan. Shortly we will get a sample code for solution 2. from a active user which we will include in github to show how to do it right with an external board for fast PWM generation. That sample can easily be modified to use arduino analog write if the pin satisfies the unused PWM timer condition.
And I have the laser mode enabled. I just don't use it because of the limitations of the software that seems to work with it.
It would be really nice if i could get a link to that example. I can work with code a little bit so I probably could make it work eventually.
Thanks for the answer.
But that's not what I am looking for. I have everything I need. All I don't have is the knowledge on how to use the Sxxx after the command to write a pwm signal.
Guess I won't have pwm then...
there are so many different laserdrivers out there , some just use a enable pin and are sold as pwm"able" which is nonsens, of coarse they work somehow , but not as they should. the ones i have are limited to 1kHz operation,
better ones start at 250 kHz and work best with true analog modulation.
Also have a weaker one that is pwm"able" Both don't like the software pwm very much.
i spent the last two months with that stuff.the only thing i can say about that :
use an external PWM controller like i do and it´s exactly written in the custom events.
It's a stupid solution though if you ask me. I have more than enough free pwm pins.
may be you need more background , it´s explained multiple times here in forum.
using the pwm pins is based on timers and timers are occupied by other functions so that is the reason for the low pwm
frequency.
but feel free to code a solution...
Guess I'll need that solution then.
But that raises another question. There are two Laser wires. One analog and one pwm. Does that mean it would work if I were to use only one of those?
My knowledge of coding is...very simple. I don't really understand what this code is doing
So simply get the analog thingy, hook it up to power and ic2 ports and laser, and use the custom events, right?
What about the rest of that code? Can I just leave it in? Do I need to do anything else?
I have no clue what I'm doing at this point.
and in Customevents.h
as you are using due/radds you have to use level shifter to get from 3.3V to 5V and keep in mind that I2C wiring is
critical , so keep wires as short as any possible
I have tried that customevents.h without success, but maybe I missed something.
Do you know about any solution for a simple PWM pin to switch the laser TTL?