Thursday, 7 July 2011

Free Electronics

You Can build some thing at your home.
LED INFO DISPLAY
“Led Label”
I. Features:
- LED dot matrix display 40x7;
- Display of clock, calendar, inside and outside temperature, text messages;
- Automatic Daylight Savings Time;
- Capability of keeping the real time clock working correctly for more than one week
without power supply;
- Inside temperature measurement (0 ÷ +75) °C, ±0.5 °C accuracy;
- Outside temperature measurement (-40 ÷ +75) °C, ±0.5 °C accuracy;
- Supports static and running messages with different effects;
- Full Cyrillic and special symbols supports;
- Memory for 10 messages, each including up to 250 symbols;
- Automatic brightness control;
- IR remote control for settings messages select;
- Power supply: 12 ÷ 24V DC;
- Front panel dimensions 305 69 mm.
II. Schematic description:
The device comprises two parts: LED control board and LED display board. The two PCBs
are designed to fit together one behind the other using two sets of dual row connectors and 4
spacers. One of this connector is used for the electrical connections, while the other is only
used as a mechanical connecting element.
The core of the device is microcontroller PIC18F252 (U9). It controls all the functions of the
device, generates the overall algorithm to control the LED matrix. LEDs are connected in
matrix 40x7. The columns tie together the cathodes of the LEDs and rows tie the LEDs anodes.
The LED matrix is controlled dynamically in row by row. To safe space and number of
components, the LEDs are driven with specialized LED driver STP16CP05 (U101-U103),
produced by ST Microelectronics. Each of these IC contain 16-bit serial-in, parallel-out shift
register, latch register and 16 constant current output channels. Outputs are open drain type,
allowing connection of a load supplied with up to 20V supply voltage. The constant current for
all outputs varies from 5 to 100 mA and is set from an external resistor (R115-R117). In this
application, the three LED drivers are connected in a cascade and controlled from the
microcontroller over SPI protocol. The microcontroller sends a 48-bit word, controlling one
row at the time. The 40 LSB represent LED states (1-On, 0-Off) in the row and control their
cathodes. The 7 MSB control the anodes through the 7 driver transistors (VT101 – VT107).
The 40th bit remains unused. The microcontroller sends the 48-bit word every 1 ms. There are
7 cycles to display each row plus an extra blank cycle, used to process temperature
measurements. Thus, the refresh rate of the display is 125Hz. To control the display brightness
is used the “outputs enable” (OE) pin. Each row cycle begins with logical 0 on the OE pin
(outputs are enabled). The duration of an enabled signal changes depending on the desired
brightness, using the microcontroller’s on-chip PWM module.
You should note that numbers of columns and rows are not sequential to the corresponding
pins of the ICs (U101-U103). This aims to simplify the design of PCB. The LEDs’
corresponding bits are rearranged by software to fit with their physical order.
Real-time clock / calendar
The real time clock is implemented with U10 - PCF8583. This is a clock / calendar / alarm
circuit with I2C interface and on-chip 32768Hz oscillator. The PCF8583 contains all necessary
counter registers to provide real time clock and date information. Its power consumption is very
low (typical supply current is 10 A). It operates in wide range of supply voltage from 1 to 6V.
These features will make it possible to have a real time clock available for a long time using a
small lithium battery or even a back-up capacitor. The designed PCB provides both options.
The footprint for lithium battery is suited for 2032 type socket. The experiments using 1F backup
capacitor show that the clock remains active more than a week after turning-off the power
supply. The diodes VD10, VD11 and VD12 should be Shotkey type as shown in the scheme
because of their low drop forward voltage. Trimmer-capacitor C21 is used to adjust the
oscillator frequency at 32768Hz. For I2C communication is used the Master Synchronous Serial
Port (MSSP) module in PIC18F252. This module is set in I2C master mode. On the same bus
an external EEPROM (U11) can be connected to expand the capacity of the data storage. The
present version of firmware does not need an external EEPROM, so it can be omitted.
Temperature measurement
For ambient temperature measurement are used LM35 sensors (U5, U6). They are factory
calibrated directly in ° Celsius. The output response is 10mV/°C. The supply voltage should be
between 4 and 30 Volts. To make a full-range temperature measurement, a negative voltage
must be applied to the output through a resistor (R4 and R5). To ensure this requirement, the
ground pins of the sensors are connected to the analog ground through two diodes (VD4,VD5
and VD6,VD7), which pick them up with approximately 1,4V. In that case the Vcc (+5V)
power supply is not enough for LM35, so additional voltage regulator U1 (78L09) is needed to
be used. The signal from the sensor is taken between the output and the negative pins of the
LM35. The voltage between these two pins is bipolar with polarity depending on the measured
the temperature sign. The sensors could be connected with external three-wire cables. Software
is designed to show inside temperature from U6 and outside temperature from U5.
A/D converter
Both LM35’s outputs are connected to U4 - MCP3302. This is a Successive Approximation
Register (SAR) analog to digital converter. It provides 13 bits resolution (12 bits plus one sign
bit). The MCP3302 has 4 analog inputs, which can be configured either as 4 single ended or as
2 differential inputs. The application requires 2 differential inputs to convert both bipolar
voltages from the LM35 temperature sensors. As a reference voltage is used U7 – LM336-2,5.
Its output value needs to be adjusted at 2,55V using a trimmer-potentiometer RP1. VD8 and
VD9 are used for temperature compensation. The MCP3302 has an SPI interface, using four
signal lines. These lines are under software control from the microcontroller (U9). To ensure
accuracy the analog ground is separated from the digital using small ferrite beam (L6). This is
an SMD type Z600 ferrite beam in 0805 package. The same type is used to decouple the power
supply for A/D converter and for temperature sensors and reference voltage (L4 and L5
respectively).
Brightness control
For an automatic brightness control is used a light-to-voltage converter – U8 (TSL257). Its
output voltage is directly proportional to the light intensity on the built in photodiode. The
voltage from the light sensor is measured using an on-chip microcontroller ADC. The ADC
value affects the PWM module from where the LED panel changes its brightness. To avoid
unwanted blinks of the display, a slight software delay of the PWM control is applied.
Display functions
The display settings are adjusted from the user with three local buttons S1-S3. The meaning of
these buttons is as follows: S1 – UP; S2 – DOWN; S3 – SET.
Clock settings
To enter in settings mode press once SET button. A “Settings” label appeared on display. To
set the clock and date, press UP or DOWN buttons to select “Set time”. Press the SET button
again and display will show the current time, where the hours’ digits are blinking. Use
UP/DOWN buttons to adjust the correct hours. Then press SET to select minutes. After the
minutes are set, the display will switch to date adjustment. Adjust date, month and year and
press SET to finish. The software automatically calculates the day of the week. If an incorrect
date is selected (for example 29.02.10), the display will show an “ERROR” message for a
while and will return at the beginning of the date adjustment. When the date is set correctly the
display will show a new set clock with blinking “OK” and will wait to confirm the new
clock/date values. If the UP button is pressed again the display will ignore the new values and
returns at “Settings” mode. If the DOWN button is pressed the display will return at the first
step of the “Set time” procedure. When the button SET is pressed a new clock and date value
are accepted, seconds are reset and display will run in normal mode.
The software automatically switches on Daylight Savings Time (+1 hour). It happens on the
last Sunday in March, at 3:00 o’clock a.m. Return to winter-time (-1 hour) is done on the last
Sunday in October, at 4:00 o’clock a.m.
Brightness settings
The user can select the brightness level in 8 steps or select an auto mode. To change the
brightness from “Settings” menu, select Bright and press SET. The display will show the
current bright level (from “Bright 1” to “Bright 8”) or “Bright A” for auto mode. The desired
value is selected by pressing the buttons UP and DOWN. When the SET button is pressed
again, the selected value will accept and store it in EEPROM.
To exit from “Settings” menu and return in normal mode of display press SET button, when a
label “Settings” appears.
IR remote control
An additional feature of the device is the possibility to change settings using an Infrared remote
control. It allows the device to be installed on a place with difficult access. The decoder is
implemented with microcontroller PIC12F675 (U52) and designed to work with a standard TV
remote control, matching RC5 protocol. This protocol is supported from TV Philips. The
decoder received a demodulated digital signal from IR receiver TSOP1736. The software
decodes the received command and transmits it to the main microcontroller U9 over an
asynchronous serial connection. The LED VD51 blinks once at each recognized command. The
main microcontroller (PIC18F252) receives commands from IR decoder using its hardware
Universal Synchronous Asynchronous Receiver Transmitter (USART) module. Because the
same module is also used for a RS232 connection to the PC, the RX signal is multiplexed
between the U52 output or U71 (MAX232) output. Switch is implemented by the 4 NAND
elements in U53 (74HC00). Unfortunately, the present version of the firmware is not ready to
control a RS232 communication. So for that moment U71, U53, J71 and their adjacent
elements can be omitted.
The available buttons from TV remote control are as follows:
- PROGRAM UP – equivalent to local button S1 - UP;
- PROGRAM DOWN – equivalent to local button S2 - DOWN;
- MUTE - equivalent to local button S3 – SET;
- MENU - equivalent to local button S3 – SET (not working with all remote controls);
- Direct buttons from 0…9 selects predefined messages. From messages 1 to 4 display
will show static message of clock, date, outside and inside temperature, respectively.
From 5 to 9 and 0 the display shows all available data with different effects.
Power supply
The device needs three different stabilized supply voltages: Vcc (+5V) for main part of scheme,
Vled (+2,5V) for LEDs’ anodes and a +9V for temperature sensors. For high-efficiancy Vcc
(+5V) and Vled (+2,5V) are provided using a step-down regulator. For a +5V is used U2
(LM2575-5.0) and for Vled is used U3(LM2576-ADJ). Because the consumption from the +9V
is very low, it is implemented with low power version of standard linear regulator 78L09. Vth1,
VD14 and R18 realized overvoltage protection. If the voltage of Vcc exceeds the zener diode
voltage plus thyristor gate voltage the thyristor starts to open and gives short circuit Vcc to
ground. This protects all the integrated circuits from accidentally raising the supply voltage.
The external power supply must have a fuse or current limiter. Of course, this protection circuit
is not necessary, but strongly recommended, especially at the stage of testing. Other two power
supplies are not so critical if the voltage is increased. The LED drivers’ outputs can work with
up to 20V load and limits the current through the LEDs. The ICs LM35 and LM336 can also
work with higher than 9V power supply.
It is necessary to pay attention to the Vled voltage. Its value is very important due to the power
dissipation in the LED drivers. In this case are used super bright red LEDs dot matrix modules
5x7 (TC20-11SRWA). The LED forward voltage Vf is 1,85V at 20mA. It won’t be a problem
to use other type of LEDs. For reliable work the Vled should be 0,5-0,7 higher than the Vf. But
not more higher, because the power dissipation in the drivers will increase and the thermal
shut-down protection will be activated. To calculate the Vled is used the next formula:
)
2
3
1,23* (1
R
R
Vled = + ,
where R2 is between 1 and 5 k .
It is also needed to choose a proper value for LEDs current. The current is set with R115, R116
and R117 resistors, connected to pin 23 (R EXT) of LED driver. The showed value (270 ) sets
a current of approximately 80mA per output. Because the duty cycle of each row is 1/8, the
average current through the LED is 10mA. See the STP16CP05 datasheet for output current
resistor set. For convenience of changing these resistors, the footprints of R115 and R116 are
duplicated next to R117, named R115’ and R116’.
In conclusion
Any special adjustments are required to start the device. If it is assembled properly and two
microcontrollers are programmed it will immediately start running. U9 can be programmed
with one of the two available connectors J4 or J4A depending on the programmer type. It is
possible to need to disconnect the Vcc from U9 during programming. For that purpose JP1 is
provided. The U52 must be programmed externally.
Please note, that the two double row connectors connecting the two boards are SMD type. The
clearance between the pins is 2,00mm, not 2,54!
This is a demonstration device. I am open to any ideas and issues concerning the project.
Don’t hesitate to contact me at: vasilev_ivailo@abv.bg
Best regards,
Ivaylo Vasilev

LED INFO DISPLAY
“Led Label”
I. Features:
- LED dot matrix display 40x7;
- Display of clock, calendar, inside and outside temperature, text messages;
- Automatic Daylight Savings Time;
- Capability of keeping the real time clock working correctly for more than one week
without power supply;
- Inside temperature measurement (0 ÷ +75) °C, ±0.5 °C accuracy;
- Outside temperature measurement (-40 ÷ +75) °C, ±0.5 °C accuracy;
- Supports static and running messages with different effects;
- Full Cyrillic and special symbols supports;
- Memory for 10 messages, each including up to 250 symbols;
- Automatic brightness control;
- IR remote control for settings messages select;
- Power supply: 12 ÷ 24V DC;
- Front panel dimensions 305 69 mm.
II. Schematic description:
The device comprises two parts: LED control board and LED display board. The two PCBs
are designed to fit together one behind the other using two sets of dual row connectors and 4
spacers. One of this connector is used for the electrical connections, while the other is only
used as a mechanical connecting element.
The core of the device is microcontroller PIC18F252 (U9). It controls all the functions of the
device, generates the overall algorithm to control the LED matrix. LEDs are connected in
matrix 40x7. The columns tie together the cathodes of the LEDs and rows tie the LEDs anodes.
The LED matrix is controlled dynamically in row by row. To safe space and number of
components, the LEDs are driven with specialized LED driver STP16CP05 (U101-U103),
produced by ST Microelectronics. Each of these IC contain 16-bit serial-in, parallel-out shift
register, latch register and 16 constant current output channels. Outputs are open drain type,
allowing connection of a load supplied with up to 20V supply voltage. The constant current for
all outputs varies from 5 to 100 mA and is set from an external resistor (R115-R117). In this
application, the three LED drivers are connected in a cascade and controlled from the
microcontroller over SPI protocol. The microcontroller sends a 48-bit word, controlling one
row at the time. The 40 LSB represent LED states (1-On, 0-Off) in the row and control their
cathodes. The 7 MSB control the anodes through the 7 driver transistors (VT101 – VT107).
The 40th bit remains unused. The microcontroller sends the 48-bit word every 1 ms. There are
7 cycles to display each row plus an extra blank cycle, used to process temperature
measurements. Thus, the refresh rate of the display is 125Hz. To control the display brightness
is used the “outputs enable” (OE) pin. Each row cycle begins with logical 0 on the OE pin
(outputs are enabled). The duration of an enabled signal changes depending on the desired
brightness, using the microcontroller’s on-chip PWM module.
You should note that numbers of columns and rows are not sequential to the corresponding
pins of the ICs (U101-U103). This aims to simplify the design of PCB. The LEDs’
corresponding bits are rearranged by software to fit with their physical order.
Real-time clock / calendar
The real time clock is implemented with U10 - PCF8583. This is a clock / calendar / alarm
circuit with I2C interface and on-chip 32768Hz oscillator. The PCF8583 contains all necessary
counter registers to provide real time clock and date information. Its power consumption is very
low (typical supply current is 10 A). It operates in wide range of supply voltage from 1 to 6V.
These features will make it possible to have a real time clock available for a long time using a
small lithium battery or even a back-up capacitor. The designed PCB provides both options.
The footprint for lithium battery is suited for 2032 type socket. The experiments using 1F backup
capacitor show that the clock remains active more than a week after turning-off the power
supply. The diodes VD10, VD11 and VD12 should be Shotkey type as shown in the scheme
because of their low drop forward voltage. Trimmer-capacitor C21 is used to adjust the
oscillator frequency at 32768Hz. For I2C communication is used the Master Synchronous Serial
Port (MSSP) module in PIC18F252. This module is set in I2C master mode. On the same bus
an external EEPROM (U11) can be connected to expand the capacity of the data storage. The
present version of firmware does not need an external EEPROM, so it can be omitted.
Temperature measurement
For ambient temperature measurement are used LM35 sensors (U5, U6). They are factory
calibrated directly in ° Celsius. The output response is 10mV/°C. The supply voltage should be
between 4 and 30 Volts. To make a full-range temperature measurement, a negative voltage
must be applied to the output through a resistor (R4 and R5). To ensure this requirement, the
ground pins of the sensors are connected to the analog ground through two diodes (VD4,VD5
and VD6,VD7), which pick them up with approximately 1,4V. In that case the Vcc (+5V)
power supply is not enough for LM35, so additional voltage regulator U1 (78L09) is needed to
be used. The signal from the sensor is taken between the output and the negative pins of the
LM35. The voltage between these two pins is bipolar with polarity depending on the measured
the temperature sign. The sensors could be connected with external three-wire cables. Software
is designed to show inside temperature from U6 and outside temperature from U5.
A/D converter
Both LM35’s outputs are connected to U4 - MCP3302. This is a Successive Approximation
Register (SAR) analog to digital converter. It provides 13 bits resolution (12 bits plus one sign
bit). The MCP3302 has 4 analog inputs, which can be configured either as 4 single ended or as
2 differential inputs. The application requires 2 differential inputs to convert both bipolar
voltages from the LM35 temperature sensors. As a reference voltage is used U7 – LM336-2,5.
Its output value needs to be adjusted at 2,55V using a trimmer-potentiometer RP1. VD8 and
VD9 are used for temperature compensation. The MCP3302 has an SPI interface, using four
signal lines. These lines are under software control from the microcontroller (U9). To ensure
accuracy the analog ground is separated from the digital using small ferrite beam (L6). This is
an SMD type Z600 ferrite beam in 0805 package. The same type is used to decouple the power
supply for A/D converter and for temperature sensors and reference voltage (L4 and L5
respectively).
Brightness control
For an automatic brightness control is used a light-to-voltage converter – U8 (TSL257). Its
output voltage is directly proportional to the light intensity on the built in photodiode. The
voltage from the light sensor is measured using an on-chip microcontroller ADC. The ADC
value affects the PWM module from where the LED panel changes its brightness. To avoid
unwanted blinks of the display, a slight software delay of the PWM control is applied.
Display functions
The display settings are adjusted from the user with three local buttons S1-S3. The meaning of
these buttons is as follows: S1 – UP; S2 – DOWN; S3 – SET.
Clock settings
To enter in settings mode press once SET button. A “Settings” label appeared on display. To
set the clock and date, press UP or DOWN buttons to select “Set time”. Press the SET button
again and display will show the current time, where the hours’ digits are blinking. Use
UP/DOWN buttons to adjust the correct hours. Then press SET to select minutes. After the
minutes are set, the display will switch to date adjustment. Adjust date, month and year and
press SET to finish. The software automatically calculates the day of the week. If an incorrect
date is selected (for example 29.02.10), the display will show an “ERROR” message for a
while and will return at the beginning of the date adjustment. When the date is set correctly the
display will show a new set clock with blinking “OK” and will wait to confirm the new
clock/date values. If the UP button is pressed again the display will ignore the new values and
returns at “Settings” mode. If the DOWN button is pressed the display will return at the first
step of the “Set time” procedure. When the button SET is pressed a new clock and date value
are accepted, seconds are reset and display will run in normal mode.
The software automatically switches on Daylight Savings Time (+1 hour). It happens on the
last Sunday in March, at 3:00 o’clock a.m. Return to winter-time (-1 hour) is done on the last
Sunday in October, at 4:00 o’clock a.m.
Brightness settings
The user can select the brightness level in 8 steps or select an auto mode. To change the
brightness from “Settings” menu, select Bright and press SET. The display will show the
current bright level (from “Bright 1” to “Bright 8”) or “Bright A” for auto mode. The desired
value is selected by pressing the buttons UP and DOWN. When the SET button is pressed
again, the selected value will accept and store it in EEPROM.
To exit from “Settings” menu and return in normal mode of display press SET button, when a
label “Settings” appears.
IR remote control
An additional feature of the device is the possibility to change settings using an Infrared remote
control. It allows the device to be installed on a place with difficult access. The decoder is
implemented with microcontroller PIC12F675 (U52) and designed to work with a standard TV
remote control, matching RC5 protocol. This protocol is supported from TV Philips. The
decoder received a demodulated digital signal from IR receiver TSOP1736. The software
decodes the received command and transmits it to the main microcontroller U9 over an
asynchronous serial connection. The LED VD51 blinks once at each recognized command. The
main microcontroller (PIC18F252) receives commands from IR decoder using its hardware
Universal Synchronous Asynchronous Receiver Transmitter (USART) module. Because the
same module is also used for a RS232 connection to the PC, the RX signal is multiplexed
between the U52 output or U71 (MAX232) output. Switch is implemented by the 4 NAND
elements in U53 (74HC00). Unfortunately, the present version of the firmware is not ready to
control a RS232 communication. So for that moment U71, U53, J71 and their adjacent
elements can be omitted.
The available buttons from TV remote control are as follows:
- PROGRAM UP – equivalent to local button S1 - UP;
- PROGRAM DOWN – equivalent to local button S2 - DOWN;
- MUTE - equivalent to local button S3 – SET;
- MENU - equivalent to local button S3 – SET (not working with all remote controls);
- Direct buttons from 0…9 selects predefined messages. From messages 1 to 4 display
will show static message of clock, date, outside and inside temperature, respectively.
From 5 to 9 and 0 the display shows all available data with different effects.
Power supply
The device needs three different stabilized supply voltages: Vcc (+5V) for main part of scheme,
Vled (+2,5V) for LEDs’ anodes and a +9V for temperature sensors. For high-efficiancy Vcc
(+5V) and Vled (+2,5V) are provided using a step-down regulator. For a +5V is used U2
(LM2575-5.0) and for Vled is used U3(LM2576-ADJ). Because the consumption from the +9V
is very low, it is implemented with low power version of standard linear regulator 78L09. Vth1,
VD14 and R18 realized overvoltage protection. If the voltage of Vcc exceeds the zener diode
voltage plus thyristor gate voltage the thyristor starts to open and gives short circuit Vcc to
ground. This protects all the integrated circuits from accidentally raising the supply voltage.
The external power supply must have a fuse or current limiter. Of course, this protection circuit
is not necessary, but strongly recommended, especially at the stage of testing. Other two power
supplies are not so critical if the voltage is increased. The LED drivers’ outputs can work with
up to 20V load and limits the current through the LEDs. The ICs LM35 and LM336 can also
work with higher than 9V power supply.
It is necessary to pay attention to the Vled voltage. Its value is very important due to the power
dissipation in the LED drivers. In this case are used super bright red LEDs dot matrix modules
5x7 (TC20-11SRWA). The LED forward voltage Vf is 1,85V at 20mA. It won’t be a problem
to use other type of LEDs. For reliable work the Vled should be 0,5-0,7 higher than the Vf. But
not more higher, because the power dissipation in the drivers will increase and the thermal
shut-down protection will be activated. To calculate the Vled is used the next formula:
)
2
3
1,23* (1
R
R
Vled = + ,
where R2 is between 1 and 5 k .
It is also needed to choose a proper value for LEDs current. The current is set with R115, R116
and R117 resistors, connected to pin 23 (R EXT) of LED driver. The showed value (270 ) sets
a current of approximately 80mA per output. Because the duty cycle of each row is 1/8, the
average current through the LED is 10mA. See the STP16CP05 datasheet for output current
resistor set. For convenience of changing these resistors, the footprints of R115 and R116 are
duplicated next to R117, named R115’ and R116’.
In conclusion
Any special adjustments are required to start the device. If it is assembled properly and two
microcontrollers are programmed it will immediately start running. U9 can be programmed
with one of the two available connectors J4 or J4A depending on the programmer type. It is
possible to need to disconnect the Vcc from U9 during programming. For that purpose JP1 is
provided. The U52 must be programmed externally.
Please note, that the two double row connectors connecting the two boards are SMD type. The
clearance between the pins is 2,00mm, not 2,54!
This is a demonstration device. I am open to any ideas and issues concerning the project.
Don’t hesitate to contact me at: vasilev_ivailo@abv.bg
Best regards,
Ivaylo Vasilev





































......

PIC Basic-Interfacing with Polstar GPS

PIC Basic - Interfacing With Polstar GPS PMB-688 Having SiRF starIII IC   PRO134
Global Positioning System (GPS), now a days, is a widely found feature in a number of consumer goods. GPS is used for navigation and tracking and is available in cars to wrist watches. A number of educational and fun projects can be built using GPS modules. GPS modules are available in very small sizes 1 cm x I cm to larger sizes like 4cmx4cm. Most of the module comes with 4 to 6 wires and hence building the project is relatively simple. But getting it working is not that easy unless you have access to right information. The purpose of this project is to do exactly the same. Provide you with the right info in a concise fashion.
It is good to know a little bit about what GPS is and how it works before starting to work on the project. In essence GPS is a small module that directly receives signals from multiple GPS satellites using a small antenna. These GPS satellites are positioned around the globe and available pretty much every part of the world. The module processes the information received through the antenna and outputs the current time and date, current position (longitude and latitude), speed at which the module is moving and the altitude at which the module is currently located, in a text string format. Life is easy, just take this string and parse it to get all the info you want and use it in whichever way you want. The text string is output in standard format following NMEA standards, which is pretty easy to understand. To get additional information about GPS we strongly recommend you to read the following links:
In this project we are going to build a position information system that will display NEMA standard strings on an LCD display. We will use a PIC microcontroller 16F877A to receive and process the NMEA strings and POLSTAR PMB-688 as GPS module. This module comes with patch antenna (antenna stuck on to the top of the module) and also has provision to connect external antenna. The module was able to locate one satellite inside my room (second floor apartment room in Chennai, India) without an external antenna. When I moved to balcony the module was able to tune to three satellites.
PMB-688 has six terminals, of which two of them are for power supply; as soon as you connect them to a supply (3V -5V) as LED start blinking indicating that it started working. You can interact with GPS using two protocols viz UART and RS232. Using both protocols you can configure the GPS to filter out certain type of messages. If no configuration is done the GPS will start sending out NMEA message in default settings. In this project we are using UART as this protocol and it is supported by 16F877A.
UART uses one wire for transmission and another for receiving data at programmatically set baud rate. The default baud rate for PMB-688 is 4800 hence the PIC need to be configured to receive at 4800 Kbits/sec. Refer code to see details. Refer to 16F877 datasheet for more details on UART settings. The data from GPs can be read from the UART registers in poll mode or interrupt mode, In this program we are using interrupt mode to read data from the registers. If you are NOT planning modify the default settings of the GPS you need to connect only the TX (transmit) wire of the GPS to the RX (receive) pin of the PIC. See circuit diagram for details.
We are using a two line LCD JHD162A for displaying the NMEA strings. See project Three Wire Interfacing With an LCD Screen JHD162A for more details on this.
Youtube Demo
Login to see tips, download datasheets and view code
Downloads
  1. Download the datasheet for PIC16F877A to get a good understanding of other details of the microcontroller.
  2. Download the datasheet for PMB-688 to get a good understanding of other details of GPS Module.
  3. Download the NMEA Specification to get a good understanding of NMEA specification.
  4. The compiled HEX file. (this can be directly burned into your PIC) click here
TIPS
  1. Ensure that all unused pins of the PIC are set to output. Any unused pin set as input and left floating causes to create garbage in NMEA output string.
  2. Login for More...
Click to view PIC code
The C compiler used for this project is Hi-TECH light


LIST OF PARTS USED IN THE PROJECT
REFPART TYPEPART NAMEVALUECOUNTINFO
 Bat1BATTERYPACKBattery Pack 12V AA12V1See Picture
 C1,C2CAPACITORCapacitor 100n100n2See Picture
 C3,C4CAPACITORCapacitor 27pF27pF2See Picture
 C5,C7ELECCAPACITORElectrolytic Capacitor 220uF220uF2See Picture
 C6ELECCAPACITORElectrolytic Capacitor 0.1uF0.1uF1See Picture
 Cr1CRYSTALCrystal 10.0 MHz10MHz1See Picture
 GPSGPSMODULEGPS Polstar PB-688688PB1See Picture
 IC1ICPIC16F877APIC16877A1See Picture
 IC2ICIC LM78057805IC1See Picture
 IC3,IC4ICIC 7417474174IC2See Picture
 LCDDISPLAYLCDLCD 16x2 JHD162AJHD162ALCD1See Picture
 PCBPCBPCB Gen Purpose DD 4x34x3inch1See Picture
 POT1POTPot Meter 10K10K1See Picture
 R1RESISTORResistor 10K10K1See Picture

Approximate cost for building this project is Rs 3741.00

Note: In addition to the above components you may also require a breadboard and power supply / batteries for building this project.

Post a comment or question
Be the first one to make a comment or suggestion on this project:
Post Type:
Comment:
 Please login to post a comment or question 
Click here to login or register