Silicon ChipDorji 433MHz Wireless Data Modules - January 2012 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Australia's energy needs are in the hands of the clowns
  4. Feature: Arduino: What’s All The Fuss About? by Jonathan Oxer
  5. Project: A Stereo Audio Compressor by John Clarke
  6. Project: Build A Simple AM Radio by John Clarke
  7. Project: Dorji 433MHz Wireless Data Modules by Stan Swan
  8. Project: 3-Input Stereo Audio Switcher by John Clarke & Greg Swain
  9. Feature: Playing USB-Stick & SD/MMC Card Music Without A PC by Ross Tester
  10. Vintage Radio: The AWA PA1002 50W Valve PA Amplifier by Rodney Champness
  11. Book Store
  12. Market Centre
  13. Advertising Index
  14. Outer Back Cover

This is only a preview of the January 2012 issue of Silicon Chip.

You can view 26 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "A Stereo Audio Compressor":
  • Stereo Audio Compressor PCB [01201121] (AUD $15.00)
  • Stereo Audio Compressor front & rear panels [0120112P1/2] (PCB, AUD $15.00)
  • Stereo Audio Compressor PCB pattern (PDF download) [01201121] (Free)
  • Stereo Audio Compressor front & rear panel artwork (PNG download) [01201122/3] (Free)
Items relevant to "Build A Simple AM Radio":
  • AM Radio PCB [06101121] (AUD $10.00)
  • AM Radio PCB pattern (PDF download) [06101121] (Free)
  • AM Radio panels artwork (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)
Items relevant to "3-Input Stereo Audio Switcher":
  • 3-Input Audio Selector (Set of 2 PCBs) [01101121/2] (AUD $30.00)
  • PIC16F88-I/P programmed for the 3-Input Stereo Audio Switcher [0111211A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Firmware HEX file and ASM source code for the 3-Input Switcher [0111211A] (Software, Free)
  • 3-Input Stereo Audio Selector Main PCB pattern (PDF download) [01101121] (Free)
  • 3-Input Stereo Audio Selector Switch PCB pattern (PDF download) [01101122] (Free)
Items relevant to "Playing USB-Stick & SD/MMC Card Music Without A PC":
  • 3-pin JST plug to bare wires cable, 100mm (Component, AUD $2.00)

Purchase a printed copy of this issue for $10.00.

Chinese 434MHz ISM data modules just keep getting better and better! First impressions: Dorji DRF7020D13-043A 433MHz Wireless Data Modules . . . by Stan Swan And then we make some simple data repeaters A lthough restricted to just a few tens of milliwatts transmit power, the licence-free 433.92MHz (“433”) ISM (Industrial, Scientific and Medical) UHF band has continuing appeal for both professionals and hobbyists. Originally reserved for non-commercial radio use, considerable innovative data handling has emerged in recent times, with the low data rates (~9600bps) especially tempting for easy microcontroller wireless applications. Of course, 2.4GHz Bluetooth, WiFi and ZigBee wireless gear now abounds but these technologies best suit only very close links, as the higher radio frequencies are blocked by almost anything in the way. In crowded Asian cities, low-dataspeed 433MHz devices are preferred for utility reading, as lower UHF frequencies have better “punch” through obstructions. Although surprising performers for what they are, most cheap 433MHz data modules are generally very low powered (a mere few milliwatts) and often the receiver is somewhat “deaf”. Jaycar’s venerable ZW3100 and ZW3102 ASK (Amplitude Shift Keying) AM pair are typical, with their continued popularity relating to ease of use and simple set-ups. Superior FSK (Frequency Shift Keying) FM types are usually less susceptible to interference, although bandwidth will be greater. Enhanced performance however comes with GFSK (Gaussian Frequency Shift Keying) modulation, as the outgoing data is shaped to a narrow bandwidth, thereby improving receiver sensitivity. Dorji DRF7020D13 Australian PICAXE agents Microzed now handle a range of Chinese-made Dorji 433MHz GFSK modules and adapters. There’s even an innovative DRF5150S wireless sensor transmitter (and matching DRF4432S receiver) that can directly read such industry standard sensors as the Maxim DS18B20. That’s right – no external micro needed! Module prices are around $25 each. The module really is small, as shown here (with a stamp for comparison!). Below is the connection data. PIN NameFunction Description 1 GND Ground (0V) 2 Vcc Power 3.4-5.5V DC supply 3 EN Input Enable pin (>1.6V) 4 RXD Input UART input, TTL level 5 TXD Output UART output, TTL level 6 AUX Output Data In/Out indication 7 SET Input Parameter setting pin 62  Silicon Chip siliconchip.com.au Several Dorji transmitters however have powers that exceed the 10dBm (10mW) or 13dBm (25mW) 433MHz limit legally permitted in most Western countries. The stamp-sized (OK, large stamp!) DRF7020D13-043A transceiver appeals for its features and legal transmitter and it’s this that the article focuses on. The “7020D13” (so called for its RF IC) is powerful (20mW), sensitive (around -118dBi at low data rates), versatile and easy to use. Inbuilt buffers and error correction give reliable “wireless serial port” action – essentially what’s sent out at the TX (transmitter) of one module is transparently seen at the RX (receiver) of the other. The modules handle all the hard work! A rugged gold plated SMA antenna socket is also featured, so you can connect the antenna of your choice. More on this shortly. They are indeed a little power house! Leading-edge 433MHz offerings of just a few years back, although considered smart at the time, increasingly look quite tame in comparison. Dorji modules – the name arises from a Tibetan word meaning “a reliable and trustworthy guardian of peace and justice” – are noticeably similar to other Chinese models. Close inspection reveals a common use of the high-performance Analog Devices ADF-7020-BCPZ transceiver IC (www.analog.com/en/rfif-components/ rfif-transceivers/adf7020-1/products/ product.html), although a “1BCPZ” was noted on the Dorji. Controlling micros may also differ; for example Atmel on one versus “0C002” on the Dorji. As they have a different on-board microcontroller and RF IC hardware, the likes of Appcon’s “RF Magic” configuration software probably won’t work with the Dorji transceivers. CON2 2^ ^ CON 2 PIN NOS REFER TO DB9 PLUG 22k 3^ 5^ 10k 2 3 IC1 PICAXE-08M 4 (TO PC SERIAL PORT) 8 7 0 6 1 330 5 2 SC 2012 2 3 4 8 SUITABLE ANTENNA I/O PINS 1 LED  7 ON DORJI DRF7020D133 6 043A UHF DATA 4 TRANSCEIVER 5 1 RXD 4.5V TXD 4 1 DORJI DATA TRANSCEIVER -- HALF DUPLEX TESTING The circuit is very similar to earlier PICAXE 433MHz modules – the biggest difference is that we haven’t had a moment’s difficulty getting the Dorji to work! and almost trivial PICAXE-08M test coding can put them through their paces. The infamous PICAXE serial in hang up was got round here by using PULSIN, as this command does “move on” if no data is received! Of course, no sooner had this approach been organised than our Postman Pat delivered some of the new fire-breathing 08M2s, which thank- fully now respond to SERIN timeouts and could be used instead – call it “Dorji’s Law” maybe ? But we believe most constructors will still be using 08M’s so the PULSIN approach has been initially retained. Note: The 08M2 now requires its pins to be known as C.0, C.1, C.2, C.3, C.4, C.5, whereas the 08M simply used the pin number without the “C.” in front. The latest PICAXE programming PICAXE coding Pleasingly, the Dorji 7020 modules work “out of the box” on 433.92MHz and at their full 20mW transmit power. This may be all many users need – however, configuring to your own needs, perhaps if local interference arises, can readily be done – see later details. The modules’ 0.1-inch SIP connections suit breadboard experimentation siliconchip.com.au The breadboard layout shown allows even the humblest PICAXE-08M to put the Dorji 433MHz module to work. The small USB-TTL adaptor (top right) conveniently allows configuration setting using Dorji’s “DRF Tools” software. January 2012  63 ‘DORJI DRF7020D13-433MHz TX/RX trial set up Stan SWAN Jul2011 ‘Makes use of the slight reading “wait” of PULSIN to prevent 08M serial hangup! dorji: serout 2,t1200,(b0) pulsin 4,0,b1 if b1=0 then dorji serin 4,t1200,b0 pulsout 1,200 goto dorji ‘ PING. b0 just a handy “placeholder”- can be anything ‘ listens pin 4 - reads & briefly awaits any reply ‘ if nothing heard then “ping” again & await reply ‘ routine when a response heard after pinging ‘ LED flash indicating data received Field testing Simple trial “ping-pong” driving code to check that each module is in contact with its partner. This code suits the popular PICAXE 08M but can also be used with the newer (and more powerful) 08M2. editor automatically converts pins to the new b.# style and 08M2 users can further retain 08M compatibility by adding “let dirsb = $FF” as an initial code line. In the panel above is a simple trial “ping-pong” driving code – note the “t” before the baud rate. These modules use a non-inverted “true” data mode (“t”) rather than inverted (“n”). True uses a high idle state, with low start and high stop communications bits surrounding the “10101010” style eight data bits. The resulting action is akin to a “Hello 1 this is 2 can you hear me? Over” style radio check, with a “Hello 2 this is 1. I heard you – please confirm that you’ve received my report back to you” response. Voice radio operators naturally would soon go crazy continually pingponging mindless signal reports like this, even though it verifies each end IS actively sending and receiving. At a data level, however, it conveniently allows one-man testing of the modules’ range – when the local LED stops winking, the far end is no longer linked. Enlisting a non-technical buddy to help with such coverage tests may otherwise soon become an exercise in boredom for them! The aux output on Pin 6 (and supposedly indicating TX / RX activity) remains at a constant low on transmit but it briefly goes high on receive, for a period related to the length of the data packet. Simple tests confirm this is long enough to blip a LED and/or trigger a PICAXE interrupt. The same breadboard layout, with only minor variations,suits all our Dorji trials. The extra LED at pin 6 (AUX) shows receiver traffic, while jumpers from Dorji pins 5 (TXD) and 3 (EN) running to PICAXE pins 3 (data in) and 4 (sleep/wake) permit enhanced repeater control (mentioned later). 64  Silicon Chip The DRF7020D13 module has no RSSI (received signal strength) or WOR/W (wake on radio/wireless) tap points to awaken a snoozing system if signals arrive. However PICAXE driven “SLEEP” control of Dorji pin 3 (EN) control can greatly help, although a scheme is then needed to match to the signal transmission rate. Quick trials with a matching pair of DRF7020D13 modules, organised to run half duplex with control by PICAXE-08Ms, readily managed 300m range through typical NZ light timber frame buildings plus assorted sheds and vegetation. Both setups were identically coded and wired, with Dorji pins 2(Vcc), 3(EN) and 7(SET) run to the positive supply – refer layout. (These 3 links are wired under the module and thus obscured on the picture). Even when placed right beside each other the units worked fine, with no sign of overloading. The supply needs range from 3.45.5V, conveniently suiting three “AA” cells (~4.5V). Active current drains were about 30mA but could be lowered with PICAXE ‘SLEEP’ commands. Several supplied antennas were used, with even the stubby one (~45mm long) performing well. Although deceptively short, it’s indeed labelled 433MHz! Past experiences indicate several Although parameters can be set from the driving microcontroller, module configuration is most readily done via a small USB-TTL adaptor using Dorji’s “DRF Tools” software. siliconchip.com.au kilometres line of sight (LOS) should be possible with the longer antenna. To put such performance in some sort of perspective, even at the default “9” (=13dBm or a mere 20mW) the TX power is only about that of a LED. In daylight a LED would be hard to see at 10m! Antenna The module’s gold-plated SMA socket suits the various stubbies but this means you could also connect your own antenna. Aside from such classic options as a quarter-wave whip (~170mm long at 433MHz), Yagi or Slim JIM, the best range boosts at UHF come by elevating the receiver and transmitter. Tests once made with 470MHz UHF CB sets, progressively elevating outdoors from ground-level to rooftop, showed ranges were boosted nearly an order of magnitude this way. For demanding links, mount the 433MHz modules as high as possible (perhaps within a plastic container) and run the low-speed data and DC supply up to them from below. Note that power boosting is usually illegal – Australian/NZ 433.92MHz LIPD ISM regulations (revised Jan. 2009) say the transmitter should not exceed 25mW EIRP (Equivalent Isotropically Radiated Power). Some countries limit the transmitter power to only 10mW and allow a gain antenna only at the receiver. A possible alternative could be to organise a simple data repeater – see later ideas. Setup configuration: As with similar USB/serial configurations, getting serial adaptor modules talking to a USB-fitted PC may be “trial by driver and hardware”. However the Dorji USB-TTL adaptor (detected as a SiLabs “CP2102 USB to UART bridge controller) worked seamlessly once its drivers were sourced (via www.dorji.com/info/download. html). As this adaptor is only about $12 it will probably become the hardware configuration standard. The 433MHz ISM band covers a 1.7MHz spectrum slice from 433.05 to 434.79MHz, so quiet slots and multiple channels, well removed from the usual 433.92MHz “RF soup”, may be utilised. Tweaking power settings and data rates (both “on air” and serial) can also give worthwhile performance siliconchip.com.au Range testing can be conducted using two identically wired, configured and programmed breadboard setups. Several SMA fitted antenna are available – even the shortest ones were found to be good performers. boosts and/or battery life extensions. The PICAXE-Dorji interface rate can go as low as 1200 bps but 2400 bps will probably be most suitable. This UART (Universal Asynchronous Receiver Transmitter) rate is slower than the modules’ usual “on air” 9600 bps but slower RF transmission rates often perform better, as signals occupy narrower bandwidth. Hence try also setting the “RF TRx rate” to 2400 bps. NB: Net and Node ID configuration parameters seem meaningless in the “DRF Tools” utility. Providing the frequency and data rates match, the modules communicate no matter what these are set to! These two options are apparently intended to suit mesh networking but such capabilities remain under development and are presently disabled. Of course, a simple network can still be created with a protocol provided with PICAXE serin “ABC” style qualifiers for station ID and data handling. Transceiver configuration is also possible directly (at 9600 bps) via the driving microcontroller – the setup mode is entered simply by setting the Dorji module SET pin (7) to low. Configuration syntax follows the A commercial application of the Dorji 433MHz module: here it is wirelessly transmitting gas usage to a “stroll-by” reader. Below is a view inside the unit, with the reading mechanism at the rear and the wireless transmitter, complete with stubby antenna. Many utilities are now using this type of “hands-free” system. January 2012  65 DRF 7020 D 13 - 043 A u  v w x y z RF GFSK Module u RF module ADF7020 v IC Type Data Transmission w Module Function 13dBm output power x Power 043: 433MHz y Frequency Band DIP package with SMA connector z Package write command style WR_Freq_DRFSK_POUT_DRIN_Parity Therefore to set the module to work at Freq (433.92MHz), DRFSK (9.6k bps), POUT (13dBm), DRIN (1.2K bps) and Parity (no parity), enter the 10-byte command WR_433920_3_9_0_0 The module will promptly respond back this string to confirm parameter acceptance. Once SET is adjusted Transmitter ‘Dorji ‘DRF7020D13 433MHz transceiver - TX ‘Data must be “t” to work – “n” gives corruption ‘Use with companion rxdorji & maybe repeater? dorji: for b0=1 to 100 ‘Counts 0-100 = easy check! serout 2,t1200,(“ABC”,b0) pulsout 1,200 pause 1000 next b0 goto dorji Parameter Unit Length Explanation (Bytes) Frequency kHz 6 433.92MHz = 433920 (Covers 418-455MHz) DRFSK Kbps 1 1 = 2400bps, 2 = 4800, 3 = 9600, 4 = 19200 POUT dB 1 0-9 (0 = -1dBm; 9 = 13dBm) DRIN Kbps 1 0 = 1.2, 1 = 2.4, 2 = 4.8, 3 = 9.6, 4 = 19.2, 5 = 38.4, 6 = 57.6 1 0 = no parity, 1 = even parity, 2 = odd parity Parity (Left): here’s how to identify the Dorji module’s specifications from its type number. (Right): the user parameters you can set when you know the code! back to high the new settings can be utilized. Simple repeater As a simple circuit extension, a proof-of-concept 433MHz and PICAXE-08M2-based simplex “store and forward” data repeater (“digipeater”) was organised. Decades of amateur radio 144MHz voice repeater experience had given familiarity with probable benefits and this quest was largely intended as a check on DORJI based data repeater Repeater ‘Dorji 433MHz simplex data REPEATER rptdorji: serin [2000,lost],4,t1200,(“ABC”),b0 serout 2,t1200,(“ABC”,b0) goto rptdorji lost: pulsout 1,100 ‘uplink lost - LED alert goto rptdorji potential. A typical use may arise with wireless temperature monitoring deep inside a building, with the weak acquired data signal then rebroadcast by a rooftop repeater to a more distant receiver. The set up below gave ~100m range in such circumstances but pleasingly >1km via an elevated repeater! Data is sent transparently under EDAC (Error Detection and Coding), via an inbuilt 256-byte buffer that kicks in if the ‘on air’ rate is less than the Receiver ‘Dorji 433 receiver - use with companion txdorji RX ‘Exploits new PICAXE 08M2 serin timeout features rxdorji: serin[2000, lost],4,t1200,(“ABC)”,b0 sertxd (#b0,CR,LF) ‘NB - ‘doubled’ data display pulsout 1,200 ‘is shown if both TX & goto rxdorji ‘repeater are in range! lost: sertxd (“Data link lost...”) goto rxdorji Although programmed differently, all three modules are laid out essentially the same, except for an extra (green) LED on the repeater’s pin 6 to show uplink data received. If both the transmitter and repeater data is received then a distinctive doubled data display shows – very handy for field trials (by noting receiver LED double wink). Set all three modules initially (via the Dorji USB adaptor?) to 433.000MHz, with 9600 bps on air and 1200 bps data rate. 66  Silicon Chip siliconchip.com.au UART data rate. The test circuitry was still based around the earlier layout for all three modules (transmitter, repeater and receiver), although the PICAXE microcontroller on each required individual programming; a near trivial task thanks to Rev. Ed’s user-friendly editor. The new PICAXE-08M2 ‘serin’ timeout and redirect options were used to redirect the program sequence if the uplink transmission was lost for more than 2000ms (2s). Past PICAXE serial “hang-ups” (often requiring cussed code workarounds) are thus now thankfully avoided. Elevating this repeater above obstacles worked wonders for improving coverage in difficult UHF environments (trees/buildings/terrain), showing impressive LOS range boosts. From a favourable hillside site repeater coverage even extended some 8km across Wellington Harbour. Such a very basic data repeater can be greatly enhanced and tweaked, of course. At the very least the repeater (which could be hauled up a tree/ sited on an elevated pole/rooftop and powered by battery or even solar PV panels) can employ some current reducing snoozing ‘down time’. It’s presently drawing a rather high 30mA and if powered by three AA cells, the drain could flatten them in less than a week. Although a solar panel (around 2-5W) and rechargeable cells could ease this drain, battery replacement may soon become irksome and costly. Enhanced repeater When monitoring the likes of (say) ambient temperature or water levels, the very nature of such slowly changing values may justify only occasional data sending. As time-critical data would probably go via cellular phone now anyway, it’s wasteful to leave the repeater fully-powered for infrequent signals, especially since PICAXE controlled snoozing can be easily employed. Naturally consideration of the overall system, particularly the consequences of missing/awaiting key data signals, may dictate approaches. A simple technique just involves the repeater awakening (via a PICAXE sourced “high” to the Dorji’s ‘EN’ pin 3) every minute for a few seconds and then listening for the data being siliconchip.com.au Here’s some initial transmitter uplink code, which simply repeatedly counts to 100 – the appeal of this relates to easy spotting of any lost values at the receiver terminal screen Dorji DRF7020D13-433MHz simplex “store & forward” data TX uplink ‘ PICAXE-08M2 - use with suitable repeater & RX downlink code ‘ Refer code hosted at => www.picaxe.orcon.net.nz/dorji-rpt-tx.bas ‘ EXTEND TO SUIT ! via => stan.swan<at>gmail.com Oct. 2011 dorjitx: b2=4 ‘ trial sleep value (~ 10 seconds) for b0=1 to 100 ‘ simple counting routine serout 2,t1200,(“ABC”,b0,b2) ‘ data sent out from transmitter wait 1 next b0 goto dorjitx The companion repeater code follows – this makes use of the 08M2’s new SERIN timeout feature to await data and even drop to a suitable lost alert if nothing is heard. ‘ Dorji DRF7020D13-433MHz simplex “store & forward” data repeater ‘ PICAXE-08M2 - use with suitable TX uplink & RX downlink code ‘ Refer code hosted at => www.picaxe.orcon.net.nz/dorji-enh-rpt.bas ‘ EXTEND TO SUIT ! via => stan.swan<at>gmail.com Oct. 2011. ‘ Enhanced for low drain sleep (<1mA). Note-b2 SLEEP value sent from TX! ‘ Thus usefully controls remote repeater hibernation- modify to suit! ‘ Found b2=4 gave ~10 secs, b2=27 =~1 min)-effectively off if b2=255 (~10 mins) ‘ Still awakens (eventually!) to monitor TX uplink & action (shortened?) b2 value. ‘ b0=actual data (here numbers 0-100), b1=loop control, b2=sleep value rptdorji: high 4 ‘ high to Dorji EN (pin3)to awaken wait 1 ‘ wake up delay for b1=1 to 2 ‘ listening loop for data signal serin [2000,lost],3,t1200,(“ABC”),b0,b2 ‘ listen for 2 seconds – ‘lost’ if nothing serout 2,t1200,(“ABC”,b0) ‘ transmit out received data ( ABC= “qualifier”) next b1 ‘ loop for received data low 4 ‘ Low to EN (Dorji pin3) for sleep sleep b2 ‘ PICAXE low drain sleep (units ~2.3s) goto rptdorji ‘ repeat routine lost: ‘ optional routine to indicate data uplink lost pulsout 1,100 ‘ uplink lost- LED alert (OPTIONAL) goto rptdorji ‘ repeat routine The far end receiver code shows values on the program editor’s terminal screen, and also utilises the 08M2’s enhanced SERIN features to wait a selectable period (here 2000ms) before dropping to a “data lost” alert. ‘ Dorji DRF7020D13-433MHz simplex “store & forward” data RX downlink ‘ PICAXE-08M2 -use with suitable repeater & TX uplink code ‘ Refer code hosted at => www.picaxe.orcon.net.nz/dorji-rpt-rx.bas ‘ EXTEND TO SUIT ! via => stan.swan<at>gmail.com Oct. 2011 dorjirx: serin [2000,lost],4,t1200,(“ABC”),b0 sertxd (#b0,CR.LF) goto dorjirx lost: sertxd (“Data link lost”) goto dorjirx January 2012  67 tions do not prevent establishment of a compliant 433.92MHz transmitter for repeater purposes. Naturally the 25mW EIRP power limit regulation must still be respected but locally (at least) it’s quite legal to set up the sort of private “store and forward” repeater that we’ve investigated here. It’s a wonder they’ve not been developed before! Conclusion Links between two setups are typically several hundred metres through timber buildings and light vegetation. This may run to several kilometres in open spaces with good line of sight. This beach trial links to an indoors setup some 1km away amongst the distant trees continually fired from the transmitter. Upon detection, data is organised for normal repeating to the distant RX, then the EN pin 3 is made “low” for snoozing again. If nothing is heard the repeater’s “lost” LED can be activated before the program loops. Only small wiring changes are needed in the original repeater circuit – Dorji pins 3 (EN) and 5 (TXD) now run to PICAXE pins 3 (data in) and 4 (sleep/wake control). This “machine gun” approach requires multiple sends of the data in the hope that the hibernating repeater awakens for a reception ‘window’ but was shown to be reliable and effective. Current drains of under 1mA were noted during PICAXE and Dorji snoozing. Depending on the ‘SLEEP’ duration (which very usefully can be determined at the transmitter) drains may now average just a few milliamps overall, while repeater battery life may be extended by around an order of magnitude or more (maybe to months). A small solar panel and four NiCad/ NiMH cells could now quite easily handle this load for a somewhat permanent installation. A more tempting scheme could be to “ping” the repeater regularly, telling it to sleep unless fresh data was available. Timing drifts may arise of course (as accurate time keeping is not available on a simple system) but a degree of synchronisation could develop if the 68  Silicon Chip These versatile and easy-to-use Dorji DRF7020D13-043A modules have shown themselves reliable performers and – given their excellent ranges – look ideal for many applications. As a tribute to their likely appeal and keen prices, MicroZed reports initial stocks sold out within days! SC Use of an elevated repeater can give enormous range boosts. Signals from a beachside house (about 1km below) were rebroadcast by this repeater and readily received some 10km away across the harbour. Not bad for 20mW! For extended use the repeater could be solar powered. repeater acknowledges TX commands before hibernating. The Dorjis are transceivers after all, so a reply signal can confirm repeater compliance. A more sophisticated approach may be explored in a later constructional article. Are 433MHz repeaters legal? Regulations checks made with both the Australian and NZ spectrum licencing authorities (ACMA and RSM respectively) confirm that their regula- References Code, circuitry, field trial findings, pictures and regulations etc, are conveniently hosted at www.picaxe.orcon.net.nz/ dorji434.htm Acknowledgement of assorted data sheets and diagrams from Dorji Applied Technologies (Shenzhen, China) is hereby made. All other pictures and circuits are by the author, Stan Swan (Wellington,NZ) stan.swan<at> gmail.com siliconchip.com.au