Mechatronics (in South Africa)

or Mechatronic Engineering, humourously (but incorrectly) referred to as Megatronics at times. In Afrikaans Megatronika or Megatroniese Ingenieurswese. What is it? What can you do with it? When I started studying I didn’t know, after 5 years I think I have a vague idea. So below I’m going to post what I know.

In it’s simplest form it’s a combination of Mechanical and Electronic Engineering. If I really don’t feel like explaining, I simplify it to robotics. This is certainly a large portion of Mechatronics, but by no means a limiting factor.

Mechatronics as a named profession is fairly new, but the idea has always been there. In the South African context, UCT have had an accredited BSc (Eng) Mechatronics course since 1997 (although how long it has actually been running is uncertain), NMMU a BEng since 2007 (first graduates) and Stellenbosch since 2005 [1]. Potchefstroom University (NWU) are apparently aiming to start a course in the next few years [2]. Although not offered in the BEng format, UKZN do offer Masters through their Mechatronics and Robotic Research Group [3]. [EDIT: added list of BTech degrees and Diplomas offered at the bottom of the post]

Mechatronics at Stellenbosch [2]

I completed my BEng Mechatronics at Stellenbosch University in 2011. The Mechatronics course was presented by the Department of Mechanical and Mechatronic Engineering in a four year course. The first two years were identical to that of those studying towards a BEng Mechanical. The first year course is identical for all engineering students. In the third and fourth years, the two courses still followed similar routes, with the Mechatronics course replacing several Mechanical courses with some courses presented by the Department of Electronic and Electrical Engineering. In third year these included Electronics and Computer System’s courses and fourth year Electronics and Electronic Design Courses. Losing out on some Strength of Materials and Thermo-Fluid Mechanics.

The department put it this way [6]

The most important difference between the mechanical engineering programme and the mechatronic programme is that mechanical engineers are equipped to develop mechatronic systems with existing controllers (computers, PLC’s, etc.), while mechatronic engineers are also equipped to develop specialised controllers (e.g. for embedded controllers) and the relevant electronics themselves.

At the time, the Head of Department felt that Mechatronics as an entity was still too new. Employers weren’t advertising for Mechatronic Engineers, and didn’t really know what to do with them when they did get them. This resulted in the close ties between the Mechanical and Mechatronic courses. I was often unhappy about this, having would of preferred more focus on the Electronics, but in the end it worked out. And the HoD’s opinions were/are valid.

When I chose Mechatronics, I didn’t know where I was going to work, I chose the course because it sounded interesting. It wasn’t until my final year that I found a direction to work towards. Course setups at different universities are going to be different, and will put emphasis on different subjects, that doesn’t necessarily make one better than the other. Either way you’re going to come out of it with a degree and a fair amount of knowledge. Most importantly though (and this is true for any engineering degree) is you’ll know how to learn.

I’m quite confident that specific things that I learn in my first year of work will be of more value to my career than a specific subject at varsity, but having struggled through several subjects, I know I can figure out most things that come my way. I know where to look and how to go about solving problems.

In my final year we were a class of 85 Mechanical/Mechatronic students, of which I’d say about 30-35 received their BEng Mechatronics in 2011.

Mechatronics at NMMU [2]

NMMU have a slightly different setup. Mechatronics is presented by the Mechatronics school of the Department of Engineering, the Built Environment and IT. Mechatronics is the only Engineering degree they offer. As such, first year physics and maths are taken alongside BSc students and after the first year, courses taken are aimed only at Mechatronics students. The format of the course is still identical to that of when it started giving a good balance of subjects. The University also offers an array of BTech degrees in other Engineering fields.

I’m currently pursuing my master’s degree at NMMU. Their 4th year BEng Mechatronics class has roughly 25 students in it and the 3rd year class about 30. First year applications are limited to 60, with the most recent 1st year class starting with 50 students. The Mechatronics department is currently sponsored by General Motors South Africa (who have a plant in PE) and also have close ties to the Volkswagen plant in Uitenhage.

Mechatronics in General

Mechatronics as a career is still finding its feet. Meaning many consider it a jack of all trades, master of none type of situation, and although the course may feel that way, it’s certainly not the end of the story.

Mechatronics isn’t a new field, it’s just finally been given a name. When you tell people you’re a Mechatronic Engineer they don’t know what that is. I had a month stint at a large production facility as part of vacation training and I was asked to choose between focusing on their Mechanical or Electrical divisions, eventually settling for a bit of time at each. But that’s how businesses in SA are structured. This will change.

Several Mechatronic Engineers that I know have taken up Automation maintenance posts. Nothing wrong with this, personally it’s not where I want to be. Contrary to this though, my first job next year will be in automation maintenance. I however plan to use this as a stepping stone into a design career.

Automation is fun, and whereas I am going into automation in a production sense, automation also relates to smaller and/or more technical situations. The recent landing of the Curiosity rover on Mars is a perfect example of Mechatronic systems. There are several elements here, from the automated landing system to the remote control of the device.

In the motor industry, systems such as traction control, ABS and ESP are all examples of Mechatronic systems. Heavily complicated systems that rely on the processing of data from sensors to enable control of actuators. As such a Mechatronic Engineer can make him/herself home in  many different industries. These include the Automotive, Aerospace, Manufacturing, Medical and Communications Industries.

Mechatronic Engineers can register with ECSA to become Professional Engineers [4]. The industry is governed by the South African Institute for Mechanical Engineers. I don’t see Mechatronics separating from this tree any time soon. The degree, being accredited by ECSA also means that the degree will be recognised internationally in many countries thanks to the Washington, Sydney and Dublin Accords [5]

So what do you do when you have your degree? You do whatever you want. You’ll find something. I’m not aware of any of my colleagues who are currently not pursuing a post-graduate degree or are employed. Not all of them are in Mechatronic specific posts. Some have opted for more mechanical orientated jobs, while others have gone entirely into areas such as electronic design or programming. And that’s one thing, a degree in Mechatronic Engineering in no way limits you. Very few engineering degrees will actually.

After re-reading what I’ve written, I think I’ve put forward some information relating to Mechatronic Engineering, but it’s still left fairly vague, maybe it’s just because none of us know what we’re really doing :)

"This is silly, of course. The enemy will be born in the Network"

From xkcd.com

 

A National Diploma in Mechatronics (for registration as a Professional Engineering Technician) can also be had from the following institutions [7]:

  • Tshwane University of Technology
  • UNISA
  • Cape Peninsula University of Technology

A BTech in Mechatronics (for registration as a Professional Engineering Technologist) from [8]:

  • Tshwane University of Technology
  • UNISA
  • Cape Peninsula University of Technology

and to reiterate, a BEng, or BScEng (for registration as a Professional Engineer) [1]:

  • Stellenbosch University
  • University of Cape Town
  • Nelson Mandela Metropolitan University

Note: Although other institutions may offer courses in Mechatronics, or Mechanical Engineering with a focus on Mechatronic elements, the ones listed above are the only ones recognised by ECSA for registration as a mechatronic professional. Information was correct at time of posting, but may have changed since.

There are also several Universities of Technology and FET Colleges which offer courses in Mechatronics. CPUT is one of these institutions. Another training institution is Umbilo Training Specialists in Durban. They are running a free training course, once a month where anyone can come to learn more and expand their knowledge. Checkout their page for details.

For some more reading and a very complimentary view with some poignant remarks have a read here.

As part of my degree at Stellenbosch University I completed a project which can be seen here.

As part of my master’s degree at NMMU I completed a project which can be seen here and here.

If you’re looking for bursaries, try this website.

If you have any questions, feel free to ask in the comments section.

Restoring Windows to a smaller drive

I recently invested in a 120GB OCZ Vertex 4 SSD drive. I bought it to replace my 750GB HDD in my laptop. Although it’s quite a knock in space, I was only sitting at about 110GB usage at the time, so figured 120GB limit wouldn’t be an issue, and I’d have a 750GB portable drive to carry around for anything extra.

I was planning on doing a fresh install. When I purchased my laptop it didn’t come with an install disk, so I used Lenovo’s OneKey Backup program to make a set of 4 install DVDs which would pretty much take me back to original state.

I got the SSD, easily swapped it out with the HDD and booted from the backup DVDs. I went through a few menu steps only to be greeted by a box telling me that the drive was too small for the install. The install was less than 30GB, but apparently because the partition the install was on was 750GB, you can only restore to a drive of the same size or larger.

I then decided to give the Windows 7 backup system a try. It would mean I’d be back up and running without any extra installs, but after making the backup onto a portable HDD and then booting with a Windows 7 DVD I had on hand, I experienced the same problem.

Reading up a bit, people suggested shrinking the partition on the 750GB to less than 120GB. When trying to do this, Windows told me, that due to “Immovable Files” I would not be able to shrink the partition to less than 320GB. Didn’t help much, made a new backup but still got the same error.

After some consulting, I booted up in Kubuntu and used the linux drive manager to shrink the partition to a round 80GB. Trying to reboot into Windows resulted in a failure to launch. Fortunately this was solved by running a Windows Repair from the boot DVD. I was then able to boot into Windows, create a backup which successfully installed on my SSD.

tl;dr

  • A backup that you wish to restore must be of a partition that is smaller than or equal to the size of the drive you wish to install onto. The rest of the space must be unclaimed.
  • Use Window’s Disk management to shrink your main partition to less than your new drive’s size. Format the rest of the drive and ensure it is un-allocated.
  • If Windows can’t make it small enough, boot using a linux live boot CD. Freely available. Use the applicable distro’s management software to shrink the partition to the desired size. If on reboot Windows fails to launch, boot with a Windows install DVD and run the repair software. Note: I place no guarantee on this solving any issues that messing with partitions from linux may cause
  • After booting into Windows, create a backup of the installation onto a network drive or portable HDD.
  • Switch out your new HDD/SSD
  • Reboot with the Windows DVD and follow the repair process to backup from an image.
  • Select the appropriate backup and follow the steps.
  • Once installed you can go to Window’s file management again and expand your partition to consume the entire drive.

Python & MySQLdb queries not executing

As part of my master’s project, I’m implementing a very simple monitoring system. Logs are continuously stored in a mySQL database, and one can get an overview of the system by viewing a website. This means one can monitor the system wherever you are, and there are no software costs. Important for my sponsors.

My database needs to get data from a serial connection, and having successfully established a connection from Python in a previous project, I figured I’d stick with this, meaning the only difficulty would be communicating with the mySQL database from python. A bit of research revealed this should be quite simple, as there’s a very convenient MySQLdb library to aid communication.

FYI: I’m running Windows 7 64bit. Python 2.7.3 32bit. MySQLdb-python 1.2.3.

A little while later I had it all up and running and successfully executed the test examples with a simple:

cur.execute(“SELECT VERSION()”)

This revealed I was running

Database version : 5.5.24-log

All fine and dandy. I then setup a simple Insert query, which although it didn’t result in any error messages, failed to successfully update the database. Executing the exact same query from phpmyadmin resulted in the record appearing in the database. This was several months ago and I struggled for a few hours each day, making small changes to the code which might possibly affect the way it’s executed. I also shifted through pages of appropriate Google searches, all to no avail.

I gave up on the problem for a while, and today decided to give it another go. I tried it on a different computer, installing everything from scratch. Yet still I encountered the same problem. After some more time spent sifting through stackoverflow problem pages I came across someone with a problem kinda like mine. The solution to the problem was that the database was set to not auto commit exectued queries. Fine, I check mySQL, but autocommit = 1, so I assume that’s not the problem. Sifting through a few more pages and someone links to an FAQ mentioning the same commit problem. I add the line

connection.commit()

to my python code, and voilà, it works. Hours of frustration, hidden away in an FAQ.

Kalahari/Kgalagadi 2012

With all my work pretty much on track, I took two weeks off to get out a bit. First a few days back in the Cape catching up with some friends, then a bus trip later to spend some time with my girlfriend in the Northern Cape, where I had the opportunity to travel 1.6km below ground. Certainly the lowest altitude I’ve ever been at, or expect to ever reach.

We then joined up with my parents, and later the rest of my gesin and some other family for a seven day trip to what is currently known as the Kgalagadi Transfrontier National Park, previously known as the Kalahari Gemsbok Park.

S.Africa – Botswana

The stage opens at an odd looking building that is split right down the middle (including the parking lot outside) to indicate the South Africa/Botswana border. Large sections of the park reside on both sides of the border, and it was with the formation of the Transfrontier park that a border post was established here allowing one to travel extensively in the park.

Our trip consisted of a night in TweeRiveren, three nights camping at Nossob and two nights in the lovely (unfenced) Kalahari Tented camp. Most days consisted of a game drive or two, including trips between the camps. Although the roads are bearable, certain sections have fairly bad corrugations. Made me thankful we were in a rental and not my own car.

Gemsbok

Although there are no vehicle restrictions in the park (a small fiat and Toyota Tazz were spotted deep into the park) and roads are passable, a more comfortable ride would be had in a vehicle more suited to off-road driving. The major advantage with these vehicles is the added height, enabling one to see over the bushes and grass that line most of the roads.

The most prolific species we saw was probably the Springbok, followed closely by Gemsbok and Wildebeest. They are in no short supply. Ostriches, Kudu, Eland, Hartebees and Giraffe are also to be seen, depending on where one travels.

Giraffe

The park also plays host to Lion, Leopards and Cheetah, but there is no guarantee of seeing any of these. Birds however! Birds are everywhere. Every drive we made included multiple sightings of Kori Bustards, Secretary Birds and Pale Chanting Gosshawks (abbreviated to PCGs). Along with the PCGs are a wide array of other raptors. We saw several species of Eagles, Owls and miscellaneous Hawks and a Vulture or two.

Martial Eagle – Bataleur – Verreaux’s (Giant) Eagle Owl with Hornbill prey in claws

We were there in the middle of July. Some snow storms down south (the N1 outside Beaufort West was closed) led to a few extremely cold nights. Most nights went negative, making it very difficult to get up some mornings. I believe -5 deg C was the lowest temperature we measured when on a drive. That being said we also had some amazing weather. First few days were slightly cool, but our last few saw most people breaking out the shorts as temperatures hit close to 30 deg C.

Pale Chanting Goshawks – Sparrowhawk? – Glossy Starlings attacking our potjie leftovers

Our most exciting aspect was probably our multiple Cheetah sightings. On our trip from TweeRivieren to Nossob we stopped alongside a group of cars to view a group of several Cheetah off in the distance, barely visible without binoculars. The next day while trying to make out a leopard in a tree (I don’t count this as a proper sighting), five cheetah (we assume the same ones) made there way out to a waterhole.

First Cheetah Chase

The exciting part came the next day when we witnessed them on a short-lived hunt on a herd of Springbok, which was unfortunately unsuccessful. Later that evening they tried again at waterhole by Nossob, also unsuccessful. It was fascinating to view a herd of Wildebeest, who were nearby band together and chase off the group of Cheetah (now down to four members). Later that night they were spotted just in front of us on a night drive.

Cheetah being chased off by Wildebeest herd

We saw, what we think was them, once more on our last day heading out shortly after they had finished a meal on a baby Eland which we found several hundred metres from them.

Leopard that we saw

Our camping at Nossob was quite pleasant. Electricity is turned off between 22:00 and 06:00 at night, and the use of communal ablutions means you’re not always guaranteed a hot shower, I had one or two showers which were just bearable.

Ground Squirrels are quite common, especially at Nossob

Kalahari Tented is absolutely beautiful, with individual building/tent combos situated 50-100m apart from each other overlooking the river bed and a water hole. This unfenced camp can make one quite nervous, especially at night when doing a quick dash from one hut to the next.

Springbok – Wildebeest

We had an amazing time there, and were very fortunate to see all we did, even if we managed to complete miss all the lion. We saw enough Lion spoor to keep a tracker busy for days though. So they are there :) Our night drive from Nossob was very pleasant, saw a Brown Hyena, several owl, the Cheetah and several other interesting animals which are more readily viewed at night. The drive was made enjoyable by our knowledgeable and friendly guide Anna, who wasn’t disheartened when she mentioned how one never sees Caracal or Cape Foxes during the day, only for us to tell her how we’d seen both species the previous day.

Southern White-Faced Owl

One is free to drive through the park between sunrise and sunset (07:30-18:00 while we were there) and each camp has several morning,day and night rides available. The experience of lying in your tent, in the freezing cold and hearing Lion’s roar (what sounds like right outside) in the dead silence of night is something incredible, and a sure occurrence, especially at Nossob.

On a side note, we hired a VW Kombi T5 tdi. I’m not sure which specific engine it had, but I’m quite sure I stalled less times while learning to drive than I did driving that vehicle for 7 days. I’m not sure what exactly made it give up so easily, but as soon as the revs dropped below 900, the engine would just die. This happened quite often on the dusty roads when slowing down to look at something, not being able to hear the engine over the noise from the corrugations. Besides that it was a very comfortable, reliable vehicle and the high seating position lends itself for game viewing.