free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Rickey's World :: Discussion Forums :: Discuss and Learn :: 8051 Discussion Forum
 
<< Previous thread | Next thread >>
Interface 8051 with a GPS module (EM-406a)
Moderators: Ajay Bhargav, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph, ExperimenterUK, DavesGarage
Author Post
iam
Sat Jul 04 2009, 09:20AM

 User Offline
Registered Member #224
Joined: Wed Nov 22 2006, 12:28PM

Posts: 20
Thanked 2 times in 2 posts
Hello guys i just buy a EM-406a module and i need some help about the interface between GPS and uC.
Typical connection

uC <------------> GPS
--------------------------
Rx <-------------- Tx
Tx --------------> Rx

right right?
But :mad
from the GPS manual :
Electrical level : TTL level,Output voltage level :0-2.85V,RS-232 lvl

so this might be a problem ? since my uC works on 5V for Logical High
right right?

Ok now lets go back to my Electrical Characteristics of my uC
Vih = min:0.2Vcc+0.9 and max:Vcc +0.5. Vcc = 5v
Voh = Vcc-0.3 , Vcc-0.7,Vcc-1.5 *with my meter i get 4.97V but why?
so should i use the typical connection or i damage the module?
i think Vihmin = 1.9V is ok for Rx <---------------- Tx
what about Tx --------------> Rx, Voh=4.97V is too much for the module ... right right?


any explain to my questions or any source for study will be helpfull thanks

*also what is your opinion about my gps module ?





Inside the electric world
I want to fly with you
Eight bits wide is our love
Circuits our destiny
http://www.youtube.com/watch?v=mu98JyjOS8g
Back to top

Ajay Bhargav
Mon Jul 06 2009, 02:41AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 7567
Thanked 1330 times in 1254 posts
use a voltage divider on tx line..

CODE:
uC TX PIN
   |
   \
   /  R1
   \
   /
   |
   |---- To module
   \
   /  R2
   \
   /
   |
   |
  GND
 


Vr2 = R2 . V /(R1 + R2)

Vr2 = 2.85V
V = 5V

2.85/5 = R2/(R1+R2)

1+R1/R2 = 5/2.85

1+R1/R2 = 1.75

R1/R2 = 0.75

R1 = 0.75R2

check your inventory and select R1 and R2 according to above equation.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


This post has been thanked 1 time
 iam 
iam
Mon Jul 06 2009, 05:56AM

 User Offline
Registered Member #224
Joined: Wed Nov 22 2006, 12:28PM

Posts: 20
Thanked 2 times in 2 posts
Nice thats the solution that i have in my mind Ajay
so R1 must be >= 0.75 * R2
my resistor invertory is so limit ..
i will use R2 = 261ohm and for R1=216 ohm with respect to above equation

but now another question arised and its about currents
i= 2,74 / 261 = 10,5 mA, should i use bigger resistors?
lets say i connect two 1K resistors in series with R1 and R2
R11=1K+R1 and R22=1K+R2 .

thanks

Inside the electric world
I want to fly with you
Eight bits wide is our love
Circuits our destiny
http://www.youtube.com/watch?v=mu98JyjOS8g
Back to top

shyam
Mon Jul 06 2009, 07:21AM

 User Offline

Registered Member #2984
Joined: Mon Aug 06 2007, 11:33AM

Posts: 847
Thanked 136 times in 125 posts
most gps have two o/ps
TTL and rs232
Electrical level : TTL level,Output voltage level :0-2.85V,RS-232 lvl


if you have a rs232 o/p.. then use
gps->max232->uC
and
gps<-max232<-uC
this will be the safest solution.


lProgress is not made by early risers or hard workers, but by LAZY people, trying to find easier ways to do the same........
Back to top

iam
Tue Jul 07 2009, 12:25AM

 User Offline
Registered Member #224
Joined: Wed Nov 22 2006, 12:28PM

Posts: 20
Thanked 2 times in 2 posts
OK shyam i connect it with max232 also i sent it but accident zero's i think ...

and later i connect it to my pc
for a simple test
pc-max232-gps

but whats wrong now ?? the led is not flashing ...
using SirfDemo i get those things see picture

http://img43.imageshack.us/img43/8335/wtfjnm.jpg

also it works only on 4800 baude rate ,at the other speeds i get errors like comm: ce_break
did i kill it? :-s

SOS SOS SOS HELP MEE!!!:-s

EDIT


OK IT WORKS BUT NOT INSIDE MY HOUSE !! :mad





[ Edited Tue Jul 07 2009, 03:28AM ]

Inside the electric world
I want to fly with you
Eight bits wide is our love
Circuits our destiny
http://www.youtube.com/watch?v=mu98JyjOS8g
Back to top

shyam
Tue Jul 07 2009, 03:31AM

 User Offline

Registered Member #2984
Joined: Mon Aug 06 2007, 11:33AM

Posts: 847
Thanked 136 times in 125 posts
it would work only on 4800 bps.
the led is not flashing

is it stable... if yes then you getting actual data.. flashing leds indicate void data.

and please do not shout.

lProgress is not made by early risers or hard workers, but by LAZY people, trying to find easier ways to do the same........
Back to top

Ajay Bhargav
Wed Jul 08 2009, 05:28AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 7567
Thanked 1330 times in 1254 posts
iam wrote ...
SOS SOS SOS HELP MEE!!!:-s

EDIT


OK IT WORKS BUT NOT INSIDE MY HOUSE !!


GPS should be placed in open sky to get satellite data. it wont work inside house or under roof or any kind of metallic shielding.

[ Edited Wed Jul 08 2009, 05:28AM ]

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top

iam
Sun Jul 12 2009, 01:08PM

 User Offline
Registered Member #224
Joined: Wed Nov 22 2006, 12:28PM

Posts: 20
Thanked 2 times in 2 posts
Well i try your ideas guys but they seems dont work ..

1st method using max232

i was getting the same none valid character all time
dunno why! :mad

actually when i was tryin to connect my GPS to PC the max232 was the only way to do it, and SirfDemo was able to get valid Data of GPS.

2nd method using a voltage divider with resistor ratio 0.75

none valid characters ....
dunno why too ! :mad

The only way to get valid data was the typical connection between
uC -- GPS
Rx <-------------- Tx
Tx --------------> Rx







Inside the electric world
I want to fly with you
Eight bits wide is our love
Circuits our destiny
http://www.youtube.com/watch?v=mu98JyjOS8g
Back to top

ExperimenterUK
Sun Jul 12 2009, 01:53PM
 User Offline
Registered Member #9602
Joined: Tue Aug 05 2008, 04:15PM

Posts: 1259
Thanked 199 times in 198 posts
iam wrote ...

The only way to ge valid data was the typical connection between
uC -- GPS
Rx <-------------- Tx
Tx --------------> Rx

If this connection method works, why not just use that ?.


Back to top

iam
Sun Jul 12 2009, 03:30PM

 User Offline
Registered Member #224
Joined: Wed Nov 22 2006, 12:28PM

Posts: 20
Thanked 2 times in 2 posts
yeah i will use this one, much simpler and much cheaper ...
but i still wondering whats wrong with the others too.


Inside the electric world
I want to fly with you
Eight bits wide is our love
Circuits our destiny
http://www.youtube.com/watch?v=mu98JyjOS8g
Back to top

 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems