Converting a 2-6 Hz pull down signal into a straight line

Hello,

I have that 2 -6 Hz HIGH to LOW blinking signal out of the drain pin of an N channel resistor(that pulls stuff down) and would like to convert it into a straight LOW or HIGH signal to be connected to another mosfet to turn a device off or on without using an arduino and as little components as possible and as little power consumption as possible.

That's the logic I've settled on so far with an attiny85 using one pin as input and one pin as output.

every time the pin goes low the output gets LOW and once 4 seconds after the input went HIGH again are over the output goes back to be HIGH

long Timer = 0;

bool OutState = 0, LOutState;

void setup() {
  
  pinMode(0, INPUT_PULLUP);
  pinMode(1, OUTPUT);
  digitalWrite(1, LOW);
  
}

void loop() {

 static bool State = digitalRead(0);

 if(State == 0){

    Timer = millis();
    OutState = 0;
 }

 else if(millis() - Timer >= 4000){

  OutState = 1;
 }
    
  if(OutState != LOutState){

    digitalWrite(1, OutState);
    LOutState = OutState;
    
  }


}

I don't understand you, your statements seem contradicting. You seem to have a LOW/High-impedance signal, not a LOW/HIGH signal. Add a pullup, then you have LOW/HIGH

Can you draw a diagram of the parts of the circuit you have?

It appears that there is several ways to read your post and understand what you are looking to accomplish with what signal.

I took it you were looking for a comparator or schmitt trigger.

Well guy's I'm basically trying to take a signal from the drain pin of another system and smooth it to a straight line when for example the signal is 4Hz an output will go LOW when starts and when it stops blinking / beeping the output simply goes back low again.

MikeLemon:
Well guy's I'm basically trying to take a signal from the drain pin of another system and smooth it to a straight line when for example the signal is 4Hz an output will go LOW when starts and when it stops blinking / beeping the output simply goes back low again.

When does it go HIGH?

Please draw a graph/diagram of the 4Hz signal starting and stopping, and show in that diagram what you want the output to do.
Draw. photograph and post, thanks.

Tom.. :slight_smile:

TomGeorge:
When does it go HIGH?

Please draw a graph/diagram of the 4Hz signal starting and stopping, and show in that diagram what you want the output to do.
Draw. photograph and post, thanks.

Tom.. :slight_smile:

Not sure how to draw it but I'll describe it.

There is a lipo battery cell monitoring system that triggers when ever a low cell voltage had been detected.

Now that triggering is coming in a form of beeping at around 2-6Hz from the drain pin of a N channel mosftet that has it's source pin connected to ground meaning it sinks the load low every time it is activated(and again it does that in 2-6Hz when triggered)

Now I want to shut off an external different system continuously when that triggers and turn it back on after it stops(Assuming you just need a mosfter for that)

So in order to do that I'm looking for a way to turn this 2-6Hz square wave into a DC LOW and DC HIGH after it stops with the simplest solution.

Thanks for helping.

Hi,
Something like this;

Tom... :slight_smile:

It's starting to make more sense now. How accessible is the circuit, particularly the source pin of that mosfet? What is the amplitude of the signal?

Perhaps using a arduino of whatever flavor you have with debouncing just slightly slower than the frequency of the signal could give you something simple to work with.

TomGeorge:
Hi,
Something like this;

Tom... :slight_smile:

Yes exactly that do you have a solution without using a MCU?

tinman13kup:
It's starting to make more sense now. How accessible is the circuit, particularly the source pin of that mosfet? What is the amplitude of the signal?

Perhaps using a arduino of whatever flavor you have with debouncing just slightly slower than the frequency of the signal could give you something simple to work with.

That's what I've done but I don't wanna relay on software to do that do I'm trying to do it without any MCUs

A retriggerable multivibrator should work.
There will be some lag.

.

larryd:
A retriggerable multivibrator should work.
There will be some lag.

.

Some delay is fine do you have any examples for some simple a cheap circuits? along with how would you calculator the values of the components?

A simple monostable 555 timer based IC would work with the circuit below:

I've used the android app electrodroid to calculate the pulse time required.

Look at the 74HC123 or 555 missing pulse detector.

http://www.falstad.com/circuit/e-555missing.html

larryd:
Look at the 74HC123 or 555 missing pulse detector.

http://www.ti.com/lit/an/sdla006a/sdla006a.pdf

555 Missing Pulse Detector

Yeah the 555 one work well but is it there a way to invert the output of the 555 so it will be normally ON and when a pulse triggers it it goes high without adding any component just rewiring?

but is it there a way to invert the output of the 555

Yes just send it through a transistor.

Grumpy_Mike:
Yes just send it through a transistor.

MikeLemon:
Yeah the 555 one work well but is it there a way to invert the output of the 555 so it will be normally ON and when a pulse triggers it it goes high without adding any component just rewiring?

Then make the second mosfet a p-channel. You never said exactly what you are trying to do with this signal.

without adding any component just rewiring?

In which case the answer is no.

What is wrong with extra wiring anyway? In electronics to do stuff you need stuff. You don't have a God given right to make the function you want with the number of components you arbitrary choose. Grow up.