3 Attachment(s)
Re: AndyUK's Build - 1.2x1.0m Gantry
Hi All,
So, I thought I had the machine all ready to make its first self-powered movements this evening, however I've stumbled!
I'm pretty sure the problem is that the drives are not enabling, because they worked before I reprogrammed the enable to be active high rather than active low, so one of the things I'll do to test is reprogram a drive enable to be active low again and retest.
I thought I'd throw this out to people to see if you can see where I've gone wrong. The drives are wired as per the EM806 manual (below) and my circuit diagram two posts ago.
Attachment 27264
So, each drive has a line from +24V on the UB1 to ENABLE + on the drive via a 2k ohm resistor. The ENABLE - lines are then commoned, and fed into the OSSD output on the UB1. This is the output of the safety circuit, which I can override with a button (so I know the cause isn't limits etc).
The UB1 manual says this about the outputs:
Attachment 27265
And lists the OSSD as just another output that is controlled by the safety circuit:
Attachment 27266
My thoughts were, that when the output is off (i.e. safety circuit broken), no current can flow through the enable optocoupler, so its a logic low. When the output is on current can flow, logic high, drive enabled.
The drives target 10mA on those optocouplers, so 40mA approximately should be within the 70mA sink of the output.
I know the OSSD output is doing its thing because I can see the LED come on when I press the override.
Have I missed something?
Re: AndyUK's Build - 1.2x1.0m Gantry
Quote:
Originally Posted by
AndyUK
My thoughts were, that when the output is off (i.e. safety circuit broken), no current can flow through the enable optocoupler, so its a logic low. When the output is on current can flow, logic high, drive enabled.
I haven't ploughed my way through the UB1 manual, but in general terms it looks like the internal "switch" in the UB1 shorts the pin to earth (in which case current can flow) or not, in which case no current flows. What might be causing confusion is that when the switch is on, current flows, and the output voltage on the pin is more-or-less at earth potential. When the switch is off, the output pin is high voltage (as the resistor and enable output path on the driver form a pull-up circuit). So is your logic the wrong way round? :Low and high usually refer to the voltage on the pin, not current flow.
Re: AndyUK's Build - 1.2x1.0m Gantry
Yeah that thought did trouble me too...
I didn't notice the drive working when I wasn't overriding the safety circuit, but it's also possible that in that condition the UB1 won't send the step signals.
I need to dig up some example circuit diagrams where people are switching the enable lines of the AM882 or EM806.
Re: AndyUK's Build - 1.2x1.0m Gantry
I use EM806 and I switch the enable line. Offhand, though, I can't remember exactly how, but I think it's a direct connection from a relay contact on my safety relay. Too late tonight but I'll try to sort out some info tomorrow. I know that my EM806 are in the default "disconnect to enable" mode as I've never tried to reprogramme them.
2 Attachment(s)
Re: AndyUK's Build - 1.2x1.0m Gantry
Optocouplers work a little like elctromechanical relays: When you apply a voltage across the input terminals the output terminals are connected together. In practice most couplers contain a LED which lights up to turn on an open collector transistor. The most common circuit implementation connects the LED cathode and the emitter of the transistor to ground. Your external circuit will normally include a pull-up resistor between the open collector and the positive supply so the output voltage (the collector of the transistor) is high until pulled low by a positive voltage applied to the anode of the LED. The device therefore acts as an inverter in this configuration.
There is no reason why the collector of the transistor cannot be connected to the positive supply and a pull-DOWN resistor connected between the emmiter and ground. The output is now the emitter and the circuit is non-inverting. As long as the collector is allways positive with respect to the emitter the device will work.
Simillarly the anode of the LED can be connected to the positive rail and the cathode pulled low to turn it on if that suits your circuit voltages.
All clear as mud?
Attachment 27268
The stepper controllers I have used have all deaulted to 'enabled' if the enable input is left unconnected. You could test the rest of the beast's function this way.
Kit
Re: AndyUK's Build - 1.2x1.0m Gantry
Quote:
Originally Posted by
Kitwn
All clear as mud?
The stepper controllers I have used have all deaulted to 'enabled' if the enable input is left unconnected. You could test the rest of the beast's function this way.
Kit
Thanks Kit, I've read through a few times and I think that talley's with my understanding. The problem is, I can't get to the collector or emitter in the drive, and only the collector on the UB1, so I don't have a lot of wiggle room to add pull up or down resistors?
It definitely all worked before reprogramming the drivers, it's just a hassle now everything is in place, but that's the first step.
Re: AndyUK's Build - 1.2x1.0m Gantry
Are the drives powered up when your trying to enable them.? If so it should work if you have switched the Active state to High in the drive it's self and pulled the Opto high. To test the drives then just reset Active state and disconnect the enable.
Re: AndyUK's Build - 1.2x1.0m Gantry
Yeah drives have power, and I can see the LEDs on the UB1 flashing to indicate the Step and Dir pulses are sent. Unfortunately I'm away from home for the weekend so testing is delayed!
Have just found this from vrasak himself (post #3) - so perhaps I'm just confusing my logic states as per Neale's suggestion, and really the drives just need to be configured active low. Vrasak refers to the need to switch the fault state, but not the enable, which is suggestive :)
https://www.cnczone.com/forums/uccnc...cnc-forum.html
Re: AndyUK's Build - 1.2x1.0m Gantry
Andy,
I think you understand a fair bit on the old electronic side. I was casually browsing this thread and one thing is niggling me. Opto isolators typically have a low CTR - usually significantly less than 1, often less than 0.5. That does mean that cascading optos is going to end (eventually, depending on CTR and number of optos in chain) with the latter optos not switching effectively. Really, the opto should be switching a high-z logic device rather than the relatively high current LED input on the successive circuit.
You link a rating of the output at 100mA - that /could/ just be the Ice(max) for the PT in the opto, rather than an actual expected switching current (reading the 4n25 data sheet this is the case).
I'm not suggesting this is your problem, but bear it in mind and measure the switching voltages along the opto-cascade,
Re: AndyUK's Build - 1.2x1.0m Gantry
You learn something new every day!
A scan of the RS catalogue shows you can get inexpensive devices using Darlington output stages with CTR values as high as 50 and more if you have the luxury of designing the circuit yourself, though they have a higher sturated output voltage. Problem is we're often dealing with couplers already installed in larger devices and cannot choose.
Pull-up/down resistors are often already included in many devices, it being a very bad idea to leave logic inputs to float as the mood takes them. This is how the common "enabled if left unconnected" principle is implemented.