Author Topic: Arduino + USB Power + Oscilloscope question  (Read 8560 times)

0 Members and 1 Guest are viewing this topic.

Offline jhumkeyTopic starter

  • Newbie
  • Posts: 2
Arduino + USB Power + Oscilloscope question
« on: March 11, 2013, 08:35:01 pm »
I haven't blown up anything yet . . . (but I'm trying . . .)

My background (if it helps):
General class HAM (36years) and worked with EE's for 14 years (but I was Software Programmer, not "electrical" oriented).  So, I'm not a complete electrical/eletronic idiot.   I AM, without question . . . a complete Oscilloscope Newbie/Idiot.

I wanted to do some things with Arduino's and would be using Sound (and/or Piezo's) and thought I'd need something more than just a DVM to see the waveforms and levels involved.  So purchased an OWON SDS7102.

I understand "floating/different" grounds.  (I've seen them in those 14 years of R&D work, and have seen the famous touching the guitar/microphone knocked on your butt examples.)

And I watched on Youtube:      EEVblog #279 - How NOT To Blow Up Your Oscilloscope!
(Excellent video.)

Understood everything in the video.  And yet, a problem/question still remains.

The question (finally):

When I hookup the Arduino to the 9v wallwart, I can use the oscilloscope to measure voltages.

When I hookup the Arduino to my PC (powered by an APC UPS if that matters) through the USB cable . . . and hookup the Oscilloscope Ground lead to the GND pin on the Arduino . . . the Arduino loses power and resets.

Didn't hurt the scope (Owon SDS7102), didn't hurt (or reboot) the PC.  (Though the PC does "beep" the loss/regain of the Arduino visibility via USB as the Arduino resets.)

I understand from the EEVBlog youtube video . . . this would happen if I connected the scope ground lead to say . . . 5+ on the Arduino.  (It has a path to loop back through the PC to the scope plugged to Earth Ground, and I'm shorting out 5+ to Ground.)

But . . . I'm 1000% certain, I was hooking the scope ground lead to GND (black side header) on the Arduino.

What's going on?

Is the GND (on the black Arduino side headers) somehow "not" the same as the Ground . . . coming in through the USB port?
Or . . . is the APC UPS isolation getting me?

I understand from the video, if I had hooked scope ground to "the wrong point" on the Arduino . . . bad things would happen.  But, it sure seems, that the Arduino GND was "the right point".

Again. . . when I plug in the 9V wallwart . . . everything works.  (Still clipping the scope on the same side black GND header.)

Were I at home . . . I could try it again, and put a DVM between scope ground lead and Arduino GND to see what the difference is, but that will have to wait.

What am I missing?

Thanks,

jkh
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Arduino + USB Power + Oscilloscope question
« Reply #1 on: March 11, 2013, 10:10:42 pm »
You didn't mention which Arduino board you're using but my board (Arduino UNO Rev 3) keeps USB ground separate from circuit ground.  You'll have to find a schematic for your board to see if that's also the case for your Arduino. 

According to the schematic my board has a jumper to connect the two.  From the sounds of it this is what you would want to do since your wallwart is (I assume) floating.  Don't quote me on that, however.
 

Offline Frollard

  • Newbie
  • Posts: 7
Re: Arduino + USB Power + Oscilloscope question
« Reply #2 on: March 11, 2013, 11:01:02 pm »
On every arduino board I can think of usb ground is connected directly with arduino ground which should be the same as computer chassis ground and earth ground afaik.

Double check with multimeter - is your ground pin hooked to usb shield?
 

Offline Maister

  • Contributor
  • Posts: 45
  • Country: de
  • Electronics design engineer
Re: Arduino + USB Power + Oscilloscope question
« Reply #3 on: March 12, 2013, 02:29:04 pm »
Not in every PSU the GND is connected to earth from your wall outlet. Sometimes it is connected through a capacitor for some kind of noise reduction.. So if that is the case, there is maybe a discharge from this cap happening, that causes the arduino to reboot. (?)  :o
Electronics design engineer, living in Germany.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Arduino + USB Power + Oscilloscope question
« Reply #4 on: March 12, 2013, 02:44:22 pm »
On every arduino board I can think of usb ground is connected directly with arduino ground which should be the same as computer chassis ground and earth ground afaik.

Double check with multimeter - is your ground pin hooked to usb shield?

Yep, that's the case with mine.  I made the mistake of trusting the schematic.  I'm pretty sure that's an open jumper shown in the (junky) schematic.
 

Offline jhumkeyTopic starter

  • Newbie
  • Posts: 2
Re: Arduino + USB Power + Oscilloscope question
« Reply #5 on: March 12, 2013, 02:46:06 pm »
In answer to responses above:
Yes, Arduino Uno R3 in use here.  (Regardless of what the schematic says . . . ) DVM continuity tests, seem to indicate: USB Case = USB pin 4 = Ground on PowerSupply Pin = GND on black side Header.  They all seem tied together to me.

And again to be clear . . . the wallwart must be floating and WORKS FINE.

Its when I hook the Oscilloscope ground up to GND on the black side Header, while the Arduino is powered ONLY off Computer USB cable . . . that's when the Arduino resets.

Its got to be something about the computer/USB that's allowing a loop of power through to earth ground via the scope.

Using DVM to test between USB Cable and Scope ground for voltage . . . gave "wildly varying" results.  (Like . . . 20v to 220v, heck, they're all plugged into 120v max, and I don't know any places in a standard "PC" that transforms up to 220v.)  All it told me was . . . I have wildly different grounds, and the DVM can't stabilize to get a "good reading".

Its not so much a problem (I can just program the Arduino via USB, then switch to wallwart for scope testing) . . .

(As a new scope owner/user) its the "horrifying uncertainty" of "never quite knowing" . . . when its safe to connect ground to ground.  (Because, despite all the schematic analysis and best efforts . . . ground may not be . . . Ground.)

I suppose I can always buy an Active Differential Probe.  (Though at $369 . . . even the cheaper ones seem to be near the $460 cost of the scope itself.)

Thanks for the responses . . . I will continue to experiment . . . (and try not to blow the scope up.)

jkh
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 500
  • Country: no
  • tinker - tinker, little noob.....
Re: Arduino + USB Power + Oscilloscope question
« Reply #6 on: March 12, 2013, 03:15:27 pm »
jhumkey: Very strange problem...  :o

I just tried this.
There's 0 ohm between the gnd pin and the usb gnd on my R3, and there's ~700 ohms between my laptop gnd and scope gnd.
I measured 0.05VDC and 0.005VAC between the gnd pin and the ground clip on my scope (TEK 2246A).

So somethings definitely not right in your setup.
You should probably try another computer first, if this doesn't help I suggest checking your scope thoroughly.

As for the Arduino (and the schematic) who knows what errors and strange things they have done. :P

For the record, that "gnd jumper" (which is solder pads) is located at the back of the Uno.
If you compare with the "reset enable jumper" on the front the gnd one is not shorted, which is very strange since the gnd's is connected together.

Edit: Forgot a few things. :P
« Last Edit: March 12, 2013, 03:22:17 pm by Thor-Arne »
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Arduino + USB Power + Oscilloscope question
« Reply #7 on: March 12, 2013, 03:26:48 pm »
I will guess you are using a laptop, and it has a 2 pin power cord. Simply connect a wire from a metal plate on the laptop, the VGA output is about the best to connect a wire to the hold down post, and connect to ground on the Arduino and ground post on the scope.
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5029
  • Country: ro
  • .
Re: Arduino + USB Power + Oscilloscope question
« Reply #8 on: March 12, 2013, 03:39:31 pm »
In the end, the safest way to do it is to power the Arduino from your own linear power supply, to be absolutely sure the power supply is floating.

Wallwarts can be tied to primary ground through a cap, can have a lot of ripple (as they're essentially switching power supplies), the output voltage can vary depending on the load (and an arduino uses little power so voltage could be quite high)..

Making your own linear power supply is very easy, you just need a transformer, four diodes or a bridge rectifier, a capacitor and a linear regulator. You can just cut a usb cable to get the connector.

An arduino with everything you might use won't use more than 300-500mA so even a small transformer will do, for example this one:

http://www.digikey.com/product-detail/en/FS12-500/237-1039-ND/242484

You get 6.3v AC (the tranformer is 6.3v if you parallel the two secondary windings, 12.6v AC if you connect them in series) which you can rectify with a bridge rectifier like this one: http://www.digikey.com/product-detail/en/DF04M/DF04M-ND/965265  and you get about 7-7.5V DC after the bridge rectifier.

You then put a big capacitor, let's say 1000-2200uF 10-16v to smooth the rectified voltage and then you use a simple linear regulator to get clean 5v - a cheap 0.3$ 7805 will work, and it only needs about 7v DC at input to output smooth 5v, so a transformer with as little as 6.3v AC will work. 

Easily done on a simple veriboard/stripboard, for less than 6-7$. You just have to be careful to insulate the primary pins of the transformer with some tape, to make it safe.

Look, even made a "Davecad" schematic:


 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 500
  • Country: no
  • tinker - tinker, little noob.....
Re: Arduino + USB Power + Oscilloscope question
« Reply #9 on: March 12, 2013, 03:46:01 pm »
My laptop does indeed have a 2 pin power cord, but there's no issues with using the scope ground on the Arduino gnd pin. That's why I suggest trying another computer and/or checking the scope.
 

Offline baldrick9

  • Newbie
  • Posts: 5
Re: Arduino + USB Power + Oscilloscope question
« Reply #10 on: January 21, 2014, 10:59:22 am »
Could be that the USB cable doesn't have the outer shield connected through.

I just had a similar weird problem with trying to get HC-SR04 distance sensors to work with Arduino - as soon as I hooked up my scope ground the sensor started to work - then I figured out the USB cable didn't have ground connected through. Tried a bunch of other cables and they were OK. I confirmed the shield connection (or lack of) with meter.

Apparently not all USB cables are the same.
 

Offline MrAureliusR

  • Supporter
  • ****
  • Posts: 373
  • Country: ca
Re: Arduino + USB Power + Oscilloscope question
« Reply #11 on: January 22, 2014, 02:42:41 pm »
Making your own linear power supply is very easy, you just need a transformer, four diodes or a bridge rectifier, a capacitor and a linear regulator. You can just cut a usb cable to get the connector.

That kind of defeats the whole point. The OP wasn't using the USB to just power it, he wanted to be able to probe things after programming without having to unplug and replug to the wall wart. Building a separate linear supply, while a good practice exercise, doesn't really solve the OP's problem.
--------------------------------------
Canadian hacker
 

Offline granz

  • Regular Contributor
  • *
  • Posts: 136
  • Country: us
  • 6.62606957
Re: Arduino + USB Power + Oscilloscope question
« Reply #12 on: January 22, 2014, 03:59:49 pm »
A couple of quick things to check for sanity:

Are the computer / arduino and scope connected to the same outlet?

Confirm that all outlets have connected grounds etc.  I don't know where you are located, but in my area homes abound with incorrectly wired outlets -- ground left disconnected (or sometimes even hot/neutral reversed!  But you'd have more issues if that was your problem).

Assuming no problems there, try it without the APC UPS.

Do you see any potential difference between your scope ground and your arduino ground with a meter?

Best of luck.

 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Arduino + USB Power + Oscilloscope question
« Reply #13 on: January 22, 2014, 07:31:23 pm »
jhumkey,

Start your thinking for the "This test equipment is unknown, broke, un-calibrated"
I if you start your thinking and testing process from the unknown crap point and use the test equipment to prove it is worth to you for your trust this time then while checking the test equipment you can also find problem areas that may need to be looked at.

The first volt meter was nothing more than a needle center scale. you connect you leads one way and the needle moved right. You now know something is working.
A good meter would move the same amount left is you swap the leads, does ti?
Use a testing sequence that will find out what you want to know while also proving that you can trust the test equipment somewhat this time.

I would say the best thing to use to check if you can connect the ground to a scope is the scope.
This does require you to notice what the scope could be trying to tell you.
I note that you have a dual channel scope. This can make testing easer and quicker.
Do a quick test that each channel of the scope does something. If the scope supplies a test signal try it on both channels. Even a scope that is in poor shape can be a big help in testing.
Both channels traces changed with the test signal, so set the two traces on top of each other.
Set the scope to it highest Volts/div as you are going into the unknown.
Connect just a probe tip for one channel. Did the trace jump? Did it move up/down? Is it displaying a signal?
Connect just a probe tip for the second channel.
Did the trace jump? Did it move up/down? Is it displaying a signal?
When you connect one probe tip to something labeled with a voltage and the second probe tip to something labeled with a different voltage, does what you see on the scope make sense?

Baby steps building knowledge and trust.
If things look ok, lower the Volts/Div

Think of how this is connected
You Probably have probe tip with 1M to scope ground and a second 1M back to other probe tip.

Some have said grab a DC meter. Where is the proven trust of the meter and what about the AC component that even partially working scope can show.

Think this should get the idea across,

C

 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf