Andrew Que Sites list Photos
Projects Contact

April 20, 2015

Happy TCD!

   Show today at Elmwood Park.  We had three bands that put preformed in the garage and had a decent turnout for the event.  Concerned about how loud the bands would be I walked around the outside of the house several times throughout the night.  While I could hear the music, it wasn't loud.  No one complained, and I don't think anyone will.  So hopefully this is a first of many.
Ottoman Empire soldger from the Great War

Ottoman Empire soldger from the Great War

The Sun-Dragon has two flash devices for file storage. The operating system is located on an 8 GB eMMC and the data for the website held on a 256 GB micro SD card. The 256 GB drive is mounted to /mnt/sd and contains two directories: lost+found and webpages. The lost+found directory is standard for ext* file systems. I had created a symbolic link in the root directory of the file system called webpages that linked to to the SD card directory. This works fine when all operations are done on the local machine. However, when viewed from a remote system the link wasn't showing up. Presumably the symbolic link was attempting to resolve a path on the non-local system—a path that did not exist.

The solution was to make a special mount point, a bind mount point. I first created an empty directory in the roof file system called webpages, and then mounted it with the bind option:

mount --bind /mnt/sd/webpages /webpages

That did exactly what I desired, allowing remote computers to access to the webpages directory. To get this mount point on system start I added the following line to /etc/fstabs:

/mnt/sd/webpages /webpages none bind

April 18, 2015

Step forward, step backward

   I got the Sun Dragon running the code on the I/O shield for monitoring currents and voltages.  I just had battery current and voltage to start with, but that was a good start.  To get this information to the Odroid, I wrote a simple PHP script.  The I/O shield's Atmel chip is setup for serial communications at /dev/ttyACM99.  The Atmel software writes data out once a second, so simply opening this port as a file and reading a line will result in getting the latest data from the device.  Since that worked, I modified some scripts I wrote for logging system statistics for the Blue Dragon.  They use a sqlite database to store data points about the Blue Dragon's CPU load, temperatures, fan speeds, ext.  With just a little tweaking I reused the same system for logging statistics from the Atmel chip.  A shell script calls my PHP script in a continuous loop.  Each time the PHP script runs it reads one sample from the Atmel chip and logs the data to the sqlite database.  On the Sun Dragon page I added graphs for the information I have available to log.
   With that all working perfectly I decided to work on the rest of the circuit.  I blew up two current sense op amps during this project.  Either I killed them during wiring, or static discharge.  (I'm a bad electrical engineer.)  However, I had been smart and ordered backup chips.  So using my microscope and hot air rework station I replaced the dead chips with new ones.  That did the trick and I started wiring the new setup.  Like an idiot, I left this setup plugged into the I/O shield during wiring.  I shorted 12 VDC from the battery to the ground for the I/O shield and promptly blew up the Atmel chip I had already replaced once for doing something similarly stupid.  My working setup is now dead, and I will have to replace the Atmel chip yet again.
   Lesson learned: do the development work on the development board.  When it functions, move it to the production hardware.
   Pictured is the Sun Dragon with the battery current sense and voltage monitoring functioning.
   I've been working on the software for the Atmel ATmega328 chip on the I/O shield of the Odroid—parts of the Sun Dragon.  I've decided the Atmel will do all the power control and simply make that information available to the main processor.  The first step is acquiring the data and filtering it.  In full daylight with the battery charger, the a PWM controls current into the battery.  The current sense op amp is fast enough to see the turn on/off of this switching.  Rather than try and filter this out with hardware, I filter this with software.  One thing about the Atmel compiler I've found is that it doesn't complain when you run out of memory.  My average buffers had grown too large for the device, but rather than print a link error, the software compiled, loaded into the device, and then did nothing.  That surprised me.
   The code I developed is given a couple of calibration points to in order to determine voltage or current.  I use fixed-point math for everything, so the average always collects samples in powers of two.  Taking 1024 (210) samples at one a millisecond results in roughly a 1 second average.  This gives a pretty good indication of what the current or voltage was for that period.  I let this run for the night on the Arduino.  Tomorrow I'll put the code into the Atmel chip on the I/O shield of the Sun Dragon.
   A shot I did of Raven the other day.  She is posing with Matt's harp and I set the shot up rather quickly as I was taking other pictures.  I did a diamond shot and managed to get some nice motion from the bottom left moving up and to the right, and then back to the left again.  For not spending much time with it, I don't think the composition is not too bad.
   The far bench of the lab.  This is where Pluvius (the laptop) usually sits.  Those bench tops are usually fairly clear unless I'm really making a mess with some project I'm working on.  Under the benches are storage for computer parts, and I have far more than I need.
   The Sun Dragon continues to run under solar power.  Today was partly cloudy, but still had a solid amount of daylight.  Because the ammeter was setup with loss wires I took the Sun Dragon down, but I don't believe it had any problems aside from that.  I haven't done too much work on the setup itself other than secure the power cables in the basement.  Still not entirely sure where the served will be permanently located, but until the circuitry is complete I am not going to worry about this too much.  Since the server will no longer live on the roof, I've been rethinking how to do the controls.  For now, I am manually keeping on eye on battery voltage.  In theory if the system is truly able to run off solar power the battery voltage should not drop over time.  If it does, that means the solar panel is not recharging the battery enough to keep the system powered.  If the power is more or less the same, the system is then maintaining itself.  Time will answer this question.

April 11, 2015

The Great War at Midway Village, 2015

   The house took a trip to Midway Village in Rockford, Illinois for their annual Great War event.  I started going to this event 3 years ago and have been trying to learn much more about World War I.  It's interesting the most people I know can only tell you that World War I happened before World War II, but not much else.  So I've made it a point to try and understand the causes of this war, the fighting that took place, and the effects the war had in the years following the conflict.  I think it can be argued that WWI set the stage for the 20th century, and truly closed the 19th.  With the war came the fall of the German, Russian, Austro-Hungarian, and Ottoman empires.  The map of Europe was redrawn, and in the years to come saw the rise of the Fascist Party in Italy, Stalinism in Russia, and the Nazi party in Germany.
   I stuck mostly with the biggest history gugu I know, my good friend Steve.  Together we talked to everyone who had a story to tell and spent the entire day from open to close getting our history on.
   Pictured is the last battle reenactment of the day, and the Germans are not doing well in their charge.