Skip to main content

Posts

Development board for PIC16F628A, PIC16F88, PIC16F1827, and PIC16F1847 microcontrollers

I recently made a second version of my old 18-pin PIC development board with much more peripheral chips.This board is best suitable for doing experiments with enhanced mid-range PIC microcontrollers, such as PIC16F1827 and PIC16F1847. The board has I/O port expander, external EEPROM, temperature sensor, Quad OpAmp, digital potentiometer chips, and many more features.

Sensirion's SHT1x and SHT7x series of humidity sensors interfaced to PIC Microcontroller

Sensirion's SHT series of humidity sensors integrate sensor elements with all the required signal processing circuits on chip, and provide fully calibrated digital outputs for relative humidity and temperature measurements. This tutorial explains how you can interface a SHT1x/7x sensor to a PIC microcontroller to measure ambient temperature and relative humidity. The tutorial described in full detail about the sensors, their specifications and interface, and the implementation of communication protocol using mikroC compiler.

Fundamentals of LED dot matrix display

LED dot matrices are very popular means of displaying information as it allows both static and animated text and images. This tutorial describes the basic architecture of a LED dot matrix display and its interfacing with a microcontroller (PIC18F2550) to display static characters and special symbols.

Multi-functional power supply with built-in voltage, current, and frequency meters

While prototyping your new project, you might want to know how much power your designed circuit will draw from the source voltage. One way to find it is to connect an ammeter in series with the circuit and determine the current drawn from the source. Then, knowing the source voltage you can easily determine the power. But doing this may not be always convenient. This project describes a special power supply unit that has built-in features for measuring the source voltage and current. Therefore, you can monitor both the parameters continuously while experimenting your circuit.

555 timer could reduce number of pins in keypad interfacing

A 4x3 matrix keypad requires 7 I/O pins of microcontroller for interfacing. But you could reduce the required number of connections to two by using a 555 timer IC. If you want to know how, visit Embedded Lab's new post " 2-Wire Keypad Interfacing using 555 Timer ".

Heart rate measurement through optical sensors

Resting heart rate is an very important health parameter that is directly related to the soundness of human cardiovascular system. This project describes a digital method of measuring heart rate through fingertip. The blood volume inside the finger artery fluctuates with heartbeats. This fluctuation can be measured by transmitting an IR light through the finger. A portion of this light is reflected back. The amount of light reflected back depends upon the blood volume. This small change in the reflected light is amplified through proper signal conditioning circuit and converted into a pulse. Later, a PIC16F628A microcontroller is used to count the pulses at the output of the signal conditioner and display the heart rate on seven segment LEDs. The signal conditioning circuit uses two operational amplifiers to build a two-stage active low-pass filter with a gain of about 10000, and a cut-off frequency close to 2.5 Hz.

PIC Micro, H-bridge and DC motor

H-Bridge is a very popular application circuit for dc motor control. It uses BJTs or MOSFETs to switch on the dc motor in clockwise or counterclockwise direction. This tutorial describes the classical H-bridge circuit and how to interface it with a PIC microcontroller to operate a DC motor.

Programmable digital timer with a relay switch

This project shows how to make a simple programmable digital timer switch with a PIC16F628A microcontroller. The timing schedule for the relay switch can be programmed through 4 push buttons. The program menu, the status of the relay switch and time information is shown on a character LCD.

PIC16F628A breadboard module for quick prototyping

This breadboard module is for PIC16F628A microcontroller and it provides access to the I/O ports and the power supply pins through male headers that can be easily inserted into a breadboard. This board will make protyping easier as the external oscillator, reset, and ICSP circuits are already implemented in the module. The layout of the module is shown below. You can construct this board on a general purpose prototyping circuit board.

PIC based Diode and BJT tester

If your digital multimeter does not have features for testing diodes and transistors, hold on, here's a project that describes how you can construct one by yourself. This project is based on a PIC16F688 microcontroller and uses the simple concept of unidirectional conduction of PN juction to find if the diode or transistor is good or bad. The test results are displayed on a character LCD. It also shows the type of the transistor (NPN or PNP) as well as which of the PN junctions are open or short in a faulty transistor.   Source: http://embedded-lab.com/blog/

Contact less tachometer using PIC16F628A

Introduction Tachometer is a device that gives you the information about the rotational speed of any shaft or disc. It usually measures the speed in revolutions per minute (RPM). Today we are going to make a simple tachometer that could measure the rotation speed of a disk without making any physical contact (that's why it is contact less) with the rotating object. The range of this tachometer is 0 - 9999 RPM and displays the RPM on a multiplexed 4-digit seven-segment display. Of course, we are going to do this project on our usual PIC16F628A development board. Infrared sensor Contact-less measurement of RPM will be achieved through an IR sensor. An IR diode will send a beam of infrared towards the rotating disc, and any reflected pulse will be received by a photo diode. The resistance of a photo diode drops drastically when exposed to infrared. An infrared is reflected by a white surface and absorbed by the dark ones. The test disc for this project is shown below. You can see ...

PIC16F688 based Digital Voltmeter

Actually this is the another version of my older DVM project that was based on PIC12F683. The older version displays the measured voltage on a LCD that is driven serially by PIC12F683 using 3 I/O pins. The new one uses PIC16F688 microcontroller that doesn't require the serial driver as it has got enough pins to drive a LCD directly in 4-bit mode. The theory and math is just the same. You can read my PIC12F683 version of this project here . Circuit Diagram Circuit on breadboard

EnerJar: A Digital Energy Meter

This project won the grand prize of 2008 Green Gadgets Design competition. It measures the power consumption of an electrical gadget with high accuracy. The project uses PIC16F877A microcontroller to compute the power and shows the output on a 4-digit multiplexed seven segment display. The power consumed by an electrical appliance is simply the product of voltage across the appliance and the current drawn by it. Voltage measurement is pretty straight forward. Using a resistor divider network, 120 V can be converted down to below 5 V, and can be read through ADC port. However, PIC cannot measure the current directly, it must be converted to voltage first. This is done by a low shunt resistance. This voltage drop across the shunt resistance is too small and requires a precision instrumentation amplifier to boost it to appropriate level.

Digital Voltmeter using PIC12F683

This is a digital voltmeter project based on PIC12F683 microcontroller. It measures and displays input voltage from 0 to 20V with high accuracy. You cannot feed 20V directly to PIC port, so a simple resistor divider network is used for this purpose. A 5.1V zener diode is used to prevent any damage to PIC port in case the input voltage goes way above 20V. Since PIC12F683 does not have sufficient pins to drive a LCD, 3-wire serial discussed before is used to display the measured voltage.

My PIC Projects

Here's the list of all of my PIC Projects posted so far:

Centigrade and Fahrenheit Scale Digital Thermometer with LCD Display

Digital thermometers are cool devices as they show temperatures in human readable formats. This digital thermometer project is based on a PIC16F688 microcontroller and a DS1820 temperature sensor, and it displays temperature on a character LCD screen in both Celsius and Fahrenheit scales. I selected PIC16F688 for this project because it is cheap (I bought one for $1.50). DS1820 is a 3-pin digital temperature sensor from Dallas semiconductors (now Maxim) which is designed to measure temperatures ranging from -55 to +125 °C in 0.5 °C increments. The firmware I have written is able to read and display the entire temperature range of DS1820. In order to test for temperature measurements below 0°C, I put the sensor inside my freezer. While trying this, don’t put the whole unit inside the freezer as LCD display unit may stop working at the freezer temperature. Similarly, bringing a soldering iron tip close to the sensor can do testing for the higher range temperature values.

Make your own Serial LCD for PIC Microcontrollers

HD44780 based character LCD displays are very popular among hobbyists. They are easy to interface with microcontrollers and most of the present day high-level compilers have in-built routines for them. However, the bad part is at least 6 I/O pins of microcontroller are required to use them in your project. Therefore, they are not applicable for 8-pin devices like PIC12F series microchips. The aim of this project is to allow LCD interfacing to such devices using 3-wires. I am going to demonstrate this with PIC12F683 microcontroller. The character data or command from the microcontroller will be transferred serially to an 8-bit serial-in parallel-out shift register (74HC595), and the parallel output will be fed to the LCD driver pins.

Using PIC Timer1 Module for Counting Frequency of an External Clock Source

The Timer1 module inside PIC12F683 is a 16-bit timer/counter. If used as an asynchronous counter, this module can be used for counting the frequency of an external clock source applied to its GP5/T1CKI port. The following example is a 0-65535 Hz frequency counter using Timer1 module of PIC12F683. The Timer1 module is reset first and then turned ON for 1 sec to count the clock pulses arrived at its T1CKI port during that period. The number of pulses arrived in  second is frequency itself. The measured frequency value is sent to PC through serial port and displayed on a hyperterminal receiver window. If the external clock frequency is over 65535 Hz, Timer1 overflows and an interrupt is generated. In case of the overflow, "Frequency out of range " message is displayed on the window. A 555 Timer IC running as an astable multivibrator is used as the external clock source.

00-99 Minutes Timer

Introduction This project describes how to program PIC16F628A to function as a 00-99 min programmable timer. User can set any time between 00-99 minutes and can turn ON a device for that period. The device will be automatically turned OFF after the time expires. For demonstration, the ON/OFF condition of device is simulated by switching LED ON and OFF. With the use of three input switches (unit, ten, start/stop) the user can set ON time of the timer and can also control Start/Stop operation. The two time set switches are for selecting unit and tens digit of minute time interval (00-99). Once you set the value of minute interval, pressing the Start/Stop will turn the timer ON (LED will glow), and pressing the same button again at any point of time during timer operation will interrupt the process (LED will turn OFF) and the timer will be reset. LCD display will provide timer status and user interface for setting time. Setup Connect SW1, SW2, and SW3 to RB0, RB1, and RB2 respectively...