Pages: [1]   Go Down
Author Topic: Controlling a relay with a transistor switch  (Read 1531 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello first post here,

The reason I'm doing this is because the relay is going to be dealing with a very high ac voltage and I'm trying to keep the arduino as safe as possible - also the relay may need its own power source.

In other words, is replacing the LEDs in this circuit with a 120v rated relay feasible?

http://www.youtube.com/v/L_7E2Nk1Hnk

Any and all input is welcome.
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 13
Posts: 1314
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Definitely not !

If you want to switch 120vAC and your level of expertise is low then the following relay shield, or similar, is recommended  - actually if your level is low then steer clear of mains voltage until you've developed some skill.
http://www.robotshop.com/seeedstudio-arduino-relay-shield.html
Note that this is only rated for 360VA.
« Last Edit: September 23, 2012, 04:25:29 pm by jackrae » Logged

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

Thanks for your response jackrae

Can you explain why it wouldn't work?

It seems that this relay shield would only bring that high voltage closer to sensitive electronics, which I'm trying to remove it from.

My skill level is not necessarily low with these kinds of electronics, I'm just new to the arduino controller.
Logged

0
Offline Offline
Shannon Member
****
Karma: 160
Posts: 10418
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A well designed mains-relay shield will keep all the relay contacts well separated from the relay coil connections (about a cm is good), preferably with a plastic sheet on the underside to protect the traces from touching anything accidentally.

And of course the relays must be mains-rated.
Logged

[ I won't respond to messages, use the forum please ]

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 23
Posts: 1752
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

With significant power being switched, I recommend getting the relay(s) physically away from Arduino (Close to the load if possible), and using Optical Isolation so you don't need any direct electrical connection between Arduino and the relay circuitry.

See the schematic diagram on this page: http://goo.gl/PcWJ2  You could do something like this yourself, or buy relay boards. (The one shown is only $4)..

Read up on controlling power with Arduino on the ArduinoInfo WIKI here - http://arduinoinfo.info   
See: http://arduino-info.wikispaces.com/ArduinoPower


DISCLAIMER: Mentioned stuff from my own shop...
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Malaysia
Offline Offline
Newbie
*
Karma: 0
Posts: 29
A place for DIY projects
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to control many channels, says more than 4 channels, I would suggest to use ULN2803 Line Driver to control the relay.
http://ediy.com.my/index.php/blog/item/34-connecting-arduino-to-uln2803-line-driver
Logged

Electronics and computer projects
http://ediy.com.my/

Offline Offline
Edison Member
*
Karma: 20
Posts: 2106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To be honest a relay would work providing A. it's rated for the voltage. B. it's located away from your breadboard C. there's a protective diode to protect the arduino board...

BUT

your led's are going quite fast it will wear out the contacts fast as the voltage arcs as the relay makes contact.

if you wish to keep that speed up and not worry about replacing all the relays every few months invest in solid state relays.
Logged

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

UPDATE:

The light now works with a 5vdc relay switch rated for 120vac connected to the arduino. This is just a proof of concept and will be updating the code to increase the delay between switches.

http://youtu.be/SjbEleWN5m4

Thanks
Logged

Offline Offline
Edison Member
*
Karma: 20
Posts: 2106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That relay won't last 6 months at that speed
Logged

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

That relay won't last 6 months at that speed

Thats true, but I think you missed this part in my post:

Quote
This is just a proof of concept and will be updating the code to increase the delay between switches.

Either way, this is only meant to be running during parties so it doesnt even need to last 6 months.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your relay will work, assuming that a) it is rated for 5v drive, and b) you have a free-wheeling diode on the relay; and c) your transistor is rated as such.

You may also consider a solid state switch for high frequencies or life.
Logged

Pages: [1]   Go Up
Jump to: