Developer

ArduPilot Config Tool Fixed!

After reading several posts from our community describing the issues involved with the ArduPilot confiq. Tool, I guess I’ve spotted (with your help) all the possible problems. Is not just one issue, is a combination between hardware, drivers, settings and software problems. You may experience more than one issue, but only one is enough to make the “Confiq. Tool” not usable.The mistake number one is not enabling the “Set RTS On Close” option located on device manager. One way to know if this option is disabled is when you are able to upload something the first time but the second time will not work!! There’s an explanation for that. This situation may confuse a lot of people, just keep it in mind because happens all the time. Detailed instructions to find this option can be located here.The second mistake is not using the correct drivers. I always install the drivers located inside the Arduino IDE folder (\\arduino-0016\drivers\FTDI USB Drivers), works great and never gave me problems.The third and fourth problem, one of them is Sparkfun mistake(I guess), I do believe this because the first company that used a separated FTDI device to program an Arduino compatible system was Adafruit Industries (Even before DIYdrones was created and Arduino PRO/mini and FTDI Breakout basic exist). They do this because is a lot cheaper to use only one FTDI system to program several Arduino compatible boards, is better than using one +-$15 chips in every board that you may burn!! (I have burned like 10 ardupilots so I have saved more than $100 bucks!).Well this is the big deal; is obvious that SparkFun tried to imitate the FTDI cable because is using exactly the same pin order and labels like “BLK” and “GRN” to indicate the polarity, but wait! There are no black and green lines in their FTDI board, only the original FTDI has the Black and Green cables! If you check the original FTDI cable schematic you will see that they are using the pin “RTS#” to reset Arduino, they have no choice; FTDI will not change this just to satisfy a small group of microcontroller amateurs.

Now Sparkfun (that came’s later) uses the pin “DTR#” instead the “RTS#”, but why? So maybe I’m wrong and they don’t tried to copy the FTDI cable (but I still not understand the wrong labels (BLK and GRN) in their arduino boards).

Anyway I did 30 seconds of research and look for the mother of all the little ducks, the original Arduino board! And I’ve discovered this:

Italians are smart! They use both pins!!! If you see the schematic they are using “DTR#” and “RTS#” connected to reset! Now, I already mention it, FTDI corp. will not change the FTDI cable but… would be nice if SparkFun adds a jumper or something to make it more “universal”. But they don’t have too and is not really necessary, because this issue can be solved by software which means a fixed version of the Confiq. Tool.Now we are imitating 100% by software what Arduino IDE does, and I’m talking about pulling down both signals: “DTR#” and “RTS#”. Thanks to Damon Pipenberg, he was able to change the code and test it in his hardware (Claps Please!). The new fixed utility can be downloaded from here and your problem should be gone. Or you can buy the heavy duty, official and original FTDI cable.Thanks for reading![UPDATE from Chris: 7/11/2009]:Nathan from Sparkfun wrote in with some more explanation, which I'll copy here:"The pro was designed very closely with the Arduino Team. From the beginning, the team wanted to support the DTR reset trick of the Arduino USB boards.Background: Two lines on the Arduino USB board are wired from FTDI to Atmega Reset: DTR and RTS. However, only one of the capacitors is populated - the DTR line. So all the Arudino software (IDE) has been written to wiggle the DTR line to get the ATmega to reset.http://arduino.cc/blog/?p=13To retroactively support this feature, and to attempt to support the (then) growing use of the FTDI cable, team Arduino decided to abandon flow control on the FTDI pinout (CTS/RTS) for the backwards compatible support of the DTR reset trick.Does all that make sense? All of this is noted in the product descriptions of the Pros:http://www.sparkfun.com/commerce/product_info.php?products_id=9220Point: We specifically designed the FTDI Basic to work with Arduino IDE out of the box. You do not have to meddle with windows to use the Arduino USB, Arduino MEGA, or Arduino Pro series. The FTDI cable is a hack. You have to change windows settings to get the FTDI cable to work with Arduino.Jordi - I am not entirely sure what problems you are still running up against. The FTDI Basic works fabulously with all the Pro hardware, and a lot of my own side projects. Do you just need to build in a DTR toggle when your config tool? This would coincide with the way the Arduino IDE resets the ATmega.One solution from the SparkFun side, may be to attach both DTR and RTS to the same pin on the connector through 100ohm resistors. That way if either line goes low, it will pull the 'reset' line low."
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Moderator
    I got mine to work only after commenting out the 'Thread.Sleep(1000);' in the source code, weird...

    serialPort1.Open();
    serialPort1.DtrEnable = true; //Restarts ardupilot
    serialPort1.RtsEnable = true;
    //Thread.Sleep(1000);
    serialPort1.DtrEnable = false;
    serialPort1.RtsEnable = false;
    serialPort1.Close();

    here's the .exe

    ArduPilotConfigTool.exe
  • Moderator
    Anyone else experiencing the same problem?
  • Moderator
    The board has worked for a few months now uploading versions 1.0 through 2.0.1 using the Arduino IDE, this is the first time however that I've tried v2.1+. I read up extensively in as many blog posts that I could find and experimented with many variations before posting this. "Set RTS On Close" is checked for the right com port too.

    The read/write functions definitely only work if the reset button is pressed as the progress meter reaches full (or 100% but there's no numeric indication)
  • Developer
    Seems that you have the correct stuff. Did you think the possibility of a defective or damaged board?
  • Moderator
    The the only way I can get the Config Tool to work is by pressing the reset button when the progress meter gets to 100% otherwise it will not work!

    Isn't the fixed Config Tool supposed to sort this out?

    I'm using AP 2.1.2., the Sparkfun 3.3v FTDI board, driver version 2.04.16, no shield, no z-sensor (can't buy it alone anywhere!!!) and the latest Config tool (ArduPilotConfigTool_Fix1.zip dated 7 July).
  • Developer
    Bryan,

    Let me check that, maybe i named two variables with the same name. One range suppose to be in milli seconds and the second range suppose to be in percent. And no i don't have safety feature, personally i will not added. Something may occur when flying that may kill the motor. But you can do it. Many people is personalizing the code for their needs (i love that). Until know the Spanish's has been doing great things, like automatically turning on landing lights when approaching and auto-landing.
  • Developer
    Fred,
    The throttle control is in percent of the range (1000 to 2000, or depending the min and max you set). There's no wrong values, only double variables (sometimes). So 85% means the throttle will reach only 85 of its total power, very very theoretically, but you can tune it and even eliminate the dead zones.
  • Thanks for the feedback Fred. I had brought this issue up on another post I made and here is Jordi's response:
    "About the double throttle i think you have the no fixed version of the 2.2. Just delete any of both. The compiler will ignore the first one. Sorry about that."
    It seems you would need to enter the PWM range for the Tx input (I checked mine today on a scope and it's 1100ms to 1900ms) just like the min and max range for the servos should be entered. I'm still not sure how to fix this either.
  • Bryan
    I raised the dual throttle_max (it's a constant by the way) definition issue in the ardupilot forum and have not got an answer there either. I had the V2 program print throttle_max while running and it is 85. I believe this constant sets the maximum milliseconds for the RC throttle channel (ch3). If this is the case a value of 85 makes no sense because the pulse width range for any RC channel is about 1000 to 2000 milliseconds.

    I have removed the second definition from the code (hope I'm right!)
  • Jordi,
    I'm able to upload the code and read/write to the config utility now that I have the new FTDI cable. So now I'm ready to fly but have a question about the throttle control. The .h file has:
    #define throttle_max 1800 //Servo range in microseconds.
    and
    #define throttle_max 85 //Limits
    Is the "throttle_max" variable supposed to have two declarations?
    Also, is there a safety built into the program where throttle won't engage when switching out of manual mode? For example, throttle won't activate untill plane is at a minimum altitude or a minimum speed?
    I'm a lousy programmer so thanks for your input.
This reply was deleted.