# A question about a circuit simulation using LM331 in LTspice

I'm trying to convert 0..10V analog voltage to frequency by using an LM331. Since LM331 works at 5V supply, I can scale 0..10V to 0..5V and feed it as the voltage input to the LM331.

I came across this circuit and this forum. I followed the instructions to use LM331 in LTspice and simulated the circuit below:

But I'm getting 5V constant output when I use 5V supply. LM331 should work with 5V supply. But in simulation with 5V it doesn't work. It works when I use 10V supply.

Can someone explain me how this circuit works? I mean C1 and R1 sets the frequency but thats all I know. What else sets what here? How can I set the duty cycle to around 50%? How can I modify this circuit so I can run the simulation for 5V supply?

• The function of the chip is described in detail in section 8.1.1 of the data sheet. – WhatRoughBeast May 17 '17 at 19:05
• Side note: if ncl and nct are just the chip's pins, not the node's labels, then those .ic conditions are useless. If the actual labels are 1 and 5, then you may wish to change the directive to .ic v(1)=0 v(5)=0. – a concerned citizen May 18 '17 at 6:45