Shop OBEX P1 Docs P2 Docs Learn Events
Power On and Power Off a Remote Control with BS2 and a Relay — Parallax Forums

Power On and Power Off a Remote Control with BS2 and a Relay

Hello,

This is a silly issue in fact. Attached is a picture of what I'm trying to achieve as part of an automation project.
I have here an old remote from a fan. As usual is the case, the On/Off functionality is achieved by a single button.

I have managed to solder two wires to the On/Off button (the one immediately below the LCD display on the remote in the attached picture).
Manually, when I short the 2 blue wires once, the power comes on, and when I short them again the power goes off - so far so good

But I'm not able to replicate this when I hook up the two blue wires on the load side of a mechanical relay (something already in my parts bin) via this simple program:
' {$STAMP BS2}
' {$PBASIC 2.0}
counter VAR Byte
DEBUG CR, "Relay Trigger using a Microcontroller..." , CR

' Trigger the relay On and Off 3 times
' The remote control should turn On/Off 3 times
FOR counter = 1 TO 6
    DEBUG ?  counter
    HIGH 14
    PAUSE 750
    LOW 14
    PAUSE 1000

NEXT


Symptoms of the problem:

When the program runs, the relay triggers on and off as usual
But if the remote is off when the test begins, it turns on only once!
The relay triggers on and off over the 6 iterations, but the remote continues to be on.
The opposite is not necessarily true - meaning, if the remote is on when the test begins, it does not turn off

What could be the issue?
I have tested the relay with an LED circuit, and it works as intended.

Thanks for your help!
Andy
949 x 645 - 274K

Comments

  • ercoerco Posts: 20,256
    Seems pretty straightforward what you're doing. Maybe try a PAUSE 3000 instead of 1000, maybe there is a timeout in place.
  • Mike GreenMike Green Posts: 23,101
    edited 2016-02-17 03:57
    Do you have a "snubber diode" across the relay coil? What's the voltage and current rating of the coil? Remember that the HomeWork board's I/O pins have series resistors (220 Ohm?) that may limit the ability of the Stamp to close the relay? There's obviously a board for the relay. That may have a "snubber diode" and driver transistor on it, but, without your describing it, I can't tell. Are you using a fresh 9V battery? They're not meant for this kind of use and die quickly.
  • Thanks for the responses.
    As for the timing, I altered the value between the HIGH and LOW signls to as high as 3500, but there's no change in the behavior.

    Also, to Mike's question, the relay does trigger ON/OFF and i'm saying this because an LED circuit works without any issues. I thought that the 9V battery maybe the problem, but then the LED comes on . I will gather info on the relay, but I'm surprised that it can turn on the remote but cant turn it off when it comes around!
  • Mike, the battery is brand new , out of the box.
    Missed that part!
  • Resolved!!!! I swapped the relay with another - has the exact same spec ( Songle part # SRD-05VDC-SL-C) but the new relay has a smaller board. Not sure if this explains any low level differences between the 2 boards!

    The stamp was able to trigger the relay and turn the remote on/ off.
    The other test also succeeded - meaning if the remote is on before turning on the stamp, the relay toggles it to Off!

    Luckily, I had a spare relay that I totally forgot about! My actual project will have a solid state relay.

    Mike, can 2 parts with the same number and manufacturer have major differences?

  • It's not unusual for a manufacturer to use the same part number through several design revisions. Sometimes new revisions add new features. Supposedly revisions shouldn't be incompatible with previous versions. That doesn't always happen.

    Parallax used to sell a version of this, about 2 years ago (see datasheet here).

    I'm glad you got this to work.
  • Thanks Mike.
    Will check out the data sheet
  • Talk about coincidences!
    This is the relay that got my project working!! :smile:
  • Folks,

    Thanks very much for your help with this!
    I have published this project on instructables.com
Sign In or Register to comment.