Pages: [1] 2   Go Down
Author Topic: 230V Input check for Arduino?  (Read 6410 times)
0 Members and 1 Guest are viewing this topic.
Hamburg
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys,

i like to "hack" an garage door and want to controll the door with a webbrowser.
For this i need to check the actual status of the Door. So i need to check the 230V relais from the Garagedoor controller.

One way is to use another 230v relais, that switch a channel from the arduino, but i think this isn´t the best way.
Any ideas to check with arduino if theres a 230v power present at a input channel?

Logged

Germany
Online Online
Faraday Member
**
Karma: 58
Posts: 3043
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you ask, I should not tell you, because 230V is dangerous for Arduinos and Newbies.

Another thing is never pull the 230V N signal to Arduino GND, (assuming you wire L to a diode (e.g. 1N4004) and a 100k resistor to a capacitor (polarized 1µF) and a parallel zener diode <5V) but feed that to an optocoupler. This increases the components price considerably ( from 10 to 40 cent ) but its worth investing, to protect your Arduino.

It's much safer to feed the 230V to a small transformer (230V to 12 or 6V) and do the electronics fiddling as above on the secondary side ( with a smaller resistor, of course).
Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2509
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can't (shouldn't?) you make a reflective sensor to accomplish this ( X = open/close) ?
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Hamburg
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply! Dont worry, i have more expirience with Highvoltage than microcontroller.
I would Never connect a 230v supply directly to a arduino. I have a Schooling in electrician, but mircocontrollers and low current is new for me smiley
So i Need to learn more about optocoupler and so on.. Thats why i ask smiley
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i like to "hack" an garage door and want to controll the door with a webbrowser.
For this i need to check the actual status of the Door. So i need to check the 230V relais from the Garagedoor controller.

High voltage issues aside, I would humbly submit that the status of the door is not necessarily the same as the status of the relays that control the door. If it were me, I'd want to know the status of the door, and would sense it via limit switches or some similar arrangement. The control on my door is a simple pushbutton in a low-voltage circuit. There I would probably use a small relay, actuated by the Arduino, in parallel with the switch.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe an ir setup on the ceiling above the door to "see" if its up? Or cheap i guess and somewhat more dangerous is just a diode,  voltage divider and a zenerdiode. And cap right to the input, mind you that should work nit that there arent a 100 better safer ways, although then you could also get the mains frwuency if you lose the cap
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Using a web browser to open your garage door? Sounds secure to me... Cool idea though.

230V WILL blow your arduino, no doubting that fact. A device made to function between 3 and 5v will not stand up to an AC of 230V. Get a step down onto this , 230 to 5v.

You might be best using a relay instead of connecting your arduino directly to a live circuit like that. I dont think a garage door would use a full 230V supply to open the door , I bet there is a step down later on in the circuit , maybe even a DC converter depending on the mechanism. Make connecting the arduino up to a 230v a last resort as , even if its on a step down , I guess it is possible that an electrical surge could fry everything on that circuit.

Also , don't fry yourself either.
Logged

Peoples Republic of Cantabrigia
Offline Offline
God Member
*****
Karma: 6
Posts: 722
Arduino happiness
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are tons of ways to see if the door is up or down that do not require you to hook up to 230VAC. So, my recommendation would be to investigate one of the alternatives, such as a magnetic switch (alarm company style reed switch or hall effect sensor), optical approaches (reflecting IR modules like the Toshiba series, for example), Ultrasonic (i.e. is there a reflection or not) or other similar means. Keep the Arduino isolated...

Now if the issue is not whether the door is open or closed but rather whether the relay is live or not, I wonder if you can't tie into the low-voltage circuit that powers the relay coil instead. Most PCBs inside appliances use micro-controllers (MCUs) that utilize a separate ULN2003a darlington chip to turn relays on and off. You could tie into the signal that comes into the Darlington IC (i.e. between the MCU and the Darlington IC) or sense the output of the Darlington driver IC. The only issue with the latter approach is that you may need to add a protection diode for any kick-back from the relay when it is de-energized from frying the LED.

Now if the question is whether the motor is stalled, I kindly suggest using a current switch like the ones made by CR magnetics instead of sensing voltage. Again, it isolates the Arduino, poses no voltage problems and is usually painless to integrate.
Logged

Canada
Offline Offline
Sr. Member
****
Karma: 0
Posts: 318
Sometimes teaching, always learning,
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you need to sense if there is 230VAC, have a small light bulb on the mains, and a photoresistor close by connected to the Arduino. Sort of a DIY optocoupler.
Logged


Offline Offline
Edison Member
*
Karma: 29
Posts: 2448
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How's the roller door work?

If you open up the circuit there has to be a relay to open the door with, well, you could reroute those (gnd/+) to the arduino and then check the voltage from that if the signal >5v use a voltage divider.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18778
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


i like to "hack" an garage door and want to controll the door with a webbrowser.
For this i need to check the actual status of the Door.


Here's what I did:



Reed switch with a magnet attached to the door.

Story here:

http://arduino.cc/forum/index.php?;topic=58076.0
Logged


Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They make industrial models of those contacts, ive installed them for alarm systems beforr, maybe worth searching for as that doesnt look like it will last long
Logged

Brasil
Offline Offline
Sr. Member
****
Karma: 2
Posts: 315
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

check this post http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235146158/2
, using a PS2501 optoisolator, but  I changed C1 to 0,033uF and R1 to 12K ohms to 230V, I don´t use the bleender resistor.

It works fine to me...
« Last Edit: March 25, 2012, 12:07:11 pm by mmoscz » Logged

4x Duemilanove (clone)
Uno torrado (clone)
Amiga 1200 40MB
Windows XP


Hamburg
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i don´t like to check the position by magnetswitchs. I think this is a simple way, but not the best and exact way.
mmoscz version is more helpfull for me, so i can also see in wich direction the garagedoor is moving at the moment.
The Webserver can deliver the actual status of it and the iphone app will show the status smiley

Btw. Its not the problem to switch the garage door. i only need a relay that can switch a 14v power, but its just a single button for move-up/stop/move-down.

@Constantin i thought it would be better to check the 230v outputs of the controller, instead of soldering in the original circuit. smiley

« Last Edit: March 25, 2012, 12:09:51 pm by da2001 » Logged

Austin, TX
Offline Offline
Full Member
***
Karma: 0
Posts: 134
I make my own electricity.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you're someplace where 230 volts is the "standard" mains voltage, you should be able to find a relay with a coil voltage of 230 volts.  DigiKey or your local electrical supply house should have them.  Sorry -- I'm the States where the mains voltage is 120 volts.  And I know where to find relays with 120 volt coils smiley

It sounds like what you really need is the position switch sensors other have mentioned.  Though what you =really= need to do is fully describe what you're trying to accomplish -- for my money, you need two sensors for the AC power and two for position.  There are five possible states -- traveling up, traveling down (that's your two AC sensors), closed and open (that's your two contact switches), and "stopped in the middle" (no AC, no contact closures).
Logged

Pages: [1] 2   Go Up
Jump to: