Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 2nd April 2008, 03:42 AM   #1
Default Relays on the junebug

I have a reed relay i could not find it in eagle but used what seems to be a equivalent. Thats not the point tho. My issue is for some reason i get a halt and my programmer dies for a second or so when i press the button on the junebug. The code is not the issue tho. Im using the IR code i had a while back to make my remote turn on and off a bell by using a relay.

Here is my schematic. Why is my junebug suffering?

AtomSoft is offline  
Old 2nd April 2008, 04:02 AM   #2
Default

D1 should go across K1, K1 must be less than 20ma coil. If the relay is larger you'll need a transistor driver.
Something like this from Nigels page
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 2nd April 2008, 11:59 AM   #3
Default

still having a issue not sure on actual wiring i blew like 4 transistors already lol Junebug seems ok programs and debugs still
Exactly what type transistor to use? On no load it may be more than 15V but should not be a issue because relay hold 120v or so. But transistors are like baby relay and take way less energy

I am trying to use either of the below:

http://www.radioshack.com/product/in...tId=2062478&cp
Code:
Your source for component parts.
Fast response, small size and low cost make this 5VDC relay a good choice for robotics, computer interfacing and projects that require several relays.

# Maximum switching power of 10 (watt/VA)
# Maximum switching voltage of 60 VDC, 120VAC
# Maximum switching current of 0.5 A
# Maximum initial contact resistance of 150m ohms
or


http://www.radioshack.com/product/in...tId=2062480&cp

Code:
Your source for component parts.
Fast response, small size and low cost make this 1 amp SPDT relay a good choice for robotics, computer interfacing and projects that require several relays.

# Coil rating of 5VDC
# 90 mA
# 55 ohms
# Body size of 1-1/32x3/8x1/4"


    * SPDT 1A at 125VAC

Last edited by AtomSoft; 2nd April 2008 at 12:02 PM.
AtomSoft is offline  
Old 2nd April 2008, 01:13 PM   #4
Default

You do have a diode across the relay coil like in the diagram above?, if not it will blow the transistor - probably the very first time it turns OFF.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 2nd April 2008, 02:04 PM   #5
Default

i have corrected the diode but nothing still. Maybe because my pinout of the relay is totally different . I hate 4 pins on relay and i only see a coil above.the coil is the switch. and the other pins are the what i call travelers. When coil has power (switch on) the com (other 2 pins touch closing the circuit and should indeed sound bell. Bell works alone so its not that. The coil has a diode where the line is is facing +. But since this is a relay i am pulling the 5v and gnd from junebug to switch on the coil and hence turn on bell.
AtomSoft is offline  
Old 2nd April 2008, 05:17 PM   #6
Default

The top one is a reed relay, it's about 20ma and I've actually got a few of them and they do work directly from a PIC pin. A 1N4148 diode works well with small relays. The big relay needs the transistor to work.
Advice:
connect the anode and one side of the coil to 5V
connect the cathode and the other coil to the pic pin (pull low to drive)
Your USB port is limited to about 100ma, a powered hub can increase that to 500ma or more.

it's a 555 but the concept is the same, note how D3 is connected
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/

Last edited by blueroomelectronics; 2nd April 2008 at 05:21 PM.
blueroomelectronics is offline  
Old 2nd April 2008, 06:07 PM   #7
Default

ok so far i got it to work with 2 leds lol going to try other thing now
AtomSoft is offline  
Old 2nd April 2008, 06:13 PM   #8
Default

Get yourself a DS18B20 or 18S20 temperature sensor someday. You'll love wrapping your brain around the 1-wire stuff, especially when you network them. Your Junebug has a 1-wire connector on it.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 2nd April 2008, 06:13 PM   #9
Default

ok seems to work fine unless you press on and off fast lol. I guess i should make a delay thing so you cant press it for another second or 2 . Ill take a pic and draw schematics thanks to all. (schem is like above but i guess i had it a mess and messed up before.
AtomSoft is offline  
Old 2nd April 2008, 06:31 PM   #10
Default

1 wire? is that possible? I knew it i heard of something like that before but to me it was a legend lol

Um i think i had to use that diode you told me about 1n4148 (i have like 6 left lol) Thx
AtomSoft is offline  
Old 2nd April 2008, 07:15 PM   #11
Default

Basically i want a remote to open my room will have hidden button incase remote lost lol
Here is one:


and the other:


EDIT: Hey futz.. i only have 1 light still going to by a halogen lamp or just a normal one and a halogen bulb today.

Last edited by AtomSoft; 2nd April 2008 at 07:20 PM.
AtomSoft is offline  
Old 2nd April 2008, 07:25 PM   #12
Default

Quote:
Originally Posted by AtomSoft
1 wire? is that possible? I knew it i heard of something like that before but to me it was a legend lol
They have been around for a while. I use them in my greenhouse and pond. Currently I am building a project that will use them on a car.

Microchip provides sample source code. It is fairly easy to do with just one device. More then that gets a bit complicated. But not impossible.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is offline  
Old 2nd April 2008, 07:32 PM   #13
Default

any links to more info on them?
AtomSoft is offline  
Old 2nd April 2008, 07:34 PM   #14
Default

Start here
http://www.maxim-ic.com/products/1-wire/

Should be many datasheets and app notes.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is offline  
Old 2nd April 2008, 08:08 PM   #15
Default

Nice photo, what's the rating on that solenoid? You may need a bigger relay. You can use one relay to drive another.
Another solution is an opto-isolator. It's very gentile on the PIC and is exactly the same as driving an LED.
PS you can use the small 3pin header with RB3 to drive your relay, it also has PWM so you could experiment with holding current. (A relay doesn't need as much power to stay energized)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/

Last edited by blueroomelectronics; 2nd April 2008 at 08:11 PM.
blueroomelectronics is offline  
Reply

Tags
junebug, relays

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Complex (Sort of) timer circuit using relays... Electric Rain Electronic Projects Design/Ideas/Reviews 15 8th September 2008 01:45 PM
Microcontroller interfacing multiple Relays prevravanth Micro Controllers 6 14th December 2006 05:07 PM
What are Relays used for walters General Electronics Chat 21 21st August 2005 10:34 AM
Questions about relays... nerosrevenge General Electronics Chat 1 4th November 2004 09:31 PM
powering relays coma General Electronics Chat 6 23rd January 2004 09:17 AM



All times are GMT. The time now is 01:47 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker