Antenna Tracker
#1
Posted 09 January 2012 - 01:03 AM
What I would like to do is connect a GPS to CC and have CC send the GPS coordinates, altitiude and time via an Xbee to my Arduino Mega 2560. The Arduino pulls the GPS data from its Xbee and moves two stepper motors to point the antenna towards the plane.
I can work out the GPS and Mag code for the Arduino end but I am interested to know how easy it would be to get the CC board to send the GPS data down the Xbee so I can use it?
Is anyone able to help me out on this please?
#2
Posted 09 January 2012 - 04:47 AM
Edit: Err, you already are in that conversation to which I linked. Alright, sorry, should have read it more carefully before responding.
Edited by Kenn Sebesta, 09 January 2012 - 04:48 AM.
#3
Posted 09 January 2012 - 05:03 AM
Reddog, on 09 January 2012 - 01:03 AM, said:
OK, let me explain this with a picture:

Ardunio is a small step above lego mindstorms, I say that not to put it down but that is good description I have seen used elsewhere. It was designed for non-programmers that do not want to learn any serious programming, an example the arduino guys give is art students, there is useful but as you want to go further in to development and really learn things, it would be a detour that is pointless.
I quite like AVRs in their day they were good 8 bit MCUs and friendly to use, even if they are a bit ancient now, but Ardunio is really a very poor compromise and not a real world skill (Ardunio is limited to the hobby realm, it is simply not used professionally). You mentioned programming in C, then don't look at Ardunio, it uses C++ but with a bunch of libs to abstract the technical bits away (they call this concoction "processing"), the key problem is the abstraction libs hide all the details you really need to learn; the details that will make you a better programmer and give you an ability to learn new architectures quickly. Often people that start with Ardunio never make it past that ardunio stage and it becomes a crutch with them forever sticking with it. The libs that hide the complex details and the ability to copy and paste from around the net makes it much less technical but if you want to learn programming and be proficient at it, start with C from day one.
If you want to use an AVR, look at a toolchain like winavr and start off really programming in the the language you want to learn.
Another thing you might not know is that Sambas has already completed an antenna tracker that hooks in tot he GCS if I recall correctly.
#5
Posted 09 January 2012 - 09:03 AM
dankers, on 09 January 2012 - 05:03 AM, said:

Ardunio is a small step above lego mindstorms, I say that not to put it down but that is good description I have seen used elsewhere. It was designed for non-programmers that do not want to learn any serious programming, an example the arduino guys give is art students, there is useful but as you want to go further in to development and really learn things, it would be a detour that is pointless.
I quite like AVRs in their day they were good 8 bit MCUs and friendly to use, even if they are a bit ancient now, but Ardunio is really a very poor compromise and not a real world skill (Ardunio is limited to the hobby realm, it is simply not used professionally). You mentioned programming in C, then don't look at Ardunio, it uses C++ but with a bunch of libs to abstract the technical bits away (they call this concoction "processing"), the key problem is the abstraction libs hide all the details you really need to learn; the details that will make you a better programmer and give you an ability to learn new architectures quickly. Often people that start with Ardunio never make it past that ardunio stage and it becomes a crutch with them forever sticking with it. The libs that hide the complex details and the ability to copy and paste from around the net makes it much less technical but if you want to learn programming and be proficient at it, start with C from day one.
If you want to use an AVR, look at a toolchain like winavr and start off really programming in the the language you want to learn.
Another thing you might not know is that Sambas has already completed an antenna tracker that hooks in tot he GCS if I recall correctly.
Hahahaha, love the photo.
I think you are both thinking I have more skills than I do. I do not understand the GCS code or the OP Code, I don't even know how to use Git properly. I did not even understand you addressed each pin and then did your thing with it, I had pretty much no preconcieved ideas, I had no idea. I have already run into a problem with the Arduino stuff, it seems I am only able to run a single piece of code instead of writing different pieces of code and pulling them from my main() loop. I suppose thats the cost of using Arduino.
Thanks for the very good feedback. I have been told this in a less consise way a couple of times, so I purchased an STM32F4. I tried to setup a dev environment for this piece of hardware and it was so complex I gave up trying, I use Mac. I went off to buy a piece of development software and it was so costly and the libraries closed I gave up on that. I thought if I can at least understand the examples I should be able to get started doing basic crap but the ST examples are hugely complex and are not explained well at all, so this gave me the craps even more. I decided bugger it, I am going to get me an Arduino and at least get started understanding how coding for embedded works and then move on to the STM32F4.
I asked in the forums if someone could help out and fix up the dev environment information for Mac so I could use the OpenPilot dev environment without the OP specific stuff, but no one did, so I completely gave up on the STM32F4 for now. On this note, I think it would be helpful if the dev environment instructions were better done, we might not get more uber coders today but you will get lots of people who want to help and will do the simple stuff because thats all they can do.
#6
Posted 09 January 2012 - 02:55 PM
Think of it like this, you need a new car for the family but you are still learning to drive, you could buy one of those little smart cars as they are a bit less intimating to learn in or you could just buy a normal family car. The family car is bigger, a lot more powerful, more useful, much more versatile and will serve you and the family well for a long time, the smart is only useful to learn to drive in and then when you want to progress you would need to switch to the family car anyway. Worse, the smart does things in a very different way and means if you learn in a smart, you are stuck with that one brand.
Ardunio is like selecting the smart car but what is much worse is the people that use Ardunio, they learn in the smart car and then try to use it as a car for the whole family of 6! They do this by bolting on a makeshift trailer to be the back, bolting on luggage racks and other crap to a 2 seat run about to try to make it suitable for a family of 6, it's nutty and people openly point and laugh as they drive by.
Much better to buy the normal family car and have a very slightly harder time to learn things but them means you can easily pick up and use anyone elses car, this is just common sense.
The F4 is especially the wrong choice as it is so new and we have switched to SWD, this needs bleeding edge tools, I am not surprised you got little help as hardly anyone is doing this on a Mac.
Quote
You are right, it is on my todo list, they will all be redone for the revolution.
Forget STM32s and forget AVRS for now. Go to Youtube, find one of the many tutorials about learning C and learn it on your Mac. Get the basics nailed down on the desktop without dealing with embedded stuff at all, the tool chains and debugging of embedded devices is a much harder challenge to start with.
Start with learning the language and then build on the work we have already done, OpenPilot has very nice architecture in that it has a hardware abstraction layer called PiOS, this was done to allow us to port OpenPilot to new architectures quickly but it also handles a lot of the nitty gritty embedded details for the developer, it is what Ardunio should have been. As it's in pure C, extensible, has FreeRToS built in and the portability really shines, look at what Corvus did in a weekend: he ported all of OpenPilot's firmware to Linux by just porting PiOS.
This is not to knock Ardunio, although I think it is much more hype than genuine substance, it also was a good idea at the time and for who it was aimed at aka art students and none technical people. Listen to this interview with one of the founders behind it, he explains what it is about. However if you want to learn something new to do real complex things, Ardunio is certainly not the right tool, why artificially limit yourself from day one? Makes no sense.
#7
Posted 21 January 2012 - 11:27 AM
I have looked into this mechanicals further and I see a couple of options for moving the pan tilt head - servo's, steppers or DC motors. It would be simpler to use servos for each axis but I would rather unlimited Pan and not have to worry about hitting your limit.
The problem with steppers is their torque to weight ratio is approx 7 grams per gram for the standard hobby stuff. Servo's, for example the HS-785HB have a torque to weight ratio of 120 grams per gram.
The problem with servos and DC motors is there is no inbuilt way of working out where they are, you need to use a potentiometer to be sure. With steppers there is no guarantee of where they are, but you can be pretty sure of where they are as long as you not pushing the torque limit and they are loosing steps.
Still have not worked out where I am going to go on the design quite yet.
#8
Posted 21 January 2012 - 11:45 AM
#9
Posted 21 January 2012 - 01:35 PM
I do quite a lot of design and development with a wide range of microcontrollers but even so I often go for an Arduino for prototypes and one-offs because it is cheap and convenient. For a relatively simple task like antenna tracking it should be fine. I managed to squeeze pretty much the equivalent functionality of CC into an Arduino Mega. Admittedly I did away with the Arduino IDE and used a different one but I still used the same libraries.
#10
Posted 21 January 2012 - 01:55 PM
dankers, on 21 January 2012 - 11:45 AM, said:
I am pretty sure most basic servo's can be made into unlimited rotation onces ( tho i never seen a coreless one from inside yet )
Its only a matter of removing one notch from the gear part that leads to the servo horn ( careful not to harm the gears :S ! ),
and removing the potentiometer. I normaly solder servo cables with female connectors to the 3 wires of the potentiometer and have them leave the case at the same point the servo signal cable goes in.
That way i can either attach a fixed set of resistors instead of the poti ( no position feedback- basicly a back & forth geared motor with a mini esc ) or attach a poti outside somewhere in the structure to still get position feedback.
on a sidenote :
i just ordered some of the cheapo hobbyking analog 9kg / BB / metal gear onces that have to go thru this procedure,
the idea is that due to the brass metal servo horn thingy you can solder a brass metal tube on them in order to make it more easy to attach gears to drive your camera / antenna tracker / whatever
arg more and more edits ...
another thought... since the GCS is allready aware of the gps data, wouldnt it be more easy to just use a pc attached servo boardto drive the antenna ? This way all you would need is a slight modification to the GCS.
Edited by Fabian, 21 January 2012 - 02:03 PM.
#11
Posted 21 January 2012 - 03:04 PM
Fabian, on 21 January 2012 - 01:55 PM, said:
Sambas already did something like this and the code is already in the GCS source tree, but not enabled by default. It controls a stepper motor and a servo connected to a simple external board. But Reddog wants something that doesn't require much setup. This would need a magnetometer and an accelerometer mounted to the antenna plus a GPS. A CC board + magnetometer would be perfect for that job. It could read the GPS and sensors, drive the servos and maintain antenna attitude, similiar like the camera stabilization already does. 95% of the code is probably there already, it only has to be creatively re-used
dankers, on 21 January 2012 - 11:45 AM, said:
Something like the "SuperModified" servo would be very nice for this.
#12
Posted 21 January 2012 - 03:12 PM
Fabian, on 21 January 2012 - 01:55 PM, said:
That way i can either attach a fixed set of resistors instead of the poti ( no position feedback- basicly a back & forth geared motor with a mini esc ) or attach a poti outside somewhere in the structure to still get position feedback.
Yes, that works pretty well. Did it with several standard servos, using a "10-turn-poti" to control the position. Mechanically: modified servo could turn a noun, a nut sitting on that moves a lever, a box, whatever. This setup gives you a controlled movement over 10 x 360 degree turns. Just watch the slack which summs up from servo-gear, 10-turn-pot and noun/nut slackness. Using proper C code, slackness can be eliminated ..
#13
Posted 21 January 2012 - 11:55 PM
dankers, on 21 January 2012 - 11:45 AM, said:
Sure but I am trying to reduce the part count (if possible) and having a servo with unlimited rotation means I need to use a potentiometer for location feedback.
#14
Posted 21 January 2012 - 11:57 PM
D-Lite, on 21 January 2012 - 03:04 PM, said:
What I want is something which is idiot proof. Plug the tracker in and it starts working, no configuration necessary. Sort of like the difference between CC and some of the other stabilisation systems out there.
#15
Posted 22 January 2012 - 12:12 AM
Reddog, on 21 January 2012 - 11:55 PM, said:
I was looking at OpenServo and it seems it has location feedback, so maybe thats an option. Sadly they are out of stock at their only supplier. I have contacted the supplier to see when they are building their next batch. Sparkfun does sell the V2 but the v3 has a few extra features that I need.
#16
Posted 22 January 2012 - 12:18 AM
D-Lite, on 21 January 2012 - 03:04 PM, said:
What you talk about would be perfect. A CC with a Mag, Accel and GPS plugged into it with two outputs, one to a stepper (or unlimited rotation servo with location feddback) and one to a winch servo (geared down to 5.7:1).
What board can control a servo and a stepper at the same time and provide the power to the stepper and servo?
#17
Posted 22 January 2012 - 03:07 PM
Reddog, on 22 January 2012 - 12:18 AM, said:
I'll second Les Newell's suggestion for Arduino. Specifically, using the Arduino motor shield.
#18
Posted 22 January 2012 - 03:37 PM
If you want to use a servo you really need to add an incremental encoder for position feedback. Using a cut up r/c servo won't work because the built in pot won't sense over the full 360 degrees. A 10 turn pot is another alternative. You do have to allow for 'unwinding' the pot when you get near the ends of it's travel but you are going to have to allow for this anyway because you have a bunch of cables between the rotating part and the stationary part.
#19
Posted 22 January 2012 - 11:23 PM
Les Newell, on 22 January 2012 - 03:37 PM, said:
That's why I recommended SuperModified servos. They rotate freely and still give accurate position. They use a magnet + hall sensor for position sensing and seem to be perfect for that job. I never tried them myself but the concept seems to be great. It's open source - don't know if you can buy preassembled boards or complete servos somewhere.
#20
Posted 23 January 2012 - 12:47 AM
D-Lite, on 22 January 2012 - 11:23 PM, said:
I checked the 01mech guys out and it seems like their website is no longer working. Their nameservers are reporting they have no record of 01mech.com anymore. Maybe they went out of business?
An alternative is possibly the OpenServo group, which is open source. Has anyone played with them?



Australia
Luxembourg
Flemish Belgium
United Kingdom
Germany








