Categories
electronics remote temperature sensor sensors

Remote temperature monitor project – breadboard prototype

So now I have all the bits (microcontroller chip, usb- 5v serial module to program it with, transmitter, receiver, another cheap usb-5v serial to build the receiver around, a DS18S20 and a bunch of passive components). I also have a double breadboard, and the circuit diagram for the arduino boards so I know roughly how to put one together (basing it on the stripped down “Pro” model, in 5v 16MHz form). This means I can build it with the reset pin correctly tied to the usb-serial widget to auto-reset on sketch download etc.

At first it all goes well; I get my bare ‘168 up and running with an LED attached, and download the blink code to it, and it blinks nicely. I plug a couple of DS18S20 units in and get temperature readings from them which look sane. I learn how to use the software serial library to drive a second serial bus (so I can use the hardware one for debugging and sketch downloading at the same time).

However, when I try using the wireless devices, I can’t get anything out of the receiver. Zip. Zilch. Nada.

Much headscratching ensues. I’m just about to give in and send the units back to littlebird (which would have been awkward since this was over the christmas break), when a final google search turned up a suggestion that the exact module I’m using may not be able to sink enough current to drive the microcontroller input pin. A trip to Aztronics to get a cmos 4049 hex inverter, and I start getting output!

Trouble is, its mostly rubbish. The receiver appears to be extremely noisy, especially if the transmitter isn’t actively transmitting. In addition, sometimes I appear to be losing a bit or so at the start of transmissions, leading to complete gibberish as the receiver gets out of sync with the transmitter. After fiddling around with different bit patterns, I discover that putting the sequence “U U U U U U U U ” at the start of my transmission almost always results in the receiver getting synced up OK before the actual message starts arriving.

I also discover that having both the transmitter and receiver on the same breadboard means I need to not have any antenna wires, otherwise I don’t get anything but noise – I’m guessing the transmitter is completely overwhelming the receiver at this point.

But at least the breadboard prototype seems to be working.

Categories
electronics remote temperature sensor sensors

Remote temperature monitor project – inspiration.

So having got fed up with not knowing what the temperature in my office is, or how hot it is outside my house rather than several km away where the Bureau of Meteorology site is, and having heard about the neat little DS18S20 digital temperature sensors, built one of the “k145” kits from kitsrus.com, thinking that 4 sensors would be enough, and I’d hang one outside somewhere. The “1-Wire” bus these devices use can go quite a long way, so it seemed like a simple thing.

Then I started reading a bit about weather monitoring stuff, and I realized I was going to have to think about what might happen in the event of a lightning strike.

First I looked at isolating the 1-Wire bus back to the existing k145, but that turns out to be distinctly non-trivial; the application note on how to isolate a 1-wire bus involves a transformer, and actually results in the bus no longer being a 1-wire at the microcontroller end but having separate transmit and receive paths, which means it wouldn’t work on the existing widget.

The I bought an Arduino work-alike (an ET-Easy168 – more or less a clone of the older Nano with the ‘168 chip on it) and played around for a bit. I thought maybe I could put the microcontroller out in the garden as well, and use something like RS422 (which isn’t so hard to isolate) to communicate with it.

Then I found the cheap little 315MHz receivers and transmitters sold by Little Bird Electronics (receiver, transmitter) and was persuaded by a couple of colleagues that wireless would be worth trying. They also do bare ATmega chips with the Arduino bootloader on them, so I bought one of them planning to build my own board and keep the Easy168 as a development unit. A quick trip to Jaycar and and the order from Little Bird and I had all the bits I needed to get started.