PDA

View Full Version : Home Switch Problem



Kev2960
21-03-2017, 08:10 PM
Hi all, i'm having problems with the wiring of my home switches, mach 3 doesn't seem to recognise them in the diagnostic screen but they are working, but incorrectly, you have to press the the switch a couple of times before the axis stops. at the moment they are connected up open circuit, so when the switch is pressed it becomes live i have swapped the wires but to no avail. I have no idea whats going on and i'm not sure how to configure mach 3 with regard to the inputs and outputs etc
The switch is a mechanical lever type as shown. any help would be most appreciated
one wire goes to earth in the control box and the other is pin. pins used are X=13 Y=12 Z=11

john swift
21-03-2017, 09:22 PM
Hi Kev

what breakout board are you using ?
and how have you wired the switches ?

it looks like you have wired the switches as normaly open
( if a wire breaks the control will never see a switch close ! )

John

Kev2960
21-03-2017, 09:31 PM
Hi John the bob looks like this. I have tried both normally open and normally closed

john swift
21-03-2017, 10:15 PM
looking at the breakout boards inputs

21208

when the limit switch is closed, the EL817 opto isolator's NPN transistor will ground the printer ports input pin

the breakout board does not have any pull up resistors to ensure a printer port input is at a valid logic high when the limit switch is open

this can be a problem with PC's or laptops with 3.3V printer ports

John

Kev2960
21-03-2017, 10:22 PM
Hi John, Im afraid I don't understand a word of what you've just said.....sorry!
Could explain please

john swift
21-03-2017, 11:31 PM
Hi Kev
your micro switches are connected to your PC/Laptop printerport via opto isolators
(opto isolator part number EL817 - the terminal E goes to ground and C to the printer port input pin )

do you have a multi-meter to measure the voltage change at the printer port input pin when the switch is operated ?

how have you set up the switches in mach3's ports & pins ?
any thing like this -
21210

John

Kev2960
21-03-2017, 11:36 PM
Yes I've set the ports & pins and I'll check the voltage tomorrow
Thanks for your help I'll let you know how I get on

john swift
22-03-2017, 12:07 AM
Hi Kev
printer port terminals
21211

john

Kev2960
22-03-2017, 10:40 AM
Morning John, yes the voltage on the pins are about 3.3 v
So what do I need to do next

m_c
22-03-2017, 11:24 AM
Does the voltage change when you work the switch?

Kev2960
22-03-2017, 11:34 AM
It drops to about 2.8 - 3.0v

john swift
22-03-2017, 12:39 PM
Hi Kev

the voltage drop on the printer port pin to 2.8 - 3V is too small

you should have it dropping to near 0V when the switch closes

assuming the opto-isolators LED is powered from +5V
this is what I'd expect for the breakout boards limit switch input

corrected diagram
21214

(arrow pointed to the wrong end of the 1K resistor on the original diagram)

John

Kev2960
22-03-2017, 01:05 PM
Sorry my mistake, misunderstood what you said the voltage when the switch is presses is zero volts

john swift
22-03-2017, 03:32 PM
Hi Kev

do you use two seperate power supplies for the breakout board ?

I have made a correction to the diagram in post 12
this is how I expect the breakout boards input circuit to be

21219

from the limited detail in the photo of the breakout board the two regulator IC's appear to be LM317 plus resistors = 5V regulator for the 74HC245D IC's

LM2576S switching regulator = 10V regulator for the analogue VFD drive

John

Kev2960
23-03-2017, 12:17 AM
Hi John. There is a 24v which I think is for fan and 5v which is for the drivers. I've been playing around with it all night but still no joy. Just a silly question but should the switches be carrying voltage ? Because mine aren't

m_c
23-03-2017, 12:58 AM
There should be voltage at the switch, which makes me think you've not got the board powered correctly.

What power supply do you have connected to the board?
And do you have a link to any kind of manual for the board?

john swift
23-03-2017, 01:26 AM
yes ,
you should measure a voltage across an open limit switch wires

about 4V if the input circuit has a 5V supply

21220

John

PS
a photo of the breakout boards supply terminals will be usefull wth
a diagram of the breakout boards supply connections

Kev2960
23-03-2017, 10:33 AM
Would it be best to get another bob rather than messing around with this one, which doesn't seem to be much good

Clive S
23-03-2017, 10:43 AM
Would it be best to get another bob rather than messing around with this one, which doesn't seem to be much good

As have been said do you have the manual. Also doe this bob require two power supplies I say this because I do have a Chinese one that is powered by usb BUT the inputs won't work unless the other power supply (12-24V) is connected as the bob gives out the 0-10V for speed ref. Just a thought.

Kev2960
23-03-2017, 09:15 PM
I don't have a manual for the bob just for the machine itself. ive enclosed some photo's of the bob and the main board

john swift
23-03-2017, 10:48 PM
Hi Kev

the photo of the breakout board is not close enough to read the lables for the connectors

is this correct ?
21229

also does this 24V DC LED indicator light ???
21230

John

Kev2960
24-03-2017, 04:59 PM
Hi John sorry for the delay in replying iv'e just got in from work. The top photo of the bob you've labeled is correct, and the led is lit when powered up

john swift
24-03-2017, 08:23 PM
Hi Kev

going by the LED indicators the board has the DC supply OK
and the onboard 5V regulator is working
so I would of expected the board to work

with out a board to test my self I'll have to do another web search to see if I can find any more information

John

Kev2960
24-03-2017, 08:39 PM
Thanks John I appreciate you doing all this,
Kev

m_c
24-03-2017, 08:58 PM
looking at the breakout boards inputs

21208

when the limit switch is closed, the EL817 opto isolator's NPN transistor will ground the printer ports input pin


Going back to this photo, my calcs based on the 1k resistor, means the opto should have 24V on the pin you've marked as 5V. At 5V, the 1k resistor would limit the current to roughly 3mA, whereas 24V would give roughly 22mA. Having had a look at the datasheet for the opto, it's expecting 20mA with a forward voltage of 1.2V.

Kev, have you measured the voltage at the top left pins on the optos?
Try using the bottom pin on the connector for gnd, and also the main power in gnd for the voltage measurements, just in case it's a gnd fault, not a positive supply fault.

If there is no voltage showing, is there power at the fan connector/is the fan working?
Would it be possible to get a photo of the underside of the board, so we can see where the power supply feed to the opto comes from?
Given the layout, I'd think the optos would take a feed from the same supply going to the fan connector, but without seeing the underside of the board, that is purely a guess.

Kev2960
25-03-2017, 04:12 PM
Hi John, I think I'm going to replace my bob with an upgrade. What would you recomend ?
Kev

john swift
26-03-2017, 05:46 PM
Hi Kev

I'm not sure what to recomend

I was going to recomend CNC4PC's C10 breakout board
but looking at their web site they have changed the construction

the versions I had seen had the IC's in sockets
making it easy to repair if something went wrong
21272

the latest version is like this
21273

this chinese BOB others have had problems with
I have reverse engineered to find out why it didn't work as I expected
it turns out that the 74hc14 IC used to buffer the inputs doesn't have the supply pin connected !!!!
21274

in a quick web search this is the closest to your BOB I have found ( may need an extra power supply)
21275

boards like this with opto isolated outputs are not ideal when the stepper drivers have opto isolated inputs
21276

breakout boards with LED indicators on the inputs could be an advantage
at least you can see when the switch is operated

low cost chinese board with LED input indicators
21277

John
PS

from Australia
this MB02 from Homann Designs is a possible alternative to CNC4PC's C10

21278

Kev2960
26-03-2017, 08:45 PM
Hi John, I bought a bob a while ago from ebay, it looks very similar to the one in your photo, but i've never used it because someone told me it wouldn't work with my drivers, or steppers, can't quite remember which. Is that true ?

m_c
26-03-2017, 09:23 PM
Personally, I'd try fixing the one you have first.
It seems to be a reasonable spec, in that it uses 24V inputs, which is far better than using 5V which most BOBs do.

It's most likely something simple, so if you can get a photo of the underside, we should be able to workout the area of the problem.

john swift
26-03-2017, 09:28 PM
Hi Kev

thats the board with a problem with the missing positive supply to the input circuit

2128321284

what stepper drivers do you have ?

John

Kev2960
26-03-2017, 09:28 PM
Ok I'll get a photo, thanks for your help

Kev2960
27-03-2017, 10:31 AM
Good morning, here is a photo of the underside of my bob;
Kev

m_c
27-03-2017, 10:46 AM
So if the 24V LED is lighting up, and you've got no voltage at the top left pin on the opto's, then looking at that, the fault can only be the throughhole/via.

If you connect 24V to the board, looking at the front of the board, follow the track from the 24V LED to the via at the T-junction in the track. You should get 24V there?
If you do, then flip the board over and see if you still get 24V on the opposite side of the via.
If you do, then follow the track up and check to see if you get 24V at the optos.

If it is a faulty via, applying pressure when you probe could be enough to re-connect it. If that is the problem, the easy option is to put a little bit wire through it (drill it out slightly if needed), and solder it on both sides, and that should reconnect both sides of the PCB.

Kev2960
27-03-2017, 10:57 AM
WOW i have no idea what you've just said !
This is a bit out of my depth, what's the via. if I was to send you the board could you repair it ? all costs paid by me

john swift
27-03-2017, 12:46 PM
Hi Kev

using the photo's from post 3 and post 32

I have traced part of the supply circuit powering the opto-isolators

21296


the track from the opto-isolators starts of on the underside of the board
then near to the 24V LED passes through a "via" (a plated through hole)and

then another "via" next to the missing B axis connector

the track ends at the + connector of the capacitor next to the LM317 regulator
the photo is not clear enough but I expect the capacitor + terminal is connected to the metal tab on the LM317 which is connected to the regulator output

the 1800 ohm and two 300 ohm resistors set the LM317 output to 10V

looking closer at the LM2576 switching regulator it has -5.0 at the end of its part number indicating its the 5V version
( LM2576S-5.0 = 5v ouput )

if a Via is open circuit the copper pads can be cleaned and a copper wire passed through and soldered to remak the connection

since the "24V LED" lights the only Via to check is lext to the LED

John

PS

check there is continuity from the limit switches 5 pin connector common terminal and the DC power in negative

Kev2960
27-03-2017, 01:05 PM
so if i do both through holes you've pointed out with the wire do you think that would solve the problem ?

Kev2960
27-03-2017, 02:36 PM
There is continuity from the capacitor to the optos, but not from the 10v input to the gnd on the home switch socket

john swift
27-03-2017, 02:42 PM
Hi Kev
you have done some of the tests I had on this diagram

21297

you may have an open circuit limit switch common

21298

John

Kev2960
27-03-2017, 04:19 PM
The voltage on the 1st of your 2 photo's each read 10v. (9.9v actual ) the first photo has got continuity
Kev

john swift
27-03-2017, 05:17 PM
Hi Kev

if this is what you have measured

21299

then I would have expected mach3 to see the limit switches operating

provided mach3 is set up correctly and the printer port is working

the test results for this should prove the breakout board is working

21300

John

Kev2960
27-03-2017, 05:38 PM
Hi John the meter readings are all zero on that side switches open or closed

john swift
27-03-2017, 06:45 PM
Hi Kev

I think a simple tester would prove if the breakout board is working

21301

21303
John

Kev2960
27-03-2017, 07:30 PM
John can I send you the board ?
You know way much more than I do about this kind of stuff

john swift
27-03-2017, 07:42 PM
Hi Kev
OK
PM sent

m_c
27-03-2017, 11:41 PM
John, I suspect you've got the optos in the wrong order.

If you look at the traces on the top side, I'd say the top opto is P10, and it's track runs down the outside of the limit switch connector to the E-Stop connector. The tracks of the other 4 optos seem to match up nicely with the Limit Switch connector, and I wouldn't expect the bottom opto track to run the way it does if it was going to the E-stop connector.

john swift
06-04-2017, 11:41 AM
Hi m_c


from post 45 "John, I suspect you've got the optos in the wrong order"
you are correct

now I have looked more closely
21359

during the last few days I have installed mach3 on 3 PC's
IBM thinkcentre , Dell optiplex 755 and a PC built using a ASUS H110M-R motherboard

so I should be in a better position to test Kevins mach 3 settings


John


PS
as I can't upload a PDF data sheet on DC to DC converters
a link can be found here-
http://uk.rs-online.com/web/p/isolated-dc-dc-converters/1914922/

RickyTerzis
06-07-2017, 04:13 PM
Hi...as per my knowledge when the limit switch is closed, the EL817 opto isolator's NPN transistor will ground the printer ports input pin. The breakout board does not have any pull up resistors to ensure a printer port input is at a valid logic high when the limit switch is open.

assembly circuit (https://www.7pcbassembly.com/)