low voltage relay trigger

wayneh

Joined Sep 9, 2010
17,498
First, one detail. As drawn the LED will never light. The LED needs to be connected to +12V so that the comparator lights it when it pulls the output to ground. There is no output when the comparator goes "high". So the present logic will turn the LED off when the input voltage becomes high enough. If you want to change that, reverse the inputs at the comparator so that the output goes low - lighting the LED - when the voltage on the inverting input is high enough.

Your input signal may not be what you though it was. The 2.2V at the peak detector proves that. How did you determine the voltages you initially posted, probably a DMM set to measure DC voltage? Do you have any information on your receiver that might help sort that out?

In the meanwhile you can make sure the rest of your system is working by applying known voltages as your signal. Maybe you have a solar cell lying around? You could test that the LED comes on when the solar cell voltage reaches the right level, about 12v x 10/110 = 1.1V reference + 0.6V diode drop = 1.7V.
 

Thread Starter

ssnaples

Joined Jul 14, 2012
40
ok, so i am a bit confused as to how the comparator is functioning. I thought that the basic principal was that if IN+ is greater than IN-, then the comparator will have 12V coming out of the OUT pin. Does this function by closing the circuit via ground? Why is the comparator supplied with 12 volts then ?

I have rearranged the circuit as you suggested by reversing the LED (ground goes to comparator and positive to 12V rail) I think that was what you were suggesting. The LED lights now only if i disconnect the IN-.

I am still very confused as to what is happening with the peak detector. I have attached an image with all of the measured voltages using my DMM. I am getting an input signal that pulses from 0.00V to 0.78V and after the peak detector it pulses from 1.40v to 2.85v. how is this possible? I thought the purpose of the peak detector was merely to maintain the peak? I am using a IN4001 Micromini silicon diode and a 10uf Electrolytic Capacitor in series with a 100k resistor.

When triggered, the input voltage pulses from 0.4v to 1.4v. After the peak detector I am reading 3.0v to 3.14v.

I have not had an opportunity to test the circuit with another regulated power source. Maybe I will have some time later this afternoon

Any thoughts as to what I am doing wrong? I am really trying to understand this, but it is just not making sense to me. Please see the attached image for measured voltages.
 

Attachments

Thread Starter

ssnaples

Joined Jul 14, 2012
40
So I worked on this circuit quite a bit over the weekend and have something that is working, although I need iron out a few things. I wound up placing the opamp at the beginning of the circuit to increase the voltage to something that I could work with (I think the low voltage from the input signal was dropping out). With the new setup the LED (to be replaced by the motor signal) comes on when the input signal exceeds 10.6v. So a couple of questions:

1. The voltage after the peak detector is still bouncing around quite a bit. Is this working the way it should, or should this voltage be constant? If so, what do I need to change? I tried a larger capacitor/different size resistors.

2. I have an supply voltage of around 12.37v (this is not constant since the battery will be inside a boat and the various loads on the battery can change that). I need to make this voltage as close to 12V as possible in order for the trigger to work. The trigger voltage at the comparator has to be exactly 10.6V. At present, I am using a DC power supply with a voltage regulator to accomplish this. If the supply voltage goes above/below this amount the trigger value will change and the circuit may not function properly. How do I go about creating this steady voltage of 12V and what is the best way to lower the voltage to 10.6v and have it stay there?

I hope this makes sense. If you need more information from me, please let me know. Thanks again for all the help. I feel like it just needs a bit more tweaking.
 

Thread Starter

ssnaples

Joined Jul 14, 2012
40
So I have been working on this circuit for a while now and have something that is working... well not working the way it should, but working. Please bear with me as this is my first circuit and my first schematic. I have attached both the breadboard layout and schematic. The schematic came after the breadboard which is kinda backwards, but this worked for me.

So here is what I finally came up with: I used a 10v fixed regulator (to make sure that I have a consistent power supply for the comparator), a peak detector, a comparator, to a transistor, and finally a relay. It works, but not quite the way I would like it to. The problem I am having is that the relay chatters open/close when the motor starts to turn. If I isolate the motor to a separate battery, it works fine. Any thoughts as to what I am doing wrong?

Please go easy on me. I have done a lot of research, but just can't wrap my head around what is not working. Any help is greatly appreciated. Images attached.
 

Attachments

wayneh

Joined Sep 9, 2010
17,498
Chatter is a common problem that can be tricky to fix.

A wire that isn't thick enough to carry the motor current will have a voltage across it. This apples to the ground wires as well, and a shifting ground messes up a comparator's reference, Try adding extra wires to see if it helps.

A comparator without added hysteresis (small positive feedback) is another problem. Noise of just a few millivolts will change the state of the comparator. Your 339 has none. I'd start there. Also, your LM339 needs a pull-up resistor to V+ on the output. The 339 can only go low, to sink current, or "open", It doesn't really go high and needs the resistor to do that.
 

Thread Starter

ssnaples

Joined Jul 14, 2012
40
Thanks for the quick reply. As you can tell I am working hard and am dedicated to figuring this out. What seems simple for most of you in these forums is a lot to wrap your head around for a novice like me. I think I understand what you are saying and have updated the schematic (See attached). Can you take a look and see if I got everything in the correct place? Thanks again for your help!
 

Attachments

wayneh

Joined Sep 9, 2010
17,498
The LM339 circuit is looking better. I usually use a larger pull-up (3.3k is in the datasheet, I think) and a larger hysteresis of maybe 1M, but I think the values you show will work.

I'm wondering why the LM324 circuit is even there. You could could do it all, IMHO, with just one comparator but at worst you could use two of the LM339's comparators and completely eliminate the op-amp.

That LED will only flash briefly until the capacitor charges. That's fine, and maybe exactly what you had in mind. I'm just sayin'.
 
Top