Osciliscope Probing Noob question :) - Page 1
Forum section: electronics / beginners

author: CharlieK
author_rank: Newbie
timestamp: July 10, 2016, 04:45:16 pm
content: Dear EEV Bloggers,I’m relatively new to measuring setups and electronics in general. I hope you guys can help me out with a project.My situation:For a study project we have a DC motor that will be driven by a motor driver with a H-Bridge.And logic from an Arduino Mega Board. The motor will be used in a servo type application.So the motor will constantly turn CW/CCW. The H bridge will constantly reverse polarity on the motor terminals.- The Arduino is powered by USB via a PC.- The Motor Driver is powered by an 14.8V lipo.- The Brushed DC motor features an 16 PPR 2 channel magnetic encoder with hall sensor and i "think" is isolated circuit from the motor Terminals.My goal is to measure:- Voltage over the motor (Expected voltage range = 12-16.8V)- Current trough the motor (5% error is acceptable)- Speed (via 5V pulses from the magnetic hall sensor encoder on the motor.)To calculate:- Electrical input power of the motor (U&I)- Mechanical output (derived from the speed from encoder pulses and measured stall torque)- Power consumption under various loads.- Total power drawn from battery in 1 second.At small time frames for example: 0.5 mili seconds in 1 second measurement time I think is ideal for analysis.I have bought a Rigol DS1054Z 4 channel Oscilloscope to assist me in taking this measurements.I have the following setup in mind:I've never used an oscilloscope and i have some question about the probing:Ground Clip Probe 1: Should it go to the Lipo ground or to the second motor terminal?Ground Clip Probe 2: Should it go to the Arduino ground?Ground Clip Probe 3: Should it go to the Arduino ground?Ground Clip Probe 4:Glad if you could provide me some guidancePololu G2 High-Power Motor Driver 18v17https://www.pololu.com/product/2991ACS711EX Current Sensor Carrier -15.5A to +15.5Ahttps://www.pololu.com/product/2452

author: tggzzz
author_rank: Super Contributor
timestamp: July 10, 2016, 05:08:42 pm
content: It is good to see someone thinking and carefully formulating a question; not everybody does that.All the probe earth clips are directly connected to mains earth. The PC case and probably one USB wire should also be connected directly to mains earth. That limits your options.If you want to measure the voltage across a motor, you will probably have to use the scope's maths facility to subtract one probe's wave from another. Both proved voltages must be within the scope's common mode range. You would be disappointed if you tried to measure the difference between +999.9V and +1000.1V, or between 9.999V and 10.001V. Those problems can be avoided with a differential probe.To understand what can happen if you connect a probe's ground to the wrong place, have a look at

author: rstofer
author_rank: Super Contributor
timestamp: July 10, 2016, 05:56:52 pm
content: I'm assuming there is a common ground between the LiPo battery and the Arduino. I think it would be required for the H-bridge to trigger. So, that's where I would connect ALL of the probe grounds. That point will also be in common with the 0V of the USB port, the PC chassis earth ground, the scope earth ground and so forth.Now everything is measured relative to that ground. If I needed a differential measurement, like across the sense resistor, I would just use two scope probes and the MATH function. The other pair of probes would probably be used to measure the voltage across the motor and that doesn't leave any for the motion sensor.I guess I would measure RPM with the Arduino, add an LCD display for the readout. Given sufficient time and interest, I could probably measure the motor current and the motor voltage with the Arduino as well. The motor current is easy, just use a high side current sense amplifier and a shunt resistor. Depending on the amplifier, you may need an op amp to boost the output to fill up the range of the Arduino ADC. Differential voltage measurement usually requires a differential or instrumentation op amp. Here's a circuit and the equations are pretty simple:http://www.electronics-tutorials.ws/opamp/opamp_5.html

author: Kilrah
author_rank: Unknown
timestamp: July 10, 2016, 06:05:52 pm
content: An additional note:Quote from: CharlieK on July 10, 2016, 04:45:16 pmThat can't work, if you want mechanical power you need to measure the torque while running, you can't just use stall torque.The current can be used as a "torque indication" since torque is proportional to current, but you must then factor the losses in and that might be a pain (although interesting) to characterize.

author: rstofer
author_rank: Super Contributor
timestamp: July 10, 2016, 08:21:33 pm
content: Build a Prony Brake and automate the testing with the Arduino. Some kind of friction brake (band or disk) and a means for controlling it (stepper motor?) plus a load scale is all it would take. It would be an interesting project but a lot of work from class credit.

author: CharlieK
author_rank: Newbie
timestamp: July 10, 2016, 11:39:12 pm
content: Hi thanks for your swift responses!Quote from: rstofer on July 10, 2016, 05:56:52 pmYes there is indeed a ground connection between the Arduino and the Lipo via the driver. I have added a revised image.Quote from: tggzzz on July 10, 2016, 05:08:42 pmVery informative video thanx!Quote from: Kilrah on July 10, 2016, 06:05:52 pmI know it can only be used as an indication, there are also additional currents like "magnetizing current" but i only wanted to use it as a rough indication.I think swapping out the PC for my mac-book with adapter will solve the potential problem of ground shorting via Mains earth reference.And using two propes to measure the altering voltage on the Brushed DC Motor terminals.I'm still extremely new to all this, especially the reality behind voltages (referencing, relative etc.)In the past i only used with multi-meters which seems like a hell lot easier!It would be nice if you guys could comment on my revised plan, and point out potential problems:

author: george.b
author_rank: Frequent Contributor
timestamp: July 11, 2016, 02:40:26 am
content: Is the PC actually doing anything or is it just powering the Arduino?If it's just powering it, why not power it from the LiPo through a regulator? That would solve the ground shorting problem.Otherwise, well, if the power brick for the Mac is actually isolated, that should do it, too.

author: tggzzz
author_rank: Super Contributor
timestamp: July 11, 2016, 07:20:22 am
content: Quote from: george.b on July 11, 2016, 02:40:26 amFalse, unless the USB is disconnected.There will be a connection between the USB's shield and earth, and "IT" power bricks have the 0V connected to earth.

author: CharlieK
author_rank: Newbie
timestamp: July 11, 2016, 11:30:16 am
content: Quote from: george.b on July 11, 2016, 02:40:26 amThe PC/Mac-book has only one purpose:- Sending position info over serial com the Arduino/motor need to follow.-The Arduino will be following the updated positions and doing the control of the motor.-This effectively creates a servo system.Of course i can power the Arduino from the lipo, however id need to introduce wifi or blue-tooth to control the servo system which will complicate the setup.I've done it before but i like to keep the code and the setup to bare minimum and not introduce unnecessary features.So if the mac-book solves the grounding problem at least i have that covered. I'm going to checkI use a cheap aftermarket clone mac-book adapter:Quote from: tggzzz on July 11, 2016, 07:20:22 amTgzzz could you comment on my probing ?

author: tggzzz
author_rank: Super Contributor
timestamp: July 11, 2016, 12:33:15 pm
content: Quote from: CharlieK on July 11, 2016, 11:30:16 amIt would be dangerous (in several senses!) for me to make comments from a distance. All I can do is alert you to issues that might be important.Sorry.

author: tatus1969
author_rank: Super Contributor
timestamp: July 11, 2016, 03:01:57 pm
content: I see several caveats:- the AC adaptor is isolated, but there is always at least one noise suppression capacitor. (Good explanation:http://power-topics.blogspot.de/2015/04/reducing-noise-on-open-frame-power.html) For adaptors without PE terminal, they go from AC(N) to secondary GND. Which means that you have (capacitively coupled) 230VAC on your secondary (!) Just take a probe from your scope and tie it to the adapter's output. Suggestion: run your laptop on battery, or run a cable between USB GND and scope GND.- not attaching the GND of a probe will likely add noise on your measurement. The probe needs low impedance to GND at both ends, at the scope and at the target, or the shield will "grab" RF radiation. I suggest to connect all four probe GNDs to your board's GND right at the current sensor. You'll measure some offset due to motor current, but when you measure both H bridge outputs that will cancel out.- your motor driver does pulse-width modulation to control output voltage. In order to measure that voltage (the average) you need to add a low-pass filter, a simple RC with appropriate cutoff frequency right at the probe should work.

author: george.b
author_rank: Frequent Contributor
timestamp: July 11, 2016, 03:42:15 pm
content: Quote from: tggzzz on July 11, 2016, 07:20:22 amWell, of course, the idea was to disconnect the USB and power it from the battery insteadIf the power brick isn't truly isolated, then what I said doesn't apply.One could always get something like this:https://www.adafruit.com/product/2107

author: tggzzz
author_rank: Super Contributor
timestamp: July 11, 2016, 04:44:43 pm
content: Quote from: george.b on July 11, 2016, 03:42:15 pmWhen giving safety advice to a beginner, "of course" doesn't cut it: you have to be explicit about whattodo and whatnotto do.

author: george.b
author_rank: Frequent Contributor
timestamp: July 11, 2016, 04:54:44 pm
content: Quote from: tggzzz on July 11, 2016, 04:44:43 pmFair enough, I should have been more explicit.

author: Kappes Buur
author_rank: Regular Contributor
timestamp: July 11, 2016, 07:15:46 pm
content: http://electronics.stackexchange.com/questions/27066/why-on-earth-are-o-scopes-earth-referenced