What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

TAP Sensor Wiring on an SB2040

Does does gpio25 need a pull-up resistor on its config?

My config was:
Code:
pin: sb2040:gpio25
but I suspect it might need to be:
Code:
pin: ^sb2040:gpio25
to actually work with gpio25.

I was getting the same behavior of the optotap LED triggering correctly, but Klipper not detecting a change in state. When I moved to gpio28, then Klipper was detecting it being triggered.

So I tried another sb2040 board, and was getting ADC out of ranges errors. In the process of troubleshooting that, my Optotap 2.1 hit some metal and shorted. So now I can't test any further. And I've got the 5V sensor on order now, so will probably be using gpio28 anyway.

For all I know, gpio28 should also have a pull-up resistor for reliable operation, it just happens to work without it.

I think I can test the pull-up resistor theory by connecting gpio25 to GND directly, but someone tell me if that's a bad idea.
 
Does does gpio25 need a pull-up resistor on its config?

My config was:
Code:
pin: sb2040:gpio25
but I suspect it might need to be:
Code:
pin: ^sb2040:gpio25
to actually work with gpio25.

I was getting the same behavior of the optotap LED triggering correctly, but Klipper not detecting a change in state. When I moved to gpio28, then Klipper was detecting it being triggered.

So I tried another sb2040 board, and was getting ADC out of ranges errors. In the process of troubleshooting that, my Optotap 2.1 hit some metal and shorted. So now I can't test any further. And I've got the 5V sensor on order now, so will probably be using gpio28 anyway.

For all I know, gpio28 should also have a pull-up resistor for reliable operation, it just happens to work without it.

I think I can test the pull-up resistor theory by connecting gpio25 to GND directly, but someone tell me if that's a bad idea.
After some more digging on Discord, it does seem that the pull-up resistor needs to be configured on gpio25 of the sb2040.

https://discord.com/channels/460117602945990666/912303933182050314/1041965106126405663
 
I have now done the CAN mod and most is working fine. I use sensorless homing, Tap and the SB2040. I could get the Tap to trigger with ^sb2040:gpio25 and it works if I lift it by hand. But it does not stop when triggered on build plate.

I guess it's the position_endstop which is not right. What value do I have to use for start? Tried 0 (zero) but crashed into build plate...

Configuration:

#####################################################################
# Z Stepper Settings
#####################################################################
[stepper_z]
step_pin: PF11
dir_pin: PG3
enable_pin: !PG5
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
endstop_pin: ^sb2040:gpio25
position_endstop: 0
##--------------------------------------------------------------------
## Uncomment below for 300mm build
position_max: 220
##--------------------------------------------------------------------
position_min: -5
homing_speed: 10
second_homing_speed: 3
homing_retract_dist: 3
 
Last edited:
According to the schematic of the SB2040 the gpio25 has got the protection diode in series and therefore can be used with voltages higher 3.3V, but there is no pull up resistor on the board so it needs configuration in klipper --> ^sb2040:gpio25
gpio 28 and gpio29 have a 4k7 pull up resistor built in on the board, so they work without the "^" in the configuration but it does also does not hurt if it's configured. But the voltage must not exceed the 3.3V on the port.
 
I now changed to GPIO28 and it's working :) GPIO25 dit not work at all even if it triggered. No idea what's wrong but I don't care, I am fine with GPIO28 ;)
 
Hi Takuya and everybody else,

I have one of the new revision rev2.4.1. 5V/24 OptoTap boards. Can I just plug everything into the HV-IN port, including the power wire?

Thanks!
Lukas
Yes you can. If your board can take 24V, then you can put all 3 wires into the HV in port on the SB2040
 
Has anyone made it work with TAP and hall effect sensors on the SB2040 for homing? Not sure how I should set this up currently
 
Has anyone made it work with TAP and hall effect sensors on the SB2040 for homing? Not sure how I should set this up currently
Well I think it will work without any problems if someone is in the same situation. I went for the most recent Optotap 2.4.1 and connected it to the HV endstop on the SB2040. I can now use the remaining 5V endstop ports for X and Y. Should work without any problems I guess
 
Top