Showing posts with label RF. Show all posts
Showing posts with label RF. Show all posts

Sunday, 24 February 2019

Microwave Detector

Date completed: 2014

This is another device constructed for school Physics teaching. It demonstrates well that microwaves are emitted (and a few escape) from a microwave oven and also from a mobile phone by sounding a buzzer and lighting a red LED (once the variable resistor is adjusted just above the continuous background noise.) You even hear the characteristic rhythm of the mobile phone connection: tum-tum-tee-tum!

Photo and School instructions

Design

I can't tell you much about how this works, except that it has an oscillator made from an op amp (half of a 741) and a capacitor, which can be made unstable by the adjustment of the variable resistor. This somehow then picks up any radio noise nearby (acting as a weak aerial, I suppose) and the resulting oscillations are then amplified (and saturated) by another op amp with a very high gain (no feedback.) I must have found the circuit or a similar one on the internet somewhere!

Circuit Diagrams

Tiny CAD (.dsn) file: Microwave Detector






Saturday, 23 February 2019

GPS clock

Date of completion: 2018

This GPS clock was designed to replace the radio controlled clock mentioned in another blog post. The radio signal from Cumbria was rather weak and unpredictable, whereas the GPS signal near a window is much more dependable. I enhanced it a few years later to incorporate the church alarm receiver, also mentioned in an earlier post. Not only does it indicate if the church alarm is sounding (by lighting a green LED in the side of the device - the red LED flashes every 2 seconds to indicate a signal has been received from the church tower 100 yards away), but also how close to the hour the church bell rings. (e.g. the "-9s" in the photo indicates that the bell last sounded just 9 seconds late - not bad for a church clock built in 1850!)

Photos

Design

The design of the church alarm receiver is described in an earlier post, but suffice it to say it uses a cheap 433MHz receiver and HT12D decoder with a 17.3 cm aerial (a bit bent in the photo.)
The GPS unit came from Ebay and its 3 volt RS232 signal (at a baud rate of 9600 bps) is connected to a PIC 16F628A microprocessor (running at 5V), which drives a 16 character LCD display. The PIC decodes the data from the GPS unit to display the time in hours, minutes and seconds, and the current date. Like my earlier radio-controlled clock, the PIC can continue to display the correct date and time for a short while, even if the GPS signal is lost. I have included a table to switch between Greenwich mean time and British Summer Time on the correct dates each year. I think it should currently run correctly until 2026 or so. After that I will need to program the PIC with new data for future dates!
The church bell signal is compared to the GPS time every hour between 4 minutes before and 4 minutes after the hour. This reduces possible confusion with  spurious sounds due to the church alarm sounding (a rare event) or the bell ringers practising (a regular event!)

Circuit Diagrams


Tiny CAD (.dsn) files: GPSClock

Source code and other files

GPSClockX.asm  All files (.zip)

Sunday, 17 February 2019

Organ Transceivers

Date of completion: 2019

This refers to a couple of devices (a "transmitter" and a "receiver") designed and built to facilitate communication between a church leader and an organist. These people are often situated far apart in church services, and the organist needs to be kept up to date about when to start/stop/prepare for playing. This is certainly true in Seal church, Kent, where my wife is the vicar and I sometimes attempt to play the organ!

Photos



Design

Both devices are designed around the CC1101 transceiver, which is a rather sophisticated device from Texas Instruments, but which is very cheap via Ebay. It comes with lengthy instructions and a software program to help with choosing set-up parameters. The devices also each have a PIC microprocessor. I used two quite different PICs (PIC16F1503 and PIC18F2550), as I just happened to have them available, but there are only slight differences in programming details. They are programmed very similarly using C (XC8 from Microchip, who make the PICs), although one is primarily the transmitter and the other is primarily the receiver. They respond correctly to button presses only if there is a two-way communication between them, however.

Each has an on-off switch to preserve battery life, but they are also programmed to enter standby mode after 90 minutes of inactivity. Each has a white light to indicate that it is switched on and is consuming power. I have minimized power consumption by putting the CC1101s either into SLEEP mode or WAKE-ON-RADIO mode (testing for a received signal every 1 second) between transmissions and using the SLEEP mode of the PICs whenever there is activity (waking on interrupts (a) from the CC1101, (b) from a button being pressed, or (c) from the watchdog timer to keep the white light flashing.)

When a transmitter button (red, yellow or green) is pressed a signal is sent to the receiver, which flashes the appropriate LED once and sends back a signal to the transmitter. When this signal is received the transmitter flashes its own appropriate LED once. If the original button is held down, the process repeats until the button is released. There is a HELP button on the receiver, so that the organist can attract initiate communication, if needed. When pressed the red and green LEDs on both devices flash continuously until either the HELP button is pressed again or one of the buttons on the transmitter is pressed.

When first switched on both devices flash all three coloured LEDs once. Error-trapping is enabled by resetting the CC1101 and PIC (and therefore flashing all three coloured LEDs once again) if trying to communicate when, for example, only one of the two devices is switched on. Each is powered by two AA batteries, which should last for several years before needing to be replaced (if my calculations and measurements are correct, and there are no serious bugs in the programs!)

Circuit Diagrams

Tiny CAD (.dsn) files: CC1101 Transmitter CC1101 Receiver

Source code and other files

Transmitter: CC1101T.c  CC1101.h  All files (.zip)

Receiver: CC1101R.c  CC1101R.h  All files (.zip)

Garage transmitter and receiver

Date of completion: 2018

We are lucky enough to have a garage, but we can't see the garage door from the house. To avoid leaving the door open I have installed a simple RF system which indicates indoors whether or not the door is still open. The door has a microswitch set into the frame, which is pressed when the garage doors shut.

Photos


The receiver attached to the bottom of the extractor fan in the kitchen!

Design

Both the transmitter and receiver circuits are powered from mains adapters and voltage regulators. The transmitter uses an LM2936, as this has a smaller dropout voltage than the 7805 used by the receiver. The transmitter has a 555 timer to produce short pulses (about 100 ms) every 3 seconds or so to drive the HT12E encoder connected to the 433MHz transmitter unit (cheaply available with a receiver unit on Ebay). The microswitch setting is inverted by a transistor and sent via the encoder. The receiver unit is decoded by the HT12D chip, which feeds a "transmission received" signal (flash) and the microswitch signal (continuously on or off) to LEDs via transistors to provide the required current (one of the transistors is not really needed - just there for historical reasons!) Each RF unit has a 17.3 cm long vertical aerial, corresponding to one quarter of a wavelength.

Circuit Diagrams

Tiny CAD (.dsn) files:  Garage transmitter   Garage receiver



Radio-Controlled Clock

Date of completion: 2010

I am a Time-Lord! My job is to keep the local church clock, built in 1850, chiming somewhere near the right time. I can hear the chimes from home, but our clocks in the house are generally only accurate to the nearest minute, at best. So I designed and built this radio-controlled clock to display the correct time digitally to the nearest second. Then I could judge how many seconds forwards or backwards I needed to adjust the church clock. The radio-controlled clock uses the LW signal (MSF) transmitted from a site in Cumbria, UK, containing time information from a caesium atomic clock and it is therefore highly accurate. The signal is, however, very weak (we are a long way from Cumbria.) So to avoid having to design and build a receiver tuned to the correct frequency, I deconstructed a cheap analogue radio-controlled clock from Ebay, i.e. I ripped out its receiver and used it here!

Design

The heart of the clock is a 16F628 PIC with a 16 character LCD display. The PIC and display are powered from a 9V mains adapter via 7805 voltage regulator, but I noticed that the MSF receiver needed a single AA cell. It turned out that the output from the receiver is sufficient to drive the PIC, if set up judiciously, and the cell has very little current drawn from it (so rarely needed replacing.)

There are actually two clocks here: the second is run by the PIC itself, which takes over if the signal from the receiver is too weak. An interrupt routine is triggered by the receiver and this decodes the basic information of time and date. Most of the rest of the assembly language program is concerned with formatting for display (hours, minutes, seconds, day, month, year) and error-trapping (as the signal is VERY weak, and the device only works near a window - or, better, outside!)

I no longer have the clock, as I have now constructed a GPS clock, which uses a rather more powerful signal from GPS satellites for time information. See "GPS Clock" for further details.

Circuit Diagrams

Tiny CAD (.dsn) file: Clock


Source code and other files

Clock.asm  All files (.zip)

Alarm Transmitter and Receiver

Date of completion: 2012

These are two RF devices to solve a problem! I live about 100 metres from the church where my wife is the vicar. The burglar alarm sounds from time to time, and, particularly at night, it is rather a nuisance to have to go and investigate it (it is almost always a false alarm!) The trouble is that it is difficult to distinguish the sound of the church alarm from car alarms, which also sound at fairly frequent intervals. This  transmitter/receiver pair is designed to indicate if the sound is indeed coming from the church tower.

Design

The RF frequency used is 433MHz (within a public band in the UK) using a transmitter/receiver pair cheaply available on Ebay and HT12E/HT12D encoder/decoder chips, also readily available. Both are powered from 9V mains adapters feeding through 7805 voltage regulators. They each have an aerial attached as vertically as possible of length 17.4 cm (quarter wavelength), which are JUST sufficient to work over the distance involved here,

The transmitter (mounted in the church ower) has a small microphone to detect the sound of the (very loud) alarm (the church bells are also picked up, but these are easy to distinguish aurally.) Its signal is fed through an op amp to amplify the microphone signal, and then another op amp without feedback to cause saturation (i.e. with its very large gain.) The square-wave output is fed via a switching transistor with a low-pass filter into a 555 monostable circuit, set to about 10 seconds. Another 555 timer is used as a multivibrator with a time period of about 2 seconds but an "on" period of only a few milliseconds. This second 555 drives the encoder to enable transmission for a very short time every 2 seconds. It transmits a signal indicating whether the monostable is on or not.

The receiver is simpler, feeding the "transmission received" signal from the decoder to a 555 monostable set to about 1 second, in order to flash a red LED indicating transmission received (every 2 seconds.) As the decoder latches its output, a green LED is simply connected to the data output indicating the content of the last transmission.

The receiver has now (2017/2018) been integrated into a GPS clock, so I have no photos for you!. See "GPS Clock" to learn about the latest development.

Circuit Diagrams

Tiny CAD (.dsn) files: Alarm Transmitter   Alarm Receiver