Issue with uploading a sketch using external computer.

Discussion in 'Troubleshooting' started by pavelexpertov, Dec 1, 2013.

  1. pavelexpertov

    pavelexpertov New Member

    Joined:
    Jun 14, 2013
    Messages:
    15
    Likes Received:
    0
    I have problems when I upload a sketch via external computer to SAM3X on UDOO board:
    On linux (Lubuntu 13.04), arduino ide, which is 1.5.5 with the patch, can not find my board when I upload a sketch to it. I tried every usb port on my pc, but no luck. The message above the console says 'Board at /dev/ttyUSB0 is not available'. I followed this post (viewtopic.php?f=15&t=392&p=3856#p3856) to fix an issue of not being able to choose a port. After it, I manage to switch ports but it can not find the board.

    On windows XP, Arduino IDE uploads the sketch forever. It seems the application found the board, but it takes a lot of time to upload a sketch and it seems it will never end. I used 1.5.5 arduino IDE with the patch. However, I have not installed drivers for the CP210x USB to UART Bridge when I have been figuring out the problem, but still no luck after installing the drivers.

    On windows 7, I face the same issue and have same software version and the patch. However, I installed the drivers for the CP210x to UART Bridge and I still face the same issue.

    From my own observations, it seems there is a bug, which could be within arduino IDE, when a sketch is being uploaded to the board and it's being uploaded VERY slow or the process of it is killed.
    However, I can upload the sketch fine when I use UDOO with its own OS and it works perfectly.
    PS. when I program UDOO's arduino due board using external computer, do I have to provide any extra power source to the board? I know that the usb to serial cable provides power to the board.
    PSS. Do I really have to use an option to solve the problem, where I have to turn on UDOO, stop it before it boots to bootloader and then do something so old sketch on SAM3X is erased and I will be able to use external computer to send sketches. Howeverm it's a very annoying process though. :x
     
  2. hl68fx

    hl68fx New Member

    Joined:
    Jun 11, 2013
    Messages:
    24
    Likes Received:
    0
    When I upload a sketch to my Udoo Quad from my computer, I allways have to plug in the power adapter. Otherwise I get a "No device found on COM13".
     
  3. EBrown

    EBrown New Member

    Joined:
    Dec 9, 2013
    Messages:
    48
    Likes Received:
    0
    I think it's safe to assume that the Udoo will not power itself over the USB connection, which would result in the requirement to plug the power adapter in. Without it, neither the i.MX6 or the SAM3X are powered, and while the i.MX6 is not used when you upload a sketch from another computer, the SAM3X is. When the power adapter is not plugged in, the computer can neither send data to, or receive data from the SAM3X, because it's not online to process the data. Serial communication requires each device to be able to read and write bits in sequential order, which requires a timer and live components. It's not like a flash drive or SD card where it get's the power through the USB port.

    The only way to work around this would be to have the developers add the ability for the USB connection to power the SAM3X and the SAM3X alone. (Not the MicroSD card, not the i.MX6, not the ethernet, USB, or WiFi controllers, just the SAM3X.) Why only the SAM3X? Well because of the way that USB works.

    The datasheet in this post shows you that even at idle with no HDMI, WiFi or USB devices, it still requires 2.472 Watts of power. Now, the formula for power usage (Watts) is voltage times amperage. (W=VI) We can use this to derive I=W/V. Given this information, and the fact that the USB is only capable of supplying 5V of power at a typical maximum amperage of 0.5 amperes in USB 2.0, and 0.9 amperes in USB 3.0, we can calculate how many amperes would be required in the environment when attempting to use USB to power the devices:

    2.472 watts / 5 volts = 0.4944 amperes

    This means that the device, when at a typical load of < 5%, WiFi off, no USB devices, and no HDMI, would require 0.4944 amperes of power. This means that we have already hit the maximum power output of USB 2.0.

    So the only real way to make this possible would be to allow the power output from the USB port to be transferred to the SAM3X chip alone. Nothing else on the device would be allowed to be activated.

    Thanks,
    EBrown
     
  4. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    The onboard voltage regulator needs 6-15v, so it isn't possible to power over USB.
     
  5. EBrown

    EBrown New Member

    Joined:
    Dec 9, 2013
    Messages:
    48
    Likes Received:
    0
    You could get a voltage booster but you would lose amperage. (Though by Ohms law you wouldn't lose any power, due to the formula in my post above.)

    It really wouldn't be to hard to boost 5V to 12V, but not feasible due to the amperage restriction on USB circuitry. We would still have the same problem presented above. The device still requires an external source of power.

    Thanks,
    EBrown
     
  6. pavelexpertov

    pavelexpertov New Member

    Joined:
    Jun 14, 2013
    Messages:
    15
    Likes Received:
    0
    EBrown, thanks for spending time writing your explanation about the power usage (plus thanks to others who participated) and now I understand little bit more about electronics basics. However, I have got few questions though:
    1. Is it really safe to plug external powersource? This is because I read some information about arduino due and it can only work at 3.3v, otherwise its board gets damaged. Plus, I can't remember where I read the same thing on UDOO website, so I am not sure if it applies to the udoo board. I have a power adaptor of 12v and 700mA and I assume it's safe to use it.
    2. What about other external power sources? For example, I may use a battery to power the arduino due board so it can not depend on power lead. Will the battery be enough to power the whole arduino board as well as not damaging it?
     
  7. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Yep.

    3.3V *logic* (IE what the IO pins are exposed to). This is different to the power supply for the board as a whole.

    Yes, perfectly safe. The issue is if it's enough ampage. If you don't have USB stick, mice, keyboards etc then yes. Start putting 'optional' drain source in and you'll run out. So 12v 1A is a safer bet. The shipped power supply is 12v 2A.

    Help yourself. Just remember it has to be at least 6V (so really use at least 7.2v LiPo or 9V or 12V etc). Depending on the capacity of the batteries depends how long your battery lasts of course.
     
  8. EBrown

    EBrown New Member

    Joined:
    Dec 9, 2013
    Messages:
    48
    Likes Received:
    0
    12V at 700mA should be enough to power it. That's about 8.4 Watts so it should be quite sufficient, provided the power measurements DracoLlasa took are accurate. (I presume they are.)

    Thanks,
    EBrown
     
  9. pavelexpertov

    pavelexpertov New Member

    Joined:
    Jun 14, 2013
    Messages:
    15
    Likes Received:
    0
    Cheers guys!!!
     

Share This Page