I have been trying to modulate a laser using an analogue signal from the DAC.
However I have been unsuccessful in getting the output of the DAC to change. I am using an Aztec X5 mini board and the smoothie ware code correctly initialises the DAC out pin. With the laser module turned off the pin is pulled up to 2.3v this agrees with the Documentation for the lpc chip. When the laser module is enabled the DAC output is set to 0V. I cannot change it from this value when issuing G1 move commands with an S value to set laser intensity.
From previous discussions on the IRC it appears to be a software issue, I was hoping someone could have a look at the code to see if the could spot the issue. I have the hardware set up to test it I just don’t have the C++ knowledge to interpret the code.
Do you see any kind of error over the serial port ? ( try connecting using cutecom and see what goes on, ideally on the Serial UART port close to the USB cable with a FTDI cable )
I hooked up an FTDI cable to the serial port and broadcast the command G1 X10 S 0.5 and received the response “ok”
The output of the DAC does not change and is constant at 0.003V
Correction I just hit the reset button and have spotted an error message first thing.
Error: Laser cannot use P0.26 (P2.0-2.5 only) Laser module disabled.
I had not realised the serial connection kicks out this sort of information I will be sure to look at this first in the future.
The error message appeared to be different than the one in laser.cpp for both the laser DAC and edge branches so I re-compiled the code for the laser DAC branch and it appears to be working perfectly now.
Thanks for pointing me in the right direction, I am still getting to grips with C++ so the error messages via the serial connection is very useful.