External VI and USB-Power

Hi

I have a question about the voltages when I use an external power supply. I want to connect an external 8.4V power supply on pins VI and ground while reading Serial data over USB. Is the 5V USB voltage automatically disconnected on the board when an external power supply is connected so that whether the arduino nor my USB controller get damaged?

nurbs999

You can safely connect and disconnect them during runtime. It is designed for it.
When you use the Vin, the power from the usb is no longer used.

Which Arduino board are you using, a normal board like the Arduino Uno, or Leonardo, or Mega 2560 ?

Thanks for the info.
I'm using a Adruino micro which is a leonard copy, I think

This is the page for the Micro : http://arduino.cc/en/Main/arduinoBoardMicro
The schematic is in the pdf file.
There is some magic with mosfets to switch between VUSB (The 5V of the USB) and VIN and 5V.

I've seen the schematic pdf but my knowledge in electronics is not good enough to understand it completly. I'm more a programmer than an electronics engineer :grin:

How does it work with the mass potentials if I connect two power supplys? Every power supply (LiPo battery and USB in my case) has it's own mass potential. Is this a problem? Because by default the analog inputs measure from ground to 5 volts.

Maybe I should tell a little bit about what I want to achieve. I have a speed controller for a brushless motor. This controller has the capability for telemetry-data. With the arduino I'd like to read that data via digital or analog input pins and (while developing) write them to the USB-Serial interface.

The auto source select circuit works with a comparator opamp which basically looks at Vin and 3v3. When Vin goes a set amount higher than 3v3, the opamp' s output switches off the p channel FET; effectively disconnecting vusb and the unit is powered off Vin through voltage regulator. At least, I think that's how it works...

All ground (GND) are connected.
So the computer GND (via the usb cable) is connected to the Arduino GND, and that is connected to the battery.

Can you give a link to the motor driver ?
The GND of the motor driver will also be connected to the Arduino and to the computer.
In most cases it won't be a problem. Is the motor itself also powered by the Lipo battery ? So the motor is not connected to anything else ?

To avoid that GNDs are connected, optocouplers can be used. Optocouplers are also used to protect the Arduino when large currents or large voltages are involved.

Here is a link to the controller. It has a BEC which connects to the arduino, but no optocoupler. So every mass should be connected.

I can't find any specificaton for the telemetry signal :~

When you connect something to an Arduino digital or analog pin, you could use a 10k protection series resistor (signal to 10k and other side of 10k to Arduino input). That will protect the Arduino for signals of -10 to +15V.

I couldn't find the specs either. I'm afraid I will have to reverse-engineer the signal and the coding. But there are some projects that build HoTT-Telemetry pakets but none that read them.

I know that this is off-topic but how does a 10k resistor connected in series in the telemetry wire protect the arduino? As far as I know a risistor connected in series only drops the voltage. Therefor it will be more difficult for the arduino to differ between low and high pontential.
Am I right?

Anyway, I think I need a oscilloscope to check the telemetry signal in the first place. Or is there another way to check that?

You need an oscilloscope, there is no other way.

The input impedance of the Arduino is very high, so the 10k resistor will not lower the signal. But 10k is about the maximum that is possible for accurate reading. For example 100k or 1M will introduce inaccuracy.

My best man has an oscilloscope in his cellar :smiley:
We start experimenting this weekend.

Thanks a lot for your help so far!

nurbs999:
I know that this is off-topic but how does a 10k resistor connected in series in the telemetry wire protect the arduino? As far as I know a risistor connected in series only drops the voltage.

The Arduino has internal protection diodes between the input an VCC and between the input and ground. If the voltage exceeds Vcc or goes negative, one of the diodes begins to conduct and this "clamps" or "clips" the voltage.

That only works if the current is limited, and that's why you need the 10K resistor. For example, if you connect a 12V power supply directly to one of the inputs, the protection diode will get fried, and other stuff inside the chip might be fried too. It also only works if the Arduino is connected to power & ground.

The 2nd schematic on [u]this page[/u] is the same concept.

The Arduino's inputs are very high impedance (megohms) so the "voltage divider effect" is limited and you don't get much voltage drop across the 10K resistor. However, at high speeds/frequencies the input capacitance could affect the signal (the resistor & capacitance form a low-pass filter) and with the 10K "source" impedance the input is more prone to noise pickup.

The 10K value seems perfectly reasonable to me, but I haven't checked the specs or done the calculations on the current capability of the protection diodes.

Ahh, now I get it :slight_smile:
Thanks DVDdoug.

Protection diodes are 1mA.
It is not in the datasheet, but somewhere in an application note.

That is how I calculated the -10 to +15V with 10k resistor.