Timer Circuit Problem

mik3

Joined Feb 4, 2008
4,843
Yeah I have the resistor from pin 2 to positive. Looks like 9.3v at pin 2 when I hook the battery up.
If you are using a 9V battery the voltage at pin 2 should be 4.5V. This means that you don't have a 10K resistor in parallel with the capacitor.
 

Gearhead

Joined May 4, 2009
4
At the riskof getting into a can of worms...

What are you trying to do with this motor? Open and close a baffle or gate to allow cooling air (or heating air) into a system?

There are other ways to do temperature regulation, -if you have the flexibility. Making a DC motor go forwards and backwards is not so easy, since it requires either a second power supply or a set of 4 switches called an "H bridge."

Regarding the 555. It is the IC that got me into electronics, a noble chip. It is a little complex, and understanding the functions of all the pins, will pay off handsomely. Here's a subset.

Pin 2 and pin 6 are connected to comparators. That means they are comparing the voltage (on pin 2 for example) to a voltage that is internally produced. In the case of pin 2, it's 1/3 of the voltage on pin 8, the "Vcc" pin. (It is where you apply + power. Pin 1, is ground, where - power goes.)

The output of the comparator does something useful. In the case of pin 2 it is applied to an internal Flipflop, which makes pin 3 go high, but only when pin 2 is pulled *below* 1/3 of the powersupply voltage.

When Pin 2 goes low, it "sets" the flipflop and the output. Even if you pulse it low momentarily, pin 3 goes "high" and stays high.

What then makes pin 3 go low? It would be pin 6, the "Threshold" pin. When pin 6 goes above 2/3 of Vcc, the comparator output "resets" the flipflop, and pin 3 is forced low again. (If pin 6 never reaches 2/3 Vcc, then pin 3 stays high indefinitely!)

Pin 6 can go high because of the timing RC applied to pins 6&7. Pin 7 is "Discharge" and is held low, whenever pin 3 is low, the capacitor C is discharged. When pin 2 is triggered, pin 7 goes "open circuit" and the capacitor is free to charge. When it reaches 2/3 Vcc, pin 3 is forced low (ending the pulse) and pin 7 becomes active again, and quickly discharges the capacitor.

What if pin 6 is forced high AND pin 2 is held low? That doesn't usually happen, (if the circuit is designed right!).

According to the Art Of Electronics schematic for this chip, the FF is held high by pin 2, pin 3 the output is also held high, and pin 7 is inactive. So the capacitor will charge up past 2/3 Vcc. -When the trigger is pulled above 1/3 Vcc, then the output goes low (pin 6 is already above 2/3 of Vcc) and pin 7 discharges as before.

Finding a good schematic for this chip can be a problem.

So, to trigger pin 2 only momentarily, you want to connect a discharged capacitor to it (which pulls it low) then, that capacitor will charge to above 1/3 Vcc -even if the switch is still closed. If the switch opens, the capacitor should discharge itself completely.

To do this you need two equal resistors, a switch and a capacitor.

Draw the following circuit, and then build it.
Connect one resistor from +Vcc to pin 2
Connect the 2nd resistor to ground and to one side of the switch
Connect the other side of the switch to pin 2.
Connect the capacitor in parallel with the 2nd resistor, that is between the switch and ground.

Note the polarity on the capacitor if it is tantalum or electrolytic. The "-" should go to ground, the "+" to the switch.

So she circuit shows that pin 2 will be at +9V with the switch open and
at 4.5 volts with the switch closed.

If the switch is open, the the capacitor will discharge.

If the switch is closed, then the discharged capacitor will initially pull pin 2 to ground, but it will charge to Vcc/2.

The time it takes to do that is "the RC time". You want R*C to be less than the timer pulse. For you that is ~1000 millisec, so 10-100 msec would be a good choice.

Thus if C is 1 uF (10^-6 F) the two resistors should be 20-100K each.
If C is 10 uF (10*10^-6 F) the resistors should be 2K-50K each.

The RC timing is not very critical, it should not bee too short (i.e. not <<50 ms, switches "bounce") and it should not be too close to 1000 ms. 100-200 ms is best for this sort of thing.

The resistors should not be too big either. More than 100K is probably too big. (Leakage) Less than 1K is probably too small. (wastes power) 10K-50K is nice. Hope you have a cap that is about the right size!

You can, and should, experiment to see why this advice is given.

Hang in there!
 

Thread Starter

kauffjd3

Joined May 3, 2009
15
Thanks guys!

My issue comes with the trigger being on all the time. With the thermostat it is either going to be below 60 or above 60. The two outputs will be ran to a 556 dual timer chip.

But I only want it to trigger the first time. No sense to open the gate again if its already open.

Let me draw up the logic behind it tonight and post it and see if you guys can help me build the circuit.

Thanks again I really appreciate your time!
 
Last edited:

Gearhead

Joined May 4, 2009
4
kauffjd3,

Again, what is it you want to do? Regulate temperature? There are easier ways to it than opening baffles with DC motors. And you want 60 deg? Is that deg F or deg C? -As was pointed out this makes a big difference.

Is is possible to charge ahead "with a little knowledge" in electronics, but you can end up with a bad design, where you must compensate for bad choices of approach, or parts, made early on.

Working around these added artificial constraints as well as the "regular ones" is no fun.

Run the fan continuously and add heat as needed. That is much simpler.
 

Gearhead

Joined May 4, 2009
4
Kauffjd3,

Well, now the problem is somewhat clearer.
1) It's F not C.
2) It's not clear how you will regulate the temperature DOWN with a motor. but it can be done. Generally this requires a refrigeration unit or a peltier unit. These are not mentioned...

If it is cold outside, you could open a baffle, letting in *COLD* air. (-I did exactly this at the *South Pole* with one piece of equipment, but that approach surely is a rarity....)

3) To heat, you could just shut the baffle, by turning the motor the other way. Ambient (~70F) will warm it....

4) You only want the motor ON for a second.

5) The motor is 12VDC and the supply is 12VDC. So you have to reverse the polarity applied to the motor somehow. (The +12V supply shown is *implied* as the power source for the motor, though the connections are not shown.)

Aside: 5) and 4) are really the heart of the problem, but it is sort of artificial, that is, -it looks like a homework problem. Is it?

I don't think we are supposed to solve these for you, but the answer is YES it can be done. The details matter a lot. Building a circuit that can handle an Amp (1.0 amps) or several amps at 12 V is more involved than a small 12 V motor that can run on 20 mA.

6) Notice that your "control signal" comes via 2 lines. This may be useful, but it it not necessary. The implied choice is that each line goes HIGH when the logic statement next to it is TRUE, and it is LOW, when that statement is FALSE. So each line by itself carries all the temperature info you need.

So you have to figure out 6) as well, how to use either 1 or 2 logic lines to trigger your polarity reversal and to trigger your timing pulse generator as well.

It can be done, with either approach, but it's not very pretty either way, and the whole problem is a bit involved. That is what makes it a good learning/teaching example. You have to decide among competing issues.

If you also have to build it and demo it, then parts availability (!) and how much current you have to provide to the motor become real issues.

Please note that moderate sized DC motors with commutators can make a good bit of RF/EMF interference, with delicate circuits. A simple magnetic buzzer/doorbell can easily generate 200V spikes when connected to a small ~6V supply. -Ask me how I know!

Having to "demo" this with a "thumb sized" motor is much easier.... You'd be demonstrating the control principles involved, without actually having to build a working, functional, debugged, unit.
 

Thread Starter

kauffjd3

Joined May 3, 2009
15
Kauffjd3,

Well, now the problem is somewhat clearer.
1) It's F not C.
2) It's not clear how you will regulate the temperature DOWN with a motor. but it can be done. Generally this requires a refrigeration unit or a peltier unit. These are not mentioned...

I'm not regulating the temperature. I am just opening a flap to let air in.

If it is cold outside, you could open a baffle, letting in *COLD* air. (-I did exactly this at the *South Pole* with one piece of equipment, but that approach surely is a rarity....)

3) To heat, you could just shut the baffle, by turning the motor the other way. Ambient (~70F) will warm it....

When or if the temperature is reached the flap closes.

4) You only want the motor ON for a second.

Yes, only takes approx a second to open. However I would like to see a knob on it to adjust the timer.

5) The motor is 12VDC and the supply is 12VDC. So you have to reverse the polarity applied to the motor somehow. (The +12V supply shown is *implied* as the power source for the motor, though the connections are not shown.)

Aside: 5) and 4) are really the heart of the problem, but it is sort of artificial, that is, -it looks like a homework problem. Is it?

LOL. No its not a school project. I'm a computer programmer and am trying to create this device for my personal usage.

I don't think we are supposed to solve these for you, but the answer is YES it can be done. The details matter a lot. Building a circuit that can handle an Amp (1.0 amps) or several amps at 12 V is more involved than a small 12 V motor that can run on 20 mA.

I'm lost..

6) Notice that your "control signal" comes via 2 lines. This may be useful, but it it not necessary. The implied choice is that each line goes HIGH when the logic statement next to it is TRUE, and it is LOW, when that statement is FALSE. So each line by itself carries all the temperature info you need.

??


So you have to figure out 6) as well, how to use either 1 or 2 logic lines to trigger your polarity reversal and to trigger your timing pulse generator as well.

It can be done, with either approach, but it's not very pretty either way, and the whole problem is a bit involved. That is what makes it a good learning/teaching example. You have to decide among competing issues.

If you also have to build it and demo it, then parts availability (!) and how much current you have to provide to the motor become real issues.

Please note that moderate sized DC motors with commutators can make a good bit of RF/EMF interference, with delicate circuits. A simple magnetic buzzer/doorbell can easily generate 200V spikes when connected to a small ~6V supply. -Ask me how I know!

Having to "demo" this with a "thumb sized" motor is much easier.... You'd be demonstrating the control principles involved, without actually having to build a working, functional, debugged, unit.
I am using a car power window motor.




So where do we go from here? Would anyone want to build this and document it for me? If so let me know how much and what information you need. I will provide any specs you will need.

Thanks!
 

Gearhead

Joined May 4, 2009
4
Kauffjd3,

OK then!

Polarity reversal can be done (manually) with a DPDT switch (double pole, double throw switch) and a SPST (single pole single throw) switch for ON/OFF.

You can also accomplish this in a more automated way with two DPST relays. (You can also use two DPDT relays, -and just ignore the second set of poles.

You can also use something called an "H Bridge" search for it here or in google, but for big motors like yours, this would be a bit troublesome, as the motor makes inductive kick and has high starting current. Relays are more robust for these sorts of troubles but they too, would do better on AC across the contacts and smaller currents. (The metal gets transferred across the points and pits them.) It will work, but relays are not free, either.

The control logic is as follows: One signal line goes high when "temp is below 60F". The other signal line will be low-correct?

If "temp is above 60F" the first signal line should go low, -but the second line will go high, -right?

This means that "in theory" if you connected a relay across each signal line, you would only turn on ONE relay at a time. You can thus arrange the ARMS on both relays to be connected to +12V and -12V and the output contacts to be connected to the motor. One relay's contacts are arranged to go forward, the other in reverse. The output contacts "in theory" are not closed at the same time so you don't short the 12V supply.

In practice this is not a good thing to try. (What if both relays are closed, -we short the battery!) Instead use a DPDT relay, wire the +12v and -12V to the relay's moving contact arm, and "cross wire" the 4 fixed contacts to provide the polarity reversal. Take the output from those contacts and apply it to the motor. (This configuration will never close both sets of contacts at the same time.)

The relay should "pull in" for one condition, "temp above 60F" and "let go" for the other.

So now you only have to arrange to stop the motor current after 1 second. -But you also have to trigger on both "rising" and "falling" edges if you use *one* of your control/logic/signal lines ("temp above 60F") to generate a *negative going trigger pulse* for the 555. Then the 555 can drive another SPST relay to break the 12V, going to the motor, -after the one second delay. To trigger on rising edges as well, you would invert the pulse using a transistor.

Since you already have two control signals that are differential, (that is, they go in opposite directions as the temperature passes through 60F) one should always be going negative. You don't need to generate the inverted pulse, it is already there.

You make a circuit that uses both signals, but generates a negative going pulse at it's output. You can use diodes as "steering gates" and additional capacitors and resistors to generate a negative going pulse. The resistors set the DC operating point for the circuit, the capacitors apply pulses to them when the control signals switch state. The capacitors pass "AC" pulses to the resistors.

The diodes arrange to pass only the negative (useful) pulse polarity to the trigger (pin 2) of the 555. You have to make sure the capacitors can be triggered repeatedly,i.e. if charged, they must discharge at some point too. This can often be accomplished with an R across the C. You may also need to use some diodes as "clamps" in these sorts of circuits.

I can't really find a good website on "diode gates" or "diode switching" that is illustrative. This is close http://www.allaboutcircuits.com/vol_3/chpt_3/10.html but it is not the whole story.

Looking up "DPDT Switch" I find similar answers to those I have given.
http://forum.allaboutcircuits.com/showthread.php?t=13519

I wish I could (easily) draw and post a schematic. It'd be worth a kiloword or two! The diode steering is a little too much to write about.
 
Top