I Love LTSpice

A few weeks ago I went to a seminar put on by Arrow Electronics on Linear Tech’s free SPICE program LTSpice. This is an excellent program and the best part about it is the low, low price of $0. I had played with it a couple times in the past with simple circuits but this week at work I was working on designing a circuit and it came in extremely handy. There is s a bit of a learning curve to the program but the help in the program is well done and there are a lot of resources on the internet. The circuit I was simulating was fairly simple it’s a protection circuit with a couple transistors that turn’s off a P-FET when a voltage across a transistor gets too high. Some great features of the program are:

Simulating Circuits Over Different Temperatures
This circuit in particular had to operate over a wide temperature range of 0 to 85C. For analog circuits made out of discrete transistors this can have a huge impact since the Vbe of a bipolar transistor varies over temperature. These tests can be done on the actual circuit in an environment chamber and the simulation is not environment chamber replacement but you can quickly get a good idea if your circuit is going to work over this temperature range or not. It will also help give you the intuition about how temperature affects the circuit and will help you debug a circuit if you do find you have problems at high or low temperatures.

Testing to See How Noise or Transient Events Affect a Circuit
With the circuit I was working on I didn’t want it to be affected by short transient events such as Electrical Fast Transients (EFT) I was able to easily simulate a 4kV EFT being coupled onto my sense resistor and was able to tweak some values so that it was not triggered by the transient events.

Quickly Testing How Changing a Component Value Affects a Circuit
Want to see how changing R7 between 1K and 100K affects your circuits output. With one command you can have the simulation run with a list of different values and you can see how that affects the circuit.

AC Analysis of a Circuit
It is a great tool for analog filter or feedback circuit design since you can quickly do Bode plots for frequency response of the circuit

Calculating Power Dissipation in a Part
After running a simulation just Alt+Click on a part to have the power dissipation plot over the simulation time, this is great for seeing the switching power dissipation in a transistor. And then Ctrl-Click on the plot to integrate the plot and get the average and RMS power dissipation.

The program is not a perfect representation of you end circuit and is not a replacement for an understanding electronics or a replacement for calculations as some might use it, just because the circuit works in simulation doesn’t not guarantee that the circuit will work the exact same. Another limitation of the program is as your circuits get more complex the simulation times get huge event with my Quad core i5 processor I had a simulation that was going to take hours to complete. Even with some of it’s limitations it is a great tool for understanding how your circuit will react over many different operating points and fringe conditions

I am still learning the all the features of the program but it is an extremely powerful tool and should be in the tool kit of any electronics engineer.

LTSpice can be downloaded from Linear Tech’s website:


More Quadcopter Progress

I have been working on the quad copter some more and have made some more progress, although I sliced the tip of my finger open pretty good and broke one of the propellers in the process, but now the other axis id tuned fairly well. It doesn’t work as nice as the other axis right now though. It seems like one of the ESCs are stronger than the other, one of the motors runs significantly faster than the other as I mentioned in the previous post and I have narrowed it down to the ESC. Before I suspected it was the motor but swapped the two motors and the same side was stronger but after I swapped the ESCs the other motor was stronger. I have tried to calibrate out the difference to some success but it’d not perfect I may have to order a new ESC. Anyway here is a video of this axis working:

I still don’t have it flying though, I am going to have to work on that some more but that is enough for tonight.


Quadcopter Progress

Well I have recived my new Lithium Polymer battery and have been working on my quadcopter some more. I have one axis tuned and working fairly well heres a cool Youtube video of it working:

Currently having a slight issue with the other axis, when I first turn on the PID loop one of the motors shoots off in one direction and then after a bit it gains control probably due to the integrator kicking in. I don’t think there is a software problem, since the code for the two axis are the same. I’m wondering if there are some tolerances in these motors which would cause one to be stronger than the other, maybe the Kv (motor velocity constant) of the motor is significantly different between the two.