RoBeast: Using Arduino Research Application

A very official name plate.
Open source technology is a beautiful thing. Not only does it let me design more effectively it also allows me to purchase components at a cheaper cost.

In comes Arduino and every other knock off brand you can think of to claim the micro-controller market. Arduinos are fantastic devices. They are cheap, relatively powerful and easy to use. They remove a lot of the programming overhead that many ARM based micro controllers have. 

Side view of Control box.
This summer I am doing research with a professor at my university. We are going to be building a UAV for insect tracking. In order to strip down the weight of the system, a grad student has designed antennas both the transmit and receive antennas to increase performance and decrease weight. 

One problem is that we are having a tough time measuring antenna performance. We have an anechoic chamber for conducting antenna testing but our positioning system is currently not working properly. It isn't a terribly complex system but there are some tricky bits that need to be properly addressed otherwise the system could become even more damaged or lack the precision we need.

The RoBeast in the chamber.
The control system is affectionately called the RoBeast. It was built back in 1990 and the first control system was designed using BASIC. The amount of code used is absolutely crazy clocking in at around 33000 lines of code. The second iteration of the control system used MATLAB and serial ports on the controlling computer.

Unfortunately a few years ago the MATLAB controller system stopped working and the grad students that set it up have since left making it tricky to troubleshoot problems. There is roughly four to five thousand lines of MATLAB code that is sorely lacking in comments. It also uses what is called mex files. Imagine compiling C code with MATLAB to make things run faster and to access the parallel ports except none of the files provided to you will compile. All in all trying to troubleshoot problems with the system was a complete disaster. 

Gecko Controllers on top of butchered Centroid power supply/
I spent most of a week trying to figure out what the code even does. After failing to get it working I decided to scrap the entire control software and start from scratch. This allowed me to design the system from the ground up with ease of use, ease of troubleshooting and lots of comments in mind.

This is where I was fortunately able to pick a very simple system (relative to my other options) to design the control software. I wanted to use a micro-controller that almost anybody could use without much training thus resulting in my selection of an Arduino. Due to the pin requirements (4 pins per motor controller and many limit switches) I have selected an Arduino Mega. It will most likely end up being a knock off since they are a fraction of the cost with the same performance.

Testing characteristics of the antennas.
My trusty arduino and I set off last week on rebuilding a broken system. The existing hardware is a metal frame that has screws, pulleys and stepper motors to adjust the position. What I have had to do is write the code to create a command line control system using serial communication as well as actually creating the signals to move the sy

Creating the signals for moving the system was trickier than I had originally expected. Since they are stepper motors we can know how many steps we have taken. The only problem is that if we go to fast we can slip steps. If we go too slow it will take forever to move the positioner. For rotating the top plate it takes 100 steps to move 1 degree. To move the system in and out of the chamber it takes 3000 steps for 1 inch of movement. If you do 50 steps per second it will take an incredibly long amount of time to move. So we need to create a waveform that lets it accelerate, move, decelerate and then stops. Easy conceptually but much trickier to implement.

I managed to get some of the movement functions working and so it really just comes down to perfecting the controller code. We should be able to connect the control system to our Vector Network Analyzer this week to collect some data!

On to taking measurements!

Custom made 10 GHz antenna.


Popular posts from this blog

Ongoing Linux Cheatsheet

Data Processing: Matlab, Python or Octave?

Baremetal Drivers: RFM69HCW and FRDM-K22F