Friday, December 04, 2009
For a few years I have been interested in short range wireless for smart sensor networks.
The two things that really interest me are firstly, a very low power receiver which could work on a few tens of microwatts of power - so would last significantly extend lifetime whilst running on a modest battery - e.g. 2 x AA Duracell.
Secondly a really cheap way of making a transceiver in such a way that transmit and receive functions share common parts thus leading to substantial savings in component cost and bill of materials.
Given these two goals, I set about my quest - a SAW Micropower Transceiver.
After some experimentation and breadboarding, I believe I have a simple design which could with some further development achieve these joint goals. The circuit is intended for smart sensor applications, which need to have a transmit capability, but their functionality could be greatly enhanced if they had a receive function too - especially if the incremental cost of providing the receiver is very low.
Working with such low power levels means that baud rates have to be low. The SAW resonator has a maximum switching frequency of about 4kHz so this limits the practical baud rate of these devices to say 2400baud - a standard baud rate that is easy to work and debug using a terminal programme. At 2400 baud, a typical 16 byte packet takes 66mS to transmit, which for domestic sensors for thermostats and appliance control is perfectly acceptable.
Working at even lower baudrates would allow even less power consumption in the receiver. The receiver could say fall back into a low power idle mode - where it can receive say a 300 baud wake up signal, which wakes the micro and reconfigures the receiver for 1200baud or 2400baud reception.
However, as is so often the case with electronics, it is a law of diminishing returns. You might have a great receiver that draws 350uA at 4V, but with 120uA at 2V it very much lacks in sensitivity - a lesson I learned by experience.
A US patent by Thomas McEwan was my first inspiration for a micropower super-regenerative receiver, but initial attempts to get this to work were something of a failure. However another trawl of patents turned up a few more interesting ideas. The result is a combination of techniques selected from the various patents.
A SAW Stabilised Transceiver
Dr. Eddie Insam describes in his Wireless World article how the super regenerative detector is very close in configuration to a Colpitts oscillator - which is used at the heart of most SAW stabilised transmitter circuits.
He suggests that you could start with a SAW based transmitter and convert it into a super- regenerative receiver. This is effectively what I have managed to achieve.
What sparked things off this week was a US patent for a SAW resonator stabilised super-regenerative receiver by Harold Bolling III, who worked for RF Monolithics - a US manufacturer of SAW devices
This uses a single port SAW resonator - just like the type used on most SAW based transmitter modules - such as the Telecontrolli ones I use.
I had previously failed to convert a SAW resonator based transmitter into a super-regenerative receiver - but this patent was the spark of information I needed. A simple modification to a standard transmitter module, and by driving it in and out of regeneration using an external PIC microcontroller, you get a passable super regenerative receiver.
Bolling's patent used a dual comparator and a quad op-amp in an elaborate timing and filter circuit for signal recovery - but as I could not get that part of the circuit to work properly, I ditched the ICs and decided to hack it with a couple of discrete transistors. This leads to a significant cost saving in components.
I have put this together on a breadboard, see top photo, and have a demonstrable receiver that initially used about 350uA at 3V controlled by a PIC. I have subsequently reduced this current to about 100uA.
When constructed from surface mount components, the whole design fits onto a board about 25mm square.
The range is pretty good for a super-regenerative receiver - at least 10m through two single brick walls - adequate enough for indoor devices such as room thermostats and remote switching of electrical appliances.
A simple I/O change from the PIC and the receiver reverts back to a standard 433MHz SAW stabilised transmitter.
The standard Telecontrolli Tx module uses 11 components, a typical super-regenerative Rx uses about 30. In my design, I take the standard Tx module, add a further 18 parts, which includes the PIC micro, a schottky detector diode and two NPN transistors and I get a complete 433MHz transceiver - costing under a pound to implement.
How it Works
At its simplest a super-regenerative receiver is an RF oscillator - usually based around a single RF transistor which is driven in and out of oscillation by an external quench signal which is normally between 10kHz and 200kHz. As the RF oscillator starts up, it exhibits considerable gain, and is very sensitive to any external RF which is coupled into the oscillator from an antenna circuit. If there is RF present, the oscillator will show a marked decrease in start-up time, or conversely it will use less supply current to reach a given level of oscillation - because some of the energy to achieve oscillation is supplied from the received RF signal.
In my implementation a PIC is used to generate an external quenching signal which is used to drive the Colpitts oscillator in and out of oscillation. This is a low duty cycle negative going pulsed waveform. In the first iteration this was a repetative rectangular waveform of approximately 10uS low and 90uS high. (This was subsequently improved to 16uS low and 354uS high - saving a lot of drive current). The quench frequency needs to be at least twice the baud rate of the serial data - as this is a sampled data system, both Messers Nyquist and Shannon need too be kept happy.
This pulse waveform is applied to the emitter of the RF transistor on the Tx module. The result is that the SAW stabilised Colpitts oscillator starts up and begins to increase its amplitude of oscillation exponentially. The output of the oscillator is capacitively coupled into the schottky detector diode, and it is given a light forward bias using a 10M ohm pull-up resistor. The schottky diode detects and rectifies the RF and this produces a series of negative going exponential pulses - of amplitude in sympathy to the detected RF. If there is a source of in-band RF energy, coupled via the antenna, into the Colpitts oscillator, then this RF will speed up the start up time of the oscillator, and the detector will reach full detection amplitude quicker but also be considerably slower to return to its quiescent state if RF is present.
This results in completely different pulse shapes emerging from the detector, depending on whether RF is present or not. From the change to the pulse shape, we get a change in the charge in the filter capacitor and from this we can amplify and recover the demodulated data. This detected pulse waveform is smoothed by a 2.2nF capacitor to reduce the level of the high frequency quench signal, the resultant being the demodulated AM data with an amplitude of between 10 and 50mV - see photos. This signal is then capacitively coupled into the base of the first external transistor via a 2.2uF electrolytic capacitor, where it is amplified to about. The NPN transistor is set up for a gain of about 25, with a 1M collector resistor and a 10M base biassing resistor to the collector. The output of this first transistor has data pulses about 500mV in amplitude and these are passed onto the second transistor to be squared up and brought up to logic level.
The lower scope trace shows the output from the detector when there is no RF present. The upper trace is the detector output when RF is present - a large change in pulse area. Timebase is 5uS and scope sensitivity is 50mV per division.
These traces are a little confusing because they are upside-down - an increase in detector output results in a lower level trace - i.e. things are inverted. By way of explanation - On the lower trace, when the pulse turns on the RF oscillator, the detector output rapidly falls, this is probably because the transmitter emits a pulse of broadband RF when it's first switched on. The oscillator then settles down to steady output shown by the exponential rise, which then levels out. However the oscillator is then turned off again by the rising pulse, shown by the short vertical section and overshoot at the end of the 12uS pulse. On the upper trace, the oscillator starts to stabilise, but is hit by a sudden input of external RF from the antenna circuit. This causes it to start to oscillate with greater amplitude than before, and this is characterised by the change in direction of the trace, becoming an exponential increase in detector output. Then the pulse turns the oscillator off, but the received RF still continues to produce detector output as the oscillator slowly ramps down to its quiescent state - which takes several tens of microseconds - upper trace. Thus the detector output has a much greater area corresponding to a significant change in voltage - this can easily be recovered with a simple RC filter circuit built into the first transistor stage.
Having an on board receiver will allow a smart sensor to receive configuration updates from the master hub, or receive and re-transmit message packets from other sensors. Additionally you could use a wireless bootloader and transmit firmware updates to the sensor via the wireless link.
Update 5/12/2009 - I later revisited the pulse generator timings, and settled on a low time of 16uS and a high time of 354uS, reducing the draw of the receiver circuit to just 170uA. It also allowed me to clock the PIC at just 500kHz - also reducing the power budget significantly. A means is needed to run the pulse generator autonomously of the PIC - such as a 74HC4017 decoded decade counter, clocked from the PIC's 32kHz watch crystal oscillator, or the internal PIC oscillator brought out to an I/O pin.
So, to sum up:
1. A super-regenerative (SR) receiver with an external quenching circuit, which turns on the RF oscillator for a short duty cycle of about 1:24 thus running on very low current. Less than 200uA for a 1200baud receiver running on a 3V supply.
2. A SR receiver that is made substantially from a SAW stabilised transmitter circuit, and at it's simplest, includes a 2 transistor signal recovery chain.
3. A SR receiver which uses a lightly forward biassed schottky barrier diode as a signal detector
4. A SR receiver which can be switched from receive mode to transmit mode by altering the logic levels on certain circuit nodes using the I/O pins of a microcontroller.
5. A SR receiver which can be implemented with sub-200uA current draw - opening up the possibilities of improved battery life.
6. A transceiver circuit which can be implemented in under 30 surface mount components on about 1" x 1" of pcb area
7. A transceiver that can be built in volume for under 1 US$
8. The SR functionality is almost "free" if a SAW transmitter is already used in the design.
9. A transceiver design that will form part of an open hardware smart sensor design.
10. A low data rate transceiver intended primarily for short range devices, smart sensor networks, control of domestic equipment and general use in the home.
11. A transceiver that can be modified to work in the various unlicensed bands, eg 315, 433, 868MHz.
12. A transceiver circuit which could be modified to incorporate a micro-power wake up circuit, using a voltage multiplier circuit formed from schottky diodes.
13. A transceiver that uses a voltage stabilised micropower relaxation oscillator to provide its pulse train.
14. A transceiver that uses micropower amplifiers made from CMOS inverters operating in their linear region as part of the signal recovery channel.
In this version, the bulk of the 170uA is consumed by the Colpitts oscillator working on a 1:23 duty cycle. The PIC takes 550uA just driving the pulse stream - so a lower power method of producing the pulse stream is needed - possibly a 4017 decade counter running off the PICs 32kHz clock.
However, a better method is to use a single Picogate schmitt inverter, running as relaxation oscillator. With this oscillator taking just 20uA at 2.0V power supply - the prospect of a 100uA superregenerative receiver looks achievable. However - note that as the supply current is reduced, there will be a reduction in gain and sensitivity. It's all a case of tailoring the receiver performance to suit a given application.
The the two signal recovery transistors take just 20uA, but could be replaced with a single Picogate CMOS inverter, run in its linear region - see McEwan's patent. This provides high gain at very low power levels at only a small price premium over the two transistor solution.
McEwan's patent US 5630216 can be found here:
Whilst the PIC is in low power sleep mode, the receiver could be run as an even lower power wake-up receiver. The output amplifier/transistors could be used to amplify the output of the schottky RF diode voltage multiplier circuit. The wake up circuit would respond to a low datarate packet added to the beginning of the packet sequence, and this would interrupt the microcontroller out of sleep mode and enter the normal super-regenerative receive mode.
See Fig 3. here for details of 5 stage voltage multiplier circuit for receiver wake up design.
Extensions to the Basic Design
The basic receiver has been built on a small prototyping breadboard using a Telecontrolli transmitter module as the starting point. This keeps all of the RF circuitry in one compact module with a good groundplane. The original design used just 15 components plus the PIC. Whilst the original used the PIC to generate the pulse train, this was to power hungry and so a low power alternative has been found. Some additional components have been added to make a more reliable design.
A 74HC14 Schmitt inverter has been arranged as a relaxation oscillator, to provide the train of pulses to energise the receiver. To get this inverter to run on minimal power a stabilised 1.2V power supply has been fashioned from three diodes in series fed from the battery rail with a 220K resistor in series and a suitable reservoir capacitor. The pulse output is fed into an NPN transistor and this pulls on the emitter of the RF transistor in the Tx module. This oscillator uses less that 8uA when running. The timing resistors have been chose to give an on time of about 20 to 30uS and an offtime of about 380uS. The total pulse train should not exceed 415uS - if you want to successfully demodulate 1200 baud. The relaxation oscillator is very voltage sensitive, so it is imperative that it is run from a diode stabilised supply - so that performance does not change radically with battery voltage.
Taking a hint from McEwan's micropower amplifier built from a 74HC04 inverter, I incorporate this as a pre-amplifier which follows the schottky RF detector diode. Whilst it is possible to provide sufficient gain after the diode detector from just two NPN transistor stages in series, as was achieved on the prototype, the preamp gives much better performance when working with weaker signals. As per McEwans patent notes this preamp runs on a stabilised 1.0V supply and draws literally a couple of microamps.
The signal recovery chain then consists of a series of three NPN transistor stages, the first to re-invert the output from the pre-amp, and the following two to provide filtering and data slicing so that the output of the receiver is compatible with 3V logic inputs on the microcontroller.
These additional features can be very economically implemented using Picogates - single CMOS gates in SOT23/5 surface mount packages.
Getting the receiver to work reliably on breadboard has been a little tricky - but as this was just to prove the concept, I can now move to a pcb design.
I have commenced a pcb layout of the transceiver using Eagle CAD, which appears to be a popular choice amongst the hobbyist community - thus making the design more readily available to those who wish to tinker. The complete transceiver fits into 25mm x25mm which makes for a very compact design if you include a surface mount PIC or AVR.
This prototype uses a pulse train to switch the emitter of the RF transistor thus driving the Colpitts oscillator into oscillation. It is probably equally viable to apply the pulse train to the base input of the RF transistor, which saves a little complexity and modification to the Tx module.
If you can accept a lower baudrate, the power consumption can be much reduced by reducing the frequency of the pulse train. This is done by increasing the off time. At 600 baud, we could afford to be on for 30uS and off for 800uS - initial experiments showed that you could get the RF front-end consumption down to50 to 60uA.
The signal recovery chain could be implemented in McEwan style, micropower amplifier stages using CMOS inverters. However you get just as many NPN transistors for the cost of a hex inverter IC.
McEwan's design used a pulse shaping network to drive the emitter of the RF transistor with a train of negative going exponential pulses. This had the advantage that it drove quite high currents into the emitter just enough to kick it into oscillation. He also claimed to be able to run the RF transistor with about 220K of resistance in the collector - forcing the RF oscillator also to work at very low current levels. I have not yet had any success with such a lightly biassed RF stage.