Author Topic: GPS controlled servo motor  (Read 778 times)

0 Members and 1 Guest are viewing this topic.

Offline asp128Topic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
GPS controlled servo motor
« on: October 26, 2013, 02:05:22 PM »
I wish to move a servo motor to a particular angle on the basis of the altitude sensed by a gps unit. I am using an atmega 128 and a mediatek mt2239 gps unit. How do I go about writing the code?
I am completely new to avr.....
I also wish to log the gps data onto EEPROM or sd card.
Please guide....

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: GPS controlled servo motor
« Reply #1 on: October 26, 2013, 04:17:19 PM »
Read GPS data and extract the altitude info.
Convert to a pulse width that corresponds to the servo angle.
Connect an I2C EEPROM to the Atmega I2C pins and write the data out.

Each of these are separate tasks that you couple together in code. Tackle and learn how to each separately first then code them together.
There are lots of examples of each so do some more searching and reading.

Offline CJAlbertson

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 1
Re: GPS controlled servo motor
« Reply #2 on: November 16, 2013, 03:31:48 AM »
I wish to move a servo motor to a particular angle on the basis of the altitude sensed by a gps unit. I am using an atmega 128 and a mediatek mt2239 gps unit. How do I go about writing the code?
I am completely new to avr.....
I also wish to log the gps data onto EEPROM or sd card.
Please guide....

Have you looked at your altitude data yet?  GPSes are typically horrible when it comes to altitude. 

The altitude data, along with everything else is typically reported once per second.  You might find that a stationary GPS antenna is reported to be at different elevations .  So you may have to filter and smooth the GPS data.  Many applications will use a an air pressure sensor and accelerometer  in addition to GPS.    Some of the error is due to different definitions of "altitude", what is the zero reference and also the spheroid used.
Chris A. in So. Cal.

 


Get Your Ad Here

data_list