Archive

Posts Tagged ‘Temperature sensor’

USB powered LCD table clock using a DS12887 RTC and AT89S52

October 31st, 2008

In pursuit of my embedded endeavors, I ended up making many ‘gifts’ for my friends. One day I decided it was high time I made something for myself for a change.

So I had this DS12887 RTC chip and a DS1820 temperature sensor lying around. Heck, I even had the code for my first major project, the AT89S52 powered digital clock/thermometer which I could re-use for this.

So at once I went to work and after a few hours’ soldering session, I was able to come up with the hardware for my clock. One difference from my original clock is that, I have used a 1-line LCD in this clock. So what that means is that the date and the time won’t appear together. So I had to give an extra button which when pressed, would show the date. Hmm! This meant some more code changes. The temperature sensor would of course, remain as it was. And yes, I did not take pains to implement the alarm functionality here as I did with my first clock.

After a hacking session, even the code was ready. But it took some time to adapt the existing code for my clock. Also due to the fact the DS1820 now was connected to a different set of IO pins of the AT89S52. So the code for the clock did not work out-of-the-box. However, the modifications were minor and I was soon done with it.

To power it, I decided to use USB (yeah! USB again!). This would be a good idea since, I planned to keep the clock on my office desk and my office desk computer is never turned off ;-) (And even if it is, the DS12887 RTC  would continue to maintain the time).

So here are some pictures of it:

The completed table clock. With my hand to give an idea of its size.

The completed table clock. With my hand to give an idea of its size.

Side view. Notice the card board I put at its back to support it.

Side view. Notice the card board I put at its back to support it.

Another snap of the clock.

Another snap of the clock.

Close up of the display.

Close up of the display.

Alas! I do not have a YouTube video of it this time ;-) But do post in your comments nonetheless. This clock now adorns my office desk!

admin Embedded Hobbyist, My Creations, Tech , , , , , ,

LED based binary room temperature indicator

October 30th, 2008

The birthday of another of my friends was coming up and I decided to give him a ‘geeky’ gift. I saw that I had this DS1820 temperature sensor with me(I have been using a lot of DS1820 sensors lately ;-) ) and decided to create a ambient room temperature sensor for my friend.

Now, I did not want to get into the trouble of interfacing a complete LCD for this. So, I decided I would use 8 LEDs to show the temperature in binary format. with 8 LEDS, one would be green, to indicate the ‘binary’ point. And the remaining 7 would be used to indicate the temperature. The arrangement would be something like: 6 + 1 + 1. Or the first 6 red LEDs would show the integral part of the temperature, then comes the green ‘binary’ point(which would always remain green and lighted to distinguish it from the rest) and then finally 1 more red LED for showing the fractional part of the temperature, which can be either 0.0 or 0.5.

I decided to re-use the circuit board from my previous project, the POV toy for this. So after a few minutes of soldering to add the temperature sensor, it was ready. The code was also simple enough. Unfortunately, I do not have any photo of this. However, I did manage to take a video of it before I gifted it to my friend.

Here is the video, from YouTube:

As you can see, I have used USB to power the gadget. Cool, eh ? My friend sure liked it and needless to say, this gift has a tremendously high geek value ;-)

admin Embedded Hobbyist, My Creations, Tech , , , , ,