TempClock
Kris finished a project! I needed a device that would show the temperature in the house, outside and in the kids’ room. It should also have the time. We only need it at night and we need it to be very dim. After a loooooot of prototypes this is what I made: We had a bedside alarm clock that had internal and external temperature. But it wasn’t backlit so you couldn’t read it at night at all. Because our house is old, there is a big difference in temperature between the different rooms. Too cold and our kids wake up in the night; then so do we. So I had a very small OLED display in my parts bin. I also had a few of the dallas temperature monitors hanging about. I figured I’d make a quick temperature display. I also had a RealTimeClock module so I figured I’d put the time on there as well. I thought it would take me an afternoon. Four months later I finished it. The two big problems i had were the size of the screen and the one wire protocol which was a bit iffy. These are the temperature sensors I was using: Dallas (Maxim) DS18B20 1-wire . They say one wire but you actually need three (in theory you can use two, but I tried and couldn’t get it to work): Power, Ground and Signal. There’s lots of tutorials on the web about how to use these but the main issue I had was the resistor value. I had three sensors, one in the box, one under the house and one in the kids’ room (behind a book case). Wired up using some solid core UTP cat5 I had left over. On the breadboard everything worked, but in real life the sensor at the end would not read. It would detect, but not read. Eventually this was fixed by dropping the resistor value to around 2.8k. The other issue was the display: it’s a tiny 128x64 OLED display less than an inch across the diagonal. It came free with a digispark pro I had ordered. The display worked great but unless you were up close and personal, you couldn’t read it. I decided that I could use a lens to ‘project’ the screen onto a larger screen. Since it was to be used at night, the dimming effect this would have would not be an issue. Optics are HARD. The first lens was taken from a broken projection clock. The issue was the lens was only 11mm in diameter, much smaller than the OLED, by the time it was in focus it was too close to the lens and the edges were heavily distorted. So i went to a dollar store and got a magnifying glass. Much bigger diameter. I sawed the handle off and mounted it in a laser cut box. This didn’t work because the focus point was about 8 feet!. Next up i got some lenses designed for google cardboard, and made a laser cut box with more boxes inside, so i could slide each element and work out the focus, then build a purpose built box. This produced terrible results. Though at least we were down to about 110mm for focus. Next up was the medium onto which we were projecting. We were projecting from the rear so I needed a medium that lights could hit, but also pass through, without too much diffusion. I tried: Sanding glass (uneven, produces nasty particles) Engraving perspex (too opaque) Paper (not rigid enough) Grease proof paper (not rigid enough, but did work quite well) Ever so slightly textured vinyl i got from a ring binder (worked well, not opaque enough but produced an interesting ‘hologram’ like effect. The problem was you could see the original screen through it and it made it hard to read) So i had issues with both the lens and the screen. I was about to give up and buy another, larger screen when someone suggested a slide viewer. Since the slide was about the right size as the OLED module. The finished product uses a Vistarama slide viewer form the 60′s. I got two broken ones for $18 delivered via ebay. The other one was an Argus previewer which (imho) is better looking but harder to cram all the electronics in. Build instructions: These are the basic steps needed to reproduce my rather hacky project. Feel free to jump on the Robodino list and ask questions. Parts: Arduino Pro Mini (you’ll need a serial module to program it) I used a 5v pro mini as the OLED screen was 5v OLED module You don’t have to get a shield, anything equivalent will work that uses I2C Three Dallas DS18B temp sensors USB phone charger and or 5v source a bit of strip board A slide viewer ( i got mine on ebay but have a look around your local flea market, if you’re a robodino member you can have my spare Argus Previewer ) How to build it Mainly just throw it together, but anyway: drill two holes, one for the power (usb) cable and one for the remote one wire sensors. get an usb cable you don’t want and snip the end that DOESN’T go in the computer off, strip the wires and identify the 5v and 0v line (typically red and black). poke it though the hole, stop it falling back with a zip tie and solder it to the strip board. poke some cat 5 cable through the other hole and solder three conductors to 5v, 0v and a new strip which will be for signal. Put a 2.7k ohm resistor on the strip board between the 5v strip and the signal strip. If you’re only using one sensor or have a short run, use a 4.7kOhm resistor. Solder the I2C Real time clock module to the power lines on the strip board and the control lines to the arduino pins ( follow this guide ) I connected the signal line of the temperature sensors to pin 2. If you do the same you won’t have to look at my code, which is a good thing. shove it in the box. I used tape to insulate the two boards. I laser cut a little plastic window to tape the oled display to, then slid that into the slide viewing slot. You’re done! Code is here: https://groups.google.com/forum/#!topic/sydney-hackspace/22qDhfwMh9Q You’ll need to set the RTC clock first (use the example code). You’ll need all the libraries mentioned at the top of the code. You may want to put a button to adjust the time to account for drift and or daylight savings.