I´m Andreas from Bochum Germany and new to this community. If I see that right, I´m more or less an underdog when I would like to use APM2 in a ship model :-)
Before ordering I have some questions. As you can see in my profile, I would like to realize a dynamic positioning system in my model of multi purpose vessel Neuwerk.
It has two rudder propellers at the stern and a pump jet at the bow.
All three drives are controlled by a special unit for speed and rotation. This control units get their signals from R/C receiver, two chanels each. One for speed control and one for positioning the drive.
I guess it will be no issue, if APM gives signals to rudders, flaps or to this control units.
My question is now, how can I setup the code for this?
The Mission Planner I cannot use in this case, am I right?
So I need to setup the code manual. Therefore Linux is required?
Is some bacic code stored when APM is new?
Is it possible with only marginal php knowledge to understand the code, that I can modify it for my usecase?
Wich code language it is, that I can learn some more about?
Thanks in advance for your support
You can use Mission Planner. Depending on what code (ArduPlane, ArduCopter, ArduBoat, ArduRover, some new version) that you use, you can also configure in the code at compile time, or via a CLI menu, if you have one.
Arduino is the main tool used for editing and compiling the code, and since you are working on a boat rather than a plane or copter, you might end up using that a lot. You can try setting up as if you were a plane, use ArduPlane (probably the closest to your purposes) as-is, and that might even work out for some initial testing, but before long you will end up modifying the code, or working with the ArduBoat teams to adopt a different code base.
Having two throttles is a bit of a challenge, I think, but for initial tests, I'd try connecting both speed controllers to a Y cable and patch into channel #3 (removing the +5vcc BEC pin from one of them, if they have internal BECs) and just accept, to start with, that they will both push equally. Then, connect the directional controls both to a single Y cable, and patch into ch#1. You can play with differential ailerons (rudders) after this first experiment, but I don't want to suggest complicating it with that yet. You'll want to make sure the servos are connected so they both turn the same way.
When you do start to modify the code, you will want to use the Arduino IDE. See www.arduino.cc for details, but also look in the Appendix of the ArduPlane manual and read about how to set up your .... The ArduPlane/ArduCopter codebase is one of the largest (I believe it is the largest) Arduino codebases in the world, and you need to lay out the directories exactly how it says in the manual (it's easy, basically, you need two folders, the ArduPlane and the associated "libraries" directory in your Arduino directory) and you need to restart the Arduino IDE so it re-reads the "library" directory, or you will have errors.
Definitely talk to the ArduBoat members (see "Other Projects" up top, follow the links, find the people involved here and at their wiki) but I'd try out ArduPlane first to see how far you get with that code as-is.
And welcome. There are many people here would would love to hear more about your experiments and see videos of tests you do, the good and the puzzles.
There is no code in the APM2 (in the way you mean) so you will need to select and upload some "firmware". As I said, I'd start with ArduPlane. This is best performed from APM Mission Planner. If you don't have Windows, then get VMWare or Parallels or some other VM environment, use that, or follow the instructions in the manual for loading firmware from Arduino. You can use the Arduino IDE natively on Windows, Mac, and Linux. It is possible to get Mission Planner running under Linux also, but you have a lot of fun stuff to explore, and it helps if you know what to expect, so if you have the choice, do as few new things as possible until you have a handle on how it is supposed to work.
Oh, by the way, I was looking at something else you put in your profile.
The APM2 hardware is designed to control servos and ESCs. If you are using stepper motors and not pwm servos, then you will need to have a stepper motor controller to convert. I assume you are already doing this, because the APM2 will plug into your RC RX. Whatever you have plugged into your RC RX now gets moved to the APM.
So it looks like this:
RC TX ---> radio link ----> RC RX ---> APM2 ----> (servos, stepper motor controller, and speed controllers)
Thanks for your fast and helpful response.
It seems, that I have to learn a little bit. But ... the human being is growing up with his challanges, says a german adage ;-)
Some words about the control units for avoiding misunderstandings; The control unit needs to be connected to the receiver, it has two input ports. The first guides to a 10 amp speed controller on board, but it has also an output for external speed controllers, in my special case it will be a brushless controller.
The second lead is the input for the stepper. it is controlled by the board and turns the drive like a rudder, but 360° are possible, there are no end stops.
So, for one drive I need two RC channels.
Link to this control unit (unfortunally in german) including some videos regarding functionality
Combining the both stern drives is possible by Y-cable as well as connecting the both controllers in a master / slave configuration. But there is a third drive with one of this controll units in the bow, I´d like to control with APM
We will see, ...
I´m loocking forward to share success and disappointment with you
One additional question.
The superstructure of my model is made of double side copper coated PCB.
Does the onboard GPS module works in this case or do I need to have a separate GPS receiver in an area wich is not shielded?
If yes, what is the maximum cable length? More than 50 centimeters?
No experiances with this?
I guess it is similar to a carbon structure, do I need therefore a separate GPS module wich is not covered?
The GPS needs a clear view of the sky for best performance.
You can cover it with fiberglass, plastic, styrofoam, or other radiolucent materials.
You cannot cover it with metal or carbon fiber.
The cable is 5v TTL, it can be as long as you want.