-
2 Attachment(s)
Wiring up the Alarm output on Leadshine AM882
Hey folks,
I'm wanting to double check I've got this right before wiring it up.
The AM882 has an alarm signal output that triggers when the driver goes into a fault state. The object here is I want that signal to be picked up on one of the BOB inputs so Mach can trigger an estop and halt the other drivers.
Here's the an image of what Leadshine suggests in the manual.
Attachment 7875
And here's a crude wiring drawing that I've knocked up to stick on the inside of the control box for quick reference (please ignore the extra details such as the relays and stepper wiring)
Attachment 7876
Will that work?
-
Re: Wiring up the Alarm output on Leadshine AM882
Loose the brown link wire to alarm.
you are feeding it V+ from this and then to ground. when it triggers it will be a dead short.
You want e stop to go to one alarm terminal then to ground.
Basically alarm is in series with the estop
-
1 Attachment(s)
Re: Wiring up the Alarm output on Leadshine AM882
Thanks John.
Not sure I completely understand but had a go at updating.
Is this what you were getting at?
It should be noted that the Alarm+ outputs 30v 100mA and Alarm- is 0v so I don't think I've done this right.
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
Shinobiwan
It should be noted that the Alarm+ outputs 30v 100mA and Alarm- is 0v so I don't think I've done this right.
In which case feed the E Stop circuit through a set of relay NC contacts and the alarm + and - to that relay coil.
Connect all 3 drivers to the same coil and then it doesn't matter which one trips.
Driver alarms, switches the relay and breaks the E Stop. - Simples.
-
Re: Wiring up the Alarm output on Leadshine AM882
The alarm terminals don't output any power. It's an open collector output capable of switching 100mA at 30V.
So you still need a relay as per John's suggestion to connect into to the Estop circuit, but you need to provide the power to the relay, then connect the relay to ground via the alarm terminals. You could also have the relay in circuit after the alarm terminals, but it's usually better practice to switch the ground side in electronics.
-
1 Attachment(s)
Re: Wiring up the Alarm output on Leadshine AM882
Thanks guy, I think I'm starting to understand now.
Based on what's been I've changed things around and attached the updated diagram.
Is this looking OK now?
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
Shinobiwan
Thanks guy, I think I'm starting to understand now.
Based on what's been I've changed things around and attached the updated diagram.
Is this looking OK now?
No, I'm thinking that's still wrong, I suspect one of them will draw the circuit by tomorrow but if not I will, but I wont be home from work till the morning and not up till 2pm so we will have to see. Rick
-
Re: Wiring up the Alarm output on Leadshine AM882
Ohh thought I'd got it then. I'm missing something here so would someone be kind enough to just put me out my misery and scribble the correct way over the top my drawing please.
-
1 Attachment(s)
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
Shinobiwan
Ohh thought I'd got it then. I'm missing something here so would someone be kind enough to just put me out my misery and scribble the correct way over the top my drawing please.
Ok I think this is how it would be wired but you better confirm that with the gurus..
Attachment 7893
Sorry its crude but ive just got home from work.. I think you will understand it.
Rick
-
1 Attachment(s)
Re: Wiring up the Alarm output on Leadshine AM882
Thanks Rick,
Have I interpreted it correctly?
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
Shinobiwan
Thanks Rick,
Have I interpreted it correctly?
Yep I think you have, although on my machines i always make the Estop ring as normaly closed ie you break the loop to Impose a condition, the reason for this is if a wire or connection breaks or the power fails or a component fails it will always break the circuit, showing an alarm condition. so all respective relays are energised giving closed condition for normal. this basicly gives me a circuit that is broken in the event of component failure or activation. the other way would not alarm in the event of a broken wire or failed component.
Remember to check it with the Gurus though..
Rick
-
Re: Wiring up the Alarm output on Leadshine AM882
OK will hope someone can confirm if this will work. I still have doubts about what I've drawn there. I know just enough to be dangerous!
-
Re: Wiring up the Alarm output on Leadshine AM882
Either way of wiring in the relay would work. Your first diagram switched the high (positive) side, and your second switched the low (negative/gnd) side.
Only thing that threw me was the markings on your relays. Vcc is a supply voltage in electronics, whereas you've used it for the contacts.
Ricardoco is right that e-stop circuits should be fail safe. For the actual e-stop button circuit, the relay should be active when the e-stop circuit is not in stop condition, with the BOB e-stop wires going through a pair of NO (Normally Open) contacts. That way if anything fails, the machine stops.
With the drive alarm function, a truly failsafe method is not possible due to the fact the alarm only activates when there is a fault, so you need to implement a system that relies on relays/wiring working when there is a fault. This isn't quite as big an issue on the alarm funcion, as a failure to stop when a drive faults out isn't as major a safety issue. At worst two axis keep moving, while one sits still.
-
Re: Wiring up the Alarm output on Leadshine AM882
OK with that sorted I'm also looking to eventually add proximity switches for home positions.
These look a little different since they're powered devices with an output intended for a parallel port input.
Am I right in thinking its possible to only use 1 input on the BOB for 3 switches or does each need its own? Currently I have 1 input with 3 mechanical switches but not sure if that will work here.
-
Re: Wiring up the Alarm output on Leadshine AM882
If they have active (i.e. TTL level) outputs, then they won't like being connected up. Possible work arounds could be some kind of OR gate, or mini relays.
If they have an Open Collector option, then it will be possible to link them up.
-
Re: Wiring up the Alarm output on Leadshine AM882
Hi m_c, thanks for all the help you've given. Appreciate it.
The sensors are these types:
DC 10-30V 4mm Inductive Green Proximity Sensor Switch 3-wire PNP SN04-P2 | eBay
Sadly no data sheet and the specs are basic at best. I'd say that they're active outputs as I had them test wired this evening and when you tie all the outputs together they do strange things. There's a little led on each to show active, when wired in this manner you have to trip a couple of them in order to get things going. Wired individually they work fine.
Could I place a diode after each output or is this not a case of current flowing back to one another?
-
Re: Wiring up the Alarm output on Leadshine AM882
I did manage to find a datasheet to these devices, its in Chinese though!
http://www.ic72.com/pdf_file/-/84401.pdf
-
Re: Wiring up the Alarm output on Leadshine AM882
Given that they're NC when not activated, if you want to connect them through a single pin, then you'll need some way to invert the signal.
There are various options, however the one that involves reasonable size components is to use a small relay for each sensor.
However, looking at the specs for those sensors, they are far from ideal, given detection distance is listed as 5mm +/- 10%.
A slot type sensor is far more accurate, such as Optical End / StartStop w. mounts- For CNC, Reprap and laserengraving machine | eBay
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
m_c
I was reading the massive thread over on cnczone about the DIY version of these and it depends how you use them as far as accuracy goes. Passing the sensing object very close across the sensor is preferable to bringing the object up to the sensor. That's 20% error in the specs is at a distance of 5mm from the sensing object. The closer the object is to the sensor the more accurate it is. At 1mm they're accurate to 0.05mm or better.
There's video here showing the repeatability of these cheap ebay proximity switches using a dial indicator.
http://www.youtube.com/watch?v=i3nmp9AXccQ
-
Re: Wiring up the Alarm output on Leadshine AM882
For a router, that accuracy is pretty good.
I'm more used to metal work, where 0.05 is borderline acceptible. It's certainly not really good enough for a lathe, as that translates to 0.1mm on the diameter. The sensor I'm using acheives better than 0.01mm accuracy.
-
Re: Wiring up the Alarm output on Leadshine AM882
0.01mm is about the resolution of my stepping setup. Mechanically a C7 screw and nut is 0.05mm or better.
I think these sensors are a good match for my system. Anything more would have been overkill but I can see why you'd like better if your doing the kind of precision work that absolutely requires it to be dead on.
-
Re: Wiring up the Alarm output on Leadshine AM882
The other issue you can get with these that you don't get with a 3D printer is keeping then clear of swarf? you would need to shield them very well
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
m_c
Given that they're NC when not activated, if you want to connect them through a single pin, then you'll need some way to invert the signal.
Missed this but it's easy fixed just set the Home input to Active low and it will see the signal when it goes low IE: The switch opens.
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
JAZZCNC
Missed this but it's easy fixed just set the Home input to Active low and it will see the signal when it goes low IE: The switch opens.
Still wouldn't work for homing ;-)
Wiring three to the same pin, unless you can make sure 2 are triggered (i.e switched open circuit) while you home the third one, it's not going to work.
-
1 Attachment(s)
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
m_c
Still wouldn't work for homing ;-)
Wiring three to the same pin, unless you can make sure 2 are triggered (i.e switched open circuit) while you home the third one, it's not going to work.
See what you mean and didn't give it a lot of thought plus I've Never used these type Switches so won't argue but I've just been looking thru PMDX126 manual and they use them wired in parallel on a single Pin so wouldn't be so sure.?
-
Re: Wiring up the Alarm output on Leadshine AM882
That's because the sensors in that diagram have a NO output.
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
m_c
That's because the sensors in that diagram have a NO output.
Ah I didn't realise these where NC switches. . . Makes sense now.!! . . . Really should start reading the threads more often.!
(To be honest didn't even knew Proximity switches add NC - NO option never used them or thought about it. Thought they just sensed magnetic fields but on reflection it's obvious it's just an electrical circuit so could have and would need to both options to work has switches. . . Doh.!!)
-
Re: Wiring up the Alarm output on Leadshine AM882
I thought I'd bounce this thread as I have a question related to the ALM output from a Leadshine drive (EM806, which is pretty much an upgraded AM882).
Is it safe to wire the ALM straight to a PIC pin, or should I use another (opto) transistor in the middle somewhere to isolate the two?
Regards,
T.
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
dsc
I thought I'd bounce this thread as I have a question related to the ALM output from a Leadshine drive (EM806, which is pretty much an upgraded AM882).
Is it safe to wire the ALM straight to a PIC pin, or should I use another (opto) transistor in the middle somewhere to isolate the two?
Regards,
T.
I'm no electronics expert but think it should be ok has the alarm output can sink or source 20ma @ 24V and don't think the Pic will kick out more than 5V.
Something I do know thou is don't want you to blow my bloody drive up So be sure before trying. .Lol
-
Re: Wiring up the Alarm output on Leadshine AM882
Lol, I'm not keen on blowing anything up, thus the question :D
Regards,
T.
-
Re: Wiring up the Alarm output on Leadshine AM882
The Fault ouput is Open Collector, so provided there's not an issue with wires being connected wrongly, then you can connect it directly.
If noise is an issue, or the possibility of wires being connected wrongly, then having an opto would likely be beneficial.
-
Re: Wiring up the Alarm output on Leadshine AM882
The Fault output on the EM806 (i guess that's what you mean by the Alarm output) is a floating optoisolated transistor. You could do it two ways:
1. Flt+ to PIC Vcc, Flt- to the input pin and a 1k resistor from input to PIC ground. Input will go low on fault; or
2. Flt+ to PIC input, Flt- to PIC ground, 4k7 resistor from PIC Input to PIC VCC. Input goes high on fault.
-
Re: Wiring up the Alarm output on Leadshine AM882
Wouldn't using an internal pull up be just as easy?
-
1 Attachment(s)
Re: Wiring up the Alarm output on Leadshine AM882
Looking at the diagram in the manual again, I thought that if I use R = 4.7k, the PIC pin will see 5V when the FLT output is disabled, and 0V when the FLT output is enabled. With nothing passing through the FLT optotransistor in the EM806 ie. with no fault, the PIC pin should see 5VDC on the input, if the FLT optotransistor is enabled, it would pass current down to 0VDC, thus bringing the PIC pin down to 0VDC. Or am I missing something?
Regards,
T.
Attachment 11686
-
Re: Wiring up the Alarm output on Leadshine AM882
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
dsc
Looking at the diagram in the manual again, I thought that if I use R = 4.7k, the PIC pin will see 5V when the FLT output is disabled, and 0V when the FLT output is enabled. With nothing passing through the FLT optotransistor in the EM806 ie. with no fault, the PIC pin should see 5VDC on the input, if the FLT optotransistor is enabled, it would pass current down to 0VDC, thus bringing the PIC pin down to 0VDC. Or am I missing something?
Regards,
T.
That was my option 2 and will work fine, but if you read page 3 of the manual you'll see it says that the output is low impedance in normal operation and goes high when there's a fault, i.e. the logic is reversed. The reason for this is if you put the pullup at the controller end and the cable gets broken or disconnected you get a fault condition.
@m_c you could use internal weak pull_up but needs to be turned on in s/w and is only 10k so more susceptible to noise in this environment. Indeed on reflection I'd probably use a 1k external pull_up for just that reason.
-
Re: Wiring up the Alarm output on Leadshine AM882
Hey guys,
I know this thread is a little old but it's about he only decent thing that comes up when I searched "AM882 alarm wiring". I just registered to post this update.
This is just an FYI how mine worked. I have 2 motors on one axis and I didn't want the driver to sense something that would put it in to alarm and stop one motor while the other kept going. Hope that makes sense. I wanted that if one driver went into alarm that the others would stop.
Turned out really simple. In the software set the alarm to go "LOW". Run the E-Stop though as many switches as you need then end at the "ALM +" of the first drive then "ALM -" to the "ALM +" of the next and so on. After the last drive "ALM -" goes back to the control board "GND" and that's it. Job done. If any drive goes into alarm, the circuit is broken and E-Stop is activated.
Happy Days
-
Re: Wiring up the Alarm output on Leadshine AM882
Hi Joe and welcome to the forum. There are a lot of people on here that use the AM882 drives and the later model EM806 both are very good drives and for a gantry machine a must, because like you have pointed out the alarm feature
-
Re: Wiring up the Alarm output on Leadshine AM882
I just thought the beginning of the thread got a bit complicated with using relays and the such. I don't know if the op had used a different control board or something and it had me a little confused. I know how to use a transistor and a relay but couldn't work out the alarm port on the AM882.
I expected it to be simple open circuit and closed circuit when alarming or not. What threw me off the most was putting a multi-meter across the terminals didn't show continuity or only a few millivolts on DC. I figured there wasn't enough voltage to do any damage so I just give it a go running a jumper from the E-Stop on my Parallel Breakout board, "ALM +" then "ALM -" back to the GND on my break out board. What do you know it worked then I found it also worked jumping them all together so all good..
Happy Days
Joel
-
Re: Wiring up the Alarm output on Leadshine AM882
Quote:
Originally Posted by
joel0407
Happy Days
Joel
Thanks for taking the time to share Joel, I'm sure some will find your info usefull.
Good luck and welcome to the forum !