Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: craig00747 on October 22, 2018, 01:40:07 PM

Title: AKZ250 BREAKOUT BOARD - NPN NO PROXIMITY SENSORS
Post by: craig00747 on October 22, 2018, 01:40:07 PM
Hello Gents

I have built a cnc router from a kit and the X,Y and Z- Axis is working. Now I want to connect the NPN type Normally Open proximity sensors to the AKZ250 BOB.

The power supply is 24V DC and I am aware that a resistor must be installed, to reduce the voltage, between the sensor and the BOB.

The confusing part is, the way to wire the NPN proximity sensor, as per the AKZ250 User Manual.

This BOB is shown on YouTube and also how to wire the NPN sensor to it.

There are 3 wires on the sensor. BROWN, BLUE and BLACK.

BROWN = +
BLUE = - (GND)
BLACK = SIGNAL to BOB

The AKZ250 User Manual states that a RESISTOR must be installed between the BROWN+ and the BLUE (SIGNAL) and the BLACK wire goes to GND. The YouTube video shows a resistor connected between the BLACK wire (Signal) and the port on the BOB.

I don`t want to do something wrong here, which could cause the BOB to be damaged.

Any advice would be really appreciated.

Regards

Craig
Title: Re: AKZ250 BREAKOUT BOARD - NPN NO PROXIMITY SENSORS
Post by: Roaster on October 23, 2018, 02:24:30 AM
The point is to limit the voltage applied to the input pin below 5.5 vdc.
My proximity sensors have an internal 10K pull up so open circuit voltage from black to blue is equal to supply voltage. I used a 100 ohm resistor in series with the black to input pin.
When connected to an input pin (pulled low with a 390 ohm resistor on the C-25 BOB) the voltage on black drops to 3.8 v, and it goes to zero when the PS is triggered.
If you want to check your setup safely, put a 10k pot in series with the input pin (set to 10K) and measure the input pin voltage to ground. Typically above 3.5 v is a digital 1, and below 2.5 v is a digital 0. Turn the pot until you get a good voltage and measure what resistance it was.
I don't know what kind of proximity sensor you have so your setup may be different. I think the ESS manual shows how to check it. The input pin pull down on your bob may be different from the C25.
The picture shows my sensor interface board with 24v power (yellow-black) and installed resistors.
Title: Re: AKZ250 BREAKOUT BOARD - NPN NO PROXIMITY SENSORS
Post by: craig00747 on October 23, 2018, 12:17:58 PM
Hello Roaster

Thank you very much for your response and explanation.

I tried a 3,3 K Ohm resistor on the one NPN type sensor, for the Z-Axis and the voltage dropped to 5,90V from the 24V power supply. So this voltage is too high.

I must admit that the resistors which I am using, are NOT referred to as "Pull-down" resistors. I enquired about this at the place where I bought them and the Assistant didn`t know what I was talking about.

Anyway, I will do some more testing to see if I can drop the voltage further. So far, the wiring is done and I just have to install a resistor between the BLACK wire and the input terminal on the BOB. I`m still confused, regarding the diagram shown on the AKZ250 manual.

Regards

Craig
Title: Re: AKZ250 BREAKOUT BOARD - NPN NO PROXIMITY SENSORS
Post by: Roaster on October 24, 2018, 04:39:57 AM
Hello Craig00747
The input pins of an I/O board are either pulled up or pulled down internally to set their rest state. The pull up and pull down resistors are part of the I/O board. Connecting 5v to a pin internally through a resistor means you'll measure 5v at that pin to ground with no external circuitry connected. Connecting the pin internally to ground through a resistor pulls the pin low, 0v, so you measure 0v to ground when you check the pin. The rest state of the I/O pins determines how you configure the external switches or sensors, whether you supply 5v or connect the pin to ground with a limit switch, for example. Connecting a voltage source to a pin that is puled low will flow current through the pull down resistor, and you have to limit that current or the resistor gets hot and burns out. 5v is ok, but 24v needs an external dropping resistor. If all you have are 3.3k then put two in series and try it again. As long as you have more than 3.5v it should work. Never exceed 6.5v or you'll burn out the input chip.
It may help understand the I/O configuration if you have the circuit diagram for the board. Some supply it for you to use.
In my case the board mfr put input led's on the board connected to ground with a 39 ohm resistor. That's not a typical value for a 5v led, and I think they misread the value code on the resistor, 390, which equals 39 ohms, not 390 ohms. 391 equals 390 ohms. Connecting 5v made the led's as bright as highway flares and pulled something like 65ma, way too much. I unsoldered the input led's resistors and now they just have a 220 ohm pull down on the board. Sometimes you have to figure it out on your own.
To reiterate, I do not have the same board that you have and all this is general info that applies to all boards.  My sensors have an internal 10k resistor, so my 100 ohm resistors are really not needed.
In very general terms, the input device is feeding voltage to the input pin and then to the pull down resistor. If you know the value of the on-board pull down resistor you can calculate the current flow through it, 5.9v voltage drop. That same current is dropping 18.1 v through the sensor, so you can calculate the total resistance of the sensor plus external resistor. Change the 5.9 to 4.5 and recalculate to find the necessary external resistor. Or use a pot.
Title: Re: AKZ250 BREAKOUT BOARD - NPN NO PROXIMITY SENSORS
Post by: craig00747 on October 24, 2018, 12:43:39 PM
Hi Roaster

Thank you. You are making me understand it better.

Late yesterday evening, I did a few more tests with various resistors and managed to drop the voltage down to 5,12V. So I now have a 24V power supply to all of the proximity sensors and with a single resistor between the BLACK signal wire and the terminal on the BOB.

Now that the proximity sensors, have a resistor connected to them, the voltage reads 5,12 V and as soon as I place a screwdriver in front of each sensor, the voltage drops to 0,78 V.

I assume that this is all okay?

Regards

Craig