HDBB2: 3 wire limit switch setup?

This Section is for users to discuss hardware

HDBB2: 3 wire limit switch setup?

Postby berkenboom » Sun Feb 18, 2018 1:06 pm

Hello, I moved from a arduino to UCCNC, and want to use my Limit switches again.First up is the Z- axis. But i have a problem. I used a 3 wire setup like this to save a extra wire (the energy chain couldn't hold any more wires)
Image

I tried to connect them to the HDBB2 like this, but that didn't work:
Image

The manual tells me to do this:
Image

The only way i can get one switch working is to use this, but not connecting the other switch is something i dont want.
Image

Anyone any ideas? :roll:
When writing this topic this is the only solution i could think off:
( i have not tested it yet)
Image
berkenboom
 
Posts: 8
Joined: Tue Oct 31, 2017 7:05 pm

Re: HDBB2: 3 wire limit switch setup?

Postby ger21 » Sun Feb 18, 2018 1:17 pm

If you wire the switches normally open, then they'll work.
They shouldn't have worked with your Arduino either, if they were normally closed, as the circuit stays closed when one switch is tripped.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1219
Joined: Sat Sep 03, 2016 2:17 am

Re: HDBB2: 3 wire limit switch setup?

Postby dezsoe » Sun Feb 18, 2018 1:33 pm

If you don't need to know which limit is triggered, only the fact that you reached a limit, then you can chain your switches to one input. In config set all limit inputs to this pin. You can aso use it as your home switch.

lim1.png
dezsoe
 
Posts: 599
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: HDBB2: 3 wire limit switch setup?

Postby berkenboom » Sun Feb 18, 2018 2:08 pm

ger21 wrote:If you wire the switches normally open, then they'll work.
They shouldn't have worked with your Arduino either, if they were normally closed, as the circuit stays closed when one switch is tripped.


With my arduino, i believe it was possible (if I recall correctly,it was more than half a year ago). But arduino works differently than the HDBB2. First its 5v or 3.3 Versus 12V. I had problems with false trigers with my arduino when using NO. The cables for the switches run along the (shielded) cable for the spindle. But when the spindle was on, it occasionally tripped the safety the arduino. Thats why I had the Z-axis on NC switches. I recently assembled the whole Z/X axis assembly, so a rather stick to NC switches rather that taking the whole thing apart (again!) and re-wire the switches.The Limit switches For X and Y are NO, and can be re-wired without much problem.

The next difference between arduino and The HDBB2, is that a input on a arduino is a pin input that sinks one single positive charge. On the HDBB2 a input pin number consists of two inputs: it sinks 1x one negative and sinks 1x Positive charge. Whats why the setup i used on the aruino doesnt work now.

dezsoe wrote:If you don't need to know which limit is triggered, only the fact that you reached a limit, then you can chain your switches to one input. In config set all limit inputs to this pin. You can aso use it as your home switch.

lim1.png

I want to know which switch is triggered, so i can assign one side as a homing switch and the other as a limit switch. i cal the switches "limit switches" but for my implementation its more of a way to know i cant push much further, rather than as a hard stop.
berkenboom
 
Posts: 8
Joined: Tue Oct 31, 2017 7:05 pm

Re: HDBB2: 3 wire limit switch setup?

Postby dezsoe » Sun Feb 18, 2018 2:17 pm

OK, then connect the common cable to 12VOut, the other two wires to Input1+ and Input2+. Connect Input1- and Input2- to PGND. The same for the other switches.
dezsoe
 
Posts: 599
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: HDBB2: 3 wire limit switch setup?

Postby cncdrive » Sun Feb 18, 2018 2:31 pm

Hi,

Dezsoe's drawing will fix your problem. :)

The next difference between arduino and The HDBB2, is that a input on a arduino is a pin input that sinks one single positive charge. On the HDBB2 a input pin number consists of two inputs: it sinks 1x one negative and sinks 1x Positive charge. Whats why the setup i used on the aruino doesnt work now.


There are input+ and input- on the HDBB, because it is an optocoupler's input, it is basicly a LED inside the optocoupler and a series resistor is connected in series with the LED to limit the current into the LED.
So, think of the input like if you were driving an LED. Cathod is wired out to input- and anode is wired to a resistor on the board and the other side of the resistor is wired out to input+.
Both sides of the optocoupler's LED wired out is the most flexible solution, because you can connect NPN, PNP and push pull drivers also to drive the inputs.
cncdrive
Site Admin
 
Posts: 2379
Joined: Tue Aug 12, 2014 11:17 pm

Re: HDBB2: 3 wire limit switch setup?

Postby berkenboom » Sun Feb 18, 2018 9:07 pm

cncdrive wrote:Hi,

Dezsoe's drawing will fix your problem. :)

The next difference between arduino and The HDBB2, is that a input on a arduino is a pin input that sinks one single positive charge. On the HDBB2 a input pin number consists of two inputs: it sinks 1x one negative and sinks 1x Positive charge. Whats why the setup i used on the aruino doesnt work now.


There are input+ and input- on the HDBB, because it is an optocoupler's input, it is basicly a LED inside the optocoupler and a series resistor is connected in series with the LED to limit the current into the LED.
So, think of the input like if you were driving an LED. Cathod is wired out to input- and anode is wired to a resistor on the board and the other side of the resistor is wired out to input+.
Both sides of the optocoupler's LED wired out is the most flexible solution, because you can connect NPN, PNP and push pull drivers also to drive the inputs.


I understand it better, The input+ and input- from a input are in series, not individual. They always trip together, uccnc doesn't know if it was as Z top or Z bottom so both are active when tripped. Because it is very unlikely for a machine to trip Both at the same time, for homing only travel direction is inportant, since it determinates which location(top side/bottom side or left/right) to set zero.

I wanted to know which limit switch is tripped (and not only which axis), so i hooked them up like this:
input5.png
berkenboom
 
Posts: 8
Joined: Tue Oct 31, 2017 7:05 pm


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest