Ok so some progress… Flash it to pin 42. Now I have on and off at least. I do not however have variable voltage. It turns on at 51% - 100% it is off at 0% - 50%. Always sitting at approximately 4.5v it does not go above that voltage.
I completed all the steps I outlined. The laser burns but it seems to be stuck at max power I guess if 42 is 4.5 volts. Is the mega board toast? Surprisingly enough after hitting it with the 12v polarity reversed the driver still seems to function normally.
Can you zip up and post your marlin folder? I’ll take a look after work. If the laser responds then your connections are good.strange that you’re not getting pwm output, just digital on and off.
I still think you should troubleshoot by flashing a simple sketch that does analogwrite to pin 42 with a value of 127 and then check to see if you read about 2.5 volts on the pin. If you do then your firmware configuration is the issue, otherwise you have a damaged mega board.
My bad:( I think I gave you some bad info.I just reviewed the mega pin mapping and ramps schematic and it looks like pin 42 isn’t PWM capable which explains why you’re only getting digital highs and lows out of it. The A5 pin on that aux2 block should be able to generate the pwm output that you need.
I understand that this is full a full diy laser component…
But if I would buy a 2W laser with ttl support and driver from a cheap Chinese store, I assume I can still follow the steps for the Arduino control?
I just have my MPCNC built and doing my first testruns with a pen, so I am sourcing my toolset now.
@Michael Hensen
Yeah, a cheap Chinese laser should work as long as it supports the 0-5V TTL control signal. In that case you can just follow the instructions for re-mapping the pin. Some drivers, like the Jtech Photonics , support 12V control signals and can be connected to the D9 fan output on the Ramps board directly without re-mapping to a different pin.
temperature.cpp: In function ‘void tp_init()’:
temperature.cpp:894: error: ‘DIOA5_DDR’ was not declared in this scope
temperature.cpp:894: error: ‘DIOA5_PIN’ was not declared in this scope
I’m not at my pc right now but I’m guessing you need to leave off the A in A5 as just use 5bucks itself. A5 is ok in an arduino sketch but in this case it looks like it’s being passed to a function that expects an integer value.
Would my 5v regulator on the mega cause this? I assume yes. The regulator chip looks like it let the magic smoke out. Looks like there is a tiny burn hole in it. Had to see in the pic but can kinda see it.
Ok so… my replacement Mega came in WOOT!!! Plugged it all in TTL 5v works great on pin 44. Then I check movement… None of my steppers move other then homing on X axis. Nothing, not even homing on Y or Z… F#%#%#$%# resistor is attached to T0. So I connect up my old mega. X,Y and Z move but the end stops are dead, it just grinds away when it hits the end stops. Upon some closer inspection of the ramps board I see a bunch of brown spots in the red mask… Must have fried my ramps too.
I just do not understand how I could have such different operation from 2 different mega boards like that. They are both flashed with the exact same firmware. So new ramps board ordered arriving tomorrow. This better F#$%! work. LOL
I flashed the new mega with the exact same version of your firmware that was working perfectly prior to my mega blowing up… No wiring has changed everything was plugged back in the exact same way.
I use the no graphic lcd version of your firmware. I have a second folder with the edits done for the laser. Everything was working 100% until I plugged the laser driver power in backwards as leo mentioned earlier.
Its really weird how the 2 mega boards are behaving differently although the firmware is identical.
Will see what happens when the new ramps arrives tomorrow. Start back from square 1… I just hope it didnt damage this new mega board too.