Learn the Art of Mechatronics projects –
Yes, you read it right. It’s not a spelling mistake. When I started learning this, I didn’t even know that a term like this exists. Only for the sake of it, I used to tell people I am a Mechatronics Engineer, and people used to laugh, as in what the heck does that mean? It’s later that I found out that it’s an actual word and I was right. So, what exactly are Mechatronics projects? How does it relate to other engineering terms and what do you need to be a mechatronic engineer? Let’s go through this step all one by one.
What are the Mechatronics projects?
I will be defining this in my old simple term. Mechatronics projects are just a combination of multiple things. You don’t need a degree or any certification to be that. It is something when you develop your skills with pure knowledge and experience cultivating multiple skills from different fields. Confused? Let me get this straight.
During my college days, I wanted to be a programmer. A pure coder. I started learning C, C++, then Python, Haskell, Scheme programming and many more. But it’s later that I realized that these are only instructions. A code is a simple instruction as to how something should work. But without proper instruments, or the proper term would be hardware. So, without proper hardware, it simply won’t work. So, for example, if I am building, let’s say a Quad Copter, If I just write the piece of code in C++ to control the network card, it won’t work. You need to know how to rotors work, at what speed would they start maneuvering, whether you would need a step motor or a high-speed motor. There are calculations. Now you might be thinking that I am moving towards the field of Robotic Engineering. But that’s simply not right. Mechatronics projects is a combination of electronics, mechanics, hacking, coding, Mathematics, and similar stuff. The list is endless. In short, it is a combination of everything you ever learned.
How to get started?
Now, this is a question I was waiting to answer. Mechatronics projects are not something you could start learning from 5th grade or 10th grade or something. There is no age limit for that. But since we are all not Thomas Edison or Einstien here, let’s see how we could get started from the mechatronics basics here.
The best place to start would be by learning Python and buying a microcomputer which will follow your set of codes. Modern Computers and processors like Intel or AMD would probably be hard. That is the reason I asked to start with a microprocessor. Even before purchasing a microprocessor, I would recommend you to learn Linux and its commands a bit. The main reason for that is because its far easy to get started in Linux. Besides, Linux is the only choice you have since its extremely portable across various platforms until unless you can port any version of Microsoft Windows on microprocessors across ARM architectures which I presume you don’t know since we are talking about beginner efforts here. Hush! That was a long sentence.
Let me make this more simple for you. Following are the topics I would be discussing on further in this blog so that you get a hold of at least basics of Linux, Python and a Microprocessor. Now, if you are wondering where would you get this microprocessor, you don’t need to worry about rigging it off from your old computer. There are a lot of companies on the market who sell microprocessors. But today we would be more focused on Raspberry Pi 2. So, Following are the topics for today:
- Linux basics
- Python basic for LED configuration
- Raspberry Pi
So, to get you started, I would recommend downloading a Linux distribution and using it on a virtual machine. The virtual machine like VBOX or VMWare virtualizes your computer and you can use two operating systems inside one another. The simplest Linux distribution out there that people recommend is Ubuntu, but I would rather not support them. As for a beginner, I would recommend downloading Linux Mint. The current version for Ubuntu is 15.10 and for Mint it is 17.2 Rafaela. You can download either of them. Both have vast community and are extremely stable. The only thing is that if you have a graphics card, you may have issues troubleshooting Ubuntu with Unity. Linux Mint is based on somewhat similar to the GNOME 3 desktop environment, now known as Cinnamon. So coming back to our topic, once you install those, following are some sets of command you would require to know so that you get hands-on on the Linux environment.
|ls||View contents of current Directory|
|pwd||View Current Directory|
|cp, mv||Copy or Move something|
|rm, rmdir||Remove File or Directory|
|cat||Read contents of the file|
|nano||Open text editor in terminal|
|sudo||Get superuser access|
|so||Get root access|
|cd.||To go one directory up|
|top||To display CPU and memory usage|
|map||To scan ports, OSs and services|
|ssh||To access another machine via the tunnel|
|grep||Search plain text data|
These are just a few basics. Of course, you can do all of them via Graphics User Interface as well, but these are quite quick, and when you are into ssh, you won’t be able to use GUI until unless you have a VNC connection. Once you have these commands handy, you can then proceed with the following Python Part.
Once you have the above basics, you can straight away install python. You can also install it on either Mac or Windows, but since we are using Linux here, it’s extremely easy to install that. Just type:
$sudo apt-get install python3
(Note: The $ sign means terminal. Don’t use it when actually typing the command)
Once you install that, you can simply start it typing python3 in your Linux terminal. Most probably, you won’t even have to install it. Most Linux distribution comes pre-installed with Python 3.4 or the latest whichever it is.
Following are the basics of Python which you can then start typing in your terminal. Python running in Linux terminal looks like this:
If you get 3 arrows like the above part, then you can start typing in the following commands:
It prints out Hello world in the terminal.
It will print out 7 in the terminal
It will import the XYZ module
>>>from ABC import XYZ
It will import the XYZ from the ABC module
(Note: ABC and XYZ are only for reference purpose. You need to insert a specific module name to get it working)
This will check if the condition is true if it is, then it will print the statement as true else it will print false.
Now let’s write a simple portable piece of code. Write this in any text editor in Linux, for eg: Gedit or Leafpad and save it as text file.py
print(“Welcome to Python Programming”)
Here, you can save it with any name, just make sure you change the extension to ‘.py’. Once you have done this, type into terminal,
$chmod +x test file.py
Chmod +x will change the permission and make it executable. Just make sure that you are in the proper directory when doing this, else it will give you an error not found. For eg., if the test file.py is on Desktop, you can type in the following.
$chmod +x /Desktop/test file.py
Once you do this, you can run the file by typing:
This will print the statement “Welcome to Python Programming” on your terminal. You can even double click it and execute it without ever going to the terminal again. And you can use it on any Linux computer. You would just have to run the chmod command in whichever computer you are using. You can also run it in windows using the command prompt or you can convert it into a testfile.exe by using the py2exe software available on SourceForge which will convert the ‘.py’ file too ‘.exe’.
That’s it. You now know how to work in python.
MicroComputer – Raspberry Pi
So, now for the microcomputer part, you would need to Purchase Raspberry Pi. Make sure you purchase the latest one. The latest one as of the time when writing this blog is Raspberry Pi 2. It looks like this:
Image Source: pixabay.com
It has 4 USB ports, one microSD card slot which supports up to 64 GB of class 10 emmc. It consists of 900 MHz processor which as of now I have overclocked it to 1.2 GHz by using 3 copper heatsinks. It has about 1 gigabyte of RAM, 40 GPIO pins, full HDMI support, 3.5mm audio-video jack, one camera interface, and display interface, The Graphics processing unit is Videocore IV 3D. If you ask me, this is more than sufficient to run any Linux distribution in it.
By default, if you purchase the whole kit, it includes a class 10 microSD card which comes pre-installed with NOOBS. Using noobs you can install the Raspbian operating system which is included inside it. As far as I have tried, you can install almost any Operating system including Android KitKat. There are however other microcomputers as well, but I prefer Raspberry over anything. Once Raspbian is installed, you can start python which is again installed by default and start messing around with the GPIO pins and a few LEDs which is quite fun to get started with. For more information, you can always visit GitHub and raspberry pi official page www.raspberrypi.org for blogs, mechatronics projects, and updates.
So, I think that would be it to get you started in the field of Mechatronics basics. There is no limit of imagination as to what all could you do with these things. Once you get a hang of this stuff, I would recommend you to take a look to the Arduino board which is also quite fun if you are planning to include mechatronics projects and robotics in this.
First Image Source: pixabay.com
Here are some articles that will help you to get more detail about the Art of Mechatronics projects so just go through the link.