### Author Topic: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )  (Read 74422 times)

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« on: October 23, 2009, 06:14:56 pm »
Ejs Open Source DC Motor Model by Fu-Kwun Hwang and lookang
this is a derived work based on http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=912.0
Direct Current Electrical Motor Model

Direct Current Electrical Motor Model
Electric motors turn electricity into motion by exploiting electromagnetic induction. A current-carrying loop that is placed in a magnetic field experiences a turning effect.A simple direct current (DC) motor is illustrated here. ABCD is mounted on an axle PQ. The ends of the wire are connected to a split ring commutator at position X & Y. The commutator rotates with the loop. Two carbon brushes are made to press lightly against the commutators.
The motor features a external magnet (called the stator because it’s fixed in place) and an turning coil of wire called an armature ( rotor or coil, because it rotates). The armature, carrying current provided by the battery, is an electromagnet, because a current-carrying wire generates a magnetic field; invisible magnetic field lines are circulating all around the wire of the armature.
The key to producing motion is positioning the electromagnet within the magnetic field of the permanent magnet (its field runs from its north to south poles). The armature experiences a force described by the left hand rule. This interplay of magnetic fields and moving charged particles (the electrons in the current) results in the magnetic force (depicted by the green arrows) that makes the armature spin because of the torque. Use the slider current I to see what happens when the flow of current is reversed. The checkbox current flow & electron flow alows different visualization since I = d(Q)/dt and Q= number of charge*e. The Play & Pause button allows freezing the 3D view for visualizing these forces, for checking for consistency with the left hand rule .

Description:
the following case describe a postive current i, postive B field, ? start = 90o , split-ring commutator gap ?2= 80o
The split-ring commutator allows electricity flows from the positive terminal of the battery through the circuit, passes through a copper brush [rectangle black boxes] to the commutator, then to the armature.
Postive current runs through ABCD as shown in the diagram (select the checkbox labels?), a +y direction force would act on AB. An -y direction force would act on CD. Taking moments about the axle conveniently, reveals a resultant torque T = Fmag*AD*cos? acts on the coil loop. The coil loop rotates in an clockwise manner (view from battery side) starting 90o until it reaches the ? = 170o position (assuming that split ring angle are default at ?2 = 80o). At this ? = 170+o position, the current is cut off. However, the momentum of the loop carries it past the horizontal position until the coil loop reaches ? = 190o position. Contact between loop and split ring commutator is established again and the current in the coil loop is now reversed (note that current i is still positive). A -y direction force now acts on AB while a +y direction force acts on CD. The rotation motion is reinforced clockwise (view from battery side) as ? continues to rotate from 190o to 350o. At this ? = 350+o position, the current is cut off. However, the momentum of the loop carries it past the verticall position until the coil loop reaches ? = 10o position. Contact between loop and split ring commutator is established again and the current in the coil loop is now reversed back to same as at ? = 90o. A a +y direction force would act on AB. An -y direction force would act on CD and the loop reaches ? = 90o . The cycle repeats after ? = 90o allowing the armature to experience torque in the reinforced direction at the right time to keep it spinning.
Function of split-ring commutator:
The purpose of the commutator is to reverses the direction of the current in the loop ABCD for every half a cycle.
A swing back and fro motion (maybe ? = 90o increase to 270o and decrease back to 90o) is all you would get out of this motor if it weren't for the split-ring commutator — the circular metal device split into parts (shown here in teal with a gap of ?2) that connects the armature to the circuit.

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• Please feel free to post your ideas about how to use the simulation for better teaching and learning.
• Post questions to be asked to help students to think, to explore.
• Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
« Last Edit: November 17, 2011, 11:55:52 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model
« Reply #1 on: October 23, 2009, 06:30:24 pm »
O level Syllabus
This helps students learn
explain how a current-carrying coil in a magnetic field experiences a turning effect and that the effect is increased by increasing
(i) the number of turns on the coil,
(ii) the current
discuss how this turning effect is used in the action of an electric motor
describe the action of a split-ring commutator in a two-pole, single-coil motor and the effect of winding the coil on to a soft-iron cylinder

Exercises:

The external magnetic field Bz can be varied using the slider Bz. When Bz is positive, it is in the direction vertically up. Vary Bz until it is negative, what is the direction of the Bz then?
The current comes from the battery higher potential end and travels in a wire forming a closed circuit and travels back to the lower potential end of the battery. When ? = 0o current flows from the battery higher potential end, to the top brush, to the RED split ring, through the coil loop in order ABCD, back to BLUE split ring, bottom brush and lower potential end of the battery. What is the direction of the current flow in wire AB? What is the direction of the current flow in wire CD? using Fleming's left-hand rule, deduce the relative directions of force acting on i) AB ii) CD iii) BC iv) DA. hint: note that Fmag = I*B*L*sin(I&B) may be useful.
By taking moments about the axle PQ, consider the forces on AB and CD, deduce the direction of the torque and the motion if the coil loop was initially at rest (? = 0 deg/s). Select the suitable sliders of your choice and verify your hypothesis for 2 angles. Discuss with your partner what you have discovered. Ask your teacher if there are any problem/issues faced using this virtual lab.
Explain and show the equations involving T ( in earlier part of question), why the forces on wire BC and DA did not contribute to the calculation of rotating torque about axle PQ?
By considering the forces in the x direction for wire BC and DA, suggest what can happen to the coil loop if the forces are large enough. Suggest why it does not happen in terms of the properties of the wires in the coil loop.
Explain how a current-carrying coil in a magnetic field experiences a turning effect and that the effect is increased by increasing (i) the number of turns on the coil, (ii) the current (iii) increasing the magnitude of the external Bz field
After conducting some inquiry learning on the virtual DC motor model discuss how this turning effect is used in allowing the coil loop to rotate. You may right-click within a plot, and select "Open EJS Model" from the pop-up menu to examine the model equations of the motion. You must, of course, have EJS installed on your computer.
Describe the action of a split-ring commutator in a two-pole magnet setup, single-coil motor. Suggest the effect adding a soft-iron cylinder in the winding the coil.

Please submit your remix model that model features that are not available in the existing virtual lab and share your model with the world through NTNUJAVA Virtual Physics Laboratory http://www.phy.ntnu.edu.tw/ntnujava/index.php?board=28.0. Impacting the world with your model today!

This is a derived work to help students understanding DC motors especially the split ring purposes. Thanks to Fu-Kwun Hwang for his original codes! here http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=912.0

1 made n =3 to simplify the number of currents to eyeball
2 added battery wires brush + sign to give context of power of DC motor
3 mask a part of the coil to give the illusion of single coil instead of plane previously
4 design the focus to be on just the 2 sides of the coil which has the most force that powered the rotation of DC motor
5 created animated gif as well for wikipedia.com i hope
6 added angle cta from 0 to 360 ^o to give sense of orientation
9 added logic for split ring angle cta1 and cta2 to provide the ctadoubledot only when the is contact with split ring
10 equation of motion to reflect the no contact part to be without the torque from the magnetic force
11 magnetic force on and off when contact on and off
12 force shown
13 added particles for battery side wires which the particles motion is always from + potential so some code need to be re-purposed.
14 n is 5 now, better look and feel
15 motion of particles on battery wires now stop if there is no closed loop of the electric circuit
16 motion of particles current and electron are correctly reflected after extensive learning and debugging
17 added current can be negative
18 redesigned the angular acceleration and force activation condition into 4 quadrants, divide and conquer, previous original model is without the split ring consideration/model
19 added texts PQ axle, ABCD coil contact XY for ease of verbalization of communicating ideas and hypothesis for learners
20 added description and exercises to complement the virtual lab
21 rectified a major design mistake which i created due to misinterpretation of the usage of variable "sign" and finally got it to work (move) in correct representation/convention even with electron particles by designing with my own logic of how it can be made to do the simulation according to my understanding of the physics involved.
22 created a new logic for negative current in the battery wire to reflect the convention adopted today in physics
23 made the split ring commutator rotate with the coil instead of the original stationary design to conform to textbook explanation and the flash animation below
20March 2010 thanks to Taha Mzoughi http://physci.kennesaw.edu/mzoughi/bio.shtm remixed model, i realized what enhancements can be done.
24 added Torque clockwise positive view from the default perspective
25 Added Inertia to demonstrate the difficulty in increasing the angular velocity over time
26 added step button to allow for closer observation by learners
17 june 2010
27 redo the coil group to be lines instead of a 3D plane because it is drawing the whole plane instead of the perimeter
28 made java syntax false to make the split ring appear, in Ejs 4.3 default is true which the ring didn't show up
29 added simple 3D and Java3D optional from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1830
30 submit bugs to http://www.um.es/fem/EjsWiki/Feedback/Feedback?xsort=%E2%80%94created
31 leave the old version at top post and posted a underdevelopment proto-type at the bottom of post
11 feb 2011
added a new version DCmotor4 at the bottom post in order not to delete good version in case need to revert version
made beta split ring same color teal as the slider
change color of coil to DARKGRAY, the magnet blue and red is rather confusing with old color scheme
17 April 2011 (Saturday going Sunday at midnight after thinking about it every moment for a saturday)
major break through in bug fix now electron/current + splitring/ or without all bugs fix
added show graph angle, magnetic force, magnetic torque vs time and angle included even with data analysis
add N number of turns in coil
add lengthx as slider with all associated drawing of the particles
fix a bug in evolution page domega/dt = (getAlpha(cta) -bf*omega)/Inertia where getAlpha(cta) is magnetic torque a2*Math.abs(Math.cos(cta)) where a2 = a2=N*I*B*L*b*1;
new assumption in sim is inertia is not affect by N, each slider controller is for conceptual exploration, not exactly mimicking real equipment so to speak.
26 April 2011
added more text battery brush split ring coil to situate the association of the drawings more clearly labels? will deactivate them
F drawn shorter now
added axes a powerful feature to allow sim to display in XYZ to XZY so that it is immediately the same setup as some textbooks and internet graphics
added decoration = axes as suggested by collaborator Sim KS
added worksheet is jar itself for scalability as lesser chance of losing curriculum material to accompany the simulation
added angle drawn theta with checkbox
added checkbox to show hide the magnets for printing the 3 view front side and top
03 May 2011
add Bcorrect to get the correct direction for the Z , using Bcorrect = -B;
made the text black for clearly print out
background made lighter for clearly print out
re-orientate the sim to be more textbook example like customize to O level
redesign the worksheet
08 July 2011
fixed a bug with B and Bcorrect after a sharing that i realized the left hand rule should be correct now.

other reference:
http://www.magnet.fsu.edu/education/tutorials/java/dcmotor/index.html
http://www.walter-fendt.de/ph11e/electricmotor.htm
« Last Edit: July 08, 2011, 04:23:56 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model
« Reply #2 on: October 29, 2009, 01:37:47 pm »
in these few 6 days, i have spent many hours trying to understand how this applet is made.
I have remixed and redesigned some parts to be a interactive tool that i can be true to myself when i say that this work will impact the classroom of schools positively as a virtual lab.
i suggest teachers to buy a real physical DC motor to teach and supplement it with the virtual lab as a safe and hassle free way of allowing learners centered activities.

do post your experiences and ways to improve the virtual lab.
once again, i would like to thank the Ejs community especially Fu-Kwun Hwang, Francisco Esquembre & Christian Wolfgang!
The power to create is in our hands now.
Enjoy

will make a youtube video asap
« Last Edit: November 02, 2009, 11:04:45 am by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model
« Reply #3 on: October 29, 2009, 06:03:45 pm »
chance to visit http://www.educypedia.be/electronics/javamotor.htm and found interesting links
saw these http://fisik.free.fr/ressources/MccComplet.swfhttp://fisik.free.fr/ressources/MccComplet.swf and
http://www.gearseds.com/curriculum/images/figures/dcmotor.swfhttp://www.gearseds.com/curriculum/images/figures/dcmotor.swf
i think i need to redesign the behavior of the split ring to rotate instead of the original stationary design.

http://www.fairlysimple.com/applets/21Electromagnetism.dcr
like. give context to use of dc motor

http://www.walter-fendt.de/ph14e/electricmotor.htm
most popular java applet on DC motor simulation by W. Fendt
« Last Edit: May 10, 2011, 01:15:43 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model
« Reply #4 on: November 02, 2009, 09:41:56 am »
« Last Edit: November 02, 2009, 11:04:19 am by lookang »

#### VerAye

• Newbie
• Posts: 1
##### Re: Ejs Open Source Direct Current Electrical Motor Model
« Reply #5 on: November 21, 2009, 01:52:34 pm »

« Last Edit: November 21, 2009, 03:41:01 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model
« Reply #6 on: November 21, 2009, 03:48:26 pm »
Those videos are interesting.
They are used to introduce the power of learning from the simulation. Thanks.

what do you want to know? maybe you can read the text that introduce the simulation first and ask specific questions about it. I can only help if i know what you ask specifically.

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« Reply #7 on: December 11, 2009, 01:37:01 pm »
found this activity to be super cool. I can watch it again and again because despite the video being clear, i learn more things everytime i watch it again.
http://www.aps.org/programs/education/teachers/teachers-days/presentations/video.cfm

Watch physicists Becky Thompson-Flagg and Ted Hodapp trade quips as they show how to take apart a small DC motor and find out how it works. They get the armature of the motor spinning with just a battery, a few wires, and a permanent magnet. The experiment in this video is the same one described in the DC Motor Annotated Activity Handout. http://www.aps.org/programs/education/teachers/teachers-days/presentations/upload/090819-DC-motor-annotated-web.pdf

I love this!!

« Last Edit: April 25, 2011, 11:26:23 am by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« Reply #8 on: March 20, 2010, 06:49:47 pm »
found http://physci.kennesaw.edu/mzoughi/Simulations.shtm using this model too
http://physci.kennesaw.edu/ejs/ejs_TM_NTNU_DCmotor.jar

Taha Mzoughi's implementation of the torque looks ok but i don't understand why his model the inertia of the DC motor affects the magnetic force.
strange.

anyway,
looks like
torque and inertia are desirable for future versions of the DC motor!
« Last Edit: March 20, 2010, 08:30:05 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« Reply #9 on: June 17, 2010, 02:15:45 pm »
This proto-type version with 3dJava is currently under development.
U can test out Java3D with Ejs but it is still not working very well yet for complex models

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• Please feel free to post your ideas about how to use the simulation for better teaching and learning.
• Post questions to be asked to help students to think, to explore.
• Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
« Last Edit: June 17, 2010, 02:18:28 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« Reply #10 on: September 30, 2010, 10:22:59 pm »
found http://webphysics.davidson.edu/physlet_resources/bu_semester2/c18_generators.html

the explanation is good.
A electric motor is a device for transforming electrical energy into mechanical energy; an electric generator does the reverse, using mechanical energy to generate electricity. At the heart of both motors and generators is a wire coil in a magnetic field. In fact, the same device can be used as a motor or a generator.

When the device is used as a motor, a current is passed through the coil. The interaction of the magnetic field with the current causes the coil to spin. To use the device as a generator, the coil is spun, inducing a current in the coil.

Let's say we spin a coil of N turns and area A at a constant rate in a uniform magnetic field B. By Faraday's law, the induced emf is given by:

? = -N d(BA cos(?))/dt

B and A are constants, and if the angular speed w of the loop is constant the angle is:
? = wt

The induced emf is then:

? = -NBA d(cos(wt))/dt = wNBA sin(wt) = ?o sin(wt)

Spinning a loop in a magnetic field at a constant rate is an easy way to generate sinusoidally oscillating voltage...in other words, to generate AC electricity. The amplitude of the voltage is:
?o = wNBA

In North America, AC electricity from a wall socket has a frequency of 60 Hz. but in Singapore is 50 Hz The angular frequency of coils or magnets where the electricity is generated is therefore 60 Hz in USA or 50 Hz in Singapore.

To generate DC electricity, use the same kind of split-ring commutator used in a DC motor to ensure the polarity of the voltage is always the same. In a very simple DC generator with a single rotating loop, the voltage level would constantly fluctuate. The voltage from many loops (out of synch with each other) is usually added together to obtain a relatively steady voltage.

Rather than using a spinning coil in a constant magnetic field, another way to utilize electromagnetic induction is to keep the coil stationary and to spin permanent magnets (providing the magnetic field and flux) around the coil. A good example of this is the way power is generated, such as at a hydro-electric power plant. The energy of falling water is used to spin permanent magnets around a fixed loop, producing AC power.

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« Reply #11 on: November 23, 2010, 07:03:24 pm »
doing some literature review on "Electric Generator simulation physics" and found this.
http://imej.wfu.edu/articles/2001/2/02/demo/demo1-ac/ac.html
http://heebok.kongju.ac.kr/VRPS/
currently what these Superscape's Viscape plugin simulation allows
changing the intensity of the magnetic field B
direction of the magnetic field B
change the viewpoint to see details of the generators
watch the output voltage in a voltmeter but it appears to be qualitative, lack mathematics representation?

can this be a research gap to be argued for designing simulations on DC and Ac generators to address difficulties in learning electromagnetism for my study?
i can argue on several learning features desired as my research gap findings to justify my designing simulation study approach

1 E&M has force and charge particles that are invisible (Chabay & Sherwood, 2006) hence cannot be readily related to daily life.
2 to show theoretical idealized field are represented by ideas like field lines, field vectors, flux, (Thong & Gunstone, 2008) are intellectual theoretical constructs, not empirical phenomena (Guisasola, Almudi, & Zubimendi, 2004)
3 need for flux, current, resistor, due to many intrarelated concepts within E&M are difficult to distinguish and discriminate (Albe, Venturini, & Lascours, 2001; Chabay & Sherwood, 2006; Planinic, 2006; Saglam & Millar, 2006; Singh, 2006; Taasoobshirazi & Carr, 2008)
4 mechanical concepts forces, angular displacement, velocity acceleration, representation due to the interlink concepts to the broader realm of mechanics (Bonham, et al., 1999; Galili, 1995), gives initial difficulties.
5 provide mathematical representation due to mathematical complexity (Albe, et al., 2001; Chabay & Sherwood, 2006; Dunn & Barbanel, 2000; Y. Lee, 2009; L. C. McDermott & Redish, 1999) and large numbers of disconnected formula (Chabay & Sherwood, 2006) and the conditions for which the use is valid
6 1D-2D-3D Macro world with appropriate quantities superimposed visualization, sub-micro and symbolic and mathematical representation could be added to the simulation as pedagogical hints (Wee & Esquembre, 2008) (scientific graphs and plots) (Gilbert, 2005; Gilbert & Boulter, 2000; Singh, 2006)
7 Guided inquiry based learning and experience activities such as real-time display of data and even analyze the data to verify their hypothesis
8 Formative assessment could also be added like a simple game

hi prof hwang
any thoughts?

« Last Edit: February 11, 2011, 05:08:44 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« Reply #12 on: February 11, 2011, 05:12:53 pm »
seems like this model (too complex) is rather unstable when compiled using different version of Ejs. it works and it can don't work
i am going to create different versions and upload there instead to prevent losing the work.

11 feb 2011
added a new version DCmotor4 at the bottom post in order not to delete good version in case need to revert version
made beta split ring same color teal as the slider
change color of coil to DARKGRAY, the magnet blue and red is rather confusing with old color scheme

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• Please feel free to post your ideas about how to use the simulation for better teaching and learning.
• Post questions to be asked to help students to think, to explore.
• Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
« Last Edit: April 15, 2011, 04:23:39 pm by lookang »

#### lookang

• Moderator
• Hero Member
• Posts: 1772
• http://weelookang.blogspot.com
##### Re: Ejs Open Source Direct Current Electrical Motor Model Java Applet ( DC Motor )
« Reply #13 on: April 15, 2011, 04:28:21 pm »
i made a mistake in the codes and i cannot get the model to run correctly as it should be.

the splitring is not working correctly with the electrons, current is correct.
the force direction appears to be also wrong

http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=1266.0;attach=4115

appreciate any help to fix my bugs
« Last Edit: April 15, 2011, 04:30:17 pm by lookang »