Just wondering if I can get some help here.

I have a simple scheme of MIDI controller based on ATmega32u4: ATmega32U4 with TXLED and RXLED as output pins and USB functionality

And my team wants me to make this device Android/iOS compatible (because our Arduino prototypes worked fine with iPads and even iPhones).

I am experiencing a high power consumption of ATmega32u4 when connected to iOS devices. When we connect our device to iOS we get the following message: The connected device requires too much power

Meanwhile, when I make almost the same scheme and run the identical sketch on ATmega328 chip it works just fine!

I tried running all the stuff on Arduino boards, and the result is stable:

  • works on Arduino Uno and Arduino Mega (based on ATmega328 chip);
  • doesn't work on Arduino Micro and some of its Chinese clones like Arduino Micro Pro (based on ATmega32u4).

We've found a small trick/workaround: connect even two our ATmega32u4 devices through an active USB hub with additional power supply to one iPad, and they both work perfectly, then we switch off the additional power on the hub, and devices continue to work fine using the power from this single iPad without any messages about high power consumption. This case leads me to the thought that high consumption of ATmega32u4 chip appears only on the device initialisation stage.

Is there a way to solve this?

Thanks in advance.

migrated from electronics.stackexchange.com Apr 20 '17 at 19:14

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • 2
    It would help if you provide a schematic or summary of the power supply/distribution on your device. What is connected and how much current does it use? How much capacitance is connected? Also, you could get a lot of useful information about power-on transients with an oscilloscope and a current probe. – Jack B Apr 18 '17 at 22:34
  • The schematic is available through the first link provided. Basically, I have no any power-eager devices, it is just digital inputs, even with no analog inputs available. When I leave only diode matrix, the problem stays the same. That is why I consider that the problem in ATmega32u4 chip rather than schematic (the same schematic with ATmega328 chip works fine). – Sasha MaximAL Apr 18 '17 at 22:51
  • Moreover. If I disconnect all of the input switches and potentiometers leaving just plain Arduino Micro clone with basic MIDI device sketch, connected iOS device complains about high power consumption. Arduino Uno (ATmega328 based) device is working fine here. – Sasha MaximAL Apr 18 '17 at 23:01
  • 4
    If it's too much trouble for you to add a schematic to your question, I'd guess it'll probably be too much trouble for some to bother trying to answer it. – brhans Apr 19 '17 at 2:27
  • 1
    The idea of questions on SE is that they are self-contained and meaningful without having to look at external links that may vanish later – PlasmaHH Apr 19 '17 at 8:07

The major difference between ATmega32u4 and ATmega328 is that the former has USB functionality built in, while the latter requires an external USB to UART chip. When such UART chips go through enumeration, they will tell the host that they only consume 100 mA or less, because they have no idea what else you have on the board. ATmega32u4 however can potentially consume up to 200 mA (sinking 100 mA through each of the IO banks). Maybe it's requesting that current from the host when you connect it, and your phone refuses to power up a device requesting more than 100 mA of current.

You can connect your controller to a computer and check USB properties to confirm this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy