Hello Guest it is March 19, 2024, 02:44:20 AM

Author Topic: Help needed Connecting NPN Proximity sensors to BB`s  (Read 28835 times)

0 Members and 1 Guest are viewing this topic.

Help needed Connecting NPN Proximity sensors to BB`s
« on: May 08, 2008, 12:01:58 AM »
Does Anyone know ,or can point me in the direction/post etc
to finding out how to configure/connect 12volt Proximity sensors
to a standard Breakout board.
I cant understand how to wire the one wire input (from the sensor) and
make it 5volts so the board can read it.

Any help ,would be great.

Regards
Whatda
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #1 on: May 08, 2008, 12:20:28 AM »
Further to my question,the sensors output wire indicates 3.5 volts when the axis
is of the sensor ,and pretty much 0 volts on the sensor.

On connecting this wire up to one of the inputs on the bb,the voltage drops to 0.75volts.

Any ideas

Regards
Whatda

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #2 on: May 08, 2008, 07:37:11 AM »
Safest way to find out would probably be to contact the maker of your breakout board and ask them.
Hood

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #3 on: May 09, 2008, 04:23:21 AM »
How many wires have these sensors got and what is their specification - is there a 12v and 0v connection with another wire as the output.
What are these sensors so I can look them up.

Most sensors of this sort - optical, proximity etc - work on a negative "ON" - i.e. when they "sense" their resistance goes low.
The pins on your breakout board should be  normally high +5v - to reflect the fact that the input pins on LPT1 are normally high - they have an internal pull up resistor. Is the input pin you are connecting to normally at 5 volts ???

The input to Mach 3 is at 5volts - I cannot understand why you are using 12 volt sensors - unless all the proximity detectors are 12 volt devices.

« Last Edit: May 09, 2008, 04:36:17 AM by jimpinder »
Not me driving the engine - I'm better looking.
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #4 on: May 09, 2008, 06:13:36 PM »
Thanks guys for your input,

Safest way to find out would probably be to contact the maker of your breakout board and ask them.
Hood
.

I have tried this,and he cant give my a clear answer???

Jimpinder

The reason for using these 10-30volt prox sensors,were that they came with the machine ,operating with a
very basic hand controller on 24volts ,and now I have converted over to Mach .
So before I go and rewire new switches I thought I would see if there was some way
of keeping them

The sensors are Omron TL -05MC1-2  , 3 wires (ie 10-30volt,  0 volt,  and output)
and have attached the pdf file for them.

Also I believe the input pins on the BB are low.

Any help before I re wire some switches would be good.

Thanks, regards

Whatda

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #5 on: May 10, 2008, 03:59:14 AM »
According to the PDF file these sensors connect to 12 v and 0v with an output wire. The module will drive up to 100 milliamps.

It should switch between 12 volts (NOT sensing) and 0v (sensing)
Connect up on your workbench the 12 and 0v to a suitable power supply and connect your multimeter between  the output and 0v. You should get 12v reading. There is no directly connected internal pull up resistor - so the 12 v side perhaps will not show up. Move a metal (iron) object towards the sensor and the reading should change when the object is approx 2 mm from the sensor.There is also some detection indicator on the device.
The voltages will be approximate, not exact - but should be near say 11.5 and 0.5v.
 
To limit the pull up to a suitable voltage, then you need a pair of resistors in series connected between the 12 volts and the 0volts wires. These should be of the value 680ohms and 470 ohms  (preferred values). The output of the device should be connected to the junction of this "ladder".

If you check again with you multimeter the output should now be at 5 volts and when you bring the object within sensing range this should drop to 0v (or very near).

The problem is your breakout board - the input should be normally high (5v). This is what the input to the computer is . The signals goes low to indicate sensing. Read the blurb on your breakout board - there will be some way to alter the bias on the board.


Not me driving the engine - I'm better looking.
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #6 on: May 10, 2008, 06:53:30 PM »
jimpinder,
This is excellent information,thankyou. ;D

It all makes sence now, as they were working with the G100 ,providing 12 volts back to the digital input.!
I would of kept the g100 ,however it had problems talking to mach or the other way,not sure,and when it
did sensed the switch it always did something different.

............................... a pair of resistors in series connected between the 12 volts and the 0volts wires. These should be of the value 680ohms and 470 ohms  (preferred values). The output of the device should be connected to the junction of this "ladder".

I am trying to get a picture in my head as to what this would look like,  any chance of a  rough sketch to easy my elec.. challenged mind.
And then ,does the output go to one of the inputs to the BB.

Thanks very much for your info
Regards
whatda

Offline kcrouch

*
  •  193 193
  • In way too deep!!!
    • View Profile
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #7 on: May 10, 2008, 10:28:55 PM »
If You are using a board similar to CNC4PC's C11 try this. Connect a 330 ohm resistor from the 5v terminal to the input along with the proximity switch output (black wire). Then connect the proximity switch common (blue wire) to both 12 volt common (from Your sensor power supply) and 5volt common on the BOB. Do NOT connect to the 5 volt common that gets power from the computer as it will defeat isolation. Then connect the brown wire from the switch to the 12 volt sensor power supply.
What this does is use the pull-up resistor to turn the input on, and the open collector output  of the prox switch to pulll the resistor to ground to turn the input off. You may need to reverse the state of the inputs in Mach. (active low to active high) to get everything working correctly. All switches will need to be wired in parallel, connecting all three wires in order for this to work. This is not really the best way to make this connection, (as a broken prox. wire will not fail safe), but it involves the least wiring effort.
With this method, the input led should be normally on, and turn off whenever any of the prox switches are activated. If You have a different BOB, then this scheme may not apply. Go slowly, try connecting the resistor only first and see that the input turns on. Then connect a single switch and verify that the led goes out when the switch is actuated. If all is well so far then go ahead and connect the remaining switches.

Kenny
Having way too much fun! Something must surely be wrong.
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #8 on: May 11, 2008, 02:51:25 AM »
Thanks Kenny,its actually a C23 ,from the same mob,
I will give it a go though,thank you

Regards
whatda

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Help needed Connecting NPN Proximity sensors to BB`s
« Reply #9 on: May 11, 2008, 04:31:43 AM »
Kenny - I think I've missed something in your explanation - I've drawn out your diagram and have got the input to the Bob pulled to 5 volts. The problem is the proximity switch activates - i.e. pulls low, when the chunk of metal goes near it. Not the other way round - so while I agree that electrically this would work as you say, mechanically it will not - becasue I assume you are detecting the fact that something has come within 2mm of the switch - not that it has gone away.

Attached is a diagram of my thinkings about it. As I say the output is normally high and goes low when activated. Try connecting to an input. The pull up resistor shown may be strong enough to pull your Bob to 5 volts as it is. If that is the case it should work OK.
Not me driving the engine - I'm better looking.