Diesel Generator. Need To Kill If Over Temp...

Thread Starter

NFA Fabrication

Joined Aug 12, 2012
112
I am assuming that there is a very simple solution to this. A friend of mine has a diesel generator that he wants to add something to that will shut it off if it gets to a temp over it's normal operating range.

What I have already is a relay that if activated, will kill the fuel solenoid on the injection pump, and a Chevy temp sensor with a varying resistance output. I figure I will just be making a simple voltage divider with the sensor, and a resistor to make a voltage signal reflecting temperature.

So what it comes down to, is that I need to make a circuit that will activate a relay when a certain voltage input is reached. I am pretty limited as I am new to electronics, but I put together a way to make it work, but it is based on an LM3914, and I was just going to use one of the LED outputs that activated at the voltage I wanted, to operate a transistor to drive the relay. It would probably work, but is probably the wrong way to do it, as I am still pretty limited, but learning by the day! Thanks for any ideas!
 

wayneh

Joined Sep 9, 2010
17,496
... I put together a way to make it work, but it is based on an LM3914, and I was just going to use one of the LED outputs that activated at the voltage I wanted, to operate a transistor to drive the relay.
That's not a bad approach, although it's overkill. A single comparator (instead of 10, and the other circuitry in that IC) would do the job.

That said, using the LM3914 allows you to add indicator lights to actually show the temperature before the tripping point is reached. You could use the ubiquitous LM339 quad comparator to get 4 levels.
 

Thread Starter

NFA Fabrication

Joined Aug 12, 2012
112
Do you know the resistance of the temp sensor at the trip temperature?
Here is a reference chart:



I am assuming my cut-off is going to be around 200F - 210F. Lets just say 180 Ohms would be the desired cut-off.

That's not a bad approach, although it's overkill. A single comparator (instead of 10, and the other circuitry in that IC) would do the job.

That said, using the LM3914 allows you to add indicator lights to actually show the temperature before the tripping point is reached. You could use the ubiquitous LM339 quad comparator to get 4 levels.
My electronics knowledge base is pretty limited so far, so I am kind of using the "Building Blocks" that I am familiar with. I do like your "Temp Display" idea however! I will look into that LM339.
 
Last edited:

wayneh

Joined Sep 9, 2010
17,496
After reading up on the LM339, it sounds like the obvious and simple solution to my project. Thanks!
The biggest trap for anyone new to a comparator is that the "high" output is simply "open". You need an external resistor to pull the output high. The comparator completes a path to ground when it goes low, and that path cannot sink more than about 5mA of current. Not much, but enough for an indicator LED.
 

Thread Starter

NFA Fabrication

Joined Aug 12, 2012
112
The biggest trap for anyone new to a comparator is that the "high" output is simply "open". You need an external resistor to pull the output high. The comparator completes a path to ground when it goes low, and that path cannot sink more than about 5mA of current. Not much, but enough for an indicator LED.
Good to know. I will be driving a relay, so I figure I'll use 2 resistors off of the 339 output (a 1K from the output to trigger a 2n2907, a maybe a 10K from the output to +). And then a protection 4001 diode on the 2n2907 output since it will be driving a relay. Now that brings me to a question, being that the 2907 is PNP, how do I install the protection diode? I have installed them on 2222's like this:



But obviously that wont work on a PNP. How do I alter the installation of the protection diode for a PNP? I could use the 2907 to drive a 2222 and then install the diode as above, but I am assuming there is a way to get the diode on a 2907.
 

Sensacell

Joined Jun 19, 2012
3,432
Diesel Generators are nasty in terms of heat, vibration, gunk, etc.
The hardest piece of this project will be resolving the mounting problems for the delicate electronics.

Keep it simple- bolt a mechanical thermostatic switch to the cylinder head and call it a day.
 

Thread Starter

NFA Fabrication

Joined Aug 12, 2012
112
Diesel Generators are nasty in terms of heat, vibration, gunk, etc.
The hardest piece of this project will be resolving the mounting problems for the delicate electronics.

Keep it simple- bolt a mechanical thermostatic switch to the cylinder head and call it a day.
Understandable, but the system does not have to be mounted on the unit. It is a very large unit, not a portable generator. It is basically running a temporary housing situation for a friend that is currently having a new home built. Plus it's more fun to make a ridiculously over engineered solution to a simple problem;).
 

wayneh

Joined Sep 9, 2010
17,496
... I figure I'll use 2 resistors off of the 339 output (a 1K from the output to trigger a 2n2907, a maybe a 10K from the output to +).
I'm not so sure that will allow the transistor to turn off. If there's much base current at all, there will be a voltage drop across the 10K and the base voltage will never return to V+. A single resistor of about 3.3K is the usual way to pull up the output.
 

Thread Starter

NFA Fabrication

Joined Aug 12, 2012
112
I'm not so sure that will allow the transistor to turn off. If there's much base current at all, there will be a voltage drop across the 10K and the base voltage will never return to V+. A single resistor of about 3.3K is the usual way to pull up the output.
Thanks, I was wondering about that. I kinda pulled that value out of my A&*. I just didn't want to make it too low and put too much strain on the 339's output. I know that the 339's output is very low current handling (Like 2ma or something I read?).
 

MikeML

Joined Oct 2, 2009
5,444
Here is my proposed solution. With the pot centered, the relay pulls in when the sensor resistance reaches 184.57 Ω (heating), and then drops out when it reaches 187 Ω (cooling). I provide enough hysteresis to prevent the relay from chattering as the sensor heats or cools. The Pot will allow you to move the trip point a few degrees +-.

In the simulation, the green trace I(L1) is current through the relay, showing when it is pulled-in. The red trace V(i)/I(R2) is the resistance of the sensor. LTSpice lets you do arbitrary waveform arithmetic, R= E/I. I plotted that expression so we could see the resistance value at which the circuit trips.

The independent variable of the simulation (X-axis) is time. LTSpice provides a tricky method of making a resistor a function of a node voltage V(s), which in turn is a linear function of voltage V1 0r V(s).

I have not built this circuit, but it should work as described. If you build it, please provide some feedback.
 

Attachments

mlog

Joined Feb 11, 2012
276
I have a few items that you might want to think about. Maybe you already have the answers, but it seems like everyone is diving into designing the circuit. That's no surprise since everyone here is so helpful.

  • Time Response. I didn't see anything about the required time response of the temperature sensor or the actuator circuit. Does this sensing system need to work in seconds or milliseconds?
  • What temperature is being sensed? Is it exhaust gas temperature, manifold temperature, heat exchanger water temperature, engine skin temperature, or something else? This can affect the choice of the sensor, placement and method of attachment of the sensor, and the time response (see above).
  • Reliability and Criticality. Do you care about false trips? What about a failed sensor? Is it critical if the sensor fails and you aren't aware of it? If it does fail, then what do you want to do? Do you want to shut down the engine or trigger an alarm? (Circuit redundancy can affect reliability and mitigate criticality.)
  • Accuracy. Does it matter? If so, what is needed?
  • Environment. Think about exposure to the elements. Rain, sun, ambient temperature, humidity, etc. This can affect response, accuracy, and reliability.
 

Dodgydave

Joined Jun 22, 2012
11,285
Last edited:

Thread Starter

NFA Fabrication

Joined Aug 12, 2012
112
Here is my proposed solution. With the pot centered, the relay pulls in when the sensor resistance reaches 184.57 Ω (heating), and then drops out when it reaches 187 Ω (cooling). I provide enough hysteresis to prevent the relay from chattering as the sensor heats or cools. The Pot will allow you to move the trip point a few degrees +-.

In the simulation, the green trace I(L1) is current through the relay, showing when it is pulled-in. The red trace V(i)/I(R2) is the resistance of the sensor. LTSpice lets you do arbitrary waveform arithmetic, R= E/I. I plotted that expression so we could see the resistance value at which the circuit trips.

The independent variable of the simulation (X-axis) is time. LTSpice provides a tricky method of making a resistor a function of a node voltage V(s), which in turn is a linear function of voltage V1 0r V(s).

I have not built this circuit, but it should work as described. If you build it, please provide some feedback.
I will be going over your schematic more when I get a few minutes as I am sure you are better at this than I. I came up with this last night, but got stuck at trying to figure out a protection diode for the 2n2907 to control the relay. I have used 4001's after 2n2222's, but that obviously won't work for a PNP. Also, I hadn't chosen a bias resistor for the temp. sensor yet, but that will be easy. The hysteresis is the main thing I am missing, and I can see that being an issue. My initial plan was to put a capacitor on the trigger of the 2N2907 to buffer it's output. (I just edited this pic to add a protection diode as I found a similar circuit with it set up like this)



I have a few items that you might want to think about. Maybe you already have the answers, but it seems like everyone is diving into designing the circuit. That's no surprise since everyone here is so helpful.

  • Time Response. I didn't see anything about the required time response of the temperature sensor or the actuator circuit. Does this sensing system need to work in seconds or milliseconds?
  • What temperature is being sensed? Is it exhaust gas temperature, manifold temperature, heat exchanger water temperature, engine skin temperature, or something else? This can affect the choice of the sensor, placement and method of attachment of the sensor, and the time response (see above).
  • Reliability and Criticality. Do you care about false trips? What about a failed sensor? Is it critical if the sensor fails and you aren't aware of it? If it does fail, then what do you want to do? Do you want to shut down the engine or trigger an alarm? (Circuit redundancy can affect reliability and mitigate criticality.)
  • Accuracy. Does it matter? If so, what is needed?
  • Environment. Think about exposure to the elements. Rain, sun, ambient temperature, humidity, etc. This can affect response, accuracy, and reliability.
It is going to be monitoring the cooling system (Temp sensor in the coolant). The sensor I am using is very reliable, and I was going to seal up the circuit very well, and will likely encase it in resin, as I don't see why It would generate much heat. It only needs to activate for a second or 2 to kill the motor, as it will kill fuel supply right at the pump, just like on a diesel car. I like these sensors because they use a common 3/8" NPT pipe thread. so they are easy to adapt into all kinds of things, are cheap, and extremely reliable. I will probably make a test button on the unit that will simulate an overheating resistance, to check that the relay circuit activates.

At that temperature you will need a Thermocouple as a thermistors only go to 150C

here is a circuit that uses a thermocouple up to 1000F
http://www.discovercircuits.com/DJ-Circuits/temprelay1.htm

if you lower the value of the 820K resistor you can get the set volts to 2,7mV
or better still put the output of the thermocouple into a X10 gain op amp and it should work,


datasheet http://www.ti.com/lit/ds/symlink/lm193-n.pdf
This is actually a GM coolant sensor, it is great in applications like this for the reasons I mentioned above. It works great in the temp range I need.
 
Last edited:

Thread Starter

NFA Fabrication

Joined Aug 12, 2012
112
Here is my proposed solution. With the pot centered, the relay pulls in when the sensor resistance reaches 184.57 Ω (heating), and then drops out when it reaches 187 Ω (cooling). I provide enough hysteresis to prevent the relay from chattering as the sensor heats or cools. The Pot will allow you to move the trip point a few degrees +-.

In the simulation, the green trace I(L1) is current through the relay, showing when it is pulled-in. The red trace V(i)/I(R2) is the resistance of the sensor. LTSpice lets you do arbitrary waveform arithmetic, R= E/I. I plotted that expression so we could see the resistance value at which the circuit trips.

The independent variable of the simulation (X-axis) is time. LTSpice provides a tricky method of making a resistor a function of a node voltage V(s), which in turn is a linear function of voltage V1 0r V(s).

I have not built this circuit, but it should work as described. If you build it, please provide some feedback.
I spent some time looking at you schematic now, and got very confused as it all seemed backwards (My fault, not yours!). I was operating with the idea of the 339 output going low, and not high, and hadn't really considered that it can be done both ways. I learned another new thing tonight! Now that I made sense of that, I can inspect the rest, and take some que's from it (Or possibly abandon my whole plan, and steal yours, lol!)
 

wayneh

Joined Sep 9, 2010
17,496
I was operating with the idea of the 339 output going low, and not high, and hadn't really considered that it can be done both ways.
No, you had it right. That's the role of R7 in Mike's schematic. The comparator can pull the transistor base low despite R7. When the comparator goes high, R7 ensures that the base goes high.
 

MikeML

Joined Oct 2, 2009
5,444
No, you had it right. That's the role of R7 in Mike's schematic. The comparator can pull the transistor base low despite R7. When the comparator goes high, R7 ensures that the base goes high.
I was trying to make a circuit where the relay comes on only if an overheat is detected. To shut the engine off, you would use the relay's normally closed contacts.

The LM339 is diverting the base current of the switching transistor to ground while the temperature is normal, so no current flows in the collector/relay. When the 339 output shuts off, the voltage at the base only rises to about ~900mV, but all of the current that R7 can supply with ~12V across it goes into the base of the transistor, turning it on hard. The 900mV delta at the base is also the source of the positive feedback to accomplish the hysteresis. Look at the plots below. V(base) light blue shows what is going on.

I also plotted the voltage across the sensor V(i) red trace (also the 339 inverting input) and V(n) green trace, which shows the effect of the positive feedback from V(base) to create the hysteresis.
 

Attachments

Last edited:
Top