1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

R2 Ir probe

Discussion in 'Troubleshooting' started by John Pearsley, Oct 22, 2020.

  1. John Pearsley

    John Pearsley Member

    Joined:
    Aug 8, 2017
    Messages:
    33
    Likes Received:
    2
    I’m having a problem with the R2 ir probe. I’ve replaced the mainboard with a ramps 1.6+/mega 2560 combo pcbs. I use a breakout board to get the wires from the hot end to the ramps board. The heaters and servos all work properly. I want to use the original R2 ir probe for bed leveling like the original R2 did. I have the 3 wires (gnd, 5v, signal) of the ir probe to connect to the ramps board. I can change the marlin code to use any of the ramps pins. I tried to use the Z_Max connections (pin 19) and also the Servo0 pin (pin 4) to control the ir probe. In both setups, the ir probe seems to be always triggered (M119) with the red led always on whenever I try to use the probe (M30 or M29). The bed does not move more than a few mm apparently because the probe triggers immediately (always on).

    Does anyone know how the ir probe works for control? Do I need to only have the 5v on when I want the probe and use the signal line to detect the height? I assume that the signal is telling the ramps board when the bed is within its proper distance. I think I’m missing something about how the Robo R2 ir probe works. Any thoughts? Thanks.
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,672
    Likes Received:
    7,316
    While I have not looked hard at the one Robo uses this covers most of the IR sensors out there and how they work.

    https://learn.adafruit.com/ir-sensor/testing-an-ir-sensor

    I would expect it to be always on and a proximity sensor such that it will not toggle state until the bed is "home"
     
  3. John Pearsley

    John Pearsley Member

    Joined:
    Aug 8, 2017
    Messages:
    33
    Likes Received:
    2
    This make me think that maybe my version of the Robo R2 marlin code is not handling the ISR process for the signal. I have seen some C++ code from an external source that seems to process the alternative states for handling the dual IR leds. I'm assuming there is not any specific embedded code in the IR board itself. I'm going to look into the isr code to see if it has to control the individual leds.
    Thanks
     
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,672
    Likes Received:
    7,316
    As far as I know you are correct -- there is no code on the sensor board itself, it is just a (slightly) fancier switch.
     

Share This Page