switches relays asking for help

Thread Starter

cellage

Joined Oct 18, 2010
14
Help am new to the electronics world and i need to understand switches , how to control a switch though a pic microcontroller output , what kind of switch , relay ? is required
i need that circuity to control a light bulb and a (motor and thats another issue )
am kind of lost here
 

SgtWookie

Joined Jul 17, 2007
22,230
Microcontrollers aka MCU's and uC's have very limited current sink/source capability; usually +/-20mA maximum per I/O pin. You'll need to use a driver circuit to control the current in a relay's coil.

Here's one way to use a logic-level N-channel power MOSFET:



You can use basically the same circuit with an NPN transistor instead of a MOSFET; emitter gets connected to ground, base to the resistors, collector sinks current from the relay's coil.
 

Attachments

Thread Starter

cellage

Joined Oct 18, 2010
14
Thanks very much for the instant replay :)
i have this circuit but i couldn't simulate it via orcad capture it cant identify the relay ! so i dont know weather its working or not
i intend to put a light bulb 60W and fix the current and voltage according to that. Its very simple but still not sure

 

Attachments

radiohead

Joined May 28, 2009
514
The relay is simply a switch that can handle a larger current load. The relay is actuated by a controlling circuit. If you look at your circuit above, you have no power source to make your light bulb light. Try putting a voltage source in series with your lamp, then use the relay to switch it on and off.
 

Thread Starter

cellage

Joined Oct 18, 2010
14
what kind Of relay do you advice me ? give me some specific options if you please there is a lot of relays
 

KMoffett

Joined Dec 19, 2007
2,918
The type of relay depends upon your load current. A standard 12VDC/30A automotive relay should work well.
The bulb image the OP posted (#4) looks like a 60W 120VAC (or 240VAC) bulb. Not a good idea to use a 12VDC contact rated relay on high voltage AC. But then the OP hasn't really spec'd that.

Ken
 

Thread Starter

cellage

Joined Oct 18, 2010
14
The bulb image the OP posted (#4) looks like a 60W 120VAC (or 240VAC) bulb. Not a good idea to use a 12VDC contact rated relay on high voltage AC. But then the OP hasn't really spec'd that.

Ken

do you suggest that i change the light type ? or if not how can i provide a suitable voltage to the bulb ?
does the relay provide a voltage that make me discard the voltage source i put parallel to the resister named light ??
 

KMoffett

Joined Dec 19, 2007
2,918
do you suggest that i change the light type ? or if not how can i provide a suitable voltage to the bulb ?
does the relay provide a voltage that make me discard the voltage source i put parallel to the resister named light ??
I think the voltage/current/wattage of the bulb or motor is entirely up to you. You have to tell us what you want to use. Then we can help with the details. Or, is this just a paper design, with no real components?

Ken
 

Thread Starter

cellage

Joined Oct 18, 2010
14
I think the voltage/current/wattage of the bulb or motor is entirely up to you. You have to tell us what you want to use. Then we can help with the details. Or, is this just a paper design, with no real components?

Ken
thanks all for responding
its a real design i simply thought about this light bulb cause its available
now am confused the relay will have a voltage of 12 volt with current 30-60A so can this voltage turn the light on ? or i need another voltage source parallel to the light ?
by the way this circuit is supposed to be controlled through a PIC microcontroller
 

SgtWookie

Joined Jul 17, 2007
22,230
Do you really need to turn on a 60W light bulb that is powered by the mains?

If so, you will need to find a suitable relay. Automotive relays are not designed for that kind of service.

I really prefer that new people stick with low-voltage projects for awhile. Working with mains power can be quite hazardous.

Why don't you consider using automotive lamps instead? They are also readily available, and operate from 12v-14v, which is quite safe to work with.
 

Thread Starter

cellage

Joined Oct 18, 2010
14
Why don't you consider using automotive lamps instead? They are also readily available, and operate from 12v-14v, which is quite safe to work with.
well thanks for alerting me i will consider that and use an automotive lamp and look for a low voltage as you advised :)
so after changing the light type I should choose the relay depending on the new voltage rate
 

SgtWookie

Joined Jul 17, 2007
22,230
Yes.

You can then use automotive-type relays, as they are made for the same voltage.

Your 5v supply for your PIC will need to share a common ground with the 12v supply, or else you will need to use an optocoupler.
 
You could always just attach a solenoid to your standard home-wall-switch, and plug your motor/light into the corresponding wall-outlet. It's kinda jerry-rigged, but it might be cheaper than finding a proper relay, and, assuming you have an extra light-switch-controlled outlet, you don't have to risk coming into contact with mains.
 
Top