View Full Version : SPICE models for MOC3023 and PIC I/O pins?
djulien
02-14-2010, 09:42 PM
Does anybody know where to find a SPICE model for a MOC3023? I found one in the LTSpice Yahoo group, but it doesn't seem to load correctly (I'm using 5Spice, but the syntax looks the same as LTspice, so I thought it might work). I also tried using a GA IR LED to represent the input side of the MOC3023 (since it was already in the 5Spice library) and it loads okay, but is it an accurate enough representation of the MOC3023? (I am wanting to model what's happening on the input side of SSRs to help pick the correct resistor values, so can I just ignore the opto transistor side and associated transfer characteristics?)
Also, is a constant voltage source suitable for a simplistic representation of a PIC I/O pin when it's low or high if I do not exceed the max current limitations on the I/O pin, or do I need to use something more complicated like maybe a pair of transistors and some other stuff for a more realistic representation? (I just want to look at the current and voltage in the output circuit that is connected to the I/O pin).
(Spice sounded like a simple way to do some trial and error parts substitutions without actually breadboarding them, but as you can tell I really don't know what I am doing with it).
thanks
don
Aurbo99
02-15-2010, 07:36 AM
You have to register for access to this group.
http://groups.yahoo.com/group/LTspice
All the MOC3023 files are in this folder:
Files > Lib > MOC30xx OPTO TRIAC
I've not checked myself to see if this is a valid link.
Hope it works.
djulien
02-15-2010, 12:07 PM
I've not checked myself to see if this is a valid link.
Hope it works.
That is the model that I tried to load in 5Spice.
I guess I will need to try to load it a piece at a time until it breaks, then figure out why. I was hoping to avoid all that. oh well.
don
Entropy
02-15-2010, 04:11 PM
In this particular case, SPICE seems to be overkill for what you're doing. It sounds like you're doing a pretty basic LED current calculation - Vf variations from device to device and resistor tolerances will cause more inaccuracy in your design than any inaccuracies from simplifications in your model.
In general, the output pin on a PIC or AVR can be considered to be pretty close to an ideal voltage source until you reach its limit. For more detail, you can look at the transfer curves in the datasheet. Usually, the output current limit is associated with a voltage, for example, I think ATMegas guarantee the ability to sink AT LEAST 20 mA without Vol going above 0.6 volts or so. (I forget the exact numbers.) There will be device-to-device variation, so many will have a lower Vol at 20 mA.
djulien
02-16-2010, 02:12 AM
Thanks for the info!
In this particular case, SPICE seems to be overkill for what you're doing. It sounds like you're doing a pretty basic LED current calculation - Vf variations from device to device and resistor tolerances will cause more inaccuracy in your design than any inaccuracies from simplifications in your model.
It is a pretty basic LED circuit, except that there are a lot of them. The reason I'm trying to use Spice is to try to avoid breadboarding 56 optos + transistors + resistors, so I can change the resistors easily and measure the results (I am trying to model 8x7=56 chipiplexed optos). I did breadboard a 2-opto circuit and took measurements and they looked okay, but I think there may be stray current in the other branches of the circuit, so I wanted to get a more complete view of the whole circuit.
don
Entropy
02-16-2010, 12:48 PM
Hmm. You'll probably be fine modeling the input of the MOC3023 as a basic diode with the appropriate Vf. You're running low enough currents that the diode's resistance component isn't going to come into play, and ideally you should try to avoid pushing the PICs to their current delivery limits too. If you do those two, modeling shouldn't be too hard.
You need the models when you have situations like "What happens if this IC is driving an excessive load capacitance that really shouldn't be there, but you can't remove and have to live with."
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.