ADVERTISEMENT
You will be redirected to your destination in 10 seconds.
Electronics Industry Search

Polling Question

Should the government bail out U.S. automakers?

  • Yes
  • No



View Previous Poll Results
Advertisement

Mechatronics on CampusRSS

In this blog you'll find posts about mechatronics, engineering, and engineering education.  Stefan Wolpert will discuss various aspects of mechatronics, some of which include computers, control, electronics, mechanics and design.  Also, Stefan will explore his engineering education and its integration of mechatronics.

Error? Fixing Code and Embedded Hardware the Easy Way

Stefan Wolpert
Posted by Stefan Wolpert on July 14, 2008

You’ve worked all day on implementing a complicated function and it’s time to see whether it works. You compile the C++ code and program the memory on the microcontroller.

Dead. Nothing happens.

What to do? First, obviously look for any compiler warnings, such as infinite loops, etc., but if everything looks good, where do you turn to?

In mechatronics there are often many different systems working together and each possibly has its own computer software, hardware programmer, clock speed, voltage input and much more variations. How do you keep all of this straight? Data sheets are vital to have easily accessible and often having both a digital and hard copy is a good idea. The hard copy is good so you can not only rest your eyes, but also to make it easier to type on the computer, e.g. while looking at register descriptions. Digital copies of data sheets in PDF format are wonderful because you can search a document or an entire folder of documents for a search string.

But who wants to always read through data sheets to find what voltage to plug a motor into?

Doing things by memory can be costly and even dangerous — it’s a huge source of human error. You need a central place with condensed information, such as a motor and voltage chart, or a header pin diagram with descriptions, with easy to understand notation in your own style.

A detailed notebook would be essential to help solve these problems.

I’ve seen a researcher too often using a legal pad to write down e.g. resistor values or baud rate calculations. It may be possible to save legal pad sheets of paper, but it’s not natural to save a pile of ragged-topped sheets of paper that are likely curled or otherwise unkempt. When a change cascades through the system, such as an increased baud rate, having the previous calculations in a notebook (that were written as you did them) would help to quickly transition.

I suggest writing almost everything in a notebook as you work on a project. I like to color-code and use symbols to help me find information and make it easier to read. I’ll share one of the early pages of my notebook for a project I’m working on this summer:

Computation NotebookThe notebooks I love to use do NOT have easily removable pages (no pre-perforated pages) and have pre-numbered pages. A stock photo of my notebook is to the left. Brainstorming with others or by myself, reading journal articles, data sheets, random ideas, measurements, code changes,… I put all of it in my notebook with the date and often even the time. This leads up to my second point.

Working with others on code? or even by yourself? You should be using version control.

The notebook that I keep lines up nicely with version control, so I can see the reasons I made the changes (in the notebook) and what code I actually changed (version control). I use Subversion (SVN), and after I get something working, even if it’s small, I commit the change to the repository. A repository is a relatively secure server where you upload your source code. The SVN server keeps track of file changes between commits. This means if you change one register’s hex value, looking at the difference between two versions of the file, you can easily find the previous hex value and the new hex value. You can find much more about version control here and about Subversion here.

A recent experience I had:
I spent an entire day trying to write simple communication between embedded devices by deciphering data sheets and example code. I wrote my functions and tested them on a robotic arm. They worked! It was the end of the day, so I committed my changes to the repository and went home. After two more days of work of further programming, everything stopped working. The SVN repository was futile because there were too many changes listed, and would take too long to go through. I saved a copy of my changes and reverted to the previous working copy, but now what do I have to change in the working code to catch up to were I was before? I certainly didn’t want to simply copy and paste between the copies, because there was something seriously wrong (even though possibly insignificant), causing nothing to work. Looking at my notebook, I wrote down what things I meant to implement, such as "Function to lock motor on button press." and "Function to go to a position." and within an hour had re-implemented the functions, and the ghost error was gone.

Have any tips or questions on keeping a notebook, avoiding errors, version control, or otherwise? Comment below and I’ll respond to any questions.

Comments (0)
Industries:

Mechatronics in Germany: Neuronics AG Kantana Robotic Arm

Stefan Wolpert
Posted by Stefan Wolpert on June 18, 2008

1 robotic arm + 5 DSP boards + 1 ARM-based microcontroller = a robust research platform

I am currently working as an intern in Germany at Kaiserslautern Technical University (Technische Universität Kaiserslautern). I’m helping to develop control algorithms for a robotic arm in the Institute of Control Systems (Lehrstuhl für Regelungssysteme).

The robotic arm I’m working with is a Kantana robotic arm made by Neuronics AG, based out of Zurich, Switzerland.
Neuronics AG's Kantana robotic arm The robotic arm has been actively used in industry, as shown in this video clip, as well as increasingly in higher education research. The robotic arm is relatively small — when fully extended vertically it’s about 3/4 of a meter or 30 inches tall and it’s load capacity is less than half a kilogram (1.1 lbs). The robotic arm might seem like it isn’t capable of much, but it has excellent precision and range of motion with its five degrees of freedom.

Herein lies the problem: The robotic arm is precise, as it always knows the current positions of each joint and the calculations to determine the position of the end effector (tip of the arm or gripper), but knowing the proper inputs to obtain a desired position are difficult to predict. For example, without feedback, give the arm a certain amount of power (input a finite amount of energy into the system) and ask, "What is the current position of the arm?"

Reverse engineering the system and creating a valid model are invaluable for robust control. The physical trajectories of the system are calculatable, but the non-linearities of the system, such as various types of friction, are hindering control algorithms. I’ve been tasked with measuring and modeling these non-linearities.

About the robotic arm:
I’m working with a prototype arm that is not self-contained in order to access all of the control boards (DSPs) and ribbon cables that connect each joint together. The DSP boards are used to control the geared DC motors and rotary position encoders that are externally mounted on the arm. The DSPs are programmed in C++ with functions that can be called by the ARM-based microcontroller that is also programmed in C++.

In order to debug code and extract data from the system, the DSP and microcontroller are capable of two-way communication and the microcontroller can send data over a serial connection to the PC. I can measure the current input to each motor (calculated from the voltage across a shunt resistor compared to the voltage across the motor calculated from the PWM signal) and position of the motor with respect to time.

For those who are interested, here’s a look at some of the components I’m using to control the arm:
Texas Instruments TMS320F2808 (5)
NXP LPC2294 (1)
Faulhaber DC Minimotors with optical position encoders (5)

In no particular order, my lofty goal by the middle of August are to:

  • Develop a warm-up procedure to ensure consistent results
    • Develop a quantitative measurement (not solely time-based) of when the robot is ‘warmed up’
  • Measure current using built in measurement chip as well as an oscilloscope of voltage across the shunt resistor
  • Based off of results, choose a frictional model for each joint and analyze using MATLAB
  • Possibly develop a self-calibration C++ function of frictional constants that’s included in the robot warm up
    • A self-check and indicator when calibration is required

As I have just started working with the arm, I have more wild ideas than absolute plans, and feedback is graciously welcomed on my above ideas.

I feel that this type of time constrained project is a great example of a way to learn or teach mechatronics. I have had experience with microcontrollers, programming in C, design and physics, building mechatronic systems, but for this robot the chips, development software, chip programmer, electronic setup, even language of some menus are different (I am in Germany after all).

Adapting quickly to a project and to know enough concepts about an entire system — the electronics, software and hardware components — in order to start solving problems quickly and efficiently is at the heart of mechatronic design. I know I’m far from being a mechatronics expert, and I’d love to know what you think!

Comments (0)
Industries:

The USA at War = Military Robotic Innovation

Stefan Wolpert
Posted by Stefan Wolpert on April 17, 2008

There is no doubt about it: Robots are destined for use on the battlefield.

Researchers are trying to find the best mechatronic device to fight, investigate, cover rough terrain, survive explosions, and a myriad of other possibilities.  Who is to stimulate this research?  For the development of military robots and drones, the government funds many public and private companies.  One of the major backers for military research and particularly military robotic research is the Defense Advanced Research Projects Agency (DARPA).  A different approach to stimulating robotic development is the private Google Lunar X PRIZE aiming to stimulate private space research (I discussed this in a previous post).  However, this robotic space competition does not include funding, but instead a large prize as an initiative.  Which method of stimulation will be more successful?  Most likely, the companies working toward the Lunar X Prize are bootstrapping and have some funding, but do not have as many resources as the government-funded companies.  Judging by the development of companies and the funding for military robotic research, providing funding up-front seems to spur greater interest.

DARPA has an annual budget of about $3.3 billion (out of the Department of Defense’s approximately $550 billion budget).  This number makes it apparent that Washington wants new technologies for US soldiers (maybe to replace them someday?).  Doing a cursory search of government agencies, I find the Department of Energy (DoE) has an annual budget of $23.4 billion dollars.  How much of this is invested in alternative energy sources?  There’s about $1.3 billion allocated to the Office of Energy Efficiency and Renewable Energy (EERE) for "promoting America’s energy security through reliable, clean, and affordable energy," while $9.1 billion is budgeted for the National Nuclear Security Administration (NNSA) to meet defense and homeland security-related objectives.  I am sure (and I hope) there are many programs for alternative energy, but DARPA’s budget seems very large in comparison to the EERE’s.  Replacements for humans on the battlefield must be a priority for the US government.

Boston Dynamics BigDogThere are an increasing number of companies and developments in the area of military fighting and reconnaissance robots.  This is certainly not a bad thing: much of our history reflects great technological advances during times of duress.  Companies such as Boston Dynamics are making advances in studying human and other animals’ motion, simulation and robotics application.  The flagship of their robots in development is the BigDog, proclaimed as the most advanced 4-legged robot on earth.  See the robot recover after someone tries to push it over at 28 seconds in this YouTube clip, and its slip and recovery walking on ice at 1:24 in this most recent YouTube Clip.  Someday I imagine this robot running twice as fast as a dog (BigDog currently travels at about 4 mph) and having Terminator-like strength and skills.  I think the biggest obstacle is obvious if you watch a clip: BigDog seems to be incredibly loud.

Boston Dynamics RHex I think RHex, another of Boston Dynamics’ robots, covers an impressive variety of terrain at an astonishing speed with amazing agility.  I am impressed by the unique approach of its spinning legs to go through mud, cross water and, with flippers, even swimming like a fish.

Foster-Miller TALON robot, SWORDSFoster-Miller’s TALON robot comes in a variant known as the Special Weapons Observation Reconnaissance Detection System (SWORDS) that has a variety of weaponry options of a rifle, machine gun, grenade launcher or an incendiary weapon.  It was reported that the first armed robots were deployed in Iraq, but it unknown whether they are undergoing test maneuvers or are in active combat.  The robots are quick, reportedly capable of "keeping pace with a running soldier," able to climb stairs, plow through snow, and are super-tough.  To get more details, see Foster-Miler’s detailed TALON product page.

Some research programs at universities are also working on developing military robots.  One (although dated) publication funded by DARPA was titled "ARMS (Autonomous Robots for Military Systems): A Survey of Collaborative Robotics Core Technologies and Their Military Applications" in 2001.  Also, DARPA’s most recent Urban Challenge and previous Grand Challenges in 2004 and 2005, have spurred collegiate teams from various universities to build systems to control road vehicles autonomously.  This is an effective method for college students and engineering departments to become involved in the development of autonomous systems.  In general, the large defense contractors, including Raytheon, Lockheed Martin, Northrop Grumman, General Dynamics and many more, are always seeking the best and brightest engineers to join their company.  DARPA helps to expose engineering students to defense-type projects, such as the DARPA Grand Challenge.

Graduating engineers going to work in the defense industry is undoubtedly important for maintaining our security and technological advantage over other countries, but I also feel that the government should have programs similar to DARPA in other fields.  DARPA’s involvement in colleges and universities has funded and spurred many research projects in academia, and there should be a large investment in programs to spur research in other fields, such as alternative energy.  DARPA was created in 1958 in response to the Soviet Union launching Sputnik, among other things.  We should not need a scare such as Sputnik to launch a government agency to formulate and execute research and development projects.

Comments (1)
Industries:
previous next
Advertisement
Advertisement

Design News Partner Zones

AnarkCAD/CAE Model Clean-Up: Reduce Iterative Cycles
This webinar featured research and survey results related to problems associated with preparing CAD geometry for CAE applications.  We discussed how Recipe-Based Automation can help create "just-in-time" CAE-ready geometry each time a cad model is updated. Watch the Presentation


Light Matters: Systems Level Approach to HBLED illumination applications
Its good practice to apply a systems-level approach to high-brightness LED (HBLED) illumination applications. Minimally, the system includes the optical, thermal and electrical characteristics of the of the HBLED, the lens (if any) which is built-in to its package, secondary optics such as external plastic lenses/reflectors to direct the light as your application requires and power driver electronics. Read More


Design Engineers' Portal for Sensing and Machine Safety
Whatever industry you're in, or whatever product you manufacture, the right sensors to automate your plant, and to improve your overall efficiency, quality and safety are a must. You'll find Banner Engineering to be an amazing resource of products, training and people with expertise.

Design News Partner Zone Directory »

Please visit these other Reed Business sites