Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

using relays with micro-controller

Status
Not open for further replies.

hossam abdo

Full Member level 2
Full Member level 2
Joined
Mar 13, 2011
Messages
122
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
Alexandria, Egypt, Egypt
Activity points
2,064
Hi all

I use a relay with micro-controller.

Can i connect the relay directly to the microcontroller?

when i do that, and out (1) on the micro pin , the relay make somthing error... relay.jpg
 

The microcontroller can't drive directly a relay , you have to use a transistor as a switch.
In simulation it should work becasue the simulation model doesn't have the real mcu current limit.

trnasistor_drive_relay.jpg
 

This image shows just the connection of the coils not the outputs which are connected to the mains

71617d1298808011-uln2003_relay.jpg


Maybe you can post your schemetic
 

when i give the order to energize the relay, it is energized and quickly de-energized and come back energized and so on until I cancel the order.

It behaves like that untitled.JPG
 

Then there is something wrong with your code, I think you use the same button to turn on/of the relay so it oscillated, try adding a delay.
 

Dear Alexan
another question:
if i want to turn on 1710 high power led (10mA) with a power supply of (6V & 4A), what is the most appropriate way to design it?
thanks a lot for your help
 

10mA a power led?
A 10mA LED can be connected directly to the output of the AVR (5v) using a resistor to set the current , there is no need for a separate supply.
 

i want to write 3 words in area of (100cm * 50cm) with (570 led) for each word.
what i want to know , the best way to connect these leds to reduce the consumed power
as the available power supply is (6v, 4A)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top