1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

GPS Data tracker for antenna aiming

Discussion in 'Oshonsoft' started by camerart, Apr 7, 2014.

  1. SwingeyP

    SwingeyP Member

    Joined:
    Apr 26, 2010
    Messages:
    292
    Likes:
    2
    Location:
    Birmingham UK
  2. SwingeyP

    SwingeyP Member

    Joined:
    Apr 26, 2010
    Messages:
    292
    Likes:
    2
    Location:
    Birmingham UK
    Also NMEA is a standard. I hav eyet to find one that doesn't have all the message sentences. $GPGSV just needs to be configured in the GPS's setup.
    I did a LOT of work around this a while back with a lot of help from people here. You can of course get the GPS to send multiple sentences :)

    I did some work creating my own sentence protocol using several sentences and just picking the info I wanted.

    read them all, load them into an array, spit out what you want.....

    Regards -Paul
     
  3. SwingeyP

    SwingeyP Member

    Joined:
    Apr 26, 2010
    Messages:
    292
    Likes:
    2
    Location:
    Birmingham UK
    Brain dump. A simple way to do this is to get hold of an old Antenna Rotator. Lots on ebay. The old CDE ones are nice and easy to use. They have a pot in the rotator which matches the pot on a controller. You could convert the controller to have a pic with a look up table that gives voltages depending on the NMEA LAT LONG data. This would then drive the rotator where you wanted to go. Not thought this through just a quick braindump in my lunch hour.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.

    Hi Paul,

    Thanks for the idea, but I have rotatory stuff from past projects.

    For the tracker, I have made 360 degree optical wheels to fit to the output shafts for feedback, now back to work:)

    Cheers, Camerart.
     
  6. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    P,
    All very professional, and interesting. At the moment, the information is getting a bit much to remember, so if you wouldn't mind following the thread and interjecting as I get stuck. I think it's best I start, with programming 16F886 PICs, with the best I have received so far, and see how I get on.

    Camerart.
     
  7. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    Having just chosen 16F886 for driving the tracker, I keep being advised to move up to 18 series PICs. The advice includes Arctan, and look-up tables. I've been swatting up on trigonometry, not a good subject for me! Now the question is which chip to choose? I can only choose after advice from people who have experience of 18 Series.

    So, which chip? I think 28 pin will be enough.

    Camerart.
     
  8. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,174
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi C,
    The PIC 18F series does not have Trig instructions, your program would have to be written in 'C' to enable you to use the 'C' Trig function libraries.

    You can use look up Tables for the ArcTan values, IMHO you only require at max a Table 0f 90 of Atn values.

    I do not believe that 28 pins will be sufficient for your final proposed project.

    Eric
     
  9. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    Eric,

    Are you saying that updating to 18series PICs was a waste of time? It seems I've gone back to square one:meh:

    I've just searched for this sort of question and found this. Is it relevant? http://www.picbasic.co.uk/forum/showthread.php?t=10528

    Cheers, Camerart,
     
  10. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,174
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi C,
    No, I am not saying the PIC 18F is a waste of time.:)

    The advice you have been given by others regarding using the 18F is that you can use the 'C' Trig libs that are available for the 18F.
    You would have to write the main body of your program in 'C', if you wish to use the 'C' Trig libs.

    The Trig functions you need for ArcTan [ Atn] could be written in Basic, with Assembler for the Trig maths.

    Its been pointed out by others that the 18F can execute faster than the the 16F also a 20MHz Xtal should be used to maximise the the PIC execution rate.

    Its essential that you decide on the project specification and post it, so that we are working from a firm specification, otherwise we will go around in circles.;)


    Eric
     
  11. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,

    I'm trying to get out of the habit of going round in circles:meh:

    Glad to hear that the update wasn't a waste!

    I'm trying to learn a bit about Trig, also a bit of 'C', but from history, I know I won't be good at it.

    If I have at least some basic in the program, that I can adjust to suit future adjustments, that will be fine. I'm happy to have a block in the program, that is fixed, and I don't understand, if that's what you're saying?

    As for project specifications,I'm learning as I go along, but As for what's needed: I'm sure you've seen the mock up photo of the two axis, that are used to mechanically move the aerial/s. From NMEA data coming from one source, the LON, LAT and ALT are parsed out to give X,Y,Z location of source. The location of the tracker is known and entered into the program. A calculation between the the X,Y,Z of the Tracker and X,Y,Z of the source, are sued to move the two motors, with optical disks on each motor feeding back where each motor is. The Azimuth will be able to go round and round if the source goes round and round the tracker, and the Alt will be able to go from horizon to horizon 180Degerees.

    Hope this answer your question. Camerart.
     
  12. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,174
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi,
    OK,:)
    Few technical points:
    Resolution of the tracker aerial in degrees, Vert and Horizontal axis.?

    The expected beam reception width of the tracker Yagi aerial in degrees,?

    The angular velocity in the Vert and Horiz of the tracked target.?

    The expected maximum range of the Remote target.?

    How are you going to enter the Northings and Eastings [ N, E] coordinates of the Base station/Tracker drive.?

    How will you initially point the tracker aerial at the remote target.?

    What will the Base tracker do if it loses the Remote target transmission.?

    etc?

    Eric
     
  13. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,

    1/ Resolution 1 Degree. Azimuth and Alt.

    2/ The aerial will be made after the tracker has been tested, depending on performance of the tracker, etc. 5-10-20? Degrees.

    3/ I hope to make the best I can, without being too precise. I'm reliant on help from mathematicians, and programmers, as I don't know.

    4/ If you mean distance, I think Satellites can be 400ish Kilometers.

    5/ Of the top of my head, I could use left right up down keys, with LCD readout of angles, or keyboard, I think this will fall into place. Edit: or from a GPS module, in initial set-up.

    6/ Same as above. Except the GPS edit.

    7/ Cry. Or I suppose it will stop.

    8/ Etc.

    C
     
    Last edited: May 10, 2014
  14. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,174
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    Hi,
    Which part of the project do you plan to tackle first.

    E
     
  15. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    1/ That sound good.
    2/ 10 Degrees is fine.
    3/ I'm a bit lost on question/answer 3, I'll just have to wait till I get some results.
    4/ I think that's what has been mentioned with different NMEA data sentences.
    5/ Yes.
    6/ By sight or previous information. There are various ways. The tracker will have a Receiver attached to the aerial, for receiving the Data sentences.
    7/ I suppose the program could tell if there were no sentences coming in.

    The first part of the project is to choose a PIC, make a test board, and get a program to show motor outputs.

    Camerart.
     
  16. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,174
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    H C,
    I would choose a 18F4520 to start your project , using 20MHz xtal.
    If you find later in development a 28 pin version would do the job, the program would be compatible with say a 18F2520.

    As you say, I would design the tracker drive motor electronics and that part of the program, test the system response with the tracker mass.
    A simple left/right , up/down keypad to slew the motor when testing.

    Including a design for a suitable PSU for the motors

    E

    EDIT:
    While testing it would be wise to add limit switches to the slew angle limits, else you will wind the cables around and around!!:woot:
     
  17. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    E,
    I've just been checking the number of pins needed, and if a 4x4 keyboard is used , it will add up to 25, that's how many the 18F2520 has, so no room to move. That's too tight for me, so I will go for the 40pin.

    Does PSU=Power supply unit? If so, I've designed a battery :)

    Camerart.


     
  18. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,174
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi C,
    PSU aka Power Supply Unit.

    You may need a couple of 22pF caps for your 20MHZ xtal.

    Do you have a tripod and leveling attachment for mounting the Yagi aerial motors and encoder discs.?

    E
     
  19. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    E,
    I've got the Caps, and Xtls.

    I've got a Manfrotto tripod, and I have the print outs for the disks, and the film to make them. Later. I will buy motors and gearboxes to sit also later, after tests.

    Cheers, Camerart
     
  20. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    I've just set-up the programmer for 18F4520 PICs, now I'm making a circuit board.

    Regarding the LCD module, when I set-up 16F886 with LCD, I used 4data bits. With the 18F4520, as there are lots of pins, would it be better to use 8 bit? If so, why?

    Camerart.
     
  21. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,304
    Likes:
    11
    Location:
    Dorset UK.
    Hi,

    I have been working on this project which includes a program on 18F2431 PICs, where data is input into an RX PIN then moves a motor to the required position. Data AxxxExxx is input into RX which is e,g, A123Exxx, being 123Degrees, and the motor turns to 123Degrees.

    The attached program works on my test rig, but does not move accurately. As the Oshonsoft simulator does not support the QUADRATURE an PWM internal modules on the 18F2431, this give a lot of 'trouble shooting' difficulty.

    I'm guessing that the QUADRATURE encoding section is most likely miscounting steps.

    If anyone knows how to tell what causes the errors please reply.

    Thanks, Camerart.
     

    Attached Files:

    Last edited: Dec 8, 2015

Share This Page