Andrew Que Sites list Photos
Projects Contact
Main

Today I tried to check on PiPi but found it wasn't responding. After I power cycled the device I still wasn't getting a response. So I went to the roof with a stiff brush and gave it a cleaning, but to no avail. While the device was booting it had no network connectivity. I had no choice but to bring it down from the roof and see what I could find.

The back side of the board looked bad. It was covered in powdery white patches. So I cleaned it with the alcohol. That didn't help. So I cleaned it was water and dried it right away. I was able to get it to boot once with an Ethernet connection, not often it wouldn't boot at all. After using a magnifying glass to inspect as closely as I could the components of the board, I could see all the solder on the back side of the board was gray and in bad shape. The top side of the board was fine. Clearly PiPi does not like the outdoors. While it has risen from the dead once before, I'm not sure I can bring it back again. For now, it is down.

August 30, 2014

Adventures in Cheap Ethernet Cable

Messy Lab at the End of the Night

Messy Lab at the End of the Night

A lot of work done today. I received the outdoor Ethernet cable that will supply the Odroid with both network conductivity as well as backup power. With my temporary setup I simply allow the cable to lay across the roof, but for the permanent setup I wanted something better. I found a style of Christmas light clips that are designed to hold strings of light to the roof by clipping to shingles. They are just a simple plastic clip and seemed to be exactly what I needed for neatly fasten the Ethernet cable. Turns out the clips I ordered are just the perfect size for the diameter of the Ethernet cable. Cheap, simple, and effective.

In the morning I ran the Ethernet cable and along the roof ridge, down along a vent pipe, along the garage roof, then paired it up with some coaxial cable down the side of the house, and finally into the house. For the run into the house I found the air conditioner compressor lines had a large hole that had been filled in with caulk. There was plenty of room in the caulk seal for my Ethernet cable, so I drilled a hole and pulled the cable through. After inspection I could see the black cable stood out against the white house and gray shingles. So I grabbed a can of white spray paint and a large piece of plastic. After covering an area of the roof with the plastic and placing the Ethernet cable on top, I painted the cable white. It took a bit of time, but now is only noticeable if you are looking for it. The cable has the added benefit of being located on the back side of the house, and only from a small area across the street can you see the cable at all. With a discrete run, and a caulked entry point into the house I think both the neighborhood and the landlord will not object to this cable's presents.

With the cable run it was time to test performance to the Odroid. The Ethernet cable is a really cheap outdoor Cat 6 cable I read many mixed reviews about. However, it was about half the price of all the others. Since the cable was never going to have a large network load (this is a web server that only has a couple megabits/sec to contend with) I figured cheap was worth a shot. I might have attempted my next test before I installed the cable on the roof and painted it. Alas, I didn't.

With the Odroid wired up for Power of Ethernet (PoE) I took setup to the roof. It consists of the Odroid, a 12 VDC to 5 VDC swithing power supply, and a PoE breakout cable. I spent a bit of time in the basement soldering together the pieces with a nice heat shrink covers over all the solder joints and had the setup looking pretty. Everything worked in the basement and it was off to the roof. There I plugged in the Odroid and... it didn't work. The red power LED was light, and the blue status LED blinked twice, but after that: nothing.

So it was time to trace down why things were not working. I started by bringing an external power supply. That did work, and I was able to get a network connection. I thought maybe the switching power supply was introducing noise into the Ethernet signal and tried comping a ferrite bead around the cable. That had no effect. I brought the setup back to the basement and tested the setup with an other 100 foot run of cable. But this cable functioned just fine. So the length of the cable was not the issue. However, the gauge of wire used in my cheap outdoor cable might be an issue. The long run of Ethernet cable might be causing too much resistance for the current draw. With my new power supply I could test this.

The setup was to use my power supply in a current limiting mode and see if I could reproduce the symptoms I saw on the roof. Sure enough I was able to see that if the Odroid was unable to get the necessary current it would function up until it tried to switch on the Ethernet port. This was just after the two flashes of the blue LED. In fact, at the very moment my power supply went into current limit, the red LED on the Odroid flash off briefly. On the oscilloscope I could see the power sage for about 100 ms.

My first solution attempt was to add a capacitor before on the 12 volt side to see if maybe spikes in current were knocking out the system. So I cut up all the nice heat shrink I installed to run a test. I was able to setup a situation with my power supply were a large capacitor did allow the Odroid to boot when it otherwise could not without the capacitor. However on the roof this did not help. I tried placing the capacitor on the 5 volt side, and adding more capacitance. No luck. I could either not supply enough capacitance, or the 100 foot run of cable simply could not handle the current.

Thinking the average current might be the problem, I decided to increase the PoE voltage. I had purchased a cheap 12 volt supply that was basically a cell phone charger but at the higher voltage. However, I had a bench power supply and I already knew the switching DC-DC converter could handle up to 20 volts with no problem. So I decided to power the PoE from my bench supply at a higher voltage to see if that helped. There was one problem though. My Ethernet hub is not near my bench power supply, and I didn't have a good way to bring the two together. My solution was far from elegant, but it was functional. I hooked my lab supply to an extension cord using alligator clips from the supply to the extension cord prongs. On the other side I used paper clips jammed into the outlets and more alligator clips to direct the power into the PoE adapter. Ugly, but functional enough for a test.

The results were a functional Odroid on the roof. While I started at 20 volts I found I all I needed was 14 volts—12 volts just wasn't enough to get the total wattage necessary to the roof. It was not my cheap power supply either. My bench supply could provide plenty of amperage, much more than the cheap 12 volt supply. The cheap Ethernet cable has smaller gauge wire than is allowed for category 6 cable and I had already read that complaint in the review feedback for the cable. I just didn't figure it was going to be an issue like it was.

Nonetheless, I have a solution. I will have to select a new PoE power supply, and it will be harder to find one at this odd voltage. However, the Ethernet cable will function and the PoE will only be used when the setup doesn't have enough stored solar energy to run. It has been a long trying day, but I found a solution.

August 29, 2014

128 micro SD solution

What a Strange Wall?!!

What a Strange Wall?!!

   The forums for the Odroid came back with a solution pretty quick.  After following the directions I soon had the Odroid booting form the eMMC card and using the micro SD for storage.  What it looks like happened was the in /etc/fstab the eMMC card was being mounted as root by using it's /dev/ name.  However, when the micro SD card was installed, it became the first device.  That caused root to be mapped to an empty drive and the boot sequence could not continue.  The solution was to reference the drive by UUID for mounting.
   There is an oddity here that I think I was lucky in overcoming.  After I failed to get the device to boot from the eMMC I decided to install the OS on the micro SD card.  Since this is an image it actually has the same UUID as the eMMC because they are based on the same image.  However, since I installed the OS on both devices, it ended up working.  However this was making it difficult to mount both devices on start up.  I discovered the UUID was stored on the disk and could be regenerated using tune2fs.  That gave the SD card a new UUID and allowed everything to function correctly.
   An electrical engineer at work was nice enough to take time and talked to be about how to do a current measurement circuit and recommended a part by Analog Devices.  Rather than build a more complex op amp circuit where resister tolerances are critical I could just use a ready made part.  When I got home I looked it up and found it was only available in a surface mount package and not through-hole.  Looking around I found an other part that also did current sense but connected directly to the SPI bus.  It too was also only surface mount.  I couldn't find a socket that would convert the surface mount part to through hole either.  So now the question is do I buy the part and try my hand at soldering on leads or not?

August 28, 2014

128 GB micro SD Problems

   Today my 128 GB micro SD card arrived for the Odroid.  This will serve as primary storage for the device.  Currently DrQue.net span 61.5 GB of space.  Most of that space (48.3 GB) is for the my photography and that grows steadily.  So 64 GB of storage wasn't going to be enough, and the next increment was 128 GB.  To be honest I was surprised micro SD came in a size this large, and the price not outrageous.
   After getting the device formatted I plugged it into the Odroid and... no.  After some investigation I found the Odroid refused to start with both the eMMC and the micro SD.  As the system boot, it would halt in the space place every time about 3 seconds into the boot sequence.  The device wasn't locked up.  The blue status LED continued to blink and I could even switch to other consoles (none of which were ready to do anything).  After trying a few things I figured this was a question for the Odroid team.  I was pretty sure that would be able to figure it out faster than I could.
   A few other parts also arrived.  I picked up a breadboard so I could start working on a current measurement circuit.  With an op amp and a 0.01 ohm shunt I went to work, only to conclude there was no way I could use this small of a resister.  The voltage across the resister for the power I was drawing was in the micro volts.  Time to consult was electrical engineers at work and figure out a better solution.

August 27, 2014

FFTW with threads

   In a continued attempt to stress the Odroid, I went back to trying to make FFTW work threaded.  My problem was I was using the old version of FFTW, and not version 3.  After installing the version 3 package the threaded functions were all available.  So after some more work I had a threaded version FFTW compiling.  Problem was, it wasn't running in parallel.  I had a single core running at 100% and the other cores running at a tinny load.  Thwarted again.
   Pictured is my bike after an 11 mile evening trip.  On the back is a solar battery I use to keep my cellphone alive on long bike rides.  The solar panel probably won't help much during the ride.  I only need the battery when the phone is tracking the trip or being used for navigation.  On multiday trips my phone won't run all of the time and the solar cell should help put energy back into the battery.  We'll see how well that works in practice.  I have yet to mount the battery on the back bag, but have some hook and loop fastener strips I plan to adhere to both. 
   From the bag a USB extension cable brings the power from the battery to the front of the bike and on the handle bars is a cellphone mount.  I've been making a lot of use of GPS tracking during my rides, and occasionally use the map for reference.  The clip does a pretty good job, but on rough trails the phone will slip.  I've never had the phone fall from the clip, but it does move around and need to be corrected.  The biggest problem is the placement of my volume and power buttons.  A good bump and the clip slides into them and can change volume or turn the phone off which is kind of irritating.  I have to keep the phone vertical because I found that if the screen rotation is on, the bumpy ride just rotates the screen constantly.  Aside from these issues, however, I like having the phone on my bike.
   Both the head light and tail lights on my bike are some of the brightest I could find.  My head light is 1400 lumens and produces an impressive amount of light, and the tail light has a 1 watt LED.  Both should help motorists know I am on the road, and I'd rather they notice me than not.

August 26, 2014

Ubuntu and VirtualBox

I've used VirtualBox for a few years now and I generally keep an Ubuntu virtual machine running in the background as a sandbox. Ubuntu 14.04.1 LTS is now out and I wanted to make the switch first with the sandbox before doing this with the server. Unfortunately the virtual machine didn't have enough disk space to do the upgrade. I tried doing some cleanup, but I couldn't free enough space.

VirtualBox has a method to resize the virtual drives assigned to a machine. It looks at through this is only a command line option. It's pretty easy to use and I found instructions here. However, after I did this, I found my drive wasn't actually extended. Turns out the snapshot I'm running is a different drive stored in an other location. Once I resized this drive, the partition was indeed larger.

I used a LiveCD and fired up Gparted. Very quickly I had the partition resized using the full new drive space. Reboot and done—more drive space. After updates I had a hard time getting the VirtualBox drivers to compile. It was missing the kernel header files for 3.2.0-54-generic and those were not found when I tried to install them. Turns out these are in a repository not normally in the list of software packages. I found this page to be useful which basically said I should add http://security.ubuntu.com/ubuntu precise-security main to the repository list. Once I did I was able compiled the drivers. The awful interface Unity restored itself and I had to get rid of that was well.

August 25, 2014

A Battle with a Creature Controller by She Who Burrows

A Victory and Encounter

A Victory and Encounter

   Our group had been battling our was through a zombie hoard spewing from the hole left by the black house we destroyed.  After defeating the first wave of zombies, Annalis scouted ahead to see what else we had to battle.  It was an other wave of zombies and skeletons.  In preparation, Ellenoria and Aster climbed to the top of the buildings to remain out of harms way.  Ellenoria sang a Song Of Battle and soon the group was slugging it out on the ground.  Our previous town's guard help, after their disastrous defeat the last battle, ran away. 
   Marv had a fantastic opening, killing a zombie in a single stroke and ripping the arms of a second in a single stroke.  Ellenoria fumbled her third round and was knocked out the remainder of the encounter, but the group battled on.  After a lot of work this next lot of zombies and skeletons were gone.  We started attracting a crowd who were watching the battle from afar, including our two cowardly town's guard.
   However, it was after we defeated this next lot we noticed what we thought was a pile of rubble was actually in motion.  It was made of parts of bodies including the tops of heads, and quite large.  This mass was moving at us and it was clear an other round of combat was about to begin.
   Most of the group was in good shape.  Ellenoria regained conciseness and sang a Ballad of Bravery.  Along with an impressive defensive bonus, the song added resistance to all fear effects which would prove useful for this encounter.  The battle was fairly brutal.  This creature when flanked could counter attack.  Annalis, who always tries to flank, was constantly dodging the tail of this beast.  Luckily the increase to bonus defense helped her not to get hit.  We could all detect some kind of fear, but were not afraid.  Turns out the protection from the song kept us from wanting to run away.  However, that was the only useful thing Ellenoria did.  Most of her attacks hit nothing.  Aster stood on the wall with me casting fairly effective attacks.  Andal was on the ground doing damage, but her hawk Doobie had to flee after an attack reduced him to near death.
   After the monster was destroyed it fell apart and had little booty.  Before going to search the site, a creature whispered in Ellenoria's ear "That was fun.  We'll have to do it again" before disappearing.  Ellenoria noticed the creature had IX on her head.  It is clear this is She Who Burrows, the powerful Void Creature who escaped from the Solarian Labs. 
   The group had won a great victory with a large crowd witnessing, and our names will not soon be forgotten in Ashbourne.  There are many question we now have.  However this day was over.
   New power supply arrived today and it was time to check a couple of numbers for the Odroid setup.  The DC-DC converter I have is suppose to take an input voltage from between 20 to 8 VDC.  For my solar powered setup there is a chance the battery voltage will be too low to continue to run the Odroid.  In this case the Odroid will switch over to a 12 volt supply that comes from power over Ethernet.  The Ethernet cable is around 100 feet long and the 12 volts will likely drop as a result.  I wanted to be sure that despite the voltage drop the DC-DC converter would continue to supply clean voltage as sufficient current.  Knowing the actual power draw of the Odroid this isn't nearly as much of a concern, but I have the tools for this test and it was a good first project for the new power supply.
   To test, the power supply is set to 12 VDC and connected to the 12 to 5 volt converter.  Monitoring the power output on the oscilloscope, and giving the Odroid a full CPU load I began decreasing the 12 volt input.  I could get down to just over 6 volts before the 5 volts output began to sag.  Even then the power was clean.  So the converter passed this test just fine. 
   I have worked with a number of variable power supplies as part of my job.  I am pretty happy with this one so far.  I decided to build a shelve to hold both the supply and my oscilloscope.  The heights of my shelves make installing a secondary shelve very functional, and both the power supply and the scope are at a good operating height.  It also happens the LED lighting along the top shelve nicely illuminates the test equipment.  I also added a strip of LED light under the new shelve.  So far I'm pleased with the setup.
   I setup the Ordroid to mirror all of DrQue.net through the use of sub-sub-domains.  I added this mirror server functionality several months ago by adding CNAME records for each sub-domain of the site that are all routed to the Blue-Dragon.  Right now the Blue-Dragon hosts it's stats page, proxies ππ, and all the sub-sub-domain mirrors.  I switched the mirrors to the Odroid and verified all of the sites of DrQue.net are functional.
   There was one more stress test I wanted to give the Odroid, and that was a heavy floating-point load.  The Exynos processor contains VFP and NEON float-point hardware.  I wanted to make use of the SIMD instructions of the NEON hardware provides and looked into an FFT unit that would utilize this.  I found The Fastest Fourier Transform in the South (FFTS) but after a lot of work trying to get it to compile I couldn't get it to properly compute an FFT.  So I switched to using Fastest Fourier Transform in the West (FFTW) which I have used many times before.  I managed to get a single threaded version to work, but I didn't get the threads working.  So I ended up not completing the full test.  However, the single threaded version ran with out issue.  It just didn't increase power draw much, and barely increased CPU temperature.
   The total light for today was the lowest I have ever seen it, registering only 683 Wh/m2 for the entire day.  It has been close to overcast with high humidity and haze.  Although it rained a little off and on today was far darker than any rainy or cloudy day in my records. 

August 22, 2014

Measuring Loaded Odroid Power Draw

   I have some time before the parts arrive for my next part of the experiment, so I thought I'd make the Odroid sweat a little.  The purpose was to put a full CPU load on the system and see what the power draw was like.  I wrote an article in 2010 about using threads to search for prime numbers.  This test will saturate the CPU with integer operations for more than an hour and will be a good test. 
   The primes test will keep the CPU busy.  In addition, I wanted to load the network.  So I copied a 60+ GB file from the Blue-Dragon and sent it to /dev/null.  Using iftop I could see the Ethernet port holding about 92 Mbits/sec.  And htop showed all four cores holding a 100% load.  Using my amp meter I could saw power draw sustaining about 4.4 watts.  What I also noticed was the CPU temperature climbing to 70 °C.  The Odroid ships with no fan and I've found it generally operates about 50 °C.  Climbing to 70 °C is a bit much, so I put fan on it for the remainder of the test.
   As a web server, our low traffic and the low CPU requirements of being a web server means 4.4 watts will probably never take place.  Nonetheless, I have a number for the highest power draw.  The Odroid U3 is rated for 10 watts.  However, I run the device without anything plugged into USB, and no monitor.  I assume these devices could require the extra power.
   Pictured is the church in the town of Ashton.  I've biked by this large Gothic revival several times and I've been meaning to find a context to shoot it.  Today was hot and muggy and I put off my ride until the evening.  While it hadn't cooled off much I at least didn't have the sun beating down on me.  I took a tripod and spent about a half hour doing long exposures of the church.  I had hopped there would have been stars visible, but between the cloud cover and haze none were visible.  Nonetheless, I got a few good pictures and did some HDR mixes with a couple sets.

August 21, 2014

Preparing to make a current measuring circuit

   The next part of the solar power web server project for me to consider is power measurement.  I need to be able to monitor the voltage of the main battery so that if the power gets too low the server can switched to a wired power source.  So I at least need a analog input for voltage, and a relay output.  In addition, I would like to be able to measure voltage and current of all three pieces: solar panel, battery, and server.  Both the Raspberry Pi and Odroid have I/O so this can be accomplished, but it will require I build a circuit for scaling voltages.  The solar panel can range from 0 to over 20 volts.  This needs to be stepped down to 0-5 volts.  Measuring current involves running the power through a very small resister and measuring the voltage across the resister.  This voltage is not much and will require an op amp circuit to bring the voltage up to a useable range.  I know how this work theoretically, but I need to put this to practice.  So today I placed an other order for some bread boarding equipment.  The plan is to make and test a current measuring circuit, and then integrate this into the Odroid inputs.