Sunday 2 March 2014

Circuit Connection

This is the last week of our project. Actually, we had been connected the whole circuit for three weeks, and we modified the circuit and software code at the same time. I have to say this is the most difficult part during the whole project. So, we decided to make summary in the end.

At first, we want to use a motor drive shield to replace the H-bridge. In fact, only use H-bridge can we change the direction of motor. On the other hand, motor control board has more function than a L293d chip namely H-bridge.
Motor drive shield

Unfortunately, when we connected the motor drive shield with UNO board, DC motor cannot rotate in the opposite direction. Then, we realized it was meaningless and complicated to use the whole shield, and we decided to take down one L293d chip from shield so that we can simplify the circuit.
L293d
Then, we used a potentiometer to adjust the resistor of circuit. In other words, potentiometer can control the speed of DC motor. Besides, we used a switch to alter the direction of current so to meet the goals of change direction of rotation of DC motor. Oh! All the components we used in circuit must be considered when we design the code of UNO board in the computer. These two pictures show the final version of software code.



















There are so many errors during period of debugging:-( But finally, we got the expected results. We were so exciting:-D. Let us show you how it work.





So far it's working well, isn't it? Thank you for reading!





Friday 28 February 2014

Modelling of DC Motor by Using SIMULINK and SIMSCAPE

In this week, group members build the model of dc motor with Simulink. The next part of the blog will talk about the process and results.
The electric circuit of the DC motor is shown in the following figure:

As we can see in the figure, the DC motor contains an inductor, a resistor,armature and rotor.
We applied Newton's law and Kirchoff's law to the motor system to generate the following equations:
Kti-Jdw/dt-Bw=0                (1)
V-iR-Ldi/dt-Kvw=0               (2)
Kt is torque constant.
R is electric resistance.
L is electric inductance.
J is moment of inertia of the rotor.
Kv is electromotive force constant
B is motor viscous friction constant.
We need to know the w and i of the DC motor. By integrating equations (1) and (2) we get the following equations (3) and (4):
w=1/J∫(Kti-Bw)                 (3)
i=1/L(V-iR- Kvw)                (4)
The physical parameters for our example are:

Kt=0.01N*m/Amp
R=1 Ohm
L=0.5H
J=0.01kg*m^2
Kv=0.01V/rad/sec
B=0.1N*m*s

Next is the result of simulation of DC motor.

This is the mathematic model of the DC motor with Simulink.

This figure is the output value of current i(t).



This figure shows the variation of angular velocity w.

Then we build the model of dc motor by using Simscape. The circuit is:
In this section, we build the DC motor model by using the physical modeling blocks of the Simscape extension to Simulink. The blocks represent actual physical components. Therefore, we don't need to build mathematical equations from physical principles to build complex multi-domain models. The following blocks are added to the model :

DC motor block, H-Bridge block and controlled PWM Voltage block from the Simscape/ SimElectronics

DC Voltage Source block from the Simscape/Foundation Library/Electrical/Electrical sources

Current Sensor block from the Simscape/Foundation Library/Electrical/Electrical Sensors library

Three PS-Simulink Converter blocks and a Solver Configuration block from the Simscape/Utilities library

Electrical Reference block from the Simscape/Foundation Library/Electrical/Electrical Elements library

Ideal Rotational Motion Sensor block from the Simscape/Foundation
Library/Mechanical/Mechanical Sensors library

Mechanical Rotational Reference block from the Simscape/Foundation Library/Mechanical/Rotational Elements library

Three scope blocks from Simulink/Commonly Used Blocks

Then, connect and label the components so that they appear as in the figure above. Next the parameters of DC Voltage Source block, Controlled PWM Voltage block and H-Bridge block are set. We also set the Motor block parameters according to the data. Finally, we run the simulation and plot the results. The plots shown the motor current, motor RPM and motor position. 

This figure is the output value of current i(t).


This figure is the output value of the rotate speed of the dc motor.


This figure is the output value of the position of the dc motor.
In our design, we add a potentiometer to control the speed of the DC motor next is the modelling circuit:



Thursday 13 February 2014

Theory on DC motor


Hello everyone.

in this post there will be some general information about DC motor.

Basically, a DC motor is made up of an inductor L, a resistor R and a voltage component



 
figure shows that a loop of wire with some resistance is inserted between the two permanent magnets and the motor turns.

of course, we could have several commutators and loops.

So, the torque is proportional to the current through the windings,
T = kI where T is the torque, I is the current, and k is a constant

The wire coils have both a resistance, R, and an inductance, L. When the motor is turning, the current is switching, causing a voltage,

V = L dI/dt

This voltage is known as the back-emf(electromotive force), e.

If the angular velocuty of the motor is w, then e = kw (like a generator)

This voltage, e, is working against the voltage we apply across the terminals, and so,

(V- kw) = IR where I = T/R

which implies (V-kw) = (T/k) R

The maximum or stall torque is the torque at which w = 0 or T = kV/R, and

The stall or starting current, I = V/R

The no load speed, w = V/k, is the maximum speed the motor can run. Given a constant voltage, the motor will settle at a constant speed, just like a terminal velocity.

Start modelling












These are the equipment my team ordered and all of these finally arrived till this week. Although a little late, my teammates have done something on modelling the result in the computer.






As shown in the piccture, we used a software named Arduino Box to design the circuit. This project shows how to control a DC motor's direction (running forwards and backwards) using an H-bridge. An H-bridge is an electronic circuit which enables a voltage to be applied across a load in either direction. The circuit may not such diffcuit at the first time, in fact we have to do many addition and modification in the future.
More results will be published later.




Friday 7 February 2014

Get to work!

This is the first week of our project.  For we did not get the DC motor and other instruments, we spend many time brainstorming the arrangement and design. Beyond that, we looked through many books and watched videos in the hope of getting further information about DC motor. We truely found many interesting things :)

This project generally consist of two parts. One is, of course, hard modelling based on a breadboard: and the other is computer modelling, that is use MATLAB Simulink to process simulation and analog. We have much work to do.

Here is our instruments list:
1. A geared DC motor
2. A DC supply
3. A H-bridge
4. A Potentiometer
5. A Arduino UNO board
6. A 10K ohm resistor
7. A switch
8. A bread board

We are looking forward to the next week! More posts will be updated soon.
Thank you!