# Differences between LTSpice and Real circuit and why?

Discussion in 'General Electronics Discussion' started by chopnhack, Jun 16, 2015.

1. ### chopnhack

1,573
354
Apr 28, 2014
Maybe someone can attempt to help on this question.

As you can see below in the waveform, the circuit works as expected. I added C3 to smooth out the transitions between the oscillations. The value was derived by watching the output until it was clean. D3 is an LED that in real life shows only 4.4mA running through it while in the sim it shows a little over 10mA. Is there a reason why? Maybe one of our experts on Spice can assist. @Harald Kapp - I think you assisted me before with spice and would greatly appreciate any further help.

5,164
1,087
Dec 18, 2013
Hi John
You using the same LED?

chopnhack likes this.
3. ### chopnhack

1,573
354
Apr 28, 2014

No, I used a generic LED and now that you mention it, I was curious as to why when I selected different LED's from spice I ended up having different current values across the LED. I can only guess that this is because of an internal resistance inside the LED?

If I wanted more current across the LED, is there a way to achieve this? Notice that the current reducing resistor is set to 1Ω and in the real life circuit there is no resistor.

4. ### chopnhack

1,573
354
Apr 28, 2014
Do you think 100k resistor is too high to saturate the base? I am trying to limit the current to the base to the least allowable. While playing with spice, I went up as high as 20MΩ before I started to see a drop in current across the LED. At 100k resistance to the base, the base current on Spice shows to be 15uA. In the real life circuit I am using 100k resistor and it is functioning.

5,164
1,087
Dec 18, 2013
This LED has a max 3.5 Vf. It's a white LED. Also are your transistor suppose to be configured as Darlington arrangement?

chopnhack likes this.
6. ### chopnhack

1,573
354
Apr 28, 2014
The current real circuit is using green, I assume at around 2.2Vf. The transistors - well, I was just messing around with them to see if I could get them to function the way I was thinking they would. In this case, I was thinking to save power in the system. Instead of relying on the 555 to drive the led's, I thought I could use the transistors. By limiting the current out of the 555 with the large R3 value. I could then pickup the weak signal, amplify through one Q then pass that to the next Q.

The real circuit worked before with the transistors, I was just looking for other ways to improve power consumption with minimal part addition/expense.

I mean to integrate the LDR dark switch to this circuit. Can you make a suggestion as to the best location to interface the two?

5,164
1,087
Dec 18, 2013
What do you want the dark switch to do?

8. ### chopnhack

1,573
354
Apr 28, 2014
Turn the circuit on and off. Off when light and on when dark.

5,164
1,087
Dec 18, 2013
I am not that familiar with 555 timers as you know I guess you could look at using the reset pin. If you are worried about current drain and require the power to be switched you could use an LDR power switch. What current does the whole circuit draw when on, do you know?

10. ### chopnhack

1,573
354
Apr 28, 2014
I will review the datasheet and see if that reset pin can be tapped. The pin is kept high currently. What do you mean by an LDR power switch? This is the current LDR switch I have been working on.

Ammeter in series between the battery and circuit shows 3.4mA Through LED 0.22mA.

5,164
1,087
Dec 18, 2013
I mean design a low power circuit which draws virtually no current when off but can supply 3.4 mA when the LDR triggers it. Maybe a low power comparator or Schmitt trigger.

chopnhack likes this.

5,164
1,087
Dec 18, 2013
I have always found photo diodes or photo transistor good for this sort of thing.

chopnhack likes this.
13. ### davennModerator

13,866
1,958
Sep 5, 2009
also, above all ....
Don't forget that all circuit simulators assume ideal components
real life doesn't have ideal components

chopnhack likes this.
14. ### chopnhack

1,573
354
Apr 28, 2014
Harald had mentioned the Schmitt trigger as well as comparator but I was trying to avoid many more components. I thought I could simply arrange the LDR to give me an on/off, but as he explained there won't be a clean on off unless the Scmitt trigger is used. I need to work on this some more. I appreciate the input and quick replies and thoughts. The photo diode/transistor - I would need to reverse its function - it allows current to flow when light falls on it. I need current to flow when dark. Could a PNP be coupled to the emitter of the phototransistor to act as an inverter?

Good point Dave ;-)