how to tell arduino if some component is ON or OFF

Thread Starter

Hussain Shabbir

Joined Mar 5, 2018
18
I want to connect several components to my arduino project.
4 12v lights, 1 ac appliance. I am thinking that I will use simple relays to connect them to 12v lights and on the COM and NC leads I will connect a seperate 5v supply that will act as an input signal and arduino will know if any of the individual 4 lights are on or off.

I do not have an idea of knowing about the AC appliance because the relay will not work with an AC system.

Any suggestion to improve this method and for the AC appliance is highly appreciated.
 

Thread Starter

Hussain Shabbir

Joined Mar 5, 2018
18
hi! have you thought about use optocouplers?
Would an optocoupler work with one side on 12v and other on 5v?

Very frankly, I am completely uneducated in this field, I do not know much about electronics. Mostly my projects have different voltages, and when using arduino I always face difficulty because of different voltages.
 

Dodgydave

Joined Jun 22, 2012
11,302
Your choice of relay is probably wrong, or you can use opto-coupler and Triac,
Zero crossing Opto-couplers work on low voltages on the led side, and mains voltage on the other side.
There are Solid State relays.

pin.png
 

Thread Starter

Hussain Shabbir

Joined Mar 5, 2018
18
Your choice of relay is probably wrong, or you can use opto-coupler and Triac,
Zero crossing Opto-couplers work on low voltages on the led side, and mains voltage on the other side.
There are Solid State relays.
Could you please tell me why would relays be a bad option
 

Thread Starter

Hussain Shabbir

Joined Mar 5, 2018
18
Relays are fine for slow switching on/off but no good for high speed, like light dimmers, motor speed controls.
Thats fine, speed is not an issue. I just want to know weather the connected component is on or off, because then the arduino will perform its function through if statements. I just want an input into arduino that tells it that if a component is using electricity or not.
 

Dodgydave

Joined Jun 22, 2012
11,302
Then use a relay to switch on, with an opto-couper to monitor the mains side, this can feed back into your micro and give you an indication the mains is present.
You would need a capacitor on the output side to filter out the zero crossing.

P6B1h.png
 
Last edited:

LesJones

Joined Jan 8, 2017
4,190
Hi Dave ,
You can get photocouplers that will work with AC (Or either polarity DC ) input. Thye have two IR LEDs cross connected for the input.
This is one example.
They would need a capacitor on the output side to avoid pulses at the zero crossing point with an AC input.

Les.
 

danadak

Joined Mar 10, 2018
4,057
If you need to know a load is actually present, after having turned it
on via Arduino, there are a number of techniques. V, I, Light, Speed.....
detection schemes.

For example one could use a number of techniques to detect if a motor
has spun up, rpm via magnetic (Hall Effect) or optical techniques, V & I
current and phase detection.....

If switching on high power LEDs then simple V detection or photodetector
to detec brightness....

There is a plethora of sensors out there for position detection, strain, stress,
heat, optical.......to handle insuring your load is energized, in many cases also operating
properly.

Regards, Dana.
 

128ITSH

Joined Jul 20, 2017
101
Would you like to control these appliances from the arduino, or let the arduino know whether they are energized, or both?
It would be good if you give us the current rating of the appliances too.
Like Dana said there might be several ways to do this, but a question would be if you want to measure when there is voltage or current.
Checking for voltage would be easier but you will not know if the appliance is faulty or working, you will only know that it has voltage across it and should work. But when you check for current, however, you will know if the appliance is actually working and spending energy.
 

mcgyvr

Joined Oct 15, 2009
5,394
What is this AC device?
Is it turned on via a wall switch?
A relay can be used to turn devices on/off but its not going to be able to tell you if the device is on without tapping into something inside the device..

Are you planning on hacking into this AC device?
 

Phil-S

Joined Dec 4, 2015
238
May not be relevant to this project, but the HCPL3700 optocoupler is a nice way to interface mains AC with LV microcontrollers.
I find them useful for getting older lamp timers and programmers working with low energy loads - these are the type of controllers that have no neutral and rely on leakage current through the lamp.
 
Top