I have build a mains detector that starts my 48->230V inverter when a power failure occurs.
The detector works fine. It is just a wire twined around a mains cable that works like a antenna.
A op-amp amplify the 50Hz signal, the output signal is converted to a DC-voltage that goes to a LM393 comparator.
The comparator controlls a TIP31C transistor that acts like a switch. I have pulled the cables from the inverters on/off switch.
The inverters on/off switch is still there if a manually want to turn off the inverter. The problem is when a power failure accures and the inverter turns on I cannot turn the inverter off with the switch.
If I remove Q2 the inverter is still on. Why? Is it some voltage leakage between the base and Q1?
The LM393 can still turn off the inverter.
I attach a circuit diagram. Sorry if it looks funny but I did my best EDIT: The ground from inverter is connected to my circuit ground (missed in circuit diagram)
Well, apart from the fact that you made it an attachment, making it very difficult to view on this broken BBS system, (this will not display at full size)
I for one thing see no "signal is converted to a DC-voltage", and only one transistor which is connected to a system we know nothing about but which if removed,would be entirely disconnected and thus have no effect on that system.
Paul__B:
I for one thing see no "signal is converted to a DC-voltage"
The output of the first opamp is forced "normally low" by making the -input slightly more positive than the +input.
Hum from the mains will produce a positive going square wave on the output.
That is averaged by the RC circuit on the opamp's output.
Q2 won't work without a (common) ground reference.
A relay or opto could work, depending on the inverter circuit.
Leo..
Hi,
Have you got the gnd of your circuit connected to the gnd of your inverter controller?
Do not do it if you haven't, until you answer a couple of questions.
The problem I see is no base resistor on your transistor and your inverter switch may be at supply potential not gnd.
Please post a picture of the switch and its connections.
First measure the voltage that is between the two wires you are connecting to the transistor, with the transistor completely removed.
Then measure the voltage between the inverter gnd and each of the two wires with the inverter switch ON and then OFF.
Get back to us with the results
I suggest you get rid of the transistor and replace it with an optocoupler or a relay, at the moment you have no idea what potential your switch wires are at.
I missed the ground from inverter is connected to my circuit ground.
"The problem I see is no base resistor" - The output from LM393 is open collector and I have a pull up resistor. Is it not ok?
This is very strange. The inverter switch was off, I measured Q1/Q2 and it was 0V.
I then let my circlet switch "on" and the inverter started. I then measured again Q1/Q2 and it was 0V. (When the inverter switch is ON the voltage at Q1/Q2 is ~3,5V)
I do not understand why the inverter started.
By the way I have tried with a relay and it works fine, the on/off switch works as a master switch.
But I am interested in knowing why I can't get it to work with a transistor.
How do you show a image in the post? "Insert an image" want's a URL.
In the picture you see (not very clear) I have removed one wire from the switch. The blue wire goes to Q2 and the brown wire is Q1.
olof_n:
In the picture you see (not very clear) I have removed one wire from the switch. The blue wire goes to Q2 and the brown wire is Q1.
That statement and photo scare the hell out of me! You cannot use a transistor as a switch in that situation. You need to spend a lot of time learning before doing anything further since what you are doing is downright dangerous.
olof_n:
But I am interested in knowing why I can't get it to work with a transistor.
We do not know and cannot tell without knowing the switching circuit of the inverter.
olof_n:
How do you show a image in the post? "Insert an image" wants a URL.
Correct. It has to be lodged somewhere. The server however is (apparently deliberately) configured to obfuscate links to attachments, making them extremely difficult to use on many systems.
olof_n:
In the picture you see (not very clear) I have removed one wire from the switch. The blue wire goes to Q2 and the brown wire is Q1.
"Q1" and "Q2" are terms conventionally used to denote transistors, not their connections.
stowite:
That statement and photo scare the hell out of me! You cannot use a transistor as a switch in that situation. You need to spend a lot of time learning before doing anything further since what you are doing is downright dangerous.
Ok, why did it scare you?
Why is it dangerous to switch a 5V control signal from a switch with a transistor?
My cable insulation is far better than the original.
Why is it less dangerous to switch it with a relay? The only think I can think of is the voltage drop.
Before I connected the inverter switch I tried the circlet a lot with small DC-loads, it worked fine.
olof_n:
Ok, why did it scare you?
Why is it dangerous to switch a 5V control signal from a switch with a transistor?
My cable insulation is far better than the original.
Why is it less dangerous to switch it with a relay? The only think I can think of is the voltage drop.
Before I connected the inverter switch I tried the circlet a lot with small DC-loads, it worked fine.
It looks to me like you have connected directly to live (Brown wire) and neutral (Blue wire) of a UK type 240 volt mains. If so then this is extremely dangerous. If not so then please post the circuit diagram of this connection.
stowite:
It looks to me like you have connected directly to live (Brown wire) and neutral (Blue wire) of a UK type 240 volt mains. If so then this is extremely dangerous. If not so then please post the circuit diagram of this connection.
The color of the cable has nothing to do with voltage, It is NOT connected to mains.
What you see is a ON/OFF switch of a inverter, the voltage is <5V.
olof_n:
The color of the cable has nothing to do with voltage, It is NOT connected to mains.
What you see is a ON/OFF switch of a inverter, the voltage is <5V.
Okay - so post a circuit diagram showing how you connect to the inverter and a datasheet for the inverter.
olof_n:
Ok, why did it scare you?
Why is it dangerous to switch a 5V control signal from a switch with a transistor?
My cable insulation is far better than the original.
You are quite correct as such, you merely "spooked" people by using mains cable for a low voltage control function.
olof_n:
Double post
Well, use the delete function. You cannot delete the first post, but can delete any following (only your own of course). What you should not do, is to delete any which others have quoted in some fashion. And if you delete it, I can modify my comment here accordingly.
olof_n:
I added a relay after the transistor and now everything works.
If it something in the inverter I cannot do anything about it.
I was interested in if I had forgot something in my circuit. Now I know that it was the relay
Not at all.
The problem is that we do not know whether you know enough about the actual wiring of the inverter, to correctly wire the transistor, and you certainly have failed to explain how much you do know about it so that we could assist you.