Saturday 9 June 2012

Analog Clock and Thermometer on an Oscilloscope

This was our first major project at CEDT, NSIT. Using Arduino and two DACs, we had to generate an analog clock and thermometer on an oscilloscope in x-y mode. We started on 31st may, the day our 4th sem exams finished. Though Initially, it seemed quite tough. But it isn't that tough.



First of all our aim was to develop a shield with two DAC and a thermistor. We made it on 1st june. Then we started developing code for the project. We ,at first, tested the working of the DAC. It was working perfectly fine except the one or two minor flaws in it. Then made a sine and a cos wave. It was good but not fantastic. In xy mode, it presented a circle.


They weren't that bad. Because we were first to make it. The feeling was awesome. We have made something useful. The error was due to frequency considerations. The program was quite slow. It required further optimization. The solution was to write the code in AVR . The frequency of operation improved.  Next we moved on to drawing lines, we made a function which takes the angle in degrees and draws a line.
It was successfully implemented. We could now make most of the shapes on the Oscilloscope.

The next major thing was to implement the RTC. We couldn't use the delay function of the program as this would stop the rest of the program too. We didn't want that. So ,we had to use AVR timer interrupts. Luckily we got much of the help needed from the internet and were able to use the Timer of ATMega 168.

Now,we are almost done with our project. The video of our project is on youtube: http://goo.gl/HglPx