PIC relays control


Closed Thread
Results 1 to 21 of 21

Hybrid View

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


    Did you find this post helpful? Yes | No

    Post a snubber

    Hi ohararp,
    Quote Originally Posted by ohararp View Post
    Bill, do you have a schematic or part number for this control circuit with snubber by chance?
    Here is a simplified example of a snubber for AC.
    And a “fly-back” diode for DC. Note polarity.
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1885&stc=1&d=118558358 0" />

    -Adam-
    Attached Images Attached Images  
    Ohm it's not just a good idea... it's the LAW !

  2. #2
    Join Date
    Apr 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default A little confusion here.

    OK...

    The snuber I spoke of actually is acrossed the "contacts" of the relay. You only need this if your driving an inductive load or a really high current circuit. Like say a large motor or amplifier.

    the "flyback" diode is used across the "coil" of the relay (reversed biased) to stop the colapsing field in the relay coil...Not in the load. (Although if your load was a DC inductance I supose it would work there too...)

    You can use a Zener to clamp the voltage if your concerned about spikes. But if your power supply is well regulated you should not have any problems swithing 130 mills. Just make sure you have good decoupling.

    You could use a SCR like was mentioned. You will need to remove the source voltage to get the scr to "unlatch" or turn off. This might be a good option but would require more engineering. (transistor to remove the voltage from the Anode long enough for the SCR to turn off and slow enough that it does not trigger itself)

    For the kind of current your looking at. I would use a n-channel FET. I dont really have any easy way of making a schematic for you but I will try and explain.

    Take the HIGH from the pic and run it through a series resistor that will limit the current to about half the Imax of the PIC (about a 100 ohm should give you about 12mA off the top of my head) hook the resistor to the gate of the FET put the load (your camera) in the source circuit and ground the drain.

    Oh...And this is assuming that your cameras run on DC. If your switching AC then you will need a triac.

    By using a FET you will reduce your overall Current drain. It takes alot less current to keep a FET on then it will to hold a realy.

    If you look you can find a latching Relay. I personally have never used them so am not to familar with them. But I would bet they are more expensive then using a standard realy or FET.

    If you would like I will look at my schematics tommorow at work and get the actual values I used for my snubber. I think it was .01uf and 10K if I remember right but don't hold me to that.

    Hope I have helped....

    Bill12780

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


    Did you find this post helpful? Yes | No

    Post schematic

    Quote Originally Posted by bill12780 View Post
    For the kind of current your looking at. I would use a n-channel FET. I dont really have any easy way of making a schematic for you but I will try and explain.

    Take the HIGH from the pic and run it through a series resistor that will limit the current to about half the Imax of the PIC (about a 100 ohm should give you about 12mA off the top of my head) hook the resistor to the gate of the FET put the load (your camera) in the source circuit and ground the drain.
    Hope I have helped....

    Bill12780
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1886&stc=1&d=118564652 0" />
    5 V/100 Ohms = 50 mA
    5 V/400 Ohms = 12.5 mA (half the Imax of the PIC)
    Attached Images Attached Images  

  4. #4
    Join Date
    Apr 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default oops!

    Quote Originally Posted by Pic_User View Post
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1886&stc=1&d=118564652 0" />
    5 V/100 Ohms = 50 mA
    5 V/400 Ohms = 12.5 mA (half the Imax of the PIC)
    oops....Sorry....it was late when I posted that. I think I was going for the four(4) key on the keypad and fat fingered it to the one(1) right below it.
    (I mean 5/.0125 is easy math I do in my head all the time...had to be a typo...cant belive I was that tired! hahaha!)

    Pic_user...You obviously have WAY more experience with this.

    I will yield to your expertise here and bow out. I just thought that I could return the favor for all the help that I get here.

    Thanks for correcting that.

    Bill12780
    Last edited by bill12780; - 29th July 2007 at 18:25.

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


    Did you find this post helpful? Yes | No

    Smile We are all in this together

    Hey Bill,

    I do exactly the same thing with resistors. I think in current, and sometimes go down in resistance value, to lower the current, oops. I also say “bigger resistor” when I mean a bigger current, oops. We all do that type of mis-speak, don’t worry about that.

    You are more than welcome, to discuss alternate ways to do things. There is usually more that one way to solve electronics problems. Just as there is more than one way to program an algorithm. The fun of the forum is the multiple solutions discussed. Let the user decide which way they want to go. Or let their electronic junk-box decide for them. Please, always put your ideas into any thread that you want to help with. Your electronics experience is of great value.

    I posted that CMOS schematic from your description. You had said you didn’t really have any easy way of making a schematic. If you look for a drawing program called “paint.NET” it is free and way ahead of MSPaint.

    We are all in this together,
    -Adam-

  6. #6
    Join Date
    Apr 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Thank you..

    Thanks Adam,

    I appreciate your kind words of encouragement.

    I just kinda felt like a dumb A** if you know what I mean. I feel like a leach around here most of the time because I am still very new to the PBP and the digital world in general. always asking question that I am sure to some are so elemetry they are bored to tears! I have not had to use it this sort of thing much in my career. Hence...Ignorance...

    I will spout-off when I think I can help. But PLEASE if I am wrong just swat me on the nose with a rolled up newspaper!

    Maybe one day I can actually be of some help! hahahaha

    Thanks for the tip on the proggie...I will check it out. If I was at my work I would have just slapped something together in Eagle really fast. But I have never download it here at home.

    Thanks again! (I need to program an F-key for that line)

    Bill12780

  7. #7
    Join Date
    Jul 2007
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    thanks Gentlemen

    all of this end up being very constructive for me, and now I just need to set my mind on what parts I will order to get things started!
    My programmer is dead anyways, I've got plenty of time till the new one comes back

    the double way diode, that's pretty funky stuff!


    I'm using DesignWorks Lite for schematics, and it's pretty good for me so far...

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