Project

General

Profile

RFM12B OOK-receiver with op-amp

by JGJ Veken

Introduction.

The arssi signal output by the radio receiver is weak, but if amplified can be used to decode an OOK pulse train . This is performed by the opamp circuit.You have to solder a wire to access this pad (shown as red circle).

See for a description of the arssi signal http://jeelabs.org/2009/12/25/ook-reception-with-rfm12b/

Opampcircuit and description.

fig (1) Schematic for EAGLE:
see OOK_AC_coupled_inverting_amplifier.sch below

C1 and R1 form a coupling network to the ac signal from the RFM12, lowering the cutoff frequency would improve the noise immunity but the rising and falling edge off the OOK signal will be to shallow. C1 an R1 are highly responsible for the graph below.

Files for 5spice:
http:AC_coupled_inverting_amplifier.Anl
http:AC_coupled_inverting_amplifier.Sch

R2 with R1. makes the gain off this circuit, (some remarks later), C2 A small-value capacitor connected in parallel with the feedback resistor is used to prevent oscillation.

R3 and R4. A single-supply circuit connects the op-amp power pins to a positive voltage and ground. The positive voltage is connected to VCC+, and ground is connected to GND. A virtual ground, halfway between the positive supply voltage and ground, is the reference for the input and output voltages. The voltage swings above and below this virtual GND this is very important and differs in various types Opamps . (some remarks later)

C5.Care should be exercised when using capacitive coupling on pulse generators. Supply transients should be shunted by the use of decoupling capacitors (0.1 uF typical) located across the supply rails as close to the device (Opamp)as possible. (info from Texas )

C3 The capacitor also helps eliminate power supply and pickup noise (spikes on supply rails) which could be coupled in to the circuit.

Opamp IC1=LM358 A common value for single supplies is 5 V, but voltage rails are getting lower, this circuit uses 3.3 V and because of this, single-supply opamps are often rail-to-rail devices, which avoids losing dynamic range. The LM358 is not a rail to rail opamp so there is a loss in dynamic range , the output swing = 2Volt (The LM358/LM324’s output voltage swing at VCC = 5 V is 3.48 V) so the bias voltage is 1 Volt (network R3/R4 ). This means the ac signal is amplified 1 volt above and below the biasvoltage. This has some consequences for decoding OOK pulsetrain send from 0 to 2 meters away , the pulsetrain wil clip to much at 1 volt and decoding isn’t possible,larger distances are ok. A solution for this is to replace R2 with 1Mohm or 470 Kohm.

Opamp IC1=TCL27M2 The TCL27M2 is not a rail to rail opamp so there is a loss in dynamic range , the output swing = 2.7 Volt so the bias voltage is 1.35 Volt (network R3/R4 R4 becomes 39Kohm ) the circuit preforms well in short distances and larger distances because of the higher output swing.

Opamp IC1=OPA2340 The OPA2340 is a rail to rail opamp ,there is no loss in dynamic range , the bias voltage is 3.3/2 = 1.65 Volt (network R3/R4 R4 becomes 56Kohm ) the circuit preforms well in short distances and larger distances because of the rail to rail output swing. (best result of three types opamps)

Different Opamps IC1 see http://www.rn-wissen.de/index.php/Operationsverst%C3%A4rker TCL272,ICL7612,TS912,AD8551,OPA2347 supply 3.3 V .The last three are all rail to rail amplifiers.

Interrupts.

The circuit fig (1) generates a lot of interrupts, actually it generates interrupts all the time ,because the second part off the opamp IC1B is ony used as a buffer to drive the interrupt of the jeenode (ATMEGA328) The Jeenode software has no problem with this and can decode the right interrupt (OOK-code) with circuit fig 1.

IC1B can be used as a comparator to elimanate most unwanted interrupts by slightly increase the voltage on pin 6 (1.8 Volt), this can be done with two resistors from ground rail to power rail. see the circuit below (fig 2 with OPA2340).

fig (2)

Using a quad Opamp.

By using a quad Opamp (fig 3 ) unwanted interrupts can be eliminated ,and the circuit becomes more sensitive .The first 2 stages are used for a low-pass circuit type Sallen-Key , filter type Butterworth ,it filters some unwanted noise at it’s cutoff frequentie 1670Hz .The last 2 opamps are used as an amplifier. ( filter designed with TEXAS-I http://focus.ti.com/docs/toolsw/folders/print/filterpro.html)

fig (3) under construction 6_feb_2010 v0.2
see OOK_filter_amplifier.sch below

Results.

Using a dual Opamp.

Until now fig1 with the OPA2340 gives the best results on short and long distances,using IC1B as a comparator (fig 2)makes it slightly less sensitive.

Using a quad Opamp.

This circuit fig (3) is very sensitive ,because the use of the 4 poles filter most noise is eliminated ,and by using a 2 stage amplifier unwanted interrupts are eliminated. (sensivity is higher then when using a dual OPA 2340 Opamp fig 1 ).

Software.

The software is a single file (no includes) is tested in arduino 0017
see wiki_RFM12B_receive_OOK.pde below

****

Also available in: PDF HTML TXT