Thermometer with PIC Microcontroller

In the last tutorial we learn about the multiplexing technique used with seven segment displays. We learnt how it saves i/o line by using persistence of vision. Only one digit is lit at a time, but to a human eye it is too fast to catch, so we see all four digit lit the same time. In this tutorial we will make a practical use of multiplexed seven segment displays. We will use them to show current room temperature using a LM35 temperature sensor. Before reading further make sure you know the following concepts Multiplexing Seven Segment Display with PIC Micro. Using ADC of PIC Micro. Interfacing LM35 temperature sensor with PIC Micro. Schematic for PIC Thermometer Please note that this schematic is slightly different from our previous schematic on multiplexed seven segment display. The display select i/o pins were RA0,RA1,RA2,RA3 on that schematic. But in this schematic the display lines are RA1,RA2,RA3,RA4 this is because RA0 is used as analog input channel for LM35’s output. PIC Thermometer using LM35   Multiplexed Seven Segment wiring We use our PIC Development Board for making the above demo project. The PIC Development Board has all the core circuitry to sustain the MCU while the project specific part is developed on the expansion board. Multiplexed Seven Segment Display Setup   Multiplexed Seven Segment […]

Using Multiplexed 7 Segment Displays – PIC Microcontroller Tutorial

A four digit seven segment display. The image above shows a four digit seven segment display. These type of displays are widely used to present numerical data to users. Example includes clocks, panel meters, microwave ovens, refrigerators etc. As you can see in a four digit displays there are a total of 4 x 7 = 28 segments (made of leds) so you may think that they will require lots of i/o pins of MCU. But in reality a small trick can greatly reduce the number of i/o pins required. The trick is to activate only one digit at a time. All the segments of each four digit are connected in parallel and common of each four digit is tried to MCUs i/o port via transistors. That means MCU can select any digit and put the segment data which drives the segments. Only the selected digit will light up. Then next digit is selected and segment data is changed according to the digit that must be shown in that place. Similarly each digit is selected and shown. This is done fast enough that the human I cannot see the movement. We can see all four digit lit at the same time as shown in the figure above. Multiplexed Seven Segment wiring To display any four digit number, say 1234 on […]

Using Shift Registers with AVR Micro – AVR Tutorial

Today I am going to explain a helpful technique used while designing embedded system. The technique is to expand the number of input and output lines available in any microcontroller. The idea is to use a shift register, a shift register help us load data in a serial fashion (requiring less number of i/o lines) and then convert the data into a parallel form that can drive many types of load like LED,Relays, motor etc, just like normal i/o ports of MCU. Their are two advantage of this method:- Only three i/o lines can drive virtually any number of output ports. Say if you want to control 50 leds that are at the distance of 2 meter from the controller then you save lots of wires! and mess up too! The above described what we called an output shift register. Another type is an input shift register. This type is used to take input. It does reverse of the output shift register. It takes parallel input and transfer it serially to the MCU. The most common commercial example I found is the NES joystick. Their are 8 buttons (you will notice 10 but 2 of it are turbo, that means they repeat action A or B(turbo A or B pressed) at particular frequency when kept depressed) The designers didn’t ran […]

Our New Shipping Boxes !

Our new echo friendly shipping box. We have improved the packing technology so as you use least amount of cello tapes and other non-biodegradable stuffs. These new shipping boxes ensure fast packing and safe delivery. They are even helpful for our user to store their stuff safely once delivered. Our new shipping boxes!   Our new shipping boxes!

AVR RGB LED and Sound Show

Here is a nice and entertaining project created by http://www.ermicro.com . The author has a very good programming, teaching, drawing and artistic skills. The tutorial is well planned and executed. I really liked the RGB LED and Sound show given at the end. I will try it and tell how it works. Till then you can read the rest of the article here. Working with Atmel AVR Microcontroller Basic Pulse Width Modulation (PWM) Peripheral AVR RGB LED and Sound Show. The article also explain various PWM techniques like Fast PWM, Phase correct pwm, phase and frequency correct pwm. You will also learn tone generation using PWM technique. Here is a Video for Various PWM Experiments

Stepper Motor Control – AVR Tutorial

Stepper motors pairs nicely with a smart device like a microcontroller to create precise digitally controlled movements that has made possible many of modern gizmos around us. For example a printer, scanner, plotters, fax, floppy drive (not so modern though!), automatic industrial machines like CNC (Computer numerically controlled) drills, laser shows etc. Though to a naked eye the motor of stepper look no other than a DC motor but the difference is that each step of a stepper motor is in control. For example a high speed desktop printer when the paper moves forward, to a novice it seems like a motor is just pushing the paper out but in reality the control board inside the printer request the motor to move the paper exactly same amount that has been printed. This precise movement keeps the next printed pixel in alignment with previously printed pixels. The thing is that the stepper motors have certain amount of steps per full 360 degree rotation (exact number depends on model) the controller can request the stepper to rotate any number of steps. For example if you are making a robot, you want it to move exactly as per your program. Like if you say go forward 100cm then rotate right 45 degrees and move forward 50 cm. You cannot do this with DC […]

AVR Project – ATmega8 Based Multi channel IR Remote

Hi Friends, Today I will present an easy to build Multi channel IR Remote control system. It can control heavy loads (Up to AC 220V 6 Amps or smaller) with a touch of remote control. A total of 5 devices can be controlled from a distance of up to 20 feet. We will be using a standard remote control protocol that is called the NEC format. The NEC format is common in remote controls used with Chinese made CD/DVD players. They are easily available in Indian Markets. They also come in variety of sizes from full to small 21 keys (used in car audio systems). Our system is smart enough, so the user can set which key controls which load. Their are five load indicator LEDs which provide the state of five loads. When the device is powered on for the first time, the load LEDs start to blink one by one. That is the first load LED starts to blink, this means the system is waiting for the user to assign a key for that load. So you should press the key you want to use for that load. Once the system receives the key of your choice it stores it in internal EEPROM. From now on you can use that key to control that specific load. In this […]

Digital Humidity Sensor

Digital Humidity sensors are of great help in maintaining suitable environmental condition in places such as ware houses, green houses, factories, smart homes etc. They are also very easy to interface with MCU and PC. When coupled with a PC or Microcontroller they can be used in wide variety of smart automation. One such sensor I will present today is a serial humidity sensor. The interface is very simple. The communication is done over a standard asynchronous serial line. The interface parameters are as follows. UART 9600 bps. Start bit: 1 Stop bit: 1 Parity Bit : 0 (No parity bit) No Flow Control. Fig.: Serial Humidity Sensor.   Command Set All commands are begin by "$sure" followed by space (ascii 32) All UART Command are in ASCII Commands are NOT case sensitive. All commands ends with a CR LF pair (ascii \r\n in C language). Get Current Temperature in Degree Centigrade Command : $sure temp -c Returns: XXXCentigrade Where XXX is current temperature. Example in C UWriteString("$sure temp -c\r\n"); Get Current Temperature in Degree Fahrenheit Command : $sure temp -f Returns: XXXFahrenheit Where XXX is current temperature. Example in C UWriteString("$sure temp -f\r\n"); Get Current Humidity Command : $sure humidity Returns: XXX%RH Where XXX is current relative humidity. Example in C UWriteString("$sure humidity\r\n"); Get Current Status Command : $sure […]