Hello and welcome to our community! Is this your first visit?
Register
Results 1 to 5 of 5
  1. #1
    New Recruit
    Join Date
    Feb 2012
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Problem connecting to ATMEGA 1280 board, but only when ESCs are connected

    Hi AeroQuad forum.
    Today I decided to give the AeroQuad software a try and therefor connected the Sparkfun 9DOF IMU board I've got to my Arduino MEGA 1280 board (with the logic level converter board of course).
    I then uploaded the firmware to the board and were able to calibrate the board and see the 3D representation fine :-)

    All good so far. So I decided to connect only two of the 4 ESC's to test the board and then I wasn't able to connect to it, not in the configurator nor using a simple terminal writing "#".
    If I disconnected the ESCs it worked again - wtf.?

    I only connected Ground and PWM signal to the ESCs, though I've also tried with all of them including 5V. I also tried powering the Arduino thru Vin from the LiPo battery - nor did that work.

    Then I thought I would try to use a Bluetooth serial module so the USB Cable wasn't connected and could interfear on the power supply in any way.
    At first it did work in the serial terminal. Now I was able to get a reply when writing "#". But unfortunately it didn't work in the configurator - WHY? :O

    Then I thought of other opportunities and remembered a serial bridging application, creating a virtual serial port bridging it to a physical one.
    And that worked! I was finally able to control the board with the ESCs connected.


    But now to the fun and wierd part
    I have changed the PWM frequency to 50Hz because I don't think the Turnigy Plush 30A can accept the high 300Hz signal - it didn't work with that.
    But even with the 50Hz signal I can't calibrate them using the ESC calibration method. But if I go into the Motor control panel, set the throttle to max, connect power, and set throttle to minimum, it somewhat works -> but no high speeds at all!?

    By measuring the signal with a scope I can see that the width goes from 1ms (low) to 1.2ms (high) - not 2ms as it was supposed to be. Even if I set the value in between it is still only 1.2ms.
    Do you have any idea of this?


    Thank you very much in regards.

    Thomas Jespersen

  2. #2
    New Recruit
    Join Date
    Feb 2012
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    No one have a clue on this one?
    You haven't experienced the same? Maybe not with the real AeroQuad shield, but what about when doing some 'Quad-prototyping' yourself?

  3. #3
    AeroQuad Core Software Developer ala42's Avatar
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    1,692
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    12
    There is a softcoded constrain in FlightControlProcessor.h to limit the pulse length to 1200µs:
    Code:
    void processCalibrateESC()
    {
      switch (calibrateESC) { // used for calibrating ESC's
      case 1:
        for (byte motor = 0; motor < LASTMOTOR; motor++)
          motorCommand[motor] = MAXCOMMAND;
        break;
      case 3:
        for (byte motor = 0; motor < LASTMOTOR; motor++)
          motorCommand[motor] = constrain(testCommand, 1000, 1200);
        break;
      case 5:
        for (byte motor = 0; motor < LASTMOTOR; motor++)
          motorCommand[motor] = constrain(motorConfiguratorCommand[motor], 1000, 1200);
        safetyCheck = ON;
        break;
      default:
        for (byte motor = 0; motor < LASTMOTOR; motor++)
          motorCommand[motor] = MINCOMMAND;
      }
      // Send calibration commands to motors
      writeMotors(); // Defined in Motors.h
    }

  4. #4
    New Recruit
    Join Date
    Feb 2012
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    But this is in the calibration routine? And when the 1200µs is sent to the motors, they aren't spinning at full speed, so calibration must have been done up to 2000µs.
    Why doesn't it then support sending more than 1200
    µs when manually controlling it thru the Configuration interface?

  5. #5
    AeroQuad Core Software Developer ala42's Avatar
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    1,692
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    12
    The restrictions is probably added for safety reasons. When the props are mounted, the quad would lift of uncontrolled and could cause severe injuries. When they are not mounted, the motors would spin too fast without load, which is very bad for the bearings.


 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •