Go Down

Topic: Voltage Detector (Read 3732 times) previous topic - next topic

Joes

And one more question, if i was using this on multiple relays all switching different phase but with a common 9v would this cause an issue?

Thanks Joe

raschemmel

Quote
would this cause an issue?
 
issue with what ?
what kind of issue ?

I still think replacing the led with an opto-coupler would allow you to put everything under software control instead of requiring a human to view a led.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Joes

Quote
issue with what ?
what kind of issue ?
The GND will be linking phases together, but obviously through four resistors, could that cause any issue?

 
Quote
I still think replacing the led with an opto-coupler would allow you to put everything under software control instead of requiring a human to view a led.
what software? the end is just an LED.

and how would you make an opto work as there is no neutral?

raschemmel

An  opto is nothing but a  led driving a phito transistor through an isolation barrier. Tbe output has a pullup resistor and sends a high or low to arduino.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Joes

so how would you wire it?

again there is no arduino in this project

CrossRoads

#35
May 13, 2016, 09:51 pm Last Edit: May 13, 2016, 09:52 pm by CrossRoads
"Tbe output has a pullup resistor and sends a high or low to arduino."
More likely Needs a pullup resistor.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Joes

#36
May 13, 2016, 10:01 pm Last Edit: May 13, 2016, 10:01 pm by Joes
so correct me if I'm wrong, on the LED side in replacement of the neutral your using the earth?

raschemmel

#37
May 13, 2016, 11:11 pm Last Edit: May 14, 2016, 01:15 am by raschemmel
Quote
More likely Needs a pullup resistor. 
Yes, I was trying to explain the concept of an opto.


Quote
o correct me if I'm wrong, on the LED side in replacement of the neutral your using the earth?
No. Forget about earth and neutral. What I am about to describe creates an isolated interface from your voltage detector to an arduino input so YOU do NOT need to LOOK at a LED ! The arduino will detect it and the software will deal with it.



Just look at the led you already have. (the one connected across the transistor)


Now remove that. (JUST THE LED, but change the pullup resistor (the one connected to the last transistor) to the correct value for the opto)


Now connect the opto led where your led used to be.
Now connect the emitter of the opto output to the arduino GND
Now connect a 10 k pullup resistor from the collector of the opto output to +5V .
Now connect a wire from the collector of the opto output to an arduino digital input.
You DO NOT NEED TO THINK OR ASK ABOUT THE EARTH OR NEUTRAL.
NOTHING ELSE CHANGES . Everything else in your circuit remains the same. Only the led is gone and the resistor value is changed.
The result , after following the above is an isolated input to the arduino. NO ELECTRICAL CONNECTION TO THE REST OF YOUR CIRCUIT. (unless you are connected to the the arduino GND for some reason).
DO NOT CONNECT 9V BATT GND TO ARDUINO GND !

JUST FOLLOW THE ABOVE INSTRUCTIONS.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Joes

right ok i see where your coming from now thanks for explaining that.
just to say again there is NO Arduino in this project so at the end its just an LED, so correct me if I'm wrong again but the output of the opto will still be the wrong way round and it will be pulsing?

thanks again for you input

raschemmel

#39
May 14, 2016, 10:53 am Last Edit: May 14, 2016, 11:26 am by raschemmel
Ok, no arduino Hmmmn. How did I miss that ?
I guess I have arduino on the brain  LOL...
Ok your question about the opto suggests you still don't "get it".
Let's PRETEND for a moment there IS an arduino ( at the "end")
GOOGLE "OPTO COUPLER"
An ooto has an INPUT ( the LED) and an OUTPUT ( the photo transistor)
YOUR DETECTOR has a LED (what a coincidence)
If we REPLACE YOUR LED with the opto coupler led and follow my other instructions, what we wind up with at "the end" , is a microprocessor interface for your voltage detector.

The "point" of your detector is to generate a "trip LED" for the relay card. The simplest way would be an ac relay with a 9V battery powered led connected to the N.C. contacts of the relay so when the mains was lost, the relay would deenergize shorting the N.C. contacts , lighting the led.  With no mains , your detector stops pulsing because all of the transistors are off.  If the last transistor iis off , then the led across the collector and emitter of the transistor would be ON because the transistor is not shorting the anode and cathode of the led.

. In that case,  the arduino ( that we're pretending exists) could detect that automatically using the digital signal coming from the collector of the optocoupler where it is pulled up to 5V by the resistor. But , in retrospect, a microprocessor seems overkill for a led. ( LOL)
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Joes

Yer normally it does include an Arduino lol


something like this?




raschemmel

#41
May 14, 2016, 06:02 pm Last Edit: May 14, 2016, 06:11 pm by raschemmel
NO NO NO !

You violated the FIRST LAW OF OPTO COUPLERS 1

NEVER CONNECT THE INPUT GND TO THE OUTPUT GND !
Remove the LED from across the opto collector and emitter  and put it in parallel with opto led
Adjust resistor value of resistor connected to last transistor to something that allows enough current through opto led and physical led which have been placed in parallel.
Remove the connection between the opto led cathode and the opto transistor emitter
Remove the connection from the opto transistor pullup resistor and the 9/v battery.
Connect the opto transistor pullup resistor the arduino 5V
Connect the opto transistor emitter to arduino GND.
NOW , you electrical isoslation.
There is NO POINT IN USING AN OPTO ISOLATOR IF YOU ARE GOING TO JUMPER THE INPUT TO THE OUTPUT . That makes no sense whatsoever because it defeats the WHOLE PURPOSE of an opto ISOLATOR.
By connecting the opto transistor ONLY to the arduino and NOTHING ELSE, the logic signal sent by the opto has NO ELECTRICAL CONNECTION TO THE VOLTAGE DETECTOR because the opto led and the opto transistor are separated by a transparent 5000 V isolation barrier.
If you MUSH have the visual led there , you would NOT put it where you put it because that prevents the opto transistor from sending a logic signal. The led forward voltage would be on the collector of the transistor all the time and you would never get a HIGH (opto led off) or a LOW (opto led ON)

 You would put it in parallel with the opto led and adjust the current limiting resistor according to support both leds.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Joes

#42
May 14, 2016, 06:30 pm Last Edit: May 14, 2016, 06:36 pm by Joes
i don't have 5v just the 9v

so the LED is staying in the same place?

raschemmel

Quote
so the LED is staying in the same place?
I thought you only posted that last schematic to ask if that is what I meant when I thought there was an arduino, but you said there is no arduino so of course there is no purpose for the opto coupler without an arduino. My last reply was an attempt (not sure if I succeeded ) in explaining to you how an opto coupler works but by your last reply it seems like you thought I was suggesting you add an optocoupler even though you don't have an arduino.
Let's try this:
Scenario A : (no arduino) => thus , no opto coupler
Scenario B : You decide to ADD an arduino to detect loss of mains power and send an RF signal somewhere or send an SMS text message or send an message by internet, then my last reply applies as is .
The physical (visable)led stays where it was, and all the instructions in my last post apply.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Joes

Quote
Scenario A : (no arduino) => thus , no opto coupler
no arduino


Quote
Scenario B : You decide to ADD an arduino to detect loss of mains power and send an RF signal somewhere or send an SMS text message or send an message by internet, then my last reply applies as is .
no just the LED


all i would like to do is light up a LED when i have a lose of power that is it no more lol



going back to the start
this works but the LED works the wrong way round:




so you lot come up with this to reverse the operation of the LED:



but that did not work the LED says on

so need to find a way of solving that or find a better way of doing this

Go Up