Samstag, 15. September 2012

The serious garage door opener

Garage door openers are handy little gadgets. Most of them are cheap chinese plastic crap though. This one definitely isn't. It started by collecting parts from my favorite electronics shop: the dumpster.


An old emergency shutdown switch makes the perfect case with a seriously big red button.






The original opener was available for reverse engineering. It sends a 433.92 MHz tone which is keyed on or off (ASK) to transmit the 10 bit entry code. What is actually sent is:
0 kkkkkkkkkk bb
where k is the secret 10 bit key and bb  is either 01 or 10, depending on which button is pressed.
Before transmitting, the bits are converted to symbols:
1 = 110
0 = 010
Each bit of the symbol then lasts for ~ 700 us.


There are several ways of making a 433.92 MHz oscillator. The easiest is to use one of the many transistor oscillator circuits. Most of them use an LC resonator to set the frequency. At 433.92 MHz we would have to deal with single turn inductors and pF capacitors. Although it can be made to oscillate, the frequency would be extremely dependent of its surroundings and just putting your hand anywhere close to the antenna would detune the resonator too much. Replacing the LC resonator by a Surface Acoustic Wave Filter (SAW) would be the solution. These filters are very narrowband (a few 100 kHz) and act as a stable frequency determining element. Most RF remote controls use a SAW filter. However the component is hard to find for the exact frequency needed.

As no SAW filter was available, the MAX7057 was used to generate the 433.92 MHz signal. It uses a 20 MHz crystal as frequency reference. A internal fractional PLL allows to generate any frequency between 380 MHz up to 450 MHz which can be set with a resolution of 4.8 kHz.



A small PIC16LF819 microcontroller is used to key the RF signal and to configure the MAX7057 over SPI. The whole circuit is powered by a 3.7V rechargeable li-ion battery.

Putting it all together:

From left to right: ICSP header, PIC uC, Crystal + LED, Inductors with 15 and 18 nH.

The MAX7057 is on the bottom side of the board. The thin orange wires are mostly for digital signals

Details on the RF - circuitry with the tiny SMD ceramic capacitors. With some care protoboard can be used at these frequencies although a solid groundplane would have been nicer.

The small inductors close to the SMA connector are for impedance matching to 50 Ohm and bandpass filtering the output signal.

In the case with battery and antenna:

Note how the footpoint of the antenna (the outer conductor of the coax) has been connected to the metal case by copper tape. This considerably improved performance.

The timing has been fine tuned by comparing the output (yellow) to the original opener (white) on a scope:


A measurement with the spectrum analyzer shows the carrier at 433.9 MHz and harmonics at +-20 MHz distance. This is the frequency of the crystal. Also the fractional PLL seems to generate a lot of phase noise. No big deal for this application though.


Reducing the span and zooming in. We see the frequency is off by ~ 100 kHz. This has been corrected now in software. The reason for the _huge_ noise floor is the PLL, having a quite wide loop bandwidth (600 kHz).


Et voila, the working garage door opener:


Next step is to include a serious power amplifier, stay tuned ...



The software was written in PIC assembler and is available here:
garage.asm
MPLAB project

Kommentare:

  1. Now try to take this remote out of a bag in an airport ))

    AntwortenLöschen
  2. Working at CERN? ;-)

    AntwortenLöschen
  3. Garage door opener is one of things that you can do yourself when it comes to garage doors. Numerous companies offer door opener installation kits which you can safely do yourself.
    bethesda garage door

    AntwortenLöschen
  4. Nice garage door opener it helps a lot, so you do not get off on the car and it keep you safe.

    upper marlboro garage door

    AntwortenLöschen
  5. Great idea... good work! thanks for the useful information you posted here...


    ashburn garage door

    AntwortenLöschen
  6. Really great information,Nicely explained with the photographs.


    Garage Doors.

    AntwortenLöschen
  7. Der Kommentar wurde von einem Blog-Administrator entfernt.

    AntwortenLöschen