Go Down

Topic: Looking for a 'customized' Pulse Timer Relay and/or circuit (Read 1 time) previous topic - next topic

LockDots

I'm trying to find a relay (perhaps a pulse-timer relay) that energizes a relay's coil upon activation but does NOT begin to "count down" until after the trigger signal is removed. Does anyone know of a relay or circuit that does that or how to modify an existing pulse-timer relay to do so?

Most PTR's I'm finding will energize a coil and start counting down at the same time. The problem with this is that if my trigger lasts 10 seconds but the PTR is set for 2 seconds, the relay coil will only energize for 2 seconds despite the 10 second trigger. Once the trigger is removed nothing happens since the PTR is waiting for a new trigger signal.

Conversely, if I take a negative trigger and go directly to the 555 timer's trigger pin with a 10 second trigger, the relay will energize for the duration of the trigger but de-energizes upon removal of the trigger. In other words, I "lose" the count down.

I've built a circuit for an automotive application. To avoid having the circuit powered for a constant power line, I would like to use a custom PTR to provide power from the vehicle's 'constant' wire to the circuit upon being triggered from the vehicle's ignition or accessory power, and to stay on for a while after the ign/acc is removed. I hope that makes sense.

robtillaart

something like this (partial code, will not run)

Code: [Select]

unsigned long countdown = 2000;
unsigned long start = 0;

void loop()
{
  if (digitalRead(TRIGGERPIN) == HIGH)
  {
    digitalWrite(RELAYPIN, HIGH);
  }
  else  // trigger == low
  {
    if (start == 0 && digitalRead(RELAYPIN) == HIGH)  // only when relay has started
    {
      start = millis();  // remember the time the trigger went low
    }
  }


  if (millis() - start > countdown)  // wait until countdown has passed
  {
    digitalWrite(RELAYPIN, LOW);
    start = 0;                           // reset
  }
}


 
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

LockDots

Mind explaining how this works? It seems I would need a microcontroller powered constantly to run this, no?

robtillaart

Quote
no?

yes!

Think even the smallest arduino (tiny85 ?) can do this.

To understand the algorithm, follow it with paper and pencil and write out what happens in  ACTION -> EFFECT lines.

0) start and do nothing  -> relay switches off (no state change)
1) press trigger -> relay switches on
2) ...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

LockDots

I guess I should have specified better. I would like to avoid having to power  a microcontroller to avoid a current draw. This is the reason I'm using a trigger to energize a relay that provides power to the microcontroller. Once the trigger (that powers the microcontroller via a relay) goes away, the relay should stay on for a duration of time continuing to power to microcontroller until the relay times out.

robtillaart

add a capacitor that can hold the relay for some time ...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

LockDots


add a capacitor that can hold the relay for some time ...


You know, as an EE major you'd think I would have thought of that lol. What a great idea. This is what happens when we try to over complicate things. I'll definitely give it a try. Thanks Rob!

robtillaart

quick google -> http://forum.allaboutcircuits.com/showthread.php?t=16210

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

LockDots

#8
Jan 21, 2013, 11:17 pm Last Edit: Jan 27, 2013, 03:43 am by LockDots Reason: 1
quick google -> http://forum.allaboutcircuits. com/showthread.php?t=16210



Thanks again for the help Rob.

I just wired up a reed relay with a coil resistance of 1050 ohms and a 1000uF electrolitic capacitor across the coil. Pulsing the coil with power and ground keeps it energized for about 2 seconds. Being that this is a reed relay and I'm planning to use it in an automotive application I'd rather use a standard Bosch style relay. Thanks to you and the link you provided I ended up finding this which incorporates just that.

http://www.the12volt.com/relays/page5.asp

Go Up