For the past day, www.DrQue.net, the photoblog/new section of the site has been running from the solar powered web server. When I am comfortable everything is working without issues, I plan on moving all web services from the Micro Dragon to the Sun Dragon. This is a major step.
Voltage/current monitor quit unexpectedly during the day. I restarted with monitor and it seemed to work just fine. Not sure what the problem is but I will have to keep an eye on it.
Had a problem installing webmin. As I was installing the dependencies, I had a package fail with the following error message
** initializing cache. This may take a while **
Can't locate loadable object for module AptPkg in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /usr/lib/perl5/AptPkg/Cache.pm line 6.
Compilation failed in require at /usr/lib/perl5/AptPkg/Cache.pm line 6.
BEGIN failed--compilation aborted at /usr/lib/perl5/AptPkg/Cache.pm line 6.
Compilation failed in require at /usr/bin/apt-show-versions line 43.
BEGIN failed--compilation aborted at /usr/bin/apt-show-versions line 43.
dpkg: error processing package apt-show-versions (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of webmin:
webmin depends on apt-show-versions; however:
Package apt-show-versions is not configured yet.
dpkg: error processing package webmin (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
I wasn't sure what apt-show-versions does, or why it was unable to find AptPkg with the includes. But after doing a quick search for AptPkg I found it is part of the Ubuntu package libapt-pkg-perl. That was already installed. So, I forced it to reinstall.
apt-get install --reinstall libapt-pkg-perl
That seemed to take care of the problem.
So current tracking on the Sun Dragon has been a major problem. It started when I kept blowing up high end operational amplifiers. They would work fine on the breadboard, but fry when I moved the setup to the Sun Dragon. I decided I was tired of the op amps and moved to using a 16-bit serial A/D. Again, this setup worked great on the test system but burned the chips up instantly when they were moved to the Sun Dragon. After some investigation and many replaced parts I made the discovery I didn't like. The charger system uses a common positive and several different grounds. By trying to measure the current I was connecting these grounds together and causing all my problems.
Aside from getting rid of the charger that I don't like, the only way around this problem is to use isolation. So, I ordered an isolated power supply and a synchronous serial bus isolator. My initial order was messed up as I ordered the wrong part. It was an isolator, but designed to be used with several other parts to do the isolation—not what I wanted. The correct parts arrived yesterday and I went about getting them setup.
The basics are simple. I have a microcontroller that talks to some 16-bit A/D chips using an SPI bus. To isolate the A/D chips that are doing the measurements, I need to connect them to an isolated power supply. And to communicate to these chips, I need to go through an SPI isolator.
The isolated power supply is connected to my normal 5 volt power supply, and generates a 5 volt supply for the A/D. Internally there is a high-speed oscillator that turns the 5 volts DC into AC. This goes through a transformer, which isolates the ground, and then converter back to DC. Both the isolated and non-isolated supplies go into the SPI isolator. This device is a high-speed bi-directional optocoupler—light is a pretty good electrical isolator.
My initial attempts to get the system working did not accomplish much. So I set the project down for the night and tried it again the following day. I had an idea, which turned out to be the problem. The isolated side of the SPI bus did not have pull-up resisters on the signals. Normally SPI signals are pull up, and whatever is talking will pull the signal down. This is generally done at the SPI master source. But the isolator keeps the source separated from the rest of the bus. Once I added some 10k pull up resisters, my SPI communications was working just like it should. I let the setup run overnight.
This morning it was time to integrate the isolated setup with the Sun Dragon. This is usually where stuff blows up. This time, however, everything worked as expected. The isolated A/D kept the grounds from being connected and now the Sun Dragon can manage its own current readings. That is a major hurdle for the project—long overdue but now functional.
The only part of the project that remains is the backup power relay. So far this summer I haven't needed to use any backup power, and the Sun Dragon has run for 96 days completely on solar power. However I don't expect that will be the case come winter when days are short and often overcast. I decided to change how this works as well. Rather than simply switch to a separate voltage source, I decided it would be best to also switch on the AC to that voltage source. Wall warts are notoriously inefficient, even when nothing is connected to them. So the ability to leave it without power until it is actually needed would be for the best.