My girlfriend and I have this crazy project to provide a stuffed animal with creepy pulsing LED eyes. Being a geek, I decided it had to be done with pulse width modulation and an adjustable frequency sinewave. Unfortunately, I'm almost 15 years out of practice from my EE classes in another lifetime.
I've attached a PDF of the circuit, as it stands so far. Short version: The two functional blocks outlined in green work great, until they are connected to the comparator and then everything goes to hell.
It needs to be done off a single supply so we can run it on a 9v battery when it's finished. I'm using a wien bridge oscillator to provide the sinusoidal control signal, and feeding that output along with a much faster triangle wave into a comparator.
I'm using a voltage divider on a 12v power supply to provide a reference voltage / substitute ground.
The good news: both oscillators work great. I've even got the sine oscillator with adjustable frequency via a dual gang pot. It's spiffy, with an output range of 1/3 Hz to about 4 Hz, perfect for creepy glowing/pulsing eyes.
The bad news: when I try to hook up the comparator, everything fails. Both oscillators even stop oscillating, and *all* the outputs go to ground. I don't understand why.
Sometimes this even happens when I simply plug the comparator into the power supply - i haven't even connected the two oscillators to its inputs!
One of my confusions is this: the datasheet for the LM311N has three power connections, labeled Vcc, Vee, and GND. I assume that these should be connected to +12, 0, and 0 respectively, though I have also tried +12, 0, and Vref, as well as +12, Vref, and 0 (where Vref is the 6v reference provided by my voltage divider). I have added the requisite pullup resistor between the comparator's output and the positive voltage.
Many thanks for any input!
I've attached a PDF of the circuit, as it stands so far. Short version: The two functional blocks outlined in green work great, until they are connected to the comparator and then everything goes to hell.
It needs to be done off a single supply so we can run it on a 9v battery when it's finished. I'm using a wien bridge oscillator to provide the sinusoidal control signal, and feeding that output along with a much faster triangle wave into a comparator.
I'm using a voltage divider on a 12v power supply to provide a reference voltage / substitute ground.
The good news: both oscillators work great. I've even got the sine oscillator with adjustable frequency via a dual gang pot. It's spiffy, with an output range of 1/3 Hz to about 4 Hz, perfect for creepy glowing/pulsing eyes.
The bad news: when I try to hook up the comparator, everything fails. Both oscillators even stop oscillating, and *all* the outputs go to ground. I don't understand why.
Sometimes this even happens when I simply plug the comparator into the power supply - i haven't even connected the two oscillators to its inputs!
One of my confusions is this: the datasheet for the LM311N has three power connections, labeled Vcc, Vee, and GND. I assume that these should be connected to +12, 0, and 0 respectively, though I have also tried +12, 0, and Vref, as well as +12, Vref, and 0 (where Vref is the 6v reference provided by my voltage divider). I have added the requisite pullup resistor between the comparator's output and the positive voltage.
Many thanks for any input!
Attachments
Last edited: