6/11/2023 0 Comments Macspice pulseI could go look that up but for now I just used 1 nanosecond, specified as 1ns. The next two parameters specify the rise and fall time of the pulse. In our case the LV168 spits out 5V signals so I used 0.0 and 5.0 here. VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS)The first two values are the initial and pulsed (high) values of the supply. You do this by using the PULSE parameter when describing the value of a voltage supply: SPICE provides a PULSE type of voltage supply that allows you to specify a supply that has repeating output pulses. When I say measure, what I really mean is to have SPICE print or plot the values. In SPICE the only way to measure current is at/with a voltage supply you cannot measure it through a resistor, for example. Now, as to the two new voltage supplies, the easy one is the 0V supply. But probably most of the time you will just use a model already created for a standard component that you're using. That way, if you cannot find a SPICE model ready-made to cut-n-paste for your transistor, but you can find these parameters in the data sheet, you can create a model from scratch. MacSpice lets you specify a number of BJT parameters in your model, such as:Ī complete list of parameters for transistors and diodes can be found in the MacSpice (or any SPICE) user guide. Mname is the model name, like TIP3055 if you're using that model from above. Qname NC NB NE Mnamewhere Qname is the name of the transistor (Q1, Q2, QA, etc), NC is the Collector node, NB is the Base node, and NE is the Emitter node. When you add a BJT circuit element, you specify it as: (For whatever reason, MacSpice didn't recognize the Nk parameter, in red above, and ignored it). The "+" character is a line continuation so you can put the model statements on more than one line. I searched the web and found a model for a 2N2222 (close enough we could try to find a 2222A if we really needed to) and the TIP3055. In the diagram you can see I am using an 2N2222A and a TIP3055 transistor. These models are usually available from manufacturers as well as online for more common parts. Using SPICE you can model semiconductors-diodes and transistors-of various types, the properties of which you specify in a model statement. A zero-volt power supply (VM) used to measure current through the "motor"įirst let's talk about transistors and models.A special "pulse" voltage supply (VR) to simulate 5V signal pulses from the MCU.BJT transistors and transistor models (Q1, Q2).I've edited it with a graphic editor to add a couple of SPICE elements and node label numbers (in green) to each of the nodes to make it easy to create the SPICE file.Īlso, adding onto what we talked about in the first article, Part 1, our new SPICE model will include three new circuit elements we haven't talked about yet. Here's the circuit diagram, drafted in CadSoft Eagle on the Mac. The circuit I threw together at the last minute only delivered a fraction of the 9V supply voltage to the motor. The motor was intended to run on 9V but the Orangutan LV168 driving it was only delivering a 5V logic high signal. Last we left off, I wanted to use SPICE to model my fan driver circuit and help me find ways to improve it.
0 Comments
Leave a Reply. |