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!!
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!!
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
Padawan-78
Bookmarks