Thursday, December 31, 2015

Au Revoir 2015 (2015 in retrospect )


                   There are only few hours left to say good bye to 2015 and welcome 2016. The whole world is busy getting ready to welcome another new year. I’m pretty sure we all got new hopes ,wishes and challenges to complete in next year and it will be great to realise that we are very fortunate to looking in to 2016 since some of the people who celebrated 2015 with us are no longer with us to celebrate 2016. I thought writing down what I feel about how was my 2015 year went will be a good idea. Someday, may be at the end of 2016 I can look back  at this post and compare how I spent my 2016. I believe it’s always important to improve yourself at least a bit .That’s what make you feel you have achieved something in your life.
                    
                    When I am looking back at how I spend 2015 I can honestly say I was able to improve myself over all. It’s been a great year for my studies at Curtin and I have finished 3 years in my engineering degree and looking forward to start my final year next year. I was fortunate to have great friends who were always helped me in my studies and who always got my back when things aren’t going well. 2015 was my 3rd year in Australia and it’s been great life experience so far. Living in a strange country with people who I never met before was a big challenge and overcoming the obstacles and hardships I went through made me a stronger person. Now I feel I’m ready to face my life all by myself and I’m pretty excited about upcoming years.


                     Spending 3 years as an undergraduate was a great experience. I started studying at Curtin in 2013 and I slowly became good at what I love to do. Engineering was not one of my favourite field until I actually started to learn it and now Engineering has become the love of my life. I believe it’s not just a profession but a way of life if you are serious about it. 2015 was the climax of that as I started to specialise in electrical power engineering. I was fortunate to me lot of smart, brilliant people in electrical engineering field from different cultures, social back grounds and different viewpoints. It really made my experience at university more pleasant and challenging. I recon next year will be more challenging but I’m pretty confident me and my friends are ready to face it and win it.

                       2015 year was an important year even for my personal life. After going through some painful experiences in my life I finally overcame them and started to enjoy being alive and healthy. I realised it’s not the hopes that make you a human being but working hard and constantly adopting to the situation makes you a survivor. Hopes just give you a momentarily pleasure but working towards achieving them gives you more pleasure and satisfaction. At the beginning of every year we determine to change our way of life for the betterment of our selves but only few of us are strong enough to believe in them and chase them. For me it was a mixed experience in 2015. I had couple of things determined to do but I couldn't achieve all of them but I’m happy that I was able to achieve some of the most important things in the list.
                           
                                                 
                          In 2015, I started my internship as a trainee electrical engineer at Western Power, the electrical utility company in Western Australia. It was like a dream come true and I enjoy every morning going there, doing something that actually relate to what I study ,meeting some brilliant people who excel at what they do and taking advices and guidance from them. I’m thankful to my supervisor, Mr. Chathura Karunaratna who gave me the opportunity to work there and always find time to guide me in his busy schedule. My other team mates are also a big help for me at office and especially I want to thank Mr. Charles Mnyanjagha and Mrs.Nadee Jayasekara who are always kind enough to help me. I have been working there since 1st of December and I have two more months there to complete my internship and gather some good professional experience and lots of sweet memories.

                             Sometimes I wonder that I have already spent about 1/3 of my life time and I have become an adult who have some responsibilities. It’s been nice to see my friends have changed so much and doing well. During school time we all were trained to do the same thing without giving much attention to what everyone is capable of. But now I have friends who took different paths in life and enjoying the life and what they do. I’m thankful to every friend of mine who was a part of my life during some stage in my life. We may not meet again but it’s been great to spend time with them and it’ll always be preserved as a good memory.

                               
                                 I would like to thank to my parents, my brother and sister who were always there for me when I need them. 2015 was a year which I understood the importance of family bond to life. It gives me a great pleasure to see the next generation of my family (my 3 nephews) growing well in both physically and mentally. I’m sure our parents and relative must have had the same kind of feelings towards us when we were small kids. I t’s so amazing to see how repetitive is life. So I realised the best way to live life is to live at the moment and enjoying it to the fullest.
 
                                  
                                 No matter what happens life goes on. It’s the way of life. In 31st of December 2016 we’ll look back at 2016 and will have a laugh at about the silly yet lovely stuff we did. It’s good to have hopes but as I said it won’t make a human out of you. In every morning we have 2 choices, stay in bed and keep dreaming or get out of the bed and chase your dreams. It’s up to us to make the correct choice. I wish all of you a happy new year. 2016 will be a new challenge to each one of us but we are defined by how we face them. I feel 2016 going to be an amazing year for myself in both academically and personally and hope same for you.

                                    
                                    And also I would like to thank to people who come here to read my blog. I will do my best to add more useful content to my blog and hopefully everyone who spend their valuable time reading my blog will find something useful to them . I would like to thank you my brother Uchitha Ranasinghe and his friend Mr. Chaminda Serasinghe whose constant feedback give me the courage to write what I know. Hope to see you all in New Year with a good attitudes towards 2016.  












Thursday, December 17, 2015

Control LCD display using shift registers (74HC595N)

This post is pretty much a continuation of my post using shift registers in Arduino projects .Please have a look at it first if you haven’t read it since I assume you are already familiar with how shift registers work and how to use them in a project. Therefore I'm not going to explain how the shift register chip works in this post. As you might already know I was trying to build a robot during my last summer vacation. Unfortunately I had to postpone it  due to lack of technical knowledge and lack of time to learn them .but I'm having a long summer break after another successful year at university and hopefully this time I think I’ll be able to finish what I started. This project is also a side project of that project. My goal was to build an obstacle avoiding robot using Arduino platform. I wanted to use a LCD display to display the distance to an obstacle in real time since it helps a lot in debugging when your Arduino is not connected to the computer and you don’t have access to the serial input readings. But one major problem with that was the number of I/O pins the display required in order to do that. An LCD display wanted at least 6 I/O pins. I had other components like a servo motor (1 data pin) ultrasound distance (2 data pins) measuring unit and my motor controlling unit (4 data pins)  and I couldn't use 0th pin of Arduino board since it deals with the communications of the board . So I ran out of pins. Then this 74HC595N shift register IC came for the rescue. The advantage of using shift register was connecting LCD to Arduino through shift register cost me only 3 pins. That was a huge advantage when it comes to working with micro controllers. However it wasn’t straight forward since the Arduino LiquidCrystal library is not compatible with using shift registers. So I had to find a way to go through it. Fortunately I was able to find this article about how to achieve this.  This is done by using a technology called Serial Peripheral Interface (SPI) which uses a synchronous serial data protocol to communicate with 74HC595 IC. In here Arduino micro controller acts as the master device and shift register acts as the slave device. LCD display is connected to the outputs of the Shift register IC. Then SPI.h and a modified version of conventional LiquidCrystal.h header files can be used to write programs to use LCD display.

The following schematic shows the connection of the components and the connection required are listed below. You should keep in mind to use only compatible LCD displays (Such as Hitachi HD44780) with the LiquidCrystal.h header file.


                      IC Pins (1-8)
                  LCD Display pins
1(Q1)
4(RS)
2
-
3
6 (E)
4-7
11-14
8
GND


LCD Display  Pin
Connection
1
GND
2
+5v
3
10K trimpot variable leg
5
GND
7-10
-
15
+5V through 220 ohms resistor
16
GND

IC pins 9-16
Arduino I/O pins
9
-
10
+5V
11(Sh_CP/SPI clock signal)
13
12(ST_CP/Latch Pin)
9
13
GND
14 (DS/Serial Data input)
11
15
-
16
+5V

Remember to connect the fixed legs of the trimpot (Trimmer/variable potentiometer) to +5V and GND.
The following image is a schematic of the circuit.
Image retrieved from http://42bots.com

After connecting all the components We can replace the old LiqudCrystal.h file with new header file which supports use of shift register. Please go through the following steps to setup the necessary files.
  1. Download this new version of the LiquidCrystal.h from here.
  2. Close Arduino IDE if you are currently using it.
  3. Find the directory where the library folder is located. It should be inside the directory where you install Arduino IDE.
  4. Replace the older version of header file with the newer one.( keep of copy of the older one as a backup )
  5. Open Arduino IDE and Go to Files à Examples à LiquidCrystal and select Hello World SPI.
. If you can see an Arduino sketch it means the new SPI supporting header file has been recognised by the IDE and you are ready to go. Just connect your Arduino board and upload the sketch to board and run it. If you can see the output “Hello world” on your LCD all good (you can replace this to anything you like in the sketch). If it’s not working please check your connections first. Most people (including me) sometimes make wrong connections that causes malfunction or not working at all. Sometimes you might see some random characters on screen . Press reset button few times to get of this and run your code. Now you can use your LCD with Arduino just using 3 pins and saving 3 more precious pins for other components.


Please go to following links since those web pages have lots of useful details about this.

If you need my sketch you can have it from here.










Saturday, December 12, 2015

Challenges to the Power quality of modern electricity grids

It's been a long time since my last post due to a busy semester in  university and my recently started internship but I am looking forward to write more posts in upcoming months since I have some free time due to summer vacation of university. Sharing the knowledge I got from my studies always help me appreciate what I learnt and I think it's my duty to share them as much as possible because in university I realised how important to share knowledge. In almost every unit we used world wide web to learn more often we use textbook. So I think by doing somebody might find it useful.
Today I am going to present you few points about power system quality. This is not a detailed post but rather an entry point to upcoming posts under this topic. I will talk about each and every topic in this post in upcoming posts.

Modern power transmission and distribution is done by using alternative current (AC).  There are several advantages using AC transmission over DC transmission like ability step down or step up voltage as required, Ability to use high voltages in long distance transmission and almost all generators (Synchronous generators) are AC machine is another reason that AC transmission is used. But in recent years HVDC (High voltage DC) technology proved it’s capability for long distance transmission and to connect grids that use different frequency levels are quite useful. We might see HVDC more in future but at the moment all our grids are used to transmit AC.  In an ideal case these currents (including voltages) would be purely sinusoidal waves which have a frequency of 50 or 60 Hz depending on the country.  But this is impossible to achieve as we all aware.  Since the advancements in electronic devices and large demand for power by numerous types of customers on daily basis the utility companies face numerous challenges to keep their power close to the ideal case mentioned above. There are several problems associated with quality of power.
  •         Voltage dips
  •          Voltage swells and spikes
  •          Over  voltages
  •          Harmonics
  •          Variations in frequency
  •          Voltage fluctuations
  •          Voltage unbalance
  •          Supply interruptions
  •      Transient behaviour 

Voltage dips
Voltage dips are decrease in magnitude of the supply voltage for short time period. Voltage dips can happen due to various reasons such as,

  •          Tripping of sensitive protection equipment.
  •          Resetting of large computer systems.
  •          Inductive loading
  •          At the starting of a large inductive motor.

When activating large industrial loads such as large motors, they draw large currents. These are called inrush currents and this happens due to the transient nature of the motor. This causes a sudden voltage drop in line until the load (motor) starts to operate in steady state. This period could be few seconds but during this period other equipment that is connected to same node might not be able to operate. In an industrial site there may be lot of other motor as well that are connected to same node. In order to prevent motors operating under low voltage they can be equipped with under voltage relay protection which isolates the motor if such things happened.

Voltage Swells/Spikes
This is the opposite phenomena of voltage dips. Equipment can be damaged due to failure of insulation, destruction of sensitive electronic devices and electromagnetic interference caused by sudden change in voltage. Voltage spikes are often caused by lightning strikes and during switching operations of circuit breakers.
Voltage abnormalities (Image retrieved from:http://assets.tequipment.net)


Over voltages
Over voltages exceed the nominal voltage of a system over a period of time. They are mainly caused by malfunctioning voltage regulators on generators.

Voltage unbalance
Voltage unbalance occurs due to unbalance loading. Unbalance voltage supply creates zero sequence currents in wires which is responsible of heating the components. This is a serious problem in motor operating. Therefore it’s a common practice to use phase unbalanced relays to detect and unbalance cases and protect the motors against them.





Frequency variations
Frequency variations often happen in isolated networks due to faults and malfunctions of governors in power plants. Frequency variations can cause problems. Motor drives will not work properly, power generation may goes out of synchronism if the frequency has changed a lot from it’s nominal value. This may require isolating generators and reconnect them again. So having the nominal frequency value at all times over the whole network is critical.

Harmonics
A very common problem in power systems is effect of harmonics. The main cause for having harmonics in power systems are power electronic devices such as rectifiers, inverters, uninterruptable power suppliers (UPS) ,variable frequency drives(VFDs) and computers etc... In general any non-linear loads (loads where the voltage waveform is different than current waveform) are responsible for creating harmonics. The effect of harmonics is significant when loads are motors. Harmonics consists of negative sequence voltages which cancel the positive sequence voltages which creates the required flux to operate the torque of the motor. Since a negative sequence component creates a negative flux (which is responsible for creating negative torques) this will reduce the amount of positive torque available to operate the load. Besides negative sequence components, triplet harmonics (3rd 9th 15th) which are responsible for creating zero sequence currents in neutral wire causes heating problems and eventually degrades the machine.   











I suggest the following links might be useful if you need more details.
Harmoincs
In depth details about harmonics and it's effects
Voltage abnormalities