IR emitter that can be triggered from a relay

Discussion in 'The Projects Forum' started by Charlie Becker, Apr 11, 2015.

  1. Charlie Becker

    Thread Starter New Member

    Apr 11, 2015
    4
    0
    I have an RV with a fantastic fan that has an infrared remote that turns it on/off. I would like to use my smart (wifi) RV thermostat to control the fan. I have already tested that when I enable the fan on the thermostat, it will switch on a relay (and it leaves it on).

    I'm trying to find a device that will emit the fantastic vent infrared signal when the relay is switched on and the same infrared signal when the relay is switched off (it's a single on/off button on the remote). Does any such device exist?

    Thanks!

    Charlie
     
    Last edited: Apr 11, 2015
  2. Søren

    Senior Member

    Sep 2, 2006
    472
    28
    Hi,

    I doubt it, but you could make it yourself:
    1 Scan the IR code
    2 Make a small µ-controller circuit that replicates the signal when the relay changes over (run the micro from a battery and let it sleep until needed - the battery will last forever).
    3 Install it.

    Which parts, if any do you need help with?
    (I've made a remote for my cam so small, that I could fit it into a cheap regular size lighter with a LED light - and still burn down the world ;))
     
  3. Charlie Becker

    Thread Starter New Member

    Apr 11, 2015
    4
    0
    Hey Soren! Thank you for your suggestion. I'm a software developer and fairly technical when it comes to hardware so I could probably handle the configuration once I have the parts... could help me out with a list of parts that I would need to get it to work, then I can probably figure out how to put it together.

    Thanks again,

    Charlie
     
  4. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    Consider hacking a cheap off-the-shelf learning remote control (ebay), you will then only need to figure out how to emulate an "on" keypress and an "off" keypress controlled from the thermostat. You could do this with simple electronic hardware.
     
  5. Charlie Becker

    Thread Starter New Member

    Apr 11, 2015
    4
    0
    Blocco,

    Hmm, very interesting idea. If I took a learning remote, learned the on/off button, then I could use the relay to press the button (simply connecting two wires). The only problem would be it constantly pressing the button, which could, end up turning the fan on/off constantly if there is ever a break in the signal to the fan...

    Are there any relays that momentarily stay on when power is constantly provided?
     
  6. Søren

    Senior Member

    Sep 2, 2006
    472
    28
    Hi,

    To get the IR code:
    Go to http://www.ostan.cz/IR_protocol_analyzer/
    and get http://www.ostan.cz/IR_protocol_analyzer/IR_protocol_analyzer_v1.1.zip
    Install the sw.
    Solder a photo transistor to a connector for your soundcard (emitter to ground/sleeve, collector to left mic-in/tip).
    Connect and run the program.
    Click "Sample"
    Fire the remote at a distance of 1..2 cm direct line from the phototransistor (if it doesn't work, you may have the photo transistor pins reversed, or used the right channel).

    This will give you a sample than can be saved as a bitmap, with indication of each period length.
    (Another way is to use an LSA if you have such a beast - it can be way more precise and then you aren't stuck on standard codes, but the protocol analyzer is probably all - remote codes for such appliances are usually quite simple).
    If your remote uses the NEC protocol, you should only care about the first code, as the rest is a simple "repeat what I just said" code.

    When the code is in, you program a cheap µ-controller to recreate this code (with a carrier, most likely 38kHz +/-2kHz) and, depending on the distance, it can drive an IR-LED (~920..940nm) via a resistor, or a transistor can be added for longer reach.
    Part of the code should check if the relay is actually changed over, a bit after the code is transmitted and otherwise re-transmit the code until it happens.

    The µC only needs 4 pins to do this: supply+, ground, one input to detect relay position and one pin to blast the IR out, so anyone will do, even a PIC10Fnnnn, a 6 pin SMD with 4 I/O-lines (the one I used in the above mentioned project).

    Big questions are...
    Have you ever programmed a µC?
    Do you have the equipment to program/burn a µC?
    Are you up for soldering SMD's or do you prefer leaded components?
    Do you have a preferred µC?
     
  7. Charlie Becker

    Thread Starter New Member

    Apr 11, 2015
    4
    0
    Soren,

    Thank you for you help. No I have never programmed a µC, and based on the info you provided, I would say it's not worth it, to me, to go through all of that effort for what I'm trying to accomplish here.

    I think I would be much better off doing what Blocco suggested and buying a universal remote and then programming something that would momentarily press the power button when the relay is switched on and then press it momentarily again when it is switched off. I was hoping I could find something off the shelf that would allow this to happen...

    Thanks,

    Charlie
     
  8. Søren

    Senior Member

    Sep 2, 2006
    472
    28
    Hi,

    OK, you might look for a replacement remote as well (it probably have a model or type numbers or such that will help you locate it), perhaps on eBay. It will be better than trying to get s learning remote to produce a crisp code (at least the learning remotes I've had was not too precise).
    Another possibility is to get someone local to bang it together - you might try asking here, if you tell where you're situated, as a plain remote won't be able to decide a hit or miss.

    Either way, good luck on getting something that works for you :)
     
Loading...