PDA

View Full Version : Dry Contacts



jhorsburgh
- 20th January 2008, 02:10
Hi All,
Is it possible that when a switch is pressed on a PIC16F628A it will close a dry contact?
I have tried using a relay but for some reason it temporarily scrambles the PIC when ever it activates, is it possible to close 2 pins on the PIC itself instead of having voltage come out?

Thanks for your help in advance?
Regards,
Jeremy

Pic_User
- 20th January 2008, 06:18
Hi All,
Is it possible that when a switch is pressed on a PIC16F628A it will close a dry contact?
I have tried using a relay but for some reason it temporarily scrambles the PIC when ever it activates, is it possible to close 2 pins on the PIC itself instead of having voltage come out?

Thanks for your help in advance?
Regards,
Jeremy

Hi Jeremy,
I don't know about dry contacts between any two PIC pins. Take a look at this thread about adding relays to a PIC.
http://www.picbasic.co.uk/forum/showthread.php?t=6784&highlight=flyback
Take a look at the "flyback" or "suppression Diode" reverse connected across the relay.
-Adam-

BobP
- 20th January 2008, 17:12
Hi jhorsburgh,

A 'dry' contact is usually a voltage free output as in a relay contact. In many cases it can be replaced by an open collector transistor output. But care must be taken to ensure there is floating power to one of the devices as the 0volts are connected together.

If you are sure there is no danger in connecting the 0 volts then a open collector will drive the input. Selection of the transistor is dependant on the voltage used on the trigger input and the current drawn.

If you can show what you are connecting to and the voltage across the input we can help a bit more.

When using the relay have you used a back EMF diode across the relay coil?

BobP

jhorsburgh
- 21st January 2008, 22:18
Hi Bobp,
I found a project on the internet involving PIC's instead of dedicated Encoder/Decoder to transmit IR signals. (diagram attached) I managed to replicate it and it works just fine when i touch the bare wires together but for some reason when i try to add a Switch or Relay (thanks Pic_User) to trigger a channel it doesn't work. The only difference is i don't have any capacitors on there, could that have an effect or is something else to blame.

Thanks for your help,
Jeremy

BobP
- 22nd January 2008, 10:49
Hi jhorsburgh,

Looking at the diagram the switches are part of a scanned keyboard routine. Open collector outputs would not be suitable to use in this circuit. But using a relay should work?

Getting it to work when you short the wires narrows it down to the relay.
First check the relay does close and you have the correct contacts. Next extend the relay on time (~1 sec).

Let us know how you get on?
Bob

jhorsburgh
- 31st January 2008, 22:22
Hey Bob,
I have put together two wireless circuits, the circuit attached above is a IR based circuit and the one attached below is a RF based circuit. What i am trying to do is use another PIC to trigger the buttons on these IR/RF circuits. I am using a 5v SPST relay (http://jaycar.com.au/productView.asp?ID=SY4036) with a 1N4004 diode across it.
For some reason the relay works perfectly with the RF circuit (PIC16f684) but with the IR circuit (PIC16F630) it works intermittently (1 in 50 triggers).

Is there any obvious reason this doesn't work, or is there an alternative to relays?

Kind Regards,
Jeremy