Monday, October 8, 2012

Rotary Encoder Interfacing with PIC Mirocontroller

       i am currently working with some power supply design and i can say using conventional pots(potentiometer)  and rotary  switch  to adjust the voltage and other stuff is quite old school. so i have decided to go for a bit high tech , actually bit digital.
so here is the solution

Incremental Rotary Encoder
first of all i would like to tell you , these type of rotary encoder is totally digital component so you can't directly replace these  with you conventional pots. so lets start what are Incremental Rotary Encoder , Incremental rotary encoders by the looks of it just like a general purpose pot looks like but output is quite different they  provide a pair of digital signals that allow a microcontroller to determine the direction of a shaft’s rotation. They can be used to monitor motors and mechanisms, or to provide a control-knob user interface.

   for a quick look here is a typical incremental rotary encoder


Saturday, September 29, 2012

ST7565 LCD Interfacing with MSP430 microcontroller

Displaying content on a normal alphanumeric display is very limited ,we have to be limited with the font size and we can't draw any graphics also. but convention Graphics lcd are really very expensive so here is the solution, you can use ST7565 monochrome  LCD to display your large font text and graphics . the reason behind using this LCD is ,it is really very cheap and can be powered with 3 volts supply. so it is really good for battery powered application.


Project Description 

       however you can use almost any microcontroller to display content on this LCD, may be that micro controller is PIC , AVR or MSP430 , but in this demonstration we will be using Microchip MSP430G2211 Microcontroller from Texas Instrument .


Tuesday, September 25, 2012

Atmel AVR ATMega16 Interfacing WIth 16x2 char LCD

    An alphanumeric low cost LCD Display is very essential for may small and big projects to Display various type of information. Hitachi HD44780  Chipset based 16x2 char LCD is Really very cheap and easily available in the local market.

Project Description:-

  In this project we are going to learn various things about this chip set and displaying text on this LCD. The HD44780 16x2 char LCD screen Use 4 bit parallel interface with backlight.

This Primary Objective in this project are:-

1.  Displaying  "Hello Word!! LCD " message on the scree.
2.   Interfacing The LCD to the Microcontroller Using  4 Bit Mode.
3.  Generating and Displaying Custom Char on the LCD Screen. click here for custom char


Saturday, September 8, 2012

IR(infrared) Remote Control Relay Board with PIC 12F675 Microcontroller


Introduction          

        This little project will demonstrate how you can use your old NEC IR protocol based TV,DVD or VCR remote control to control you home appliances like fan bulb or virtually anything.

Consumer IR protocols    
    There are a number of consumer Infrared protocols out there and they have been used for every single purpose possible i guess, like PDA laptops and other consumer appliances. RC-5 & RC-6 by Phillips , RCA are few examples of consumer IR protocols.


       In this demonstration we will stick the to NEC protocol by NEC corporation,



NEC Protocol Based Remote Control for this Bord 
Remote Control for This Board

NEC Infrared Protocol 

Saturday, March 17, 2012

800KHz 3 Channel PWM Meter "Duty Cycle Meter"

Introduction

  After working with some motor control application i found that a multi channel PWM or Duty Cycle Meter is a quite help full to debug those PWM based motor control circuits and RGB LED control PWM using PWM which has at least 3 PWM line ,so i decided to build one for my self. 

   This is Meter has total 3 channels with all can accept frequency up 800Khz. the accuracy of the meter is quite good.

The SCHEMATIC 

Thursday, March 1, 2012

PIC MCU LCD Driver 4 commmon 7 Segmented LCD & PIC16F917

  Now a days almost all the mcu projects use a normal 16x2 char LCD or the LED  to display the data, but the problem with those 16x2 LCD and LED is , they consumes a lot of power , they are very thick  , bulky and the font size is really very small , and if you go for a big font size then they are really very expensive  and some times we just don't want that may lines and character , what we want is just a 3 - 4 digit numbers and a big display font size.
 so  here is a quick tutorial on how to use a microchip pic mcu to drive an 4 common 7 segment lcd .
Prototype


TYPES OF SEGMENTED(controller les "RAW")  LCD
     These type of LCD have no controllers built in all they are is just a liquid crystals sandwiched between to pieces of glass and sometimes a reflective plate at the back. The LCD who have that plate on the back (like my LCD has) called reflective and the LCD who don't have those plate looks quite a transparent called Transreflective.

There is another criteria for classification of the raw lcd glasses

Non Multiplexed (single Common) ( STATIC )

Wednesday, February 8, 2012

Custom Character Generation on 16x2 char lcd

   Most of the alpha numeric  LCD like 16x2 char or 16x4 char have ability to generate few custom characters. in this example i will show you how to make and display these custom characters on a 16x2 char lcd with Hitachi HD44780 lcd controller.

 HD44780 LCD can have upto 8 custom characters.


THEORY FOR CUSTOM CHARACTER GENERATION 

the basic technology of  lcd based on 3 type of   memory

CG ROM : this the memory which holds the permanent fonts you call to be displayed . this holds the pattern for every single character of  predefined lcd font. and you call the content of this memory by the placeing  corresponding ascii value on the lcd port . like for retrieval of   'A' you have to send the ascii value of 'A' which is 0x41 to the lcd.   CGROM can also be seen as computer hard drive from where you load your required program into ram to start working. but it is not modify able because it's rom.

DD RAM : DDRAM is the memory which holds only those characters which are currently on the screen . means if there is a message is currently being displayed on the screen then it has to be  on the DDRAM
for example if you want to display "hello" on the screen then you have load pattern of h from the CG ROM TO DD RAM then do the same for 'e' ,'l' ,'l' and 'o'.

Saturday, February 4, 2012

MSP430 BASED 30V VOLT METER


       This is a simple application of internal 10-bit ADC(analog to digital  converter) of MSP430G2231 microcontroller.you can use this  circuit  to measure  up to 30 v dc. the possible  applications are on bench top power supply or as a panel meter in various system.

Circuit description
            TEXAS INSTRUMENTS  MSP430G2231  is the heart and brain of this circuit .the internal adc of the mcu with a resistor network voltage  divider is used to measure the input voltage . then 3 digest of comm anode 7 segment display is used to display final converted voltage. as you can see in the schematic the displays are multiplexed with each other . means we switch on one display and put the corresponding digit on this while other two displays are off this cycle go for each of the display.

   the only problem with MSP430 mcu is there is very less I/O lines are available to use so we need 7 +3 lines to drive the display and maybe one more pin for adc input (if adc input is not multiplexed with other pin) total 10to11 lines are required but we don't have that much lines from mcu so we have to use 74LS47 bcd to 7segment decoder  ic which enable us to display any digit with only 4 i/o lines instead of 7 lines so now we require only 4+3+1 lines total 8 lines.

you can find more about driving multiplexed 7 segment led display from a mcu in application note from My previous post click here
in my circuit the refresh rate is about 50hz.




 Voltage Divider Front End

30 volts Panel Volt Meter Using PIC MCU

       This is a simple application of internal 10-bit ADC(analog to digital  converter) of PIC16F676 microcontroller.you can use this  circuit  to measure  up to 30 v dc. the possible  applications are on bench top power supply or as a panel meter in various system.





3A Current meter using PIC 

Circuit description 
            MICROCHIP'S PIC16F676 is the heart and brain of this circuit .the internal adc of the mcu with a resistor network voltage  divider is used to measure the input voltage . then 3 digest of comm anode 7 segment display is used to display final converted voltage. as you can see in the schematic the displays are multiplexed with each other . means we switch on one display and put the corresponding digit on this while other two displays are off this cycle go for each of the display.

you can find more about driving multiplexed 7 segment led display from a pic mcu in application note from microchip AN557 Four Channel Digital Voltmeter with Display and Keyboard

in my circuit the refresh rate is about 50hz.



 Voltage Divider Front End