Shop OBEX P1 Docs P2 Docs Learn Events
Relay versus direct logic for longer lifespan of product? — Parallax Forums

Relay versus direct logic for longer lifespan of product?

T ChapT Chap Posts: 4,223
edited 2012-05-06 13:45 in General Discussion
I use a Bosch PIR device and it is very reliable so far after a few years of in field use. However, I always remove the resistor that feeds the transistor which turns on the relay(5V) and run the voltage directly out to the Propeller. Several reasons for direct voltage, one is I do not want to hear the relay noise in some of the applications, but also I always feel like the relay has a finite number of clicks until it fails. This new project will be far greater detections than previous systems, and I am weighing if the standard off the shelf version may not be such a bad idea for ease of replacement down the road(if needed). If the Bosch dies for any reason, it is going to be a headache for the client as it is the door for the main entrance to a retail store, and it will be urgent to get it replaced. No problem with replacement, I can include a spare and avoid some of the stress. However, if you were making the decision, would you use a relay or direct output to hedge your bets?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-05-06 10:04
    T Chap wrote:
    However, I always remove the resistor that feeds the transistor which turns on the relay(5V) and run the voltage directly out to the Propeller.
    ??? I have no idea what that means. A picture is worth a thousand words. Draw us a schematic:

    -Phil
  • Mike GreenMike Green Posts: 23,101
    edited 2012-05-06 10:31
    How do you have the output of the Bosch sensor connected to the Propeller's I/O pin? The relay provides some isolation between the sensor and the Propeller. Given that the sensor runs on 5V, the Propeller needs some protection for its 3.3V logic inputs. You may have a resistor between the two to provide this protection.

    It's always a problem when you modify an existing device in a commercial installation. The manufacturer will not provide a warranty. It's extra work if it has to be replaced. If something goes wrong with a device connected to it (like your Propeller controller), you can't blame the sensor manufacturer. Relays are rated for a certain number of closures. The exact number depends on the relay and its construction. Worse case for a standard low voltage relay is over 100,000 cycles. With a reed relay, you may get over 5,000,000 cycles.

    I would use the sensor as supplied by the manufacturer. If I didn't like some feature of the sensor, I'd look for someone else's product that fit my needs better. Sometimes you need to make compromises.
  • T ChapT Chap Posts: 4,223
    edited 2012-05-06 10:46
    Phil, a simple transistor turns on the low side of the relay coil from a PIC on the Bosch PCB. 5V turns on the transistor base via a resister, which allows the relay coil to see GND. I remove the resistor, run a jumper off of where the resistor was, through a 1k to the Prop that is attached via a shielded cable approx 20' away. The Prop has a weak pull down at it's input.

    Mike, I am not concerned really about the warranty on the Bosch, PIR, it is a small expense to provide a spare to have on hand. Let's use 100,000 cycles as a lifespan reference. 250 detects a day * 365 = 91,250. The detects could be more, even double that.


    Edit. In either case, the device can be removed with 2 screws, and three cables will be attached right behind the device with wire nuts for easy change out. The change out to a replacement has no bearing on what method is used, it is just three wirenuts.
  • kwinnkwinn Posts: 8,697
    edited 2012-05-06 12:08
    I can see how not having to debounce a relay contact would simplify the prop software and increase the reliability of the PIR sensor so I would be tempted to bypass the relay. I would try to make the modification such that the standard PIR and the modified one would work in the circuit.

    Have the prop pin with a pullup resistor and debounce software so it would work with the unmodified PIR sensor. Modify the PIR sensor by removing the relay or cutting the trace from the transistor to the relay coil and using the transistor to pull the prop pin low.
  • T ChapT Chap Posts: 4,223
    edited 2012-05-06 13:45
    Oh, nice idea. Make it so if they replace it themselves, it works the same as if I provide the mod, same wiring. Thanks!
Sign In or Register to comment.