Update: The examples can be found on my GitHub repo (MartyMacGyver/memristor-modeling)
Lately I’ve been getting back into the EE groove with some random electronics projects (such as an Arduino-based LED strip driver). I’ve also been dabbling with different circuit simulators like Micro-Cap (which I used back in college but which is VERY expensive for the regular version… still, it’s handy for quick little sims to learn new things, especially in the digital realm).
Today I stumbled on LTspice from Linear Technology, which I found to be surprisingly intuitive (and given that it’s based on the venerable and powerful SPICE it’s that much more worth learning). It’s not as animation-friendly as Micro-Cap but it’s pretty easy to make custom components (and where else can you simulate the actual inner workings of a 555 timer or a 741 op-amp?) (And yes, the 741 is not something you’d reach for normally nowadays, but they are instructive nonetheless.)
Memristors have intrigued me since they made the news a few years back, when discoveries were made of practical memristive materials. You can read more about them on Wikipedia and so on, and though very subject is not without controversy I personally think they will prove to be a valuable technology going forward. I found them intriguing from both the EE and the MSE perspectives.
Side-note: if you find yourself wondering more about why a device does what it does (in my case, the humble MOSFET) than regurgitating Kirchoff’s Law and applying Thévenin’s theorem, you’re probably better off in Materials Science Engineering than Electrical Engineering. At least that’s what happened to me… that and a very grumpy EE prof who made it clear we’d all be obsolete, unemployed and grumpy like him soon anyway. And you can always fall back on CS when the semiconductor market tanks…
Given all that, today I decided to see if I could simulate a circuit with a memristor in it. Problem is, while some sims have memristors, LTspice does not, and apparently nobody out there has published a simple example that actually works (I found videos – who writes a text tutorial in a video? – and a broken webpage, but I never found a working sim). So, I made one… and after a few false starts I got it to work. Not bad for an evening at home!
To try my demo LTspice-based memristor simulation out, please visit my GitHub repo (MartyMacGyver/memristor-modeling) and follow the instructions there for how to install and use it.
And to reiterate, this is a demo based on the SPICE model of a memristor as described in one paper… this is for educational purposes only and no, I can’t help you with your homework. 😀
Update 2015-03-30: My goal was to create a simulation in LTspice using a memristor component… I did NOT write the SPICE model for the memristor component itself (it’s straight out of the paper by Biolek, Biolek, and Biolkova as noted in the Readme file). Due to the limitations of that model, this simulation only works in transient analysis mode. The parameters are “.tran 0 3s 0 3m uic” (uic used to be called skipbp).
To test all this, install the latest LTspice, install the files per the Readme, load up memristor_sim.asc, and run the simulation. I just tried it myself with version 4.22x and it still works.
Update 2016-02-08: I’ve moved the files for this to GitHub.