Wireless Morse thermometer

By KD1JV

This wireless Morse thermometer was inspired by one designed by K7TMG.

http://www.qsl.net/k7tmg/morse-code-hf-wireless-thermometer.html

I found out about this project when someone on the QRP-L list was looking for someone who could program the required microprocessor and I replied that I could do it, having both the Tiny13 processor and the programmer on hand. It turned out a number of other Hams were also interested in building one of these. One of the guys interested had a supply of Maxim digital temperature measuring chips available, so it was decided to rework the project to use these. In the end, about the only thing in common with the original design by K7TMG is the use of the Atmel AVR Tiny13 processor, a 4.00 MHz crystal oscillator for broadcasting the temperature and doing it in Morse code.

The idea behind this device is to use the Part 15 FCC regulations permitting the use of a low power transmitter on virtually any frequency you like, provided it does not cause interference to legitimate users of that frequency. A low power crystal oscillator operating at 4 MHz is unlikely to produce any interference to anyone and it does fall right on the top edge of the 75 meter ham band, so you can probably hear it with a ham band only receiver.

You use this device by putting it outside your radio room (ideally just outside a window or under your outdoor antenna) and when you want to know the temperature outside, you tune your receiver to 4 MHz and wait for it to broadcast the temperature, which it does about once a minute, in Morse code of course. So why the heck would you want to build one of these, when for as little as 9 bucks you can buy a wireless indoor/outdoor thermometer with a LCD display, long battery life and 1/10 degree resolution? Do we really need a reason?

New vs. old

The original K7TMG design used a LM335 temp sensor. This chip produces a linear 10 mv/C output. Since the output is analog it must be read with an A/D converter and it also has to be calibrated. The output voltage is centered around about 3 volts, so it needs at least a 5 volt supply. The Tiny13 has both an A/D and a built in reference voltage, but the reference is only 1.1 volts. Therefore, a divider would be needed from the sensor chip to lower the voltage below 1.1 volts, or an external reference voltage used. K7MTG used a 5 volt regulator, a 78L05 for this. However, the 78L05 has a +/- 0.25 volt tolerance, so it makes calibration even a bit more of a challenge. Another problem is the 78L05 has a 3-4 ma quiescent current, which drains batteries fairly quickly.

A diffrent (but more expensive) solution.

Enter the Maxim DS18B20 digital temperature sensor. Packaged in a TO-92 case, this device is precalibrated and outputs temperature measurements as a digital word ( in degrees C) It has a resolution of 0.0625 degrees. (but for our purposes, we will disregard the fractional temperature) Another advantage is it does not require a regulated supply and can work down to as low as 2.5V (though the spec sheet says 3) Bought new from a distributor they run about $5.00 a piece. The only problem with this device (other than its cost) is that it uses a 1 wire, bi-directional data interface, with very specific timing requirements. This was somewhat of a pain to implement in the firmware, but eventually it was done.

The final design:

My version of the wireless Morse thermometer will run on a supply voltage of between 2.5V and 5.5V. This allows directly powering the unit with three AA or AAA batteries (four if you use a series dropping diode to lower the voltage some), eliminating the need for a voltage regulator. To farther reduce current draw, the sensor is only powered when needed. The processor spends most of its time asleep, waking up every few seconds for a couple of microseconds to advance a counter. When the counter reaches 1 minute, the temp sensor is powered up, a temperature measurement done, transmitted in Morse and then goes back to sleep until the next measurement is needed. This once a minute cycle time is a compromise between not having to wait too long to get the temperature, but not so often it would drain the batteries too quickly. Current consumption is about 160 uA when the processor is a sleep and about 3.5 ma when active (with 4.5V supply), which lasts for about 5 seconds out of every minute. Lastly, I added a jumper to select the temperature reading to be in either degrees C or F and a sidetone output so a piezo speaker can be connected for seeing if it works. Normally, you would not have one connected.

The temperature measurement range of the sensor is -55 C to +125 C. However, when used in the same temperature enviorment as the processor, this range becomes more narrow. This is because the clock frequency of the processor varies with temperature and at the extreams makes the timing for talking to the sensor fall out of its timing window. On the high end, this happens at about 120F, (35C) I sure hope it doesn't get that hot out where you live! The processor clock slows down when cold and the timing is more tollerant of slower speeds, so it shouldn't be a problem at very cold temps.

I needed a way to cool the sensor to test the handling of negative numbers. Dry Ice would have been a good option, had I been able to find a local source, which I couldn't. What turned out to do the trick was a can of Wart remover freeze. This is preasurized can of a ether and propane mix which is used to freeze an applicator swab by putting it on a holder and pressing it into a cavity at the top of the can. I found I could wrap the sensor in one of the swabs, put into the top of the can and freeze it. This was able to get the sensor down to - 30 C and provided a way to debug the program so it outputed the negative temperatures correctly. I froze some of the Wart swabs and used them to cool down the processor chip as best I could and it continued to work, although I doubt I was able to get it down anywhere near -30 C.

Data format:

The wireless thermometer outputs the temperature in the following manor:

Code speed about 18 wpm

positive temps : xxx F or xx C

Negative temps - xx F or - xx C

Leading zeros are suppressed and zeros are sent as the cut number 'T'. minus is [dah dit dit dit dah]

The circuit:

As can be seen from the schematic, not a whole lot of parts are used. A simple crystal oscillator is used for the transmitter. The oscillator will work well below the 2.6 volts the rest of the circuit craps out at. With the oscillator on the bench, I could just hear the oscillator powered at 2.5 volts with my GAP vertical about 20 feet away outside and T-T Argo V receiver. Adding a 6" piece of wire to the emitter of the oscillator brought the signal up to a very reasonable S-7. Depending on how far away the unit is from your antenna, you may or may not have to add the antenna.

The value of R3 is not very critical, any value in that general range will work. R2 is not absolutely needed, but if it is not used, pin 1 should be connected to pin 8 to prevent false resets. With pin 3 open, the unit will transmit the temperature in F, with it shorted to ground, it will transmit in C.

Although a 4.00 MHz crystal is shown for the frequency, you have a wide choice here. If you use a much lower frequency, the value of C3 and C4 will likely have to be adjusted. About the only criteria is the frequency is basically unused by someone else and you have a receiver for that frequency.

The optional piezo speaker (the I/O port can't drive a low impedance speaker directly) can be used to hear if the circuit is working before you put it outside. You may want to power the crystal oscillator seperately to run all the time to find the exact frequency on your receiver. This will be easier trying to find it with the transmit window every minute or so. If using a 4.00 MHz crystal and it turns out to be a little on the high side, changing C3 and C4 to 100 pfd will lower the frequency some.

 

Building the device:

It can be assembled on a small piece of perf board or on a copper clad board dead bug style in short order. Since this device is meant to be installed outdoors, some kind of weather tight container should be used (with some ventilation to keep moisture from building up in it). The DS18B20 temperature sensor could have a narrow piece of aluminum attached to it, long enough to go outside the box and couple the ambient temperature to it.

Just in case anyone wants to make a pc board for thier unit I did up a layout.

Use the above diagram for parts location and a X1 layout suitable for toner transfer as a pdf file can be downloaded here.

You should of course keep the unit out of direct sun light. Many years ago I made a digital thermometer with a simple diode for the sensor. It was winter at the time and I put the sensor outside on the apartment balcony that night and it read, oh maybe 10 degrees out. The next moring it was reading a balmy 60. So it opened the door and stepped outside wearing only a T shirt thinking it was a warm day, only to find it was still freezing out! Then I moved the sensor out of the direct sun and it promply told me it was really only 20 out!

Source code / programmed chips:

For those who can program the Tiny13 chip themselfs or are curious to see what the program looks like or want to lift the 1 wire communications interface code to use for something else, the source code is here. The source code can be viewed with notepad, but the formating will be all screwy. It will only look right when opened with AVR Studio 4.

Since I normally keep a stock of Tiny13 chips on hand for the Simple keyer chip, I guess I can also supply programmed chips for this project for the same price. ($3.00 + $2.00 postage)

Building a dedicated receiver:

Having to tune your main rig to the wireless Morse thermometer frequency every time you want to know the temperature outside might be a pain. Therefore, you might want to build a receiver just for this. A simple SA612A and LM386 Direct Conversion receiver will likely do the job.

Alturnative power sources:

Making the unit solar powered should be very possible to do. To test this, I bought a cheap ($3.00 at Wally world) garden light to try.

The light consists of a solar cell, a 350 ma/hr ni-cad battery, a small circuit board with a voltage boost circuit on it, a photo cell for turning it on at night and of course, the white LED. I found that removining the LED and adding a 1N4148 diode and a filter cap, it would produce about 8 volts, open circuit. Since this is a bit too much voltage, I added a 5.1V zener across the filter cap to limit the voltage. Connecting the wireless transmitter to this, the voltage drops to about 3 volts when it is sending a signal. Current from the battery stays at a fairly conistant 8 ma, even when sending.

Connecting the wireless transmitter directly across the LED didn't work. However, simply adding a series diode to the LED and taking the power from the diode, LED junction did. A10 ufd cap is added at C5 for filtering and produces nice clean signal. Using the LED in addition to the temp sender gives a battery current of about 9.5 ma.

To keep the voltage boost circuit on all the time, remove one or both of the photo cell leads going to the board. The short circuit current from the solar cell is about 15.5 ma in direct sun. Since the circuit will be drawing 9 ma, this doesn't leave much to charge the battery. Since the garden light is only 3 bucks, get a second one, gut it and wire its solar cell in parallel with the other (maybe use the second battery too), gluing or taping the two assemblies together. There isn't enough room in the garden light assembly to mount the temp sender in with the rest of the parts, but there is if you use the gutted housing. The circuit board layout is small enough to fit inside the housing, but the crystal needs to be mounted laying down. The aluminum post for sticking the light into the ground can be used for the antenna. When powered with just the voltage available across the LED, the signal is pretty weak.