Physics Laboratory 6

Electric potentials and fields

Objective:

In this lab students will calculate the electric potential at grid points in the in the x-y plane due to two small, uniformly-charged spheres.  Students will fix the position of the first charged sphere and vary the position of the second charged sphere.  The x-y plane is divided into a 26´26 grid.  The upper left corner of the grid corresponds to x=-12.5m, y=12.5m, and the lower right corner corresponds to x=12.5m, y=-12.5m.  The charged spheres can be placed anywhere on the grid in the x-y plane, as well as above or below the x-y plane.  Students will calculate the potential at each grid point and construct a surface and a contour plot of the potential.  The contour plots will display the equipotential lines.  The electric field is perpendicular to the equipotential lines, E=-ŃV.  Students will draw field lines indicating the direction and relative magnitude of the electric field in the vicinity of the charged spheres and calculate the magnitude of the electric field at selected points.

The potential at r=(x,y,z) outside a uniformly charged sphere centered at r’=(x’,y’,z’) is

.

The constant k has a value of 9´109 in SI units.  If we measure q in units of nC=109C, then kq=9q Nm2/C.

Procedure:

Open a Microsoft Excel spreadsheet.

Let cells B1-AA1 contain the numbers -12.5 - 12.5 in increments of 1 and cells A2-A27 contain the numbers 12.5 - (-12.5) as shown below.

Cells B2-AA27 are the grid points whose x- and y-coordinates (in units of m) are listed in cells B2-AA2 and cells A2-A27, respectively.

Into row 31 type the total charge on each sphere (in units of nC) and the  x-, y- and z-coordinates (in units of m) of the positions of the centers of the spheres.  Start with q1=0 and q2 = +1nC at x = y = z = 0.  (If you let the x- and y-coordinates always be integers. you can avoid “divide by zero” errors, since the grid points have half integer x- and y-coordinates.)

Now find the potential due to the two charges at grid point B2.

Into cell B2 type

=9*$A$31/SQRT((B$1-$B$31)^2+($A2-$C$31)^2+$D$31^2)
+9*$F$31/SQRT((B$1-$G$31)^2+($A2-$H$31)^2 +$I$31^2)

This is the sum of   due to the two charges.

Now copy cell B2 into the other cells of your grid.  The grid consists of cells B2-AA27.

  Highlight your grid (cells B2-AA27) and choose to construct a chart.

Choose a surface chart of subtype 3-D surface.  Place the chart on sheet 2.
You will see a two-dimensional surface plot of the potential outside a small, uniformly charged sphere.  On this chart right-click the legend and choose to format the legend.
  Choose scale, maximum 10, minimum -10, and major units 1.
(If you are using Excel 2007, select the graph, and from the "Chart Tools" menu choose Layout, Axes, Primary Vertical Axis, More Primary Vertical Axis Options.  Now choose maximum 10, minimum -10, and major units 1.)

Construct another chart of subtype contour.  Place the chart on sheet 2.

On this chart right-click the legend and choose to format the legend.  Choose scale, maximum 10, minimum -10, and major units 1.
(If you are using Excel 2007, select the graph, and from the "Chart Tools" menu choose Layout, Axes, Primary Vertical Axis, More Primary Vertical Axis Options.  Now choose maximum 10, minimum -10, and major units 1.)

You now have a surface and a contour plot of the potential outside a uniformly charged sphere placed at the origin.  The contour lines are equipotential lines.  They are spaced in 1V intervals.

Go to sheet 2.  Click View, Toolbars, and make sure the Control Toolbox is checked.  Excel will display a toolbar that contains the symbols shown below.  You can move this toolbar to a convenient position.

Click the symbol for the scrollbar , and then click in an empty cell, where you want the scrollbar to appear on sheet 2.  Drag the scrollbar to the orientation and size you want.
(If you are using Excel 2007, click the developer tab.  If this tab is not available, Click the Microsoft Office ButtonButton image, and then click Excel Options, Popular, and select the Show Developer tab in the Ribbon check box.
Click Insert, ActiveX Controls, and choose the scrollbar.)

To set the properties for the scrollbar, right-click the control, and then click Properties on the shortcut menu.  Choose Max = 13, Min = -13, and Value = 0.

Label the scrollbar by typing "x-position" into a cell next to the scrollbar.

To add macro code for the control,  right-click the scrollbar control, and then click View Code on the shortcut menu.  In the Visual Basic Editor, write your macro code.  Enter the following code and close the Visual Basic Editor.

Private Sub ScrollBar1_Change()
Worksheets("sheet1").Range("g31") = ScrollBar1.Value
Worksheets("sheet1").Calculate
End Sub

Click Exit Design Mode  in the Control Toolbox to quit design mode and enable the scrollbar.  Click the arrows on either side of the scrollbar to move the slider and observe how the x-position of charge 2 changes.
(If you are using Excel 2007, click the Design Mode button to turn design mode on and off.)
Repeat the procedure above and insert a second scrollbar.  Label this scrollbar by typing "y-position" into a cell next to the scrollbar.  Enter the following code and close the Visual Basic Editor.

Private Sub ScrollBar2_Change()
Worksheets("sheet1").Range("h31").Value = ScrollBar2.Value
Worksheets("sheet1").Calculate
End Sub

Repeat the procedure above and insert a third scrollbar.  Label this scrollbar by typing "z-position" into a cell next to the scrollbar.  Enter the following code and close the Visual Basic Editor.

Private Sub ScrollBar3_Change()
Worksheets("sheet1").Range("i31").Value = ScrollBar3.Value
Worksheets("sheet1").Calculate
End Sub

Click the symbol for the Checkbox , and then click in an empty cell, where you want the Checkbox to appear on sheet 2. 
Right-click the Checkbox control, and then click View Code.  Enter the following code and close the Visual Basic Editor.

Private Sub CheckBox1_Change()
Old = Worksheets("sheet1").Range("f31").Value
Worksheets("sheet1").Range("f31").Value = -Old
Worksheets("sheet1").Calculate
End Sub

By clicking the checkbox you can change the sign of q2. 

Now go to sheet 1 and enter the value 1 for q1 into cell A31.  Then switch back to sheet 2.

Charge q1=1 is fixed at the origin.  Both charges have the same magnitude.  You can move the charge q2 to different positions with the slider.  You can change the sign of charge q2.  In sheet 1 you can change the magnitude of either charge.

Open Microsoft Word and prepare a report using the template shown below.

Name:
E-mail address:

Laboratory 6 Report

Summarize what you have done in this the lab exercise. 

Describe you graphs and how they change when you move q2.  What do they tell you about the potential outside two uniformly charged spheres? 

Produce a contour plot for

q1 x1 y1 z1   q2 x2 y2 z2
1 0 0 0   1 -5 -5 0

and paste the plott into your word document.

Click the drawing icon on the toolbar to show the drawing toolbar.  Click Autoshape, Lines, and pick the Scribble line.  Draw approximately 8 field lines onto the contour plot.  The field lines should accurately reflect the strength and direction of the electric field.  At each point, the field lines must be perpendicular to the equipotential lines.  They have to start on the positive and end on the negative charge.

Pick a point on your graph at which to calculate the magnitude of the electric field.  Let the point lie on a field line.  Label the point A using the textbox tool from the drawing toolbar
Estimate the magnitude of the electric field at that point by finding the change in the potential DV over some small distance d along the field line.  Let d go along the field line from one side of the chosen point to the other side.  Calculate E=DV/d.

Save your Word document (your name_lab6.doc) and attach it and your spreadsheet to an e-mail message to mbreinig@utk.edu.