PIC relays control


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    just a little follow up on this

    Finally ,I had to order 4.5V relays cuz order 5V we're not stock.
    By time things arrived, I spoke with a few people and one told me that some relays were designed to be driven by IC, without anything special requd for protection.

    I then decided to give it a chance, and it work! First without a bi-color LED on the pins of the coil, but this would take to much power and only the led would light up.
    Removed the led, relay started switching, and kept going

    since then I've being debugging/coding for a while, and no problem to report, for the relay.
    Coding is another challenge

    relays PN is AGN2104H

  2. #2
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Default AGN2104H Relay

    Quote Originally Posted by flipper_md View Post
    just a little follow up on this

    Finally ,I had to order 4.5V relays cuz order 5V we're not stock.
    By time things arrived, I spoke with a few people and one told me that some relays were designed to be driven by IC, without anything special requd for protection.

    I then decided to give it a chance, and it work! First without a bi-color LED on the pins of the coil, but this would take to much power and only the led would light up.
    Removed the led, relay started switching, and kept going

    since then I've being debugging/coding for a while, and no problem to report, for the relay.
    Coding is another challenge

    relays PN is AGN2104H
    Hi Dom,

    Glad to hear you are making headway. Thank you for the follow-up information. We are all on the learning curve of life.

    It is good to get technical advice from knowledgeable people.
    Always double check information, at least till you find out which information sources are reliable.

    Always read the data sheet.
    Always “do your home work” with the technical briefs.

    AGN2104H Relay
    4.5V nominal 6.75V maximum

    If you look at the AGN2104H data sheet:
    http://pewa.panasonic.com/pcsd/produ...pdf_cat/gn.pdf
    Quote Originally Posted by the AGN2104H data sheet
    For Cautions for Use, see “Relay Technical Information”.
    That brings us to here:
    Relay Technical Information (PDF:400KB)
    http://pewa.panasonic.com/pcsd/product/re/rti.pdf
    Quote Originally Posted by Relay Technical Information
    Countermeasures for surge voltage of relay control transistor
    If the coil current is suddenly interrupted, a sudden high voltage pulse is developed in the coil. If this voltage exceeds the voltage resistance of the transistor, the transistor will be degraded, and this will lead to damage. It is absolutely necessary to connect a diode in the circuit as a means of preventing damage from the counter EMF.
    In the Technical Brief, they are assuming you are driving the relay with a discrete transistor. If you are driving from a PIC then the “transistor” is really inside the PIC. The same precautions apply.

    Hope this helps,
    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  3. #3
    Join Date
    Jul 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Thanks much for the check Adam!

    I admit I'm a bit lazy at reading tech stuff, and I kinda trust a lot electonic components, just like mechanical parts
    I fear only things when they start to smell weird, burn my fingers or don't light up anymore.
    Further more, i'm not skilled at welding so less means better!


    I understand I might be hurting the poor PIC now, but I'm just so curious to see how long he will take it that I can't get myself to puts some diodes in.
    By caution I measured the peak voltage on my fluke(112), it says 3.3V peak after a couples switch, but is that reliable? The FLuke alone may buffer the voltage?

    those tiny processor are heck of fun to play with, it's never ending!

    ... if I had a girlfriend, she d probably wish to be a PIC 8)

  4. #4
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Exclamation HElp me please

    I need to know how to write the code to switch on/off a relay when a temperature setpoint is reached. The output pin im using is RC1 of a 16f873. Please, someone help me!!

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kalind View Post
    I need to know how to write the code to switch on/off a relay when a temperature setpoint is reached. The output pin im using is RC1 of a 16f873. Please, someone help me!!
    Code:
    main:
    if temp > setpoint then
         portc.1 = 1
    else
         portc.0 = 0
    endif
    goto main
    You write code by typing at the keyboard.

  6. #6
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Default OMRON sold state relay w/built in snubber 240VAC @2A

    I have been using the OMRON G3MB-202PL DC5 solid state relay for my AC christmas lights controller. They only pull ~15mA (input impedance is 440ohms +/- 20%) and work great for switching. The voltage input is 4-6V for on. I drive them directly from my pics and have had no problems. I can tell you that it is a GREAT idea to include fuses in your circuit when you use these if you are planning on large loads 1A+. The best part is that the snubber is built right in the SIP package. They go for 4-5.50 from DIGIKEY part #Z915.

    From this forum I learned how to hold the state on or off with a simple counter.
    I use this to

    main:
    if button = 0 then
    i = i +1
    'blah blah
    endif
    gosub choice
    goto main

    choice:
    if i.0 = 0 then
    high relay1
    endif
    if i.0 = 1 then
    low relay1
    endif
    Attached Images Attached Images  
    Padawan-78

Similar Threads

  1. SMS control for Relays
    By charudatt in forum Code Examples
    Replies: 15
    Last Post: - 2nd May 2009, 00:08
  2. Replies: 5
    Last Post: - 12th September 2007, 15:59
  3. Motor Control PLC with a PIC
    By sougata in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 2nd November 2006, 07:59
  4. Pic Control With Software
    By Agent36 in forum General
    Replies: 5
    Last Post: - 18th October 2006, 18:18
  5. Need help on pic to pic flow control (simple problem I think)
    By khufumen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 00:34

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts