Mar 062013
 

Analog computing in the dark!

I got interested in analog computers over the summer and ended up buying a Comdyna GP-6 off of eBay. They still make the GP-10 version and the Comdyna finds application in teaching labs and in control systems engineering. You can read about the history of the Comdyna GP-6 here.

The unit works and as a first computation I patched it up to simulate the Lorenz system.

The Lorenz system of ODEs is given by:

\frac{dx}{dt} = s (y-x)

\frac{dy}{dt} = r x-y-x z

\frac{dz}{dt} = x y - b z

The classic Lorenz butterfly results when s=10, r=28, and b=8/3.
Here’s the resulting program:

The “program” on the Comdyna GP-6.

And here are a few time-exposures of the program output.

The x-z plane of the phase space.

Another view of the x-z plane.

The x-y plane.

 

 Posted by at 6:01 PM
Jul 282011
 

— Update: Digilent got back to me and they are sending out a replacement board. Very quick and positive response. Way to go Digilent! —

I was planning on reviewing and the new chipKIT Max32 board and comparing performance to the Arduino Mega 2560, so I downloaded the modified Arduino environment and downloaded the blink demo to the board. Everything seemed to be OK, but there was no blinking light. This is pretty much the simplest program on the Arduino and all it does is toggle digital pin 13 high and low with a two second period. Most Arduino boards have a LED on pin 13.

Time to debug.  Probing around, starting at the socket for pin 13, I saw that the digital line was toggling, but I was getting no LED action. Let’s take a look at the chipKIT schematic. Here is the LED driver on the chipKIT. They use a transistor to drive the LED instead of driving it directly as on the Arduino.

The chipKIT LED driver for pin 13. They don’t load down the I/O pin. Nice.

OK, so let’s see what’s going on over at the LED driver.

Q2! Where are you?

What a bummer. Q2 is missing! I sent a note off to Digilent’s tech support and got a response in just a few minutes. I’m hoping that this is a one-off mistake and that they aren’t saddled with hundreds of bad boards. Did somebody forget to load a reel? I wonder who is making the boards for Digilent.

Anyhow, how about some benchmark action?

Let’s look at the time required to invert a 5×5 single-precision floating point matrix. The time for an Arduino Mega 2560 is 3.2 ms while the chipKIT only takes 260 us. That’s a speed up factor of 12.3. Not too shabby.

My intention for the chipKIT board is to upgrade Tobor’s brain for next year’s Sparkfun AVC with minimal effort. I can drop a Tobor shield onto the chipKIT, keep all of the Tobor code unmodified, and add a ton of processing headroom. That’s the theory, at least. Not all of the Arduino libraries are working on the chipKIT. Currently, (I think) I2C, interrupts, and servo need work. 

 Posted by at 5:00 PM