# Detect 1Hz square wave to operate relay

#### nags14

Joined Apr 26, 2018
13
I have the situation where 12v is either on continuously (or off), or on/off at the rate of once per second.
The 12v is from a car battery.
I want a circuit, to operate a relay that will switch according to whether the 12v is "square waving" or not.
I'm having trouble getting my head round what sort of RC circuit could drive the relay coil (about 270 ohms) to acieve that without resorting to transistors or chips.

#### AlbertHall

Joined Jun 4, 2014
12,293
A 5000μF capacitor would give you about 1.35 seconds T.

An RC time constant calculator will give solutions. There are many on the web.

e.g.:https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-time-constant
This method will also operate the relay when the 12V is continuously on. Also the voltage to the relay will depend on the mark/space ratio of the square wave. That may be OK and may be what you want.
If you want the relay to operate only when a square wave is present but not when the 12V is either always on or off then it is more complicated and will need at least a transistor.

#### click_here

Joined Sep 22, 2020
548
If it's a digital signal, you should be thinking of using a microcontroller with a step down.

12V to 5V

7V : 5V
5k6 : (2k+2k)

Or 5k6 : 3k9 if you want a little margin of error on the input voltage (12V : 4.9V)

You can then look at the rising edge as a start point.

On a PIC the comparator and timer 1 with the "gate" functionality is made for this problem.

#### MrSalts

Joined Apr 2, 2020
2,767
A 5000μF capacitor would give you about 1.35 seconds T.

An RC time constant calculator will give solutions. There are many on the web.

e.g.:https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-time-constant
Since he has three states (on, off and oscillating) and since the OP mentioned he was having trouble solving a specific problem using an RC network - I don't see any useful information in your post. How would your "circuit" differentiate a switching event (0 to 12V constant) vs square-wave oscillating.

#### Ya’akov

Joined Jan 27, 2019
8,505
Since he has three states (on, off and oscillating) and since the OP mentioned he was having trouble solving a specific problem using an RC network - I don't see any useful information in your post. How would your "circuit" differentiate a switching event (0 to 12V constant) vs square-wave oscillating.
I misread the post. I didn't see the differentiation of continuous on and oscillation.

If solid state devices are not available, electromechanical relays would be required.

#### AlbertHall

Joined Jun 4, 2014
12,293
If diodes are allowed it could perhaps be done with a charge pump depending on how many cycles delay are allowed for the relay on and relay off conditions.

#### crutschow

Joined Mar 14, 2008
33,345
Do you want the relay to be on when the 12V is continuous?

How much current can the 12V source supply?

#### MrSalts

Joined Apr 2, 2020
2,767
If diodes are allowed it could perhaps be done with a charge pump depending on how many cycles delay are allowed for the relay on and relay off conditions.
It becomes quite a challenge if no doped silicon can be used.

#### AlbertHall

Joined Jun 4, 2014
12,293
We need more details of the problem from TS (@nags14)

#### MrChips

Joined Oct 2, 2009
29,827
You can try a 555-timer circuit as a retriggerable monostable multivibrator.

#### nags14

Joined Apr 26, 2018
13
If diodes are allowed it could perhaps be done with a charge pump depending on how many cycles delay are allowed for the relay on and relay off conditions.
Yes, diodes are allowed

#### nags14

Joined Apr 26, 2018
13
If diodes are allowed it could perhaps be done with a charge pump depending on how many cycles delay are allowed for the relay on and relay off conditions.
Yes, diodes are allowed
If diodes are allowed it could perhaps be done with a charge pump depending on how many cycles delay are allowed for the relay on and relay off conditions.

#### nags14

Joined Apr 26, 2018
13
It becomes quite a challenge if no doped silicon can be used.
Do you want the relay to be on when the 12V is continuous?

How much current can the 12V source supply?
Preferably relay on when "square waveing", but OK either way.
12v is from a car battery, so regard that as infinite current capability.

#### nags14

Joined Apr 26, 2018
13

#### AlbertHall

Joined Jun 4, 2014
12,293
Something like this, but I don't know how practical it is. The relay voltage gets up to 8.4V in 3 seconds which may be high enough to operate the relay but note that it draws 2.8A pulses of current from the source and will only work if the source pulls the input to 0V not just disconnect the 12V.

#### Attachments

• 1,011 bytes Views: 1

#### AlbertHall

Joined Jun 4, 2014
12,293
What more details do you want to know?
During the 0V part of the pulse, is the 12V just disconnected or is it actively pulled to 0V?
WHat is the minimum pull-in voltage for the relay?

#### nags14

Joined Apr 26, 2018
13
During the 0V part of the pulse, is the 12V just disconnected or is it actively pulled to 0V?
WHat is the minimum pull-in voltage for the relay?
12v is disconnected when off.
Minimum pull-in 10v

#### AlbertHall

Joined Jun 4, 2014
12,293
12v is disconnected when off.
In which case my circuit won't work.