LTSpice simulation not matching breadboard?

Thread Starter

beezerlm

Joined Apr 4, 2012
18
Hi,

I am working on a simple circuit that will monitor the status of a motor drive's (Gecko G320X) fault output signal. If the fault signal is +5VDC, It should have a green LED lit indicating the drive is powered and enabled. If the fault signal goes low, the green LED should turn off and the red LED should turn on.

I have drawn a simulation and built the matching circuit as shown in the attached screenshot. On the breadboard, the green LED performs as it should, but the red LED (D2 on left circuit) only runs about 1.5ma of current instead of the 15ma the simulation shows. There is also a voltage drop of about 3v from the emitter to the collector of the 2907 transistor? I checked all the resistor values and replaced the 2N2907 with a new one yealding no results.

Can someone point me in the right direction? I must be missing something.

The LTSpice Simulation Circuit.
Circuit.jpg
 

dannyf

Joined Sep 13, 2015
2,197
A red led has a forward voltage drop of about 1.8v. So Q3's base should sit at about 2.5v. That means a base current of 0.5ma. That should be more than enough to drive a pnp into saturation. Maybe your wiring is wrong, or your pin-out is messed up.

BTW, the design is quite atypical.

yealding no results.
Sure it does something, however indifferent from what it did before.
 

Thread Starter

beezerlm

Joined Apr 4, 2012
18
I think I may have the pinout of the transistor backwards. Looking at a different datasheet, I think I misinterpreted the pinout of the first datasheet. I don't have the breadboard in front of me but I will give that a try when I get back to work.
 

Alec_t

Joined Sep 17, 2013
14,280
If the 5V fault signal can source enough current to drive a green LED at adequate brightness directly you could simplify the circuit considerably.
 
Last edited:

Thread Starter

beezerlm

Joined Apr 4, 2012
18
If the 5V fault signal can source enough current to drive a green LED at adequate brightness directly you could simplify the circuit considerably.
I think it can, but the signal functions as an input and an output. It can't source too much and If i pull it low it will disable the drive. I would also like to connect this circuit to an input on the control side to notify the operator there is a fault via the computer screen. The input is on a breakout board that is operated by a PC running Mach4.

I did a retrofit on two of these machines (Moore G18 CNC Jig grinders) around 2010 and it's time to upgrade from Win XP to Win 7 and from Mach 3 to Mach 4 control software. I am trying to add a few more bells and whistles to make things more convenient for the operators. On the current Xp/Mach 3 setup, the operators have to open the cabinet to see if the drives have a fault. I want the indicators and reset to be on the outside of the cabinet so they don't have to open it. Plus it will help keep all of the metal grinding dust from getting on the electronics.
 

Alec_t

Joined Sep 17, 2013
14,280
Here's a couple of suggestions.
The second circuit could only be used if the fault signal Input could drive the green LED directly.
GreenRedSwitch.PNG
GreenRedSwitch2.PNG
 

Thread Starter

beezerlm

Joined Apr 4, 2012
18
Here's a couple of suggestions.
The second circuit could only be used if the fault signal Input could drive the green LED directly.
View attachment 104455
View attachment 104456
Thanks! I like the simplicity of the second circuit. I'm sure they are both more efficient than my first circuit. I may give that a whirl on Monday to see if the fault signal can drive the led directly.

BTW what is the 5 in the "1.K5" on the first circuit resistor value?
 

dannyf

Joined Sep 13, 2015
2,197
The whole thing depends on the drive capability of the signal pin. The circuits proposed so far assumed it could drive a 1-2k resistor to 5v. That implies a current output of 2ma minimum.

If that's the case, that pin is perfectly capable of driving most (signal) LEDs directly. No driver is needed.
 
Last edited:

Thread Starter

beezerlm

Joined Apr 4, 2012
18
Here's a couple of suggestions.
The second circuit could only be used if the fault signal Input could drive the green LED directly.
View attachment 104455
View attachment 104456
I tried your 2nd circuit but the input signal could not source enough current. I only got about 2ma current through the green led

I built the your 1st circuit, and the fault signal on the drive kept dropping low disabling the drive. I increased the value of R1 from 2.2K to 2.7K and it functions as expected. If I measure the voltage of the fault signal coming right out of the drive it now only measures 1.6V. It is about 5V when it is not connected to a load. Do you think this could be a problem?
 

Alec_t

Joined Sep 17, 2013
14,280
Hmmm, sounds rather marginal if 2.2k doesn't work but 2.7k works. I don't know enough about your drive to say if there would be a problem. The 1.6V measurement suggests there is a ~6.8k resistor in series with its output, which would possibly allow the output pin to be shorted to ground without harm (but of course would disable the drive). If you are concerned, you could replace Q1 with a Darlington NPN transistor and increase R1 by a factor of at least ten.
 

eetech00

Joined Jun 8, 2013
3,858
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.
 

Attachments

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.
This is interesting. What are the 47k resistors going to ground used for? Maybe to clean up any residual current from the base of the transistors?
 
Top