Power on *LED when switch as been closed for x seconds

Thread Starter

TheWireJumper

Joined Dec 20, 2018
6
Hi everyone,

I am currently busy with a UPS for a micro-controller board that I'm working on. Currently what I have functioning is when there is power outage, I am able to switch to battery power and safely shutdown my board. Likewise, I am also able to power on the board when power comes back on. Both situations are triggered by a buffer contact that comes with the UPS.

What I need now is to cater for brown out situations where power might come back on and in a short space of time, go back off again. I need a simple circuit that can be able to monitor if the buffering contact has been closed for a specific amount of time before I initiate the restart of the board. If the contact opens before that time, no restart should happen, and the timing should reset, and wait for next closed switch even.

Thanks in advance
 

dendad

Joined Feb 20, 2016
4,452
I personally would use an Arduino Mini Pro as they can be purchased for about $2 each. Then you have full flexibility as to timing and function just dependent on the program. A 555 or similay would be what I'd have used years ago but no longer.
 

Thread Starter

TheWireJumper

Joined Dec 20, 2018
6
I personally would use an Arduino Mini Pro as they can be purchased for about $2 each. Then you have full flexibility as to timing and function just dependent on the program. A 555 or similay would be what I'd have used years ago but no longer.
Thanks for the reply.

Using an Arduino is actually not going to work for my application. I'm working on a Raspberry Pi which will be used for remote sensing. I don't wish to be using two controller boards. When the power goes out, I safely shutdown my Pi, so when I power it back on I'm using an analog circuit to restart it, which currently includes a 555 timer.

I tried using two 555 timers, with the first one being for the time delay that I need, but it doesn't work according to what I need. The 555 timer will give me the required delay as soon as the switch closes, and will not care whether the switch opened immediately after that.

But thanks again for the advice.
 

AnalogKid

Joined Aug 1, 2013
10,987
Sounds like a variation of a missing pulse detector will work. This can be a simple as one CMOS logic chip and a few R's and C's.
What is the signal coming from the UPS? Voltage, current capability, relay contacts ... ?
What is the circuit output driving? Voltage range, current requirement, a uC input pin, ...?
What is available to power the circuit?

ak
 

Thread Starter

TheWireJumper

Joined Dec 20, 2018
6
Sounds like a variation of a missing pulse detector will work. This can be a simple as one CMOS logic chip and a few R's and C's.
What is the signal coming from the UPS? Voltage, current capability, relay contacts ... ?
What is the circuit output driving? Voltage range, current requirement, a uC input pin, ...?
What is available to power the circuit?

ak
Hi AK

I think you and I are one the same page:).

To answer all your questions:

1. Signal coming from UPS is a relay contact, with ratings 30Vdc 1A (Which I'm currently using as just a normal switch in my circuit, for logic)
2. The UPS is a 24V UPS (PULS QS10- Series) which I send to a DC/DC converter to get a 5V output
3. The output from the converter is powering the Pi as well as my current 555 timer Pi restart circuit.
4. I'm working with 5V and the pi TTL logic of 3.3V
5. I'm currently drawing 0.2 - 0.3 A, which is sufficient.
6. The entire circuit is powered from the DC/DC converter

Thanks
 

Thread Starter

TheWireJumper

Joined Dec 20, 2018
6
Seems like an ATTINY85 could do all this and replace the 555 timers.
Thats an 8 pin part, can be programmed in ASM, C, or Basic (Bascom
Basic) -

https://www.mcselec.com/index.php?Itemid=41&id=14&option=com_content&task=view

Has A/D, and GPIO.

View attachment 167780

Tiny boards dirt cheap -




Regards, Dana.
Hi Dana,

This solution is viable. However I have space limitations when it comes to my PCB design. The final circuit should be a type of proto board that will be mounted on top the Pi. Adding the ATTINY85 to the solution will result in me having to resize my board, which cannot happen. That's why I need a completely analog solution involving basic component.

Hope I'm making sense.

Thanks for the reply and advice,
WireJumper
 

djsfantasi

Joined Apr 11, 2010
9,156
Hi Dana,

This solution is viable. However I have space limitations when it comes to my PCB design. The final circuit should be a type of proto board that will be mounted on top the Pi. Adding the ATTINY85 to the solution will result in me having to resize my board, which cannot happen. That's why I need a completely analog solution involving basic component.

Hope I'm making sense.

Thanks for the reply and advice,
WireJumper
I’m confused. The ATTINY85 uses up the same amount of space as a 555.
 

AnalogKid

Joined Aug 1, 2013
10,987
What is the restart signal polarity?
Rest state voltage =
Restart state voltage =
Is the restart signal a level (it can sit at the restart state continuously during the restart) or must it be a pulse that returns to the rest state after a minimum/ maximum time period?

Depending on the answers, this could reduce to one small transistor and one resistor.

ak
 

Thread Starter

TheWireJumper

Joined Dec 20, 2018
6
What is the restart signal polarity?
Rest state voltage =
Restart state voltage =
Is the restart signal a level (it can sit at the restart state continuously during the restart) or must it be a pulse that returns to the rest state after a minimum/ maximum time period?

Depending on the answers, this could reduce to one small transistor and one resistor.

ak
What is the restart signal polarity?
Rest state voltage =
Restart state voltage =
Is the restart signal a level (it can sit at the restart state continuously during the restart) or must it be a pulse that returns to the rest state after a minimum/ maximum time period?

Depending on the answers, this could reduce to one small transistor and one resistor.

ak
HI AK,

I've set my circuit up such that the restart signal, going to my current 555, is a momentary pulse that sends GPIO3 of the Pi to ground, at a 3.3V level.

The crux is just ensuring that the restart signal is sent only after the contact has been closed for time t, i.e when power has been on for long enough. Otherwise we do not send any signal.

Thanks
 
Top