Andrew Que Sites list Photos
Projects Contact
Main
Andrew Que in the Lab

Andrew Que in the Lab

   At long last my inspection microscope arrived.  For a first test I went to work on repairing a Kindle that had a bad USB connector.  I had attempted to repair this some months ago for a friend, but didn't have the equipment.  I ended up soldering two USB leads together and gave up.  With the microscope and solder station I had what I needed and tried again.  Although still difficult I had much better luck and succeeded in installing the connector.  The Kindle was charging and seemed function... well, it that was until I knocked it on the floor with the charger plugged in.  That broke the connector again.  So I was able to make the repair even if the device insisted on being broken.
   The inspection station and solder rework station make a good combination.  I've wanted both for a long time and now that I've been doing electrical projects again I could justify the investment.  I found that 20x zoom was good for this project and I have three levels of magnification available: 10x, 20x, and 40x.
   Decided to take some pictures of myself in the lab last night, so here I am.

September 14, 2014

River Sprite Encounters Sahuagin

Riding Aboard the River Sprite

Riding Aboard the River Sprite

   The group was now aboard the River Sprite on our way to Newport, about a days journey away.  There was nothing special on the first day of travel.  Andal was sea sick, and the group discussed our ideas about keeping our true identity secret while in Twilight City.  That evening we awoke to heavy seas.  Reaching the deck of the ship we saw no weather, and there was not a strong wind.  Looking into the water we saw Sahuagin.  They were riding waves in a circle around the ship attempting to create a whirlpool to sink the vessel.  The first to see this was a new character named Scar, a raptor man in leather armor with goggles, opened fire on the enemy with a bow and battle began. 
   In the first round of battle Marv, who only attack at close quarters tried to balance on the bowsprit, but fell into the water.  Jam mannaged to throw a road and lasso Marv's arm.  Andal attacked using Sparky as a lightning source.  This caused Sparky to begin glowing, and then a bolt of lightning jetted out from Sparky to Andel (who was in the crow's nest) and then down to an enemy in the water.  The enemy exploded.  Marv continued to battle in the water and doing pretty well.  Scar used an action point and in a single round killed an enemy with a volly of arrow that would have made Legolas proud.  Ellenoria sang several Songs of Battle to the tune of old sailing songs, giving everyone a bonus to attacks.  One by one each enemy was destroyed. 
   After all the enmies were destroyed, Marv went to inspect the device the the Sahuagin were riding to create the whirlpool.  He discovered they were, in fact, tentacles from a much larger creature that is larking under the water.  The first fight was over, but the battle was about to go into a second phase.

September 13, 2014

Selecting a Holding Capacitor

Test Passes

Test Passes

   As stated before the solar powered web server will have a power source selection relay.  This will allow the server to switch to a power over Etherenet source should there not be enough solar/battery power to continue operating.  The relay I have selected states it has a 10 millisecond switch time.  During that time the server will be without power.  To compensate for this I plan to use a capacitor to store enough energy to keep the server running during the switchover process.  The size of this capacitor is what I need to calculate.  It must be large enough to keep the system powered for 10 ms.
   This calculation could be done mathematically, but it can also be done experimentally which is how I chose to do it.  The setup is fairly simple.  A capacitor is placed on the supply voltage just before the DC-DC converter.  An oscilloscope placed on the voltage fed into the DC-DC converter, and a second probe on the output.  The scope is setup to trigger on the falling edge of the input voltage and for a long interval. 
   The results of a test using a 100 µF capacitor are shown in this scope trace.  Each vertical division represents 10 milliseconds of time.  The trace at the top is the output of the DC-DC converter which should be 5 VDC.  The bottom trace is 12 VDC feeding into the converter.  To preform the experiment, the scope is setup to trigger for a single trace.  The holding time is the interval between when the 12 VDC begins to fall, and the 5 VDC begins to fall.  That is, the amount of time the setup is running without power.  Vertical cursors have been setup marking the location of the start of the 12 VDC drop (i.e. when power was removed) and the start of the 5 VDC drop (when power is too low to run the DC-DC converter).  In this experiment the 100 µF capacitor holds power to the running Raspberry Pi for 34 milliseconds.  This would be sufficient to sustain power during the 10 millisecond relay switch over.  I used the Pi because it's idle power is higher than that of the Odroid, and the Odroid is currently being a server for one domain and should not be switched on/off.

September 12, 2014

Test the Weather Proof Fixture

   Here is ππ's new case undergoing a submerged water test. The pipe wrench is just for weight to hold the case under water. On the top is a glass window for the lux meter.
   The results: pretty good, but there were problems. The case was mostly water tight. After more than an hour submerged there was a little water inside the case. The caulk I used on seal the glass did not hold up. Either I didn't allow the caulk to dry long enough, or it didn't like being submerged. The glass came right off after I pulled it the test out of the water.
   The new weather proof housing for ππ has arrived and it is time to put it together. I have to get an Ethernet cable inside the enclosure. I wasn't impressed with any of the weather proof connectors I found online, and decided to make my own. Here is what I came up with. This is part of a contact lens case. The lids seal water tight. I drilled a hole in both the lid and through the bottom of the container. This gives me a connector I can mount on the case. On the cable side I plan to use a bit of cork (from a wine bottle) and the lid of the contact lens case. When matted this should create a compressed seal around the Ethernet cable.
   The first step was cutting a hole and attaching the modified contact lens case to the enclosure. A lot of super glue does this. After the super glue dries, I will add a layer of silicon caulk that should create a water tight seal. We will have to see if this works after it is completed.
   Our new soldering station arrived today. It is a nice setup with both an iron and a hot-air rework wand. I have a couple of projects in mind that will need the rework abilities. After assembly I placed the station on the shelve with my power supply and oscilloscope.
   Our under-bench tool shelve is now installed and in action. I ran a strip of LEDs along the top for illumination and have placed all my basic electrical tools on this shelve. This allows me to work efficiently in this area of my bench on electrical projects as I have access to anything I would generally need within arms reach. The shelve is nothing fancy made of plywood, a coat of black paint and a couple coats of varnish. It should, however, be quite functional.

September 08, 2014

Odroid synchronization

   As the Odroid now has all the hardware components necessary for it to be a web server it is time to set it up to be a server.  However, testing is needed before any switch takes place.  The Odroid's 128 GB micro SD will be storage for all the websites hosted by DrQue.net.  I setup an rsync script to synchronize the Odroid to the Micro Dragon.  One of the problems with this is permissions.  The web server runs as the user www-data and since the users of the Micro Dragon are not the same as those on the Odroid I can't preserve ownership during the synchronization.  All the web pages are owned by www-data anyway so I wanted a way to force this user to have ownership for new files.  I accomplished this in a rather complicated manner.
#!/bin/bash

ID_FILE=`mktemp`
sudo chown www-data $ID_FILE
sudo chmod 600 $ID_FILE
sudo cp id_rsa $ID_FILE

COMMAND="rsync -rltv --no-p --no-g --delete -e 'ssh -o IdentityFile=$ID_FILE -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' user@drque.net:/webpages/ /webpages"

echo "*************** Sync webpages ***************"
sudo su - www-data -s /bin/bash -c "$COMMAND"
sudo rm $ID_FILE
    What this script does is first copy an SSH key that allows a no password log in from some location to a temporary file.  This file is then assigned to www-data with no read access given to anyone else.  This will allow www-data to log into DrQue.net over SSH without needing a password.  Then a command string is setup that uses the temporary file to the SSH log in for rsync.  Since www-data cannot normally log in it has no user directory, so the known hosts and strict host checking need to be disabled.  Once the command is setup, su is used to switch the user to www-data and run the rsync command.  The rsync command is setup to not preserve permissions or ownership, meaning all the files transferred will be owned by the user doing the transfer—www-data.
   We were suppose to continue our role-playing campaign this afternoon, but Xiphos' laptop decided to die instead.  Since all his character information is on this machine we had to postpone.  It may be the laptop requires some solder rework as apparently that is a common mode of failure on that brand.  Latter this week my rework station and inspection microscope should be arriving.  So perhaps we can bring the laptop back from the dead.
   A lot of work was done around the house today.  Xiphos and I cleaned up the garage and reorganized our wood collection.  It is now much easier to access.  I installed some new purple LEDs in my sleeping quarters.  The set I had were in bad shape after having to remove the waterproof covering because the ultraviolet light yellowed the waterproofing material.  I found a set that were double density, having 600 LEDs in a 5 meter strip rather than 300.  I decided to order a set and see how they worked.  So far, so good.  I will need one more set to complete the lighting.
   I also started working on a tool shelve for my primary work bench.  The board was cut, sanded and painted today.  A couple of coats of varnish and it will be ready to install.  This will give me an area to keep tools I normally need at my bench, such as wire strippers, diagonal cutters, ext.  But to do it right will take a couple of days.
   Early in the morning I rearranged my selves above the bench.  I wanted access to all electrical items right by where I would do electrical work, so I moved my bin of resisters and my bin of other electrical parts above my work area.  Once my new solder work station arrives I will likely add an other shelve to this setup, but I want to see about size before I do anything.

September 06, 2014

Design of the solar powered circuit

block diagram

Here is block diagram of the setup for the solar powered web server. It consists of 3 major components: solar panel, battery, and computer. In addition there is a battery charger, power over Ethernet, DC to DC converter, and monitoring circuitry. The monitor feeds current and voltage information back to the computer. In reality all power must go through the monitor so current can be measured.

There is also a source select relay. This relay is normally closed and directs power from the battery charger to the holding capacitor. Should the computer determine the battery voltage is too low, it can engage the source select relay and switch to using the power over Ethernet as it's power source. The source relay feeds a holding capacitor. Should a switch from battery to PoE or vice versa, the holding capacitor will maintain power until the switch over is complete. This time is in the tens of milliseconds which is long enough to need a holding capacitor.

The output of the holding capacitor feeds a DC to DC converter, which in turn powers the computer. The DC-DC converter can take a range of voltages from 8 to 20 VDC and dropping this down to a regulated 5 VDC. This allows the setup to run on whatever voltage comes from the solar/battery/PoE. Currently the PoE is 15 volts, which was required to overcome the current limits of the cheap Ethernet cable. The voltage of the solar panel can range from 12 to 17.5 volts, but will sag when a load is placed on it. With the battery charger I suspect the voltage should never get above 14 VDC.