how to control a Relay

lcx
 
Posts: 2
Joined: Tue Nov 18, 2014 2:58 pm

how to control a Relay

Tue Nov 18, 2014 3:03 pm

Hi, I recently received my VoCore and was wondering how I could manage to control some relay with it.
I was reading about Solid State Relais and my idea was to somehow connect a relay to the USB port and trigger it by software to send power to the relay.
What I want to achieve is to be able to turn on a lightbulb, a DIY version of http://lifx.co/

Peter H
 
Posts: 58
Joined: Wed Nov 12, 2014 10:24 pm

Re: how to control a Relay

Thu Nov 20, 2014 7:01 pm

You could use one of the VoCore's GPIO pins to control the relay. You would need to use a driver circuit between the I/O pin and the relay since the I/O pin will only handle a few mA and would not be up to driving a mechanical relay directly. If you use a solid state relay that can be controlled by a TTL signal at the voltage you're running your VoCore then you could drive it directly. There are various inexpensive motor drivers around, but you'd need to know whether you were switching AC or DC, and the voltage, current and inductance characteristics of the load, to know which ones might be suitable.

User avatar
milaus
 
Posts: 9
Joined: Thu Nov 20, 2014 4:31 pm
Location: Italy

Re: how to control a Relay

Fri Nov 21, 2014 6:32 pm

connect gpio from your vocore to UNL2803 and from UNL2803 to Relay or other
Image
;)

lcx
 
Posts: 2
Joined: Tue Nov 18, 2014 2:58 pm

Re: how to control a Relay

Sat Nov 22, 2014 7:31 pm

thanks for the replies. Think I will need to reed it a couple of times to be sure I understood everything.
The voltage I want to switch is 230V AC.

Peter H
 
Posts: 58
Joined: Wed Nov 12, 2014 10:24 pm

Re: how to control a Relay

Sun Nov 23, 2014 9:59 pm

The safe answer is to get a powerswitch tail or similar to encapsulate the high voltage part of the problem - you can control it with a simple TTL signal.

darksoul
 
Posts: 45
Joined: Fri Nov 14, 2014 2:29 am

Re: how to control a Relay

Tue Nov 25, 2014 10:22 pm

Hey! Guys! Don't forget about the safety diodes! other wise you will burn something.
Also vocore has limited pins, so its better to use an shift out ic. just gpios. but can connect from 8 to 99999 relays.
Good luck!

charliex
 
Posts: 42
Joined: Sun Nov 16, 2014 5:34 pm
Location: los angeles

Re: how to control a Relay

Wed Nov 26, 2014 8:08 pm

just use an ssr, depending on the load type use a random switch, or zero volt crossing type .
http://www.phidgets.com/docs/Solid_State_Relay_Primer

a simple NPN transistor will make sure the load from the gpio is low. click L / H to toggle it. put the Lamp on the SSR. a 5V source will make sure the SSR switches on, but a lot of SSR's can do 3V, but better to use 5V.

a 2N2222 will be fine. the SSR will optically isolate the vocore side form the AC and you can get SSR's to switch almost any AC voltage/load.

(link needs java) sample circuit, i left the relay as the default mechanical so it wont switch as is, change the parameters of the relay to match the ssr you choose, or drop the resistor from 600 to 100 ohms just to see it switch on and off.

http://www.falstad.com/circuit/#%24+1+5 ... 0.0+0.5%0A

Peter H
 
Posts: 58
Joined: Wed Nov 12, 2014 10:24 pm

Re: how to control a Relay

Wed Nov 26, 2014 10:19 pm

There is far more to switching a mains voltage load safely than just wiring up a suitably rated relay. Unless you understand the risks involved and know how to address them, you should leave the design of the high voltage part of the circuit to a professional. Devices like the Power Switch Tail are readily available and give you a completely safe solution. If you try to make your own high voltage electronic circuit without understanding the issues involved, you risk injuring or perhaps even killing somebody.

User avatar
milaus
 
Posts: 9
Joined: Thu Nov 20, 2014 4:31 pm
Location: Italy

Re: how to control a Relay

Thu Nov 27, 2014 12:10 pm

for you have 220v into using an 12v relay but with the exchange to 220v 16A

Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: No registered users and 23 guests