Hi all,
I built a handheld CNC and I’m now trying to wake the monster up — but I can’t get any sensors to be detected. Maybe I bought the wrong ones, maybe all my PCBs are faulty, or maybe someone just doesn’t want me to use this awesome machine ![]()
How can I figure out what the actual problem is?
Is there a debug version of the firmware for the Arduino Mega so I can see more detailed information? Right now, the only thing I see in the serial monitor is:
Reconnecting to COM5 Connected!
SCREEN: Initializing…
Loading calibration coefficients:
Sensor 0: Cx:0.0102, Cy:0.0102, Cr:0.0000
Sensor 1: Cx:0.0102, Cy:0.0102, Cr:0.0000
Sensor 2: Cx:0.0102, Cy:0.0102, Cr:0.0000
Sensor 3: Cx:0.0102, Cy:0.0102, Cr:0.0000
Sensor0 initialization failed
Sensor1 initialization failed
Sensor2 initialization failed
Sensor3 initialization failed
Initializing SD card…Initialization failed!
SCREEN: Zero Machine XY
10655: sensing time = 10654783
SCREEN: Zeroing Machine XY…
SCREEN: Zero Workspace Z
31914: sensing time = 1516271
SCREEN: Zeroing Workspace Z…
SCREEN: Turn to
set thickness
0.00 mm
I disassembled one of the sensors again and soldered the wires directly, but that didn’t solve the problem either.
The sensors are from 1PCS Neue und Original PMW3360DM-T2QU LM19-LSI DIP PMW3360 PMW3360DM sensor objektiv LM19 - AliExpress 502 , and the PCBs were ordered from JLCPCB but soldered manually.
greetings from Germany ![]()
EDIT:1
addes some debuging Serial.print to PMW3360
bool PMW3360::check_signature() {
SPI_BEGIN;
byte pid = adns_read_reg(REG_Product_ID);
byte iv_pid = adns_read_reg(REG_Inverse_Product_ID);
byte SROM_ver = adns_read_reg(REG_SROM_ID);
SPI_END;
Serial.println(pid);
Serial.println(iv_pid);
Serial.println(SROM_ver);
return (pid==0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04
}
looks like SPI is not working:
Sensor0SS Pin: 30
0
0
0
initialization failed
Sensor1SS Pin: 10
0
0
0
initialization failed
Sensor2SS Pin: 31
0
0
0
initialization failed
Sensor3SS Pin: 32
0
0
0
initialization failed




