Safety switch relay thingy?

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Pyrobrit
Posts: 14
Joined: Fri Apr 27, 2007 7:49 am
Contact:

Safety switch relay thingy?

Post by Pyrobrit »

Hi,

I'm looking for some kind of switch or relay which can be initiated from a signal from a PIC device.

The idea is to power off a device (cut the feed from a battery) if a certain signal is received by the device over an rs-485 or CAN bus comms link.

Once the power is cut the switch would need to be physically reset by visiting the device. Does anyone know of anything that might fit this description?

Regards

Nick.W

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello

You can use a normal relay with a PICmicro by using a NPN transistor to boost the current from the PICmicro I/O.

The circuitry would be something similar to the following.


5v-------------Relay Coil --------------NPNcollector

PICmicro I/O Pin ----1K Resistor---- NPNbase

GND-------------------------------------NPNemitter

Pyrobrit
Posts: 14
Joined: Fri Apr 27, 2007 7:49 am
Contact:

Post by Pyrobrit »

Would the pic have to maintain a supply to the relay?

Can you get relays that use a coil to open or shut a switch but do not require a continuous feed to maintain the new switch state?

Regards

Nick.W

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Here is a little sample project where someone is using a relay for the purpose you are describing. You need to scroll down to the title The Latching Relay Circuit.

http://www.eleinmec.com/article.asp?24

This should help you to get started.

If the power is lost the relay will become unlatched.

To get a relay that will provide the latching you can either store values into the PIC EEPROM to detect a latch failure or you can get a Latching Relay. However im not sure if even Latching Relays maintain their state after power off.

Pyrobrit
Posts: 14
Joined: Fri Apr 27, 2007 7:49 am
Contact:

Post by Pyrobrit »

Aha! A bistable relay.

Perfect!

Cheers for your help. I'm in the middle of designing a complex firing system for fireworks using Flowcode and E-Blocks. It has to accomodate network communication but I wanted a way to remove power to the remote firing modules if they have their own internal batteries. Sending a signal to powerdown is one idea.

I haven't decided if the modules will have a local power supply or if I provide power alongside the data cable to each module. There are advantages and disadvantages to both methods.

regards

Nick.W

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Glad to be of help.

Let us know how you get on with your project.

Post Reply