How to model a variable current sink in spice

current-sourcesimulation

For a project I am working on (related question here) I need to model a nonideal variable current sink in spice.

Simply reversing the orientation of a current source or inverting its value is not sufficient because it is still sourcing current, just in another direction.

I am fairly certain there is a 'trick' using some built in components to simulate a variable resistance since as far as I understand, that may be the most accurate model for this component.

Best Answer

If you want a current sink that can't drive a node below ground, just add an ideal diode as a voltage clamp.

schematic

simulate this circuit – Schematic created using CircuitLab

Related Topic