LM311 Circuit Help Needed

sda

Active Member
I'm trying to put together a sample circuit with an LM311 to make sure I understand how it works.
From what I do understand, which seems to be wrong, is that pin 7 is an open collector.
When pin 2 voltage (input+) is less than pin 3 voltage (input-), conditions are met and pin 1 (emit out) is connected to pin 7 (col out),
in this case ground, and the LED should turn on. It doesn't. But if I connect pin 2 directly to ground, 0V, the LED will turn on.
What am I doing wrong? Probably everything!

lm311a.JPG
 
sda,

You are close to accomplishing what you want to do. On pin 3, I would create a voltage divider between V+ (6v) and ground, in your case just add a 10k resistor from pin 3 to ground (leave the existing 10k resistor). This will set the trip threshold to approximately 3 volts (with a 6 volt supply). This should get you up and running.

The datasheet has good examples of different uses of the LM311;

http://cache.national.com/ds/LM/LM111.pdf
 

sda

Active Member
Thanks.
Added the resistor. Pin 3 is now 2.9V.
Also swapped out the LM311 with a different one.
But the LED is still off.
I've looked at the data sheets, sample circuits, and various explanations of what its supposed to do.
I must be missing something.
 

BraveSirRobbin

Moderator
I agree with electriclight, change the 1M to 10K.

What are you going to use this for after your test? There are some example circuits for instance of using the LM311 for setting a temp level using adjustable resistors for the divider input to pin 3 (I remember seeing these around on the web).

Been a while since I played with an LM311 though...
 

sda

Active Member
Finally had a chance to get back to this. Thanks for the help. Used 15V to supply the LM311, but after I got it to work I put it back to 5V and it also worked. The original circuit wasn't for anything specific, just to get how it works into my thick head. This circuit was the goal. Light on, LED on. Light off, LED off.

lm311.JPG

Trying to do something like this:
http://web.archive.org/web/20060509092108/...nadams.com/pge/
(this is really slow to load)

meterreader.JPG

Uses a laser pointer and detector circuit to count the revs of the rotor disc. Hopefully mine will look better than this. I like this idea better than the readers that use clamp on CTs. There's not a whole lot of room in my panel to be poking around in front of the main breaker, and this should have more accuracy since it counts the actual rotor turns instead of calculating the watts from the current flow. I'll be feeding the output into a 1-wire counter.

There's also this thing:
http://www.powercostmonitor.com/index.php?products_id=3982
$140 plus shipping, no data collection ability, battery powered, big lump on the meter which will attract attention, looks like your meter has a headset, and my meter faces west, so the sun will destroy the transmitter in a year or two.
 

ckindt

Member
What are you going to do when your power company updates the meter? :) Mine just swapped out my old mechanical style with a new digital kWh meter. No more wheels to count revs on. I think your much better off monitoring the current/voltage with transducers and calculating the power use from the source instead of monitoring the monitor.
 

BraveSirRobbin

Moderator
Monitoring the current would indeed be the ultimate measurement, but I believe he doesn't want to have to mount anything to the 'front end' of his breaker box (usually requires the power company to come out and disconnect power to do this safely as it is before the overall breaker). Also, this would require connection to an analog to digital interface which he may or may not have.

As far as your circuit, if you connect it and then get some double pulses or it just doesn't seem to be counting correctly, you may want to put in a Schmitt Trigger after the voltage comparator to sharpen the front end rise of the pulse. Also, I've always wondered how this setup would perform with really bright sunlight (i.e. can you adjust the comparator to discern the pulse over the bright background light). I've also wondered if perhaps a "pass band" light filter (in front of the photocell) whose center wavelength matched the laser would help this problem.

Man, this looks like a great project. If only there was more time in a day..... :(
 

hult

Active Member
Monitoring the current would indeed be the ultimate measurement, but I believe he doesn't want to have to mount anything to the 'front end' of his breaker box (usually requires the power company to come out and disconnect power to do this safely as it is before the overall breaker).

Man, this looks like a great project. If only there was more time in a day..... :(

I've designed and begun installing current monitoring on the mains (200 amp 220v) supply, the 50-100 amp load centers in basement, kitchen and 2nd floor, and selected circuits including hardwired lighting.

The/A key to monitoring the main supply at the entrance panel is to use spilt-core (eg clamp-on) current transformers ( CT 's) that don't require turning off the electricity in order to thread the conductor through them.

I have a bunch of extra current transformers and a modest-cost pcb that I designed that I may be ready to share by the end off the year.When I'm done I will have upwards of 50 monitoring points. First step is simply to monitor current amps (I). Next step will be to use the I data to calculate P= VI from voltage and current data many times a second.

Extra parts that I've accumulated will be available at www.ECOntrol.org/porch_sale.htm.

There'll be new web pages to describe the setup beyond what is already at the site including schematics and pcb's with information on how/where to modify them have them made. I made them with Eagle PCB CAD software www.cadsoft.de in sizes small enough that they can be modified with the free version of Eagle CAD. The AVR micontrollers are programmed in BASCOM www.mcselec.com and the code _might_ be small enough to use the freeware version of that too.

... Marc
 

ckindt

Member
all legit points, but what happens when the meter is replaced with an updated one without a wheel to count revs on? Like mine - a digital one with no external moving parts.

As far as the transducer, just install it after your main breaker. There's are no loads between the power company's meter and the homeowner's main breaker (shouldn't be anyway) so you won't miss any current sucking devices.

You are correct in stating the need for an analog input device. Using PLCs affords one to interface analog components and whip up any logic to scale, compare or manipulate otherwise. No intermediate hand-crafted circuits necessary.
 

BraveSirRobbin

Moderator
As far as the transducer, just install it after your main breaker. There's are no loads between the power company's meter and the homeowner's main breaker (shouldn't be anyway) so you won't miss any current sucking devices.
I haven't looked that hard at my breaker panel, but I believe the main breaker is "integral" to the main two busses that feed the rest of the breakers. I don't see how you could get a split core between the main and the breaker panel.

As far as the meter, there is a box next to it, not sure if it has a breaker also, but it is locked out (power company can only access).
 

sda

Active Member
This is a "just for fun" project. When and if Mr. POCO comes and replaces the meter, I'll go with something else.

I decided not to go with CTs because [a] that's what everybody does, a data collection setup would cost more, [c] even split core would be hard to get into my panel, [d] maybe some accuracy issues, and [e] not as much of a "cool" factor.

For the ambient light problem, I plan on putting the photo resistor at the bottom of a 4-6" piece of conduit. That will shield it from normal daylight but the laser will be shining straight down on it.
 
Top