LTSpice simulation not matching breadboard?

Thread Starter

beezerlm

Joined Apr 4, 2012
18
Here is a variant of Alex_T's circuit.
It important that the monitor circuit use an external 5v power source and not use power from the fault pin to power the circuit.
It sounds like the fault signal has very limited power.
I tried this design out and it works as expected. The fault signal line still drops but not as much. it measured 2.0V at .28ma while the green light was lit. It is certainly not capable of sourcing much current.

Quick question to help me learn some - What makes these designs better than the first circuit design I posted (other than my drawing was a little odd)? Are they more efficient or more reliable?
 

eetech00

Joined Jun 8, 2013
4,724
I tried this design out and it works as expected. The fault signal line still drops but not as much. it measured 2.0V at .28ma while the green light was lit. It is certainly not capable of sourcing much current.
Hmmm...280uA current draw is pretty small and I wouldn't expect that to load down a 5v signal much, if at all.
I'm starting to think there's something wrong with the fault output signal.
 

eetech00

Joined Jun 8, 2013
4,724
What is the power supply voltage?

I found the following text in the manual. Does it make sense?
Did you reset the output pin?

"This terminal functions as an ERROR output and as a RESET input. Because this terminal functions as both an input and an output, some detailed description is necessary.

When first testing the G320X, ERR/RES (Terminal 5) was connected to ENC+ (term. 7). It can be left that way if it is not necessary to read the state of the ERROR output. Otherwise, the following details are important.

The ERROR output is latched in the “ERROR” state (Terminal 5 = “0”) by the power-on reset circuitry in the G320X. It will stay in this state indefinitely until it is cleared by applying +5V to this terminal for at least 1 second.

The voltage on this terminal is +5VDC when the G320X is functioning normally. The voltage on this terminal goes to 0VDC whenever the FAULT indicator is lit. This output can be used to signal your controller that an error has occurred."
 

Thread Starter

beezerlm

Joined Apr 4, 2012
18
Hmmm...280uA current draw is pretty small and I wouldn't expect that to load down a 5v signal much, if at all.
I'm starting to think there's something wrong with the fault output signal.
Sorry eetech, I meant 280ma not .280ma.

Yes I have many of these drives in service and one on my test bench hooked to a motor/encoder for testing this circuit. I have a pushbutton set up that will short the encoder's +5V to the fault signal and that does reset the error. The drive has small LED'S on it that show the fault status. Everything is working as it should, I was just concerned about the the fault signal dropping to about +2V when enabled (green led on) if that would cause any issues when the drive is pushing a heavy load. I would also like to send this signal to the input of the machine's breakout board (PMDX-424) so the software will recognize the fault and halt the program. I am not sure yet how much current the input will need and how it may affect this circuit.
 

eetech00

Joined Jun 8, 2013
4,724
Sorry eetech, I meant 280ma not .280ma.

Yes I have many of these drives in service and one on my test bench hooked to a motor/encoder for testing this circuit. I have a pushbutton set up that will short the encoder's +5V to the fault signal and that does reset the error. The drive has small LED'S on it that show the fault status. Everything is working as it should, I was just concerned about the the fault signal dropping to about +2V when enabled (green led on) if that would cause any issues when the drive is pushing a heavy load. I would also like to send this signal to the input of the machine's breakout board (PMDX-424) so the software will recognize the fault and halt the program. I am not sure yet how much current the input will need and how it may affect this circuit.[/QUOT

280mA current draw out of the fault signal pin is a lot of current.
If you have an external supply for the monitoring circuit, there shouldn't be that much current draw from the fault pin. Should only draw about 1ma (actually about 915uA) when the monitoring circuit transistor is on. Have to figure out why the fault signal drops to 2v when the monitor is connected.

Is there something else connected to the fault pin?
What is the power supply voltage to the GX320? Is the power supply going in to current limit?

Do you happen to have a schematic of the GX320 fault I/O circuit?
 

Thread Starter

beezerlm

Joined Apr 4, 2012
18
My apologies once again. I was right the first time. Set my meter to "2m" and it read "0.280" when I set the probes in series between the Fault signal and R1.

When the I used the fault signal to drive an led directly ( i think with 220ohm resistor in series ) I was only getting around 2ma.

The only thing I could find for the drive's fault circuit is actually from the older "G320" model



The power supply I am using on the bench isn't much (24VDC 2a), but there is no motor load connected.. The power supply I am using on the actual machine is here:

http://www.automationtechnologiesin...s/unregulated-1440w-72vdc20a-120vac-or-230vac
 

Attachments

eetech00

Joined Jun 8, 2013
4,724
Disconnect the monitor, then try taking a 2907 (I think you have one) and connect it like the one in the schematic you posted.

except:

1. Replace the 220 ohm resistor and LED with a 4.7k resistor.
2. change the base resistor of the monitor input to 470 ohm
3. Connect the base of the monitor circuit to the junction of the 2907 emitter and resistor.

See if that works
 

dannyf

Joined Sep 13, 2015
2,197
The only thing I could find for the drive's fault circuit is actually from the older "G320" model
That's a OC drive, with an embedded current limiting resistor.

Because it can only sink current (actually it can source very small amount of current through the 1Meg resistor), you can use an external pull-up resistor as a signal to drive a pnp/npn pair.
 

dannyf

Joined Sep 13, 2015
2,197
I sketched it up here.

R1/R5/Q3 is internal to your device.

R2 is the pull-up resistor - its value doesn't matter as long as it is reasonably high;

When Q3's collector goes low, D1 lights up; When Q3's collector goes high, D2 lights up.
 

Attachments

eetech00

Joined Jun 8, 2013
4,724
Disconnect the monitor, then try taking a 2907 (I think you have one) and connect it like the one in the schematic you posted.

except:

1. Replace the 220 ohm resistor and LED with a 4.7k resistor.
3. Connect the base of the monitor circuit to the junction of the 2907 emitter and resistor.

See if that works
Here is the modified schematic.
Leave Q1 base resistor at 4.7k

edit: this circuit works as intended.
 

Attachments

Last edited:

eetech00

Joined Jun 8, 2013
4,724
OC meaning "Open collector" in which case you would need to add a "pull up" resistor (10k) from the fault pin to +5v, but according to the manual, that might latch it in reset mode.
 
Last edited:

Thread Starter

beezerlm

Joined Apr 4, 2012
18
I sketched it up here.

R1/R5/Q3 is internal to your device.

R2 is the pull-up resistor - its value doesn't matter as long as it is reasonably high;

When Q3's collector goes low, D1 lights up; When Q3's collector goes high, D2 lights up.
This circuit worked well. The Fault signal voltage only dropped to +4.68 volts from +5
 

Thread Starter

beezerlm

Joined Apr 4, 2012
18
I have added a connection to the input of my Breakout Board that is connected to the pc running the Mach 4 software. This pulls the input low when a fault occurs and stops the program from running. It also has a pop up message telling the operator there is a drive fault.

LED_Circuit.jpg

Here is the code I added to Mach 4's screen loading script to monitor the signal:

Code:
--My Signal Code Starts Here
--Code added to the "Screen Load Script"

SigLib = {
    [mc.ISIG_INPUT1] = function(state)
        local inst = mc.mcGetInstance()
        local input_1 = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1) -- Get handle for input 1
        local input_1_state = mc.mcSignalGetState(input_1) --Get state of drive fault signal

        if (input_1_state == 1) then -- Check to see if fault signal is on
            mc.mcCntlEnable(inst,false) -- Disable drive
            wx.wxMessageBox("Z Axis Drive Fault Triggered E-Stop") -- user message
        else
            wx.wxMessageBox("Z Axis Drive Fault Cleared")-- user message   
        end
    end
}
--My Signal Code Ends Here

I tested it out and it works well.
 
Top