Friends,
I'm a beginner maker. I'm mostly interested in using microcontrollers to build and control small devices. I program professionally, so the big weakness in my education is the electronics and mechanical engineering side of things.
Particularly in the space of electronics, I know a lot of the fundamentals only at a high level. I am working my way through a beginning electronics text, and concurrently working on some design projects I'm interested in, practicing reading datasheets, etc.
One thing I thought might be useful is to use a program like LTSpice to simulate my designs and see if they "actually work" before ordering parts. As an exercise, I'm trying to design a decoder for DCC model train signals.
I've attached the model I came up with so far, with a screenshot in case anyone doesn't want to download my file.

(Note that this model is not complete yet -- there are a few other components I want to include on it. But it demonstrates the issue I was having.)
Originally, when I was designing this circuit, I thought the DCC signal pulses were about 1us in duration. I've since realized that the pulses are more like 50us long, which means my question is sort of obsolete. But, for the sake of "learning to learn," I'd like to ask this question anyway.
A problem I noticed in the simulation was that the railsig net voltage rose and fell too slowly, I assume due to capacitance in the 4N25. I read the datasheet for the 4N25 photocoupler and learned that the rise and fall time were about 2us, too slow for a signal 1us in duration. There are other photocouplers with sufficiently high bandwidth for this application, however, all the ones included in LTSpice are too slow.
My question: when you want to test the behavior of a component that is not included in LTSpice, what are your options? Do you have to build your own model for the device? Are you supposed to use some kind of shortcut? Is testing behavior using LTSpice even a proper use of this program or proper avenue for learning, or should I be testing on the bench?
More generally: my main goal right now is gaining an intuitive understanding of how circuits and circuit components work, with an aim to become proficient and board design and component selection in the space of mostly-digital low-power electronics. I seem to learn best by experimenting and doing, and I think my overall question is whether you think LTSpice or some other simulator is a good approach to this, or if this is not productive and there is another avenue I should be following.
Thank you so much for any help.
I'm a beginner maker. I'm mostly interested in using microcontrollers to build and control small devices. I program professionally, so the big weakness in my education is the electronics and mechanical engineering side of things.
Particularly in the space of electronics, I know a lot of the fundamentals only at a high level. I am working my way through a beginning electronics text, and concurrently working on some design projects I'm interested in, practicing reading datasheets, etc.
One thing I thought might be useful is to use a program like LTSpice to simulate my designs and see if they "actually work" before ordering parts. As an exercise, I'm trying to design a decoder for DCC model train signals.
I've attached the model I came up with so far, with a screenshot in case anyone doesn't want to download my file.

(Note that this model is not complete yet -- there are a few other components I want to include on it. But it demonstrates the issue I was having.)
Originally, when I was designing this circuit, I thought the DCC signal pulses were about 1us in duration. I've since realized that the pulses are more like 50us long, which means my question is sort of obsolete. But, for the sake of "learning to learn," I'd like to ask this question anyway.
A problem I noticed in the simulation was that the railsig net voltage rose and fell too slowly, I assume due to capacitance in the 4N25. I read the datasheet for the 4N25 photocoupler and learned that the rise and fall time were about 2us, too slow for a signal 1us in duration. There are other photocouplers with sufficiently high bandwidth for this application, however, all the ones included in LTSpice are too slow.
My question: when you want to test the behavior of a component that is not included in LTSpice, what are your options? Do you have to build your own model for the device? Are you supposed to use some kind of shortcut? Is testing behavior using LTSpice even a proper use of this program or proper avenue for learning, or should I be testing on the bench?
More generally: my main goal right now is gaining an intuitive understanding of how circuits and circuit components work, with an aim to become proficient and board design and component selection in the space of mostly-digital low-power electronics. I seem to learn best by experimenting and doing, and I think my overall question is whether you think LTSpice or some other simulator is a good approach to this, or if this is not productive and there is another avenue I should be following.
Thank you so much for any help.
Attachments
-
3.2 KB Views: 3


