Need help wiring NPN NC proximity switches for homing

I ordered three AES-CN-3A proximity switches from Automation Direct for homing on my 1F Journeyman. They are NPN NC 3-wire. I want to make sure I wire them right so I don’t fry my controller…

BROWN wire: Where do I power this from, the breakout board or do I need a separate power supply?
BLACK wire: Breakout board (pin 3 for X, pin 5 for Y, and pin 11 for Z)
BLUE wire: Should I ground this on the breakout board? (I see multiple pins that say ground, are they all the same?)

Do I need a resistor somewhere?

I believe @WaywardWoodworker shared a while back that he installed proximity sensors, so he might be a good resource.
I use proximity sensors, but not the 1F controller. A quick look at the bag shows yours require a minimum of 10 VDC, which is more than the logic level voltage provided through the BOB pins.

1 Like

Ah I see… would connecting brown (+) and blue (-) to a separate 12v power supply and only the black wire to the breakout board do the trick then? No resistor required?

I am not familiar enough with the BOB to answer your questions, but you will need to find out what the voltage and current limitations are for the motor limit pin inputs.
I am hoping others who have set this up successfully with the 1F controller and BOB will share their knowledge soon.

You will need the 12v external power supply to power the proximity sensor and control some sort of logic level shifter or a relay that connects the break out board pin to ground when the switch closes. I built mine using a normally closed setup so that if a failure occurs in the wiring or switch it will cause the machine to think it hit a limit and stop operating.

1 Like

Hey Jerry,

neither on the datasheet provided by automationdirect (PDF) nor in the datasheet provided by the italian manufacturer, I can find the term “open collector”. If it was a sensor that has an open collector output like the Omron E2B, then you could simply connect it to the motor min and max limit pins on 25-pin I/O port, because these are direct pins to the AVR microcontroller on the Controller Mainboard, and with Onefinity Controller and Buildbotics Controller Version ≤1.0.0, they are programmed in the firmware as inputs with the internal 20 KΩ pull-up resistor activated (since version 1.0.2 of the Buildbotics Controller all AVR ports are user-remappable now).

But since we don’t seem to have an open collector output here with your Micro Detectors AES-CN-3A, you will have to use an optocoupler like the PC817 to attach them, e.g. like shown here (PDF):

automationdirect.com__proxterms.pdf__Proximity_Sensors_Terms__Field_Device_Examples_-_3-Wire_Connections__PDF007__NPN_Example

Note that since you bought normally-close switches (NC), you have to set the ‘min-switch’ and the ‘max-switch’ settings to ‘normally-close’ in the Motors Tab.

Welcome to the forum!

Thanks for the replies everyone! I just ordered a 4-way voltage converter from Amazon:

as well as a variety pack of common resistors.

Hey Jerry,

unfortunately this module has 3 KΩ resistors in the output, they would have to be shorted if you want to trigger logical low on the AVR inputs. Also the pins “2” of each PC817 are all connected together, to ground, but you need to connect each signal (black) wire of the sensor to the pin 2 of each PC817 separately, so you’ll need to cut through the thin copper lines around pins 2.

1 Like

Aren’t the four channels independent? I don’t see any soldering on the back of the chip, and it states “Onboard 4-Channel 817 Are Independent: can achieve different voltage control at the same time” in the description…
And how can I tell there are 3K resistors on the output? (so I know in the future.)

I just checked, my controller is version 1.0.9
Sounds like I should just go with a different proximity switch to simplify things, unless there’s a specific optocoupler(s) in mind that’ll work. At this point I’ll buy whatever, and a simpler proximity switch solution sounds nice since I’m apparently a noob with them lol

Suggestions? I’d prefer NC with a sensing distance of at least 2mm.