Hardware Integration of RTPT

Main Page – Real time planet tracking system

Things you need :

  1. Arduino Mega (or MCU with more than 33Kbyte flash )- This is important because my final code was around 33KB and i couldnt fit it in an UNO.
  2. U-BLOX GPS Receiver ( NEO-6M ) or any GPS Module.
  3. MPU9250 (9 axis gyro-accelero-magneto) for auto Yaw stabilization [OPTIONAL]
  4. Pan- tilt Mechanism with Servos.(pan servo should be of 3.5turns and Tilt servo can be a normal 180 degree servo )
  5. A laser pointer –to be fixed to the tilt servo to show planet location in a closed rooom
  6. Optional Power Distribution board and Battery Eliminator Circuit (BEC).
  7. A Potentiometer  to be used as Planet selector and a Switch as Mode Selector.

Starting with the GPS

Using the GPS is very easy when we use TinyGPS++ Libraries : http://arduiniana.org/libraries/tinygpsplus/

GPS uses Serial communication so I have connected it to Serial2 of Mega That is pin 16 and pin 17.

capture

After connecting burn a test code from library named “FullExample“.The library use Software serial  make sure you have converted it to Serial2 also change the GPSBaud to 9600. Also, have a look at the code named “DeviceExample“. Both of the aformentioned code examples can be found here.The reason why I am asking you to understand these codes because we will be using SmartDelay to update GPS values from the GPS buffer

Also we will be using the following functions call statements to get Latitude,Longitude,Year,Month,Date,Day,Hour,Minute

Now that we have our GPS ready we can go for pan-tilt mechanism with Laser.

We need to get a 3.5 turns Servo for PAN and a normal 180° Servo for TILT. I wont tell you much about a servo pan-tilt  mechanism rather focus on the connections and its mapping.

Principle : The mechanisms used in pan tilt is the same as the one used for moving large telescopes in Space Observatory !

  • The pan-tilt can rotate roughly 360° from side-to-side (pan motor) and can tilt up & downward (tilt motor) around 180°.
  • A laser pointer will be mounted on this pan-tilt mechanism
  • Calculated azimuth angle could be traced by pan motor. Elevation angle traced by tilt motor.

ezgif-1425128589

first the connections..we will be using Pin 9 for Pan Servo and Pin 10 for Tilt Servo Afgdfb.JPG

I have also added a potentiometer (present in the featured image at the top of this page, which is my final schematic) as a switch to select planets. This is optional and can be implemented easily.

Servo  mapping

Just look on the servo library examples …you will understand how to make a servo work.We just need three lines of code  from the library for each servo.

We need to define Servo objects and attach the pins and initialize them:

Our pan servo is a 3.5 turns servo and it takes input from 5 to 29 to rotate from 0° to 360°

Then we do our mapping which is quit simple.Lets assume the variable “Azim” gives us the value of Azimuth and the variable “Elevation” altitude,then we do our mapping as

Azi  and El are the right  mappings and can be fed to the pan tilt as :

Now all you need to do is convert the calculation of Azimuth-Altitude from the previous post into an Arduino code and use the data from GPS and get the output and feed it to the servo Link.

Note: You must align your pan-tilt setup at its initial position (both at 0° ) with the 0° Azimuth of your actual location ….that is nothing but North Direction!.

In the next post I’ll integrate MPU9250 so that my Pan Servo Automatically senses the north of my location and Automatically shows me the planet position by adjusting itself even if I dont keep it at Azimuth 0°…again this step is optional.

RTPT (Real Time Planet Tracking System and Trajectory Prediction) Copyright © 2016 Shubham Paul , Samhita Ganguly ,Rohit Kumar  GNU GPL3+

This entry was posted in Embedded Hardware, Embedded Software, Planet Tracking System and tagged , , , , , , . Bookmark the permalink.

1 Response to Hardware Integration of RTPT

  1. Pingback: Real-Time Planet Tracking System & Trajectory Prediction | paulsite.com

Leave a Reply

Your email address will not be published. Required fields are marked *

18 page views, 37 database queries in 0.206 seconds.