Pages: 1 2 3 [4]   Go Down
Author Topic: 350Mhz RF Remote. I know there is 315mhz and 433mhz.  (Read 7243 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The good news is that it looked like the code I posted would work if it picked up the data.
  I think so too.  I ran it just printing things to the console.

There are no ICs on the button board or the transmitter.




Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm.... I thought we determined for sure it was using the PT2262 style encoders way back early in the discussion, but I don't see that now. You said you found the FCC documents, perhaps there is a picture provided there using a regular IC. They usually send a prototype to the FCC with test fittings installed. So they use regular components, typically.

I am 99% certain that it does use a compatible encoder, though. It's not the only game in town, but I have yet to see one of these that didn't use them.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I dont know.  There is nothing in the FCC documents besides the engineers name and things

https://apps.fcc.gov/tcb/GetTcb731Report.do?applicationId=568629&fcc_id=IN2TX28

The back of the remote case does list
FCCID: IN2TX28  and  IC: 3558A-TX28

Not sure what the IC is, but I kind of doubt it's what we want.

Edit:
I popped open a receiver module and found that the receiver has an IC.  It's a PT4302-X

Then again, my other 433mhz has an IC too, so it probably wont tell us anything.
« Last Edit: March 12, 2013, 03:03:16 am by Mysticle31 » Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What you were looking for is this:

https://apps.fcc.gov/oetcf/eas/reports/ViewExhibitReport.cfm?mode=Exhibits&RequestTimeout=500&calledFromFrame=N&application_id=568629&fcc_id=IN2TX28

And it is using encoder AS-12E

http://www.rentron.com/Files/ht-12e.pdf
« Last Edit: March 12, 2013, 05:12:04 am by Retroplayer » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ohhh! See newbies doing dumb things.  There was more on the FCC website.  

I did some searching around and found a form member who made a library for the HT-12E.  
here http://arduino.cc/forum/index.php?PHPSESSID=2b8cea5a27a650c478c694e178b72f5a&topic=24424

I've been playing with it.  If I hook it up and try to read a code, it prints FFFF which is case 4 under "check if buffered data matches the address mask" in HT12E.cpp

HT12E.cpp
Code:
/*---
  HT12E.cpp
  HT12E Support for Arduino
  Author: Marcelo Shiniti Uchimura
  Date  : May '08
---*/

#include "Arduino.h"
#include "HT12E.h"

HT12E::HT12E(int pin, unsigned int addrMask)
{
  _pin = pin;
  pinMode(_pin, INPUT);
  _data = 0;
  _mask = addrMask << 4;  // the HT12E basic word is a stream with an 8-bit address
                          // followed by 4-bit data. I left shift the
                          // address mask 4 bits so I can match it to the entire word
}

int HT12E::read()
{
  byte ctr;            // for general error handling
  _tries = 0;
  do
  {
    /* look for HT12E basic word's pilot stream */
    for(ctr = 0; ctr < 13; ++ctr)
    {
      while(digitalRead(_pin) == LOW);                // wait for the signal to go HIGH
      _dur = pulseIn(_pin, LOW);

      if(_dur > 9000 && _dur < 12000) break;          // 36x(clock tick interval)
    }

    /* if error, skip everything */
    if(ctr == 13)
      {
        _tries = 4;
        break;
      }

    /* now wait until sync bit is gone */
    for(ctr = 0; ctr < 6; ++ctr)
      {
        if(digitalRead(_pin) == LOW) break;
        delayMicroseconds(80);
    }

      /* if error, skip everything */
      if(ctr == 6)
      {
        _tries = 5;
        break;
      }

    /* let's get the address+data bits now */
    for(_data = 0, ctr = 0; ctr < 12; ++ctr)
    {
      _dur = pulseIn(_pin, HIGH);
      if(_dur > 250 && _dur < 333)        // if pulse width is between 1/4000 and 1/3000 secs
      {
        _data = (_data << 1) + 1;         // attach a *1* to the rightmost end of the buffer
      }
      else if(_dur > 500 && _dur < 666)   // if pulse width is between 2/4000 and 2/3000 secs
      {
        _data = (_data << 1);             // attach a *0* to the rightmost end of the buffer
      }
      else
      {
        /* force loop termination */
        _data = 0;
            break;
      }
    }

    // check if buffered data matches the address mask
    if((_data & _mask) < _mask)
    {
      /* data error */
      _tries = 6;
    }
    else ++_tries;

  } while(_tries < 3);

  if(_tries > 3)
  {
    switch(_tries)
      {
        case 4: return 0xffff;
        case 5: return 0xfffe;
        case 6: return 0xfffd;
    }
  }
  return (_data ^ _mask);
}


HT12E.h
Code:
/*---

  HT12E.h
  HT12E Support for Arduino
  Author: Marcelo Shiniti Uchimura
  Date  : May '08

  Note  : make sure HT12E is operating at 3~4kHz clock range

---*/

#ifndef HT12E_h
#define HT12E_h
#include "Arduino.h"

class HT12E
{
  public:
                 HT12E(int pin, unsigned int addrMask); // this is the constructor
    int          read();                                // this is the main method
  private:
    byte         _pin;      // this is Arduino input pin
    unsigned int _data;     // this is data
    unsigned int _mask;     // this is the address mask
    byte         _tries;    // this is how many times Arduino could find
                            // valid HT12E words
    unsigned long _dur;     // pulse duration
};

#endif

Usage Example
Code:
#include <HT12E.h>

HT12E remote(7, B01111111); // pino 7, endereço 0111 1111b

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  unsigned int valor;
  valor = remote.read();
  if(valor > 0xFFF0) Serial.println(valor, HEX);
  else
  {
    Serial.print("DATA ");
    Serial.println(valor, BIN);
  }
  delay(1000);
}

He says it's a 12 bit encoder.  8 bits are the address, 4 bits are the code.  
My button board has 4 dip switches.  I dont know what it transmits.



How long is a word?  I seem to remember it being 2 bits, but maybe it varies?  I just barely understand enough here to be dangerous.
« Last Edit: March 12, 2013, 01:57:12 pm by Mysticle31 » Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A 'word' is anything longer than a byte, actually. It *usually* means two bytes or 16 bits. But a word could be anything. It is defined mainly by the databus width of whatever is generating it.

So an INT (16 bits, 2 bytes) would store your 12 bits of data. The way the chip was designed, the dip switches are connected to the 4 bit address and the buttons are connected to the 8 bits data lines. However, it really just spits out whatever is on the address and data lines, so a manufacturer could implement it however it wanted to.

The receiver IC is designed to set its address as well and it only listens to messages decoded with its address nibble (4 bits). When that matches, it sets its 8 data lines to match the transmitted data.

So FFFF doesn't seem right unless the upper 4 bits are being set to 1 by default. For 12 bits, the max value should be 0x0FFF (4095 decimal).

So the encoder is capable of controlling 16 different devices (4 bit address) and 256 commands (8 bits data.) But that would take a micrcocontroller decoding the data lines on the receiver end and a microcontroller pre-encoding the data on the transmitter end. Usually they connect the relay or whatever directly to one of the data lines. So, in practice it would only handle a maximum of 8 commands (only 1 bit at a time set) because typically they only use the single chip, no microcontroller at all. This would be in your case as well.

So, what this means is that one single pin is being set for each button. So your commands are going to be 1,2,4,8,16,32,64,128 since these are the only values that will use a single pin. Your address could be anything, though, from 00 to 15. you could try every combination with your code to see which ones the fan responds to.

I would do this, though...

keep your command set for 'fan on', and send that with all 16 possible addresses. Output which address it is currently sending to the serial port so you know, and have it increment only when you tell it to so you have time to catch the right address. Once you have the addresses, that will always be the same for that device. So then you write a new sketch that fixes the address at what you found, and send all the combinations of commands (only 8 ) and observe what they do.
« Last Edit: March 12, 2013, 05:08:02 pm by Retroplayer » Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Scratch part of that. The part of the datasheet you posted says it will output a complete word, so those extra 1's are coming from that. However, the last two F's would mean that all datalines were active. That's unlikey. Even if your address was 15 (F) meaning all DIP switches of the address were set, here is what it *should* look like when you press a button:


(the first FF part would be your address part)
FF01 = 1
FF02 = 2
FF04 = 4
FF08 = 8
FF10 = 16
FF20 = 32
FF40 = 64
FF80 = 128
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This thread has really made me hopeful, but unfortunately I'm left with a lot of questions after reading through it. It appears this is one of the only threads that turns up in Google that matches the same project I'm working on. I have a 350MHz Hunter remote for the ceiling light and fan. I have one in each room in my house and my goal is to remotely control through the Arduino.

Mysticle31, would you mind posting what your final code was to make this work? I've read up a lot on using a 315MHz or 434MHz receiver for obtaining the codes for various RF controls. My problem is, I've yet to find a sniffing solution that is working with my 315MHz receiver. I'm suspecting that there is a communication problem with the frequencies being different, but I've read that it should work by adjusting the 315MHz receiver. The back of my 315 shows three different frequencies: 315, 330, 433. I'm not sure what that means though. Did you need to get a 350MHz receiver to get the codes for your fan's remote?

Thank you very much.
« Last Edit: June 18, 2013, 09:18:42 pm by cstout » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This thread has really made me hopeful, but unfortunately I'm left with a lot of questions after reading through it. It appears this is one of the only threads that turns up in Google that matches the same project I'm working on. I have a 350MHz Hunter remote for the ceiling light and fan. I have one in each room in my house and my goal is to remotely control through the Arduino.

Mysticle31, would you mind posting what your final code was to make this work? I've read up a lot on using a 315MHz or 434MHz receiver for obtaining the codes for various RF controls. My problem is, I've yet to find a sniffing solution that is working with my 315MHz receiver. I'm suspecting that there is a communication problem with the frequencies being different, but I've read that it should work by adjusting the 315MHz receiver. The back of my 315 shows three different frequencies: 315, 330, 433. I'm not sure what that means though. Did you need to get a 350MHz receiver to get the codes for your fan's remote?

Thank you very much.

Forget the 350mhz frequency

I think the best way is to forget 350mhz frequency and look for other bypass method.

Why? because 350mhz is rarely seen, for the transmitter part, now the transmitter between 315 - 433 range or similar are all using SAW resonator, which is fixed frequency, not the old transmitter whose frequency can be adjusted by coil or capacitor.

A simple photo of current transmitter can be found at http://blog.solidremote.com/post/identify-rf-remote-control.aspx

And for the receiver part, the old super-regenerative receiver's frequency can be changed by adjusting the variable inductor on board, but nowadays super-het ones are using crystal stabilizer, which means not possible to change frequency unless you change many components on board - which also involves re-design and tuning.

If you're interested, there is a smarter way of adjusting frequency on modern transmitter chips, such as Silabs 4010, the frequency can be changed by configure the software, and can be changed from 27-960mhz, and also can switch between AM/FM, of course, there involves board parameter change also to achieve maximum output power.

Si4010 is truly great, to achieving so many feature in so small package and low cost! worth learn more.

Attach Ardunio to original transmitter board

In this way, you just simply remove the original buttons / or connect side-by-side on transmitter board, and use arduino output ( or via relay ) to simulate button press ( just simple on/off in circuit ), so everything works just same as before, the only difference is, arduino instead of fingers.

Hope it helps.
Logged

Pages: 1 2 3 [4]   Go Up
Jump to: