WOw finally some place I can help!
Ok here is the deal,
You MUST use a diode across the coil of ANY relay (unless its got one built in) Its for the back EMF (colapsing magnetic field) of the coil when you un-energize it.
If your looking for a latching type of switch depending on what your doing you have lots of options. relays with NO and NC contacts (probly your best bet), scr's, Triacs etc..
If your worried about not being able to drive the coil from the PIC. You can just use a FET. The input impedence of the gate of a FET is really high and takes almost no current to turn on. Just make sure to use a series resistor in the gate circuit in case the FET ever fails (If the fet ever shorted gate to whatever it could hurt the PIC)
Oh, one other thing to consider is what your switching. If your switching AC with lots of current you will need a snubber circuit to reduce the arching on the relay contacts. I just went through this on my predesesor's motor control circuit at my work. His "new" design would fuse the contacts together about the thrid or forth time the motor started.
Well that is my two cents (probly all its worth) hope it helped. If you want to post a schematic of what your doing I would be more then happy to look it over.
Best!
Bill12780
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-
1 Attachment(s)
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