. .

Thread: routercnc_MK3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Your bothering over nothing. Get it built and working stop freting over shit that doesn't matter. 4v won't even tickle.!!

  2. #2
    Hi Clive, Jazz,

    OK thanks for the info I've stopped worrying now . . .
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  3. #3
    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:	2649 
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:	2624 
Size:	27.3 KB 
ID:	15410

    Here is another option:
    Click image for larger version. 

Name:	NPN_opto-isolated_prox_24Vto5V_v2.JPG 
Views:	2676 
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:	2622 
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:	2639 
Size:	117.8 KB 
ID:	15412
    Click image for larger version. 

Name:	opto_2.jpg 
Views:	2597 
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
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  4. #4
    The output of an NPN switch does not have to go to the supply voltage. There is no need for additional opto-couplers or voltage dividers. A NPN output is simply just a switch to 0V.
    Depending on the inputs to your BOB you have two simple options. If the input is connected to an opto-coupler then connect the anode to the BOB supply voltage (5V) and connect you proximity switch output to the cathode (may need to add a series resistor if BOB does not have one). If the BOB has a logic type input then simple connect the proximity switch output to the input. You may need to add a resistor between input and BOB supply (5V) if one does not already exist on the BOB.

  5. #5
    Quote Originally Posted by Graeme View Post
    A NPN output is simply just a switch to 0V.
    The datasheet is a bit scant... I'd verify that there aren't any pull-up resistors attached to the output of that NPN switch (which would see the supply voltage on the output if the switch is in the open state)....therefore to test, just provide it with its supply voltage & see what voltage is on it output (if any)

  6. #6
    Some of these proximity switches already have a pull-up resistor inside.
    Here is a good explanation of how to calculate it's value.
    See page 11 http://cnc4pc.com/Tech_Docs/C50R1_user_manual.pdf in the ones I have it is 10K

    ..Clive

  7. #7
    Hi Graeme, HankMcSpank,

    OK, that makes a bit more sense now, thank you. I'll check Hank's suggestion first - power it up without the resistor between black and brown and check the voltage on the black. If it is nothing then I have a simple switch and can follow up on your suggestions Graeme. I may need to clarify something with you but lets see what I have first.

    If it is 24V then I have a pull-resistor inside the sensor and need to do something else as I know this board won't like 24V into the logic circuits!

    I see Clive has posted as well so I'll have a read of his link next . . .

    Thank you
    Building a CNC machine to make a better one since 2010 . . .
    MK1 (1st photo), MK2, MK3, MK4

  8. #8
    If there is a voltage on the black, then a simple voltage divider should do....but it'd be useful for you to measure the input resistance of the follow on BOB board input pin (as that will end up being in parallel with your proposed voltage divider)....I'd imagine it'll be very high input resistance on your BOB input.
    Last edited by HankMcSpank; 24-05-2015 at 08:48 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •