2
\$\begingroup\$

I have a battery powered board with an ATMega328P and some other peripherals such as SD card, RTC, sensors, etc. The design of the board is to be as low power as possible, whilst keeping with the ATMega328P as an MCU. The board uses the Arduino boot loader etc.

I added a FT232RL USB to UART chip to the design, to give better serial comms than having to have an external serial converter. The FT232RL has a 5V input from the USB with a 3.3V generator on board which I connected to the 3.3VIO supply it needs. So the FT232RL is powered from the USB when connected. The battery power circuit is separate. TX and RX are connected to the ATmega328P RX and TX.

enter image description here

The problem is that when the power to the FT232RL is disconnected, the chip is still drawing some parasitic power through the ATmega328P RX and TX lines. Another ATmega328P pin is used to detect TX from the chip, so the ATmega328P can turn off the serial whenever. Even with the serial turned off and TX set to 0V, and RX to input, the FT232RL still draws some power from RX, more so if pull-ups are enabled. This increases the power consumption.

My solution is (when no serial activity detected)

  • Disable serial port
  • Set TX to 0V
  • Set RX to input and add external pull-down resistor.

However this seems a bit inelegant. Is there a hardware solution that would work? Any other suggestions?

\$\endgroup\$
  • 1
    \$\begingroup\$ I think the most 'elegant' solution is not to have the FTDI ship on-board, but to use a FTDI breakout board for the usb connection. If you want to achieve really low power, generally the less components the better. \$\endgroup\$ – RJR May 3 '14 at 23:22
  • 1
    \$\begingroup\$ Pull Sleep and PWREN low to meet 70µA usb suspend mode current draw? Seems like the best option, short of jumpers/dip switch on RX and optionally TX. \$\endgroup\$ – Passerby May 4 '14 at 2:19
  • \$\begingroup\$ @RJR from a user perspective it is easier to have a generic USB cable than a breakout board IMO. Plus the FTDI is not powered for most of the time (except when connected to USB or by the parasitic power) so it won't make any difference to current consumption. \$\endgroup\$ – geometrikal May 4 '14 at 7:31
  • 1
    \$\begingroup\$ Can you use a switch to disconnect the lines? Even an electrical switch that is switched by the USB +5 would work. Or use one of the more modern ATMega's with USB built in - the ATmega32u4 used in the Arduino Leonardo would be the most obvious choice. \$\endgroup\$ – RJR May 4 '14 at 9:33
  • 1
    \$\begingroup\$ @RJR I could use a switch but would worry the user would forget to switch it back. I looked into the ATmega32uX but larger quantities one must buy a block of vendor / device ids of the USB group, unless I'm mistaken? \$\endgroup\$ – geometrikal May 4 '14 at 12:18
3
\$\begingroup\$

You can put a pair of optocouplers between the FTDI chip and the Atmel MCU. That way you would not only get rid of the parasitic powering path but the Atmel part of your circuit (and everything connected to it) would also be galvanically separated from the USB host as a bonus.

\$\endgroup\$
  • \$\begingroup\$ Even serial resistors at RX,TX (e.g.1k) should reduce consumption significantly. \$\endgroup\$ – TMa May 4 '14 at 7:02
  • \$\begingroup\$ Optos sound good but add a bit of cost to an otherwise cheap board (unless you can suggest some?). \$\endgroup\$ – geometrikal May 4 '14 at 7:39
  • 1
    \$\begingroup\$ @geometrikal: if you're price-concerned, you may replace you pricey FT232 with some cheaper variant (CH341, for example), and from the price difference, you could easily put any circuit in between... \$\endgroup\$ – Laszlo Valko May 4 '14 at 8:42
  • 1
    \$\begingroup\$ Other than that, there's no simple and "elegant" solution with ~0 price tag. The ~0 price tag solution is the "inelegant" one you've already found: detecting the USB power and switching the serial I/O lines off completely. \$\endgroup\$ – Laszlo Valko May 4 '14 at 8:43
  • \$\begingroup\$ @LaszloValko Hey thanks for the tip on a cheaper alternative. \$\endgroup\$ – geometrikal May 4 '14 at 12:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.