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

    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)

  2. #2
    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!!

  3. #3
    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.

  4. #4
    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