Maker Pro
Maker Pro

Generating two complementary signals on 12 V supply on/off

dashy1981

Jun 19, 2013
83
Joined
Jun 19, 2013
Messages
83
Looking for simple circuit which monitors 12V power supply signal. 5V is a battery used in the circuit and is always available, while 12V is available from wall adapter.

Here is the truth table:
12V Power | output1 | output2
ON | +5V | 0V
OFF | 0V | +5V
 

John Canon

Jun 1, 2022
91
Joined
Jun 1, 2022
Messages
91
It doesn't get much easier than this: use a relay with a 12 volt dc coil and with DPDT contacts, or even with SPDT contacts. The relay activates with the 12 volt signal, and the contacts send the 5 volts to one output or the other.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Any voltage monitor, from a relay to a microcomputer, has a detection range for good and a detection range for bad. Usually this is simply a voltage level. For example, if the 12 V source might vary by +/-10%, then a comparator with a trip point of 10.8 V will give you a basic present/not present signal.

What trip point do you want?

ak
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
Several ways, how easy do you want it?

How do you want to alert a person? A light? A sound? An email? How complicated is it?
 

dashy1981

Jun 19, 2013
83
Joined
Jun 19, 2013
Messages
83
Ok... Sorry my fault for vague question...Guess I need to be more specific...

I have two Arduino pins to monitor halt and resume function of my program. Both are active low inputs. Whichever pin goes low that function is activated.

Now, by default I need to keep these two pins high... In fact they are pulled high internally by Arduino internal pull-up.

Problem is while detecting 12 v power I need to generate two inverting signals in sync.

While 12 v goes off... I shall only make halt pin low while keeping, Resume pin high.

While 12 v is on... I shall only make resume pin low while halt shall be high.

Also the pins are configured to detect falling edge so thay can be high after signalling is done...

How can I achieve this ?
 

dashy1981

Jun 19, 2013
83
Joined
Jun 19, 2013
Messages
83
Any voltage monitor, from a relay to a microcomputer, has a detection range for good and a detection range for bad. Usually this is simply a voltage level. For example, if the 12 V source might vary by +/-10%, then a comparator with a trip point of 10.8 V will give you a basic present/not present signal.

What trip point do you want?

ak
You mean I don't need relay ... Just updated more details.. pls have a look
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
When the 12 V goes on or off, do you want a pulse at the corresponding input, or a continuous low level as long as the 12 V is in that state?

For continuous (steady-state) signalling, then dividing the 12 V down to 5 V with two resistors will create a signal that is high when the 12 V is on, and low when the 12 V is off.

For the other signal, a 2N7000 small signal MOSFET (plus a drain pull up resistor to 5 V) can be driven directly from the 12 V, and will invert its status. When the gate is 12 V (or anything above 3 V), the drain will be pulled to GND (low). When the 12 V is off, the drain (and the uC input) will be pulled high by the drain resistor.

ak
 

dashy1981

Jun 19, 2013
83
Joined
Jun 19, 2013
Messages
83
When the 12 V goes on or off, do you want a pulse at the corresponding input, or a continuous low level as long as the 12 V is in that state?

For continuous (steady-state) signalling, then dividing the 12 V down to 5 V with two resistors will create a signal that is high when the 12 V is on, and low when the 12 V is off.

For the other signal, a 2N7000 small signal MOSFET (plus a drain pull up resistor to 5 V) can be driven directly from the 12 V, and will invert its status. When the gate is 12 V (or anything above 3 V), the drain will be pulled to GND (low). When the 12 V is off, the drain (and the uC input) will be pulled high by the drain resistor.

ak
I tried steady state signalling but it did not achieve required functionality.

So, I need a low pulse when 12 v goes low/high. Default state shall be high for both the pins.

So when 12 v goes off - hold pin shall receive low pulse... When 12 v goes high - resume pin shall receive a low pulse.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Did it occur to you for even one millisecond that we might need actual information about the pulses?

ak
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
12V power supply signal.

1. Is this the actual 12 V output, or some kind of status signal?

2. How much current can it source and sink?

3. How fast is it? Specifically, are both its rise and fall times less than 1 ms?

4. The resulting pulses might not go all the way down to 0.0 V. What is the maximum low signal voltage allowed?

The issue here is whether or not the "signal" can drive two R-C timer circuits directly, or does it need to be buffered.

ak
 

dashy1981

Jun 19, 2013
83
Joined
Jun 19, 2013
Messages
83
Ok.. here are my answers based on limited knowledge:
1. It's actual output from a 120w, 12v/10a wall adapter power supply.
2. 10a source.
3.Not sure but it's a cheap 12v supply so rise n fall times would not be very good I would say.
4. Not sure what you mean... Final two outputs shall be on 5v/gnd levels of Arduino....
 

CircutScoper

Mar 29, 2022
300
Joined
Mar 29, 2022
Messages
300
temp.GIF
Ok.. here are my answers based on limited knowledge:
1. It's actual output from a 120w, 12v/10a wall adapter power supply.
2. 10a source.
3.Not sure but it's a cheap 12v supply so rise n fall times would not be very good I would say.
4. Not sure what you mean... Final two outputs shall be on 5v/gnd levels of Arduino....

This circuit should do what you want..
 
Last edited:

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
This circuit should do what you want..
Maybe. That's why I asked question #3.

If the output of the 12 V supply wanders down to 0 V slowly (very possible with a light load), the slew rate might be below the 10 uF (reference designators) - 2 K (reference designators) differentiator time constant. The transistor (not that one, the other one) emitter might not exceed -0.6 V.

ak

ps. Reference Designators - !
 
Last edited:

CircutScoper

Mar 29, 2022
300
Joined
Mar 29, 2022
Messages
300
Maybe. That's why I asked question #3.

If the output of the 12 V supply wanders down to 0 V slowly (very possible with a light load), the slew rate might be below the 10 uF (reference designators) - 2 K (reference designators) differentiator time constant. The transistor (not that one, the other one) emitter might not exceed -0.6 V.

ak

ps. Reference Designators - !

Good point. Maybe the cap needs to be 1000uF.

Meanwhile, maybe instead of designators we can make do with descriptors. For example we have the common base transistor and the common emitter transistor.

Happy to help.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
maybe instead of designators we can make do with descriptors. For example we have the common base transistor and the common emitter transistor.

Strongly disagree.

Besides the typing efficiency (2 keystrokes versus 25 (!)), that idea does not work for any schematic with multiple similar circuit stages and/or non single-transistor subcircuits. It also does not work for anyone who does not know as much as the original designer, such as what a common base amplifier is, or looks like, or or or ...

Another example, how would you describe uniquely the two transistors in a differential pair? The original 555 has two of them, plus a flipflop, in a total of 35 transistors.

One last thing - whatever is identifying each component on the schematic must fit on a pc board as silk screened text next to those components so you can find them for installation, calibration or troubleshooting. My alarm system control panel has around 30 IC's and way over 100 resistors. That's a problem.

Electrical schematics have been around for almost 200 years. We don't use reference designators because they work; we use them because they are the only thing that works.

ak
 

CircutScoper

Mar 29, 2022
300
Joined
Mar 29, 2022
Messages
300
Strongly disagree.

Besides the typing efficiency (2 keystrokes versus 25 (!)), that idea does not work for any schematic with multiple similar circuit stages and/or non single-transistor subcircuits. It also does not work for anyone who does not know as much as the original designer, such as what a common base amplifier is, or looks like, or or or ...

Another example, how would you describe uniquely the two transistors in a differential pair? The original 555 has two of them, plus a flipflop, in a total of 35 transistors.

One last thing - whatever is identifying each component on the schematic must fit on a pc board as silk screened text next to those components so you can find them for installation, calibration or troubleshooting. My alarm system control panel has around 30 IC's and way over 100 resistors. That's a problem.

Electrical schematics have been around for almost 200 years. We don't use reference designators because they work; we use them because they are the only thing that works.

ak
...Besides the typing efficiency (2 keystrokes versus 25 (!))...

ROFL! On the subject of "typing efficiency," how many keystrokes did you just invest in complaining about my simple schematic? Please help me out here, because I lost count. :)

...
 

dashy1981

Jun 19, 2013
83
Joined
Jun 19, 2013
Messages
83
Hey guys... First of all thanks for investing your valuable time in helping me out.

But as I am not expert on this area I would appreciate a working circuit. I am willing to provide any further details like rise and fall time by borrowing a oscilloscope from one of my friend.

But pls keep the air cool... I have great regards for both of you and I have been helped out multiple times in this wonderful forum earlier too. So let's not get into flame wars... Just help me out ;-)

BTW circuitscoper I tried the ckt on proteus but could not get a spike. Do you guys together want to change the ckt or modify it ?
 

dashy1981

Jun 19, 2013
83
Joined
Jun 19, 2013
Messages
83
BTW English is not my first language so pls ignore if any of my comments come as offensive or arrogant to you guys... Really appreciate your help !!!?
 
Top