Posts

Showing posts from July, 2013

Simple Photometer (Light meter) using LDR and PIC microcontroller. (Schematic + Code + Proteus Simulation)

Image
This post would provide a working example of how to make a simple Light Meter (PhotoMeter) using 16bit PIC microcontroller and a LDR (Light Dependent Resistor). Or how to interface LDR with MicroController (MCU).
You may download code and Proteus Simulation from the download section at the bottom of this post. I am using MPLAB X IDE, C30 Compiler and Proteus Simulation on v8.0. This code is written in C Language and will work on PIC24, DsPIC33 and DsPIC30 (16bit microcontroller) by slightly changing the code.
In this post I supposed that you know following things if not then please go through following posts before proceeding with this.
·How to Blink an LED. (Click here) ·How to interface an LCD. (Click here) ·How to configure ADC module. (Click here) ·Digital OhmMeter. (Click here)
The science behind measuring Light using LDR is very simple. I used some basic formulas as Intensity depends on distance too. So I was not able to find perfect formula for finding precise light intensity in case …

Simple Digital Current Meter (DCM) using PIC microcontroller (Schematic + code + Proteus simulation)

Image
This post would provide a working example of how to make a simple Current Meter (DCM) using 16bit PIC microcontroller and a series shunt resistance. We have very precise ammeter current measurement with a 10bit ADC and with a tolerance of ±10mA.
 You may download code and Proteus Simulation from the download section at the bottom of this post. I am using MPLAB X IDE, C30 Compiler and Proteus Simulation on v8.0. This code is written in C Language and will work on PIC24, DsPIC33 and DsPIC30 (16bit microcontroller) by slightly changing the code.
 In this post I supposed that you know following things if not then please go through following posts before proceeding with this.
·How to Blink an LED. (Click here) ·How to interface an LCD. (Click here) ·How to configure ADC module. (Click here) ·Digital Voltmeter. (Click here)
The science behind measuring current is to add a known shunt resistance in the path from which current is flowing so the voltage drop on this shunt resistance is measured by A…

Temperature Sensor using thermistor (PTC) and 16 bit PIC microcontroller. (Code + Proteus Simulation)

Image
This post would provide a working example of how to interface thermistor or how to use thermistor as temperature sensor. This thermistor is PTC (Positive temperature coefficient) and has approximately linear behavior from -55 to 200 oC with tolerance that I found in Simulation is different for negative and positive temperatures form ±2oC (When temperature is less than 0oC) to ±10oC( when temperature goes beyond 200oC).
You may download code and Proteus Simulation from the download section at the bottom of this post. I am using MPLAB X IDE, C30 Compiler and Proteus Simulation on v8.0. This code is written in C Language and will work on PIC24, DsPIC33 and DsPIC30 (16bit microcontroller) by slightly changing the code you may get help for changes.
In this post I supposed that you know following things if not then please go through following posts before proceeding with this.
·How to Blink an LED. (Click here) ·How to interface an LCD. (Click here) ·How to configure ADC module. (Click here) ·Di…

OhmMeter (Resistance Meter) PIC24, DsPIC33 and DsPIC30 (16bit PIC microcontoller) Code + Proteus Simulation

Image
This post is all about how to build a digital OhmMeter (Resistance meter) to measure resistance of different unknown resistors. This design measures resistance from 1Ω to 1MΩ with an accuracy of ±5% approximately. You may download code and Proteus Simulation from the download section at the bottom of this post. I am using MPLAB X IDE, C30 Compiler and Proteus Simulation on v8.0. This code is written in C Language and will work on PIC24, DsPIC33 and DsPIC30 (16bit microcontroller) by slightly changing the code.
In this post I supposed that you know following things if not then please go through following posts before proceeding with this.

How to Blink an LED. (Click here)How to interface an LCD. (Click here)How to configure ADC module. (Clickhere)Digital Voltmeter. (Click here)

Proteus Simulation:
            In the following figure 1. I used a fix resistor (R3 = 10kΩ) that is pull-up by Vcc (5 volts) and the resistor whose value we have to find is attached to other end of R3 and the secon…

Digital Voltmeter code + Proteus Simulation (using PIC24 (16bit PIC microcontoller) ) .

Image
This post is all about how to build digital voltmeter. You may download code and Proteus Simulation from the download section at the bottom of this post. I am using MPLAB X IDE, C30 Compiler and Proteus Simulation on v8.0 This code will work on PIC24, DsPIC33 and DsPIC30 (16bit microcontroller) by slightly changing the code.
In this post I supposed that you know following things if not then please go through following posts before proceeding with this.
How to Blink an LED. (Click here)How to get input at a certain pin. (Click here)How to interface an LCD. (Click here)How to configure ADC module. (Click here)

Proteus Simulation:
            In the following figure 1. I used a variable resistor as a dummy voltage divider so simulate the difference in voltages from (0 to 50VDC). This digital voltmeter will only measure voltage from 0 to 5volts (Warning!!! Measuring greater than 50 volts may damage microcontroller permanently). I used potential divider with 90kOhm and 10kohm. Which ensures th…