Whilst waiting for the various bits to arrive I've turned my attention to the wiring I'll need for the proximity switches. I've kept this job until last as I knew there were going to be problems.

The prox switches are SN04-N. Brown wire (10-30V) , blue wire (0V), black wire (signal NPN NC).

I rigged one up on the bench (at 12V for now), with a 700ohm resistor between brown and black, then checked the voltage between black and blue. Got 12V or 0V when a metal plate was present or not.
Click image for larger version. 

Name:	NPN_opto-isolated_prox_24Vto5V_v0.JPG 
Views:	2671 
Size:	25.6 KB 
ID:	15414

All good, but my BOB is 5V inputs only. So I've thought about the options:

1. Upgrade to 24V logic BOB ! Maybe when funds permit but not now

2. Use a pair of resistors as voltage dividers
I think can work out the ratios OK (top one ~4.5 times the bottom one, giving ~5V tap out in centre?)
But what actual values to use to control the current into the BOB?
What is the acceptable current into the BOB - I've seen a USB board quoted at 7mA . . .
How do I calculate the current my resistor selection will allow into the BOB?
I've got a feeling I need to know the resistor value inside the board . . .

Here is a diagram I created showing one option (adapted from a great post by Irving long time ago):
Click image for larger version. 

Name:	NPN_opto-isolated_prox_24Vto5V.JPG 
Views:	2653 
Size:	27.3 KB 
ID:	15410

Here is another option:
Click image for larger version. 

Name:	NPN_opto-isolated_prox_24Vto5V_v2.JPG 
Views:	2709 
Size:	28.4 KB 
ID:	15411

But I have a feeling I need to do / know this:
Click image for larger version. 

Name:	NPN_opto-isolated_prox_24Vto5V_v3.JPG 
Views:	2643 
Size:	32.0 KB 
ID:	15415


3. Use an opto-coupler module

I bought this out of curiosity (£1.32 all in) - just got to wait for it to arrive in a couple of weeks:
Click image for larger version. 

Name:	opto_1.jpg 
Views:	2683 
Size:	117.8 KB 
ID:	15412
Click image for larger version. 

Name:	opto_2.jpg 
Views:	2617 
Size:	87.6 KB 
ID:	15413

http://www.ebay.co.uk/itm/3911024978...ht_5545wt_1109

I asked the supplier about max input voltage and max output voltage but after several days no reply. In the advert they suggest an ideal use is using 3V systems to control 24V systems but I want to go the other way around.
They sell sauce bottles, phones and underwear so I guess they don't make them themselves and probably have no idea!!

Any thoughts on the above options and questions?

Thanks