Below is the sample output of the above program graphed using Excel spreadsheet.
During the mid-1990s I was wondering how I could monitor the water level in my domestic water tank and display the readings neatly in my house. In 2010 I came across Microchip's PIC microcontrollers and found a project measuring temperature using an LM35 on YouTube, which was also sending its output to a computer via a serial port. This gave me the idea to use Ultrasound to measure the water level present in the tank and display the output on an LCD.
Saturday, January 7, 2012
Code used to fine tune the Analog circuit
Code I use to calibrate the ultrasonic sensor and debug the analog part of the circuit which is made of 3 Op Amps in Non-Inverting Amplifier configuration with an Op Amp as voltage follower in its first stage. The PIC outputs the data through its USART which is connected to the development board to the RC6 pin. The development board is in turn connected to the serial port/RS-232 of the computer where which it is logged using the USART Terminal of the mikro C PRO compiler and saved as a text file. Any other communication program understanding the serial port would do the job.
Below is the sample output of the above program graphed using Excel spreadsheet.
Below is the sample output of the above program graphed using Excel spreadsheet.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment