Problem with TMCM1290EVAL BOARD and HOMING with sensor

Thread Starter

plif

Joined Oct 10, 2025
1
Hello,
I'm using a TMCM 1290 EVAL board hooked up to a stepper motor and a photointerrupter (GP1S093HCZ0F). Currently running into a problem with my sensor (GP1S093HCZ0F) and home position for the stepper motor I'm using.

The motor works perfectly, but I’m having trouble getting the sensor to interact with the motor. The sensor detects light at a single position, which should serve as the home position. Currently, the sensor itself works, but the motor does not respond when the sensor is activated.

The phototransistor is connected to the REF. SWITCHES input (also tried connecting to the GPIO pin). I connected the cathode and emitter to GND, placed a resistor (250Ohm) between the supply (5V) and the anode, and left the REF input connected to the collector. The board has a 4.7 kΩ pull-up resistor for the left REF input.

I tested by manually shorting LEFT REF to GND, which successfully triggered a logic low and caused the motor to respond to the TMCL code. However, this does not happen with the phototransistor connected.

Using a voltmeter, I measured 0.8 V between GND and the collector when light is detected, which the driver interprets as low, and 5 V when the light is off.

Is it possible that it's a programming problem too? I've been testing with this code from the examples. Tried this with the GPIO pins:
Code:
amax = 10000           // max acceleration
vmax = 20000           // max speed
cmax = 100             // max current


SAP 5, 0, amax         // set max acceleration
SAP 6, 0, cmax         // set max current

SGP 78, 0, 0              // configure GPIO0 as input (bit 0 = 0)
SIO 0, 0, 1            // enable internal pull-up for input 0 (optional)


loop:
    GIO 0, 0           // read GPIO0 into accumulator
    JC ZE, stopMotor   // if LOW → photointerruptor active → stop motor

    // Sensor inactive → rotate left
    ROL 0, vmax        // rotate axis 0 at vmax
    JA loop            // repeat loop

stopMotor:
    MST 0              // stop motor immediately
    JA loop            // go back to loop
Also the schematics:
1760102542717.png
 
Last edited:

lichurbagan

Joined Jul 4, 2025
121
The REF inputs on the board are pulled up to +5 V on the PCB (through 4.7 kΩ), but the 74LVC Schmitt input that senses the switch is running at 3.3 V. That can produce marginal thresholds and unexpected behaviour.
 
Top