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!

Concerning wired sensors for Tap

vinnycordeiro

Well-known member
Voron Owner
As Tap has been officially released, I'd like to make a point about the choice of sensors, and why the devs chose OPB991 sensors (slightly technical electronics explanation, if you don't understand just ask a question):

If you read the sensor's datasheet, you'll see right at page 1 that these are open collector sensors, and that means that the output pin is either floating or at ground.

"Why is that important?", you will ask.

That's important because that way we don't need to know which voltage the microcontroller of you board accepts. You just set the sensor pin with a pull up resistor, and when the probe is activated the microcontroller itself detects the voltage change when the circuit is completed and current flows to ground.

However, if you absolutely know that your board's microcontroller is 5V tolerant (such as all the 8-bit AVR microcontrollers or the 32-bit STM32 ones), you can use the OPB990 sensors, they send 5V to the sensor pin when the switch is activated. If you use such a sensor on a RP2040-based board, you will fry the mcu's sensor pin.

If, for any reason, you only have access to the OPB990 sensors and have a RP2040-based board, you'll need to add a level shifter between the sensor output and the board. That can be as easy as adding two resistors on your circuit, or a circuit with a dedicated level shifter IC.

tl;dr: follow BOM as close as possible and you won't have problems. If that can't happen for whatever reason, know what you are doing before proceeding.
 
Thanks for this. Have my 990T51Z working well on a STM32 Can board (EBB 42). Critical that people follow the diagrams and don’t forget the 220ohm resistor either.
 
Thanks for this. Have my 990T51Z working well on a STM32 Can board (EBB 42). Critical that people follow the diagrams and don’t forget the 220ohm resistor either.
With the EEB42 did you just need to connect the 220 ohm resistor to the red wire like in the build guide and connect it to the EBB42 or did you need a voltage regulator?
 
With the EEB42 did you just need to connect the 220 ohm resistor to the red wire like in the build guide and connect it to the EBB42 or did you need a voltage regulator?
The resistor is needed to limit the current of the sensor's infrared LED, it doesn't have any relation with the output.
 
I get it now thanks! I was just seeing messages about the board using 3.3V being a issue for something.
 
EBB42 is fine with a VCC (5v) level input back into the probe input (PB9 think) but as Vinny noted the current limiting resistor is critical otherwise the opto sensor will smoke a bit, smell a bit and then die !
 
A level-shifter in our case can also be approximated with something most builders will have -- a BAT85 (or similar) signal shottky diode. It actually is solving the same problem as the original inductive probe, too. The diode should be reverse-biased to the MCU (band points away from the MCU) and you can now use the xx1 sensors if they're all you can find.
 
Once switching to the optical sensor, is it better to leave or remove the BAT85? Or does it matter? I have mine set up near the controller and I'll be using the V2 PCB version.
 
Once switching to the optical sensor, is it better to leave or remove the BAT85? Or does it matter? I have mine set up near the controller and I'll be using the V2 PCB version.
That depends on which mcu your board uses. Using a diode is a cheap, fast way of simulating an open collector output, as mallcop said. I'll try to summarize it:
  1. You have a board that is 5V-tolerant: that's the best case scenario, you can use whatever sensor you want, either wired or soldered on a PCB;
  2. You have a board that is not 5V-tolerant: on this case you have to pay attention which sensor you are using.
    1. You are using a soldered sensor, or a OPB991 wired sensor: on these options you can wire the sensor directly to your controller board. Since their outputs are open collector they can only have two states: floating and connected to ground. When a pin is floating, it acts like an open switch. Since the pin on your controller board will be set with an internal pull up resistor (by prefixing ^ on your klipper configuration), when the sensor's output is floating the pin will be at the board's operating voltage (either 3.3V or 5V). When the sensor's output goes to ground, it completes the circuit and the pin will "see" the input going from Vcc to ground. It's that change that triggers the mcu, indicating that the sensor is activated.
    2. You are using a OPB990 wired sensor: this is the only case where you need to use additional components, either a diode (with the side with the band pointing the sensor) or a proper level shifter, because it sends either 5V or ground to the mcu. And if you have a board based on the RP2040, you'll have a bad time sending 5V to a pin of it.
As always, if you don't know what you are doing you can ask around here or on Discord, or just follow the BOM to the letter.
 
It's an Octopus V1.1, so the 446 chipset. I'll be following the BOM exactly and I believe the PCB kits will have the OBP666 sensor. Sounds like it's fine to leave it in there and is cheap insurance.
 
It's an Octopus V1.1, so the 446 chipset. I'll be following the BOM exactly and I believe the PCB kits will have the OBP666 sensor. Sounds like it's fine to leave it in there and is cheap insurance.
With that setup you don't need the diode, since the OPB666 is an open collector sensor.
 
Top