Tuesday, July 4, 2017

Solar System Two

Trying to meet CPAP requirements:

http://www.healthyresources.com/sleep/magazines/psnews/power03.html

    here are the three parts:
the panels, order now on ebay ($160)

http://www.ebay.com/itm/Mono-Poly-PV-Solar-Panel-160W-100W-90W-40W-25W-10W-5W-12V-24V-RV-Boat-Camping/361878817780?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649

    Costco batteries:
    best is 140wh (2 70wh deep cycle costco batteries)

charge controller:

    http://www.ebay.com/itm/5-10-15-20-30A-PWM-Solar-Panel-Battery-Regulator-Charge-Controller-CE-12V-24VMS-/272672199604?var=&hash=item3f7c8793b4


extension cables:

http://www.ebay.com/itm/1-Pair-TEMCo-10ft-MC4-Solar-Panel-Extension-Connector-12-AWG-PV-Cable-Wire/281368913995?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649



Wednesday, February 15, 2017

Inexpensive Solar system

Solar panel Notes:
Optimum angle for solar
              Fixed--~30 Degrees
Two season
              Summer (march 30-september 12th)- ~8 degrees
              Winter (rest of year ~45 degrees).
Sites:
Note, angle for grid-tie is very different than off-grid.  (because you are watching for optimal energy generation the whole day.

For the mini off-grid installations, current position is good for winter (until march 30), lay on top during summer.

Batteries for mini-grid
System works for either 12 or 24 volt battery systems (however, you need different output systems for 24v)  For simplicity, I recommend all small systems stay at 12v.
You can use 2 6v batteries in series to get 12v, but they must be very very similar.
Checkout of Battery
Battery checkout is the most dangerous step.  It is a little safer to do battery checkout with a smart charger (from 110), but it can be tricky in other ways.  (I had fully discharged batteries take days to recover on a charger, but I think the charge controller would have quickly worked).
Do not attach a battery directly to an array of batteries.  (Even a good battery could rapidly charge, generating hydrogen, and explode, spraying sulfuric acid.)  Battery testing should be done outside.  Batteries should always be on a thermal insulator (like a piece of wood).  Lead-acid Batteries are not really a fire risk.  (all types of lithium batteries are a fire risk because they have ~10x energy density).
The Charge controller to battery hookup has clips for this reason.
#1 measure new battery voltage (should be between 9 and 12 volts, but not necessary).
#2 remove clips from exiting batteries and attach to new battery (battery should be at least 30#s).
#3 measure new battery voltage (do this during the day).  Within 10 min battery should be between 9 and 12 volts.  If battery is not quickly moving to 9 volts you may have a problem.
#4 Everything should work right away, but avoid placing heavy loads, and night use
#5 Every evening and morning check the battery voltage to get a feel for self-discharge and capacity.

Loads
The charge controller is a 42v 30A device.
That means that if any circuit goes over 42v and/or 30A, at least that part and likely everything fails.

So voltage open circuit (VOC) of the solar panels should be less than 42 volts.

Friday, September 11, 2015

More Windows 10

Removing OneDrive from windows 10

http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_files/how-to-uninstall-onedrive-completely-in-windows-10/e735a3b8-09f1-40e2-89c3-b93cf7fe6994?auth=1

Remember to clean up the registry afterwards.

Sunday, August 16, 2015

Windows 10

I've been updating my computers to windows 10.

Good:  generally works.  Particularly, on the slowest machine, seemed to work better.

Bad:  some driver issues.   bluetooth confused (thought it was USB, had to uninstall and reinstall a few time).

Bad: lots of advertising.

to get rid of stupid metro aps:

http://www.howtogeek.com/224798/how-to-uninstall-windows-10s-built-in-apps-and-how-to-reinstall-them

used the following commands

Get-AppxPackage *3dbuilder* | Remove-AppxPackage
 Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage
 Get-AppxPackage *officehub* | Remove-AppxPackage
 Get-AppxPackage *skypeapp* | Remove-AppxPackage
 Get-AppxPackage *getstarted* | Remove-AppxPackage
 Get-AppxPackage *zunemusic* | Remove-AppxPackage
 Get-AppxPackage *windowsmaps* | Remove-AppxPackage
 Get-AppxPackage *solitairecollection* | Remove-AppxPackage
 Get-AppxPackage *bingfinance* | Remove-AppxPackage
 Get-AppxPackage *zunevideo* | Remove-AppxPackage
 Get-AppxPackage *bingnews* | Remove-AppxPackage
 Get-AppxPackage *onenote* | Remove-AppxPackage
 Get-AppxPackage *people* | Remove-AppxPackage
 Get-AppxPackage *windowsphone* | Remove-AppxPackage
 Get-AppxPackage *photos* | Remove-AppxPackage
 Get-AppxPackage *windowsstore* | Remove-AppxPackage
 Get-AppxPackage *bingsports* | Remove-AppxPackage
 Get-AppxPackage *soundrecorder* | Remove-AppxPackage
 Get-AppxPackage *bingweather* | Remove-AppxPackage
 Get-AppxPackage *xboxapp* | Remove-AppxPackage
Get-AppxPackage *travel* | Remove-AppxPackage
Get-AppxPackage *reading* | Remove-AppxPackage
Get-AppxPackage *camera* | Remove-AppxPackage

Friday, February 20, 2015

Bash script for Cygwin to read in camera images from SD card

#this script does a nice job of reading in DCIM cards
#run with ./get_picts title
#it creates a folder with a date if the name is defaulted, appends drive name, then title.


#!/bin/bash
thisTitle=$*
getlabel() {
$(cygpath --sysdir)/cmd /c dir ${1}:\\ | \
    tr \\r \\n | \
    sed -n -e '1s/^ Volume in drive . is //p'
}

cd /cygdrive/c/DCIM
cd ~/DCIM
for i in e f g h i j k l m
#
#DIRS=`ls -d /media/matt/*/DCIM`
#echo $DIRS
#for thisTarget in $DIRS
do

    thisTarget="/cygdrive/${i}/DCIM"
    if [ -d "$thisTarget" ]; then
        driveName=`getlabel ${i}`
        echo  $driveName
        thisDate=$(date +%y%m%d)
        #echo $thisDate
        #echo $thisTitle
        thisDate=$thisDate"_"$driveName"_"$thisTitle
        echo $thisDate
        #read -p "Press [Enter] key to start copy..."

        if [ -d "$thisTarget/101ND610" ]; then
            mv "$thisTarget/101ND610" "$thisTarget/$thisDate"
        fi
        if [ -d "$thisTarget/101D3200" ]; then
            mv "$thisTarget/101D3200" "$thisTarget/$thisDate"
        fi
        if [ -d "$thisTarget/100D3200" ]; then
            mv "$thisTarget/100D3200" "$thisTarget/$thisDate"
        fi
        mv -f $thisTarget/1* .
        for jj in $(ls -d $thisTarget/* | xargs -n1 basename)
        do
            for kk in _1 _2 _3 _4 _5 _6 _7 _8
            do
                if [ -d $jj$kk ]; then
                    echo $jj$kk
                else
                    mv -f $thisTarget/$jj  $jj$kk   
                    break
                fi
            done
        done
        rmdir $thisTarget
    fi
done
find . -type d -exec rmdir --ignore-fail-on-non-empty -p {} \;
find . -name "DSC*.JPG" -ls -exec exifautotran {} \;
find . -name "IMG*.JPG" -ls -exec exifautotran {} \;
find . -name "DSC*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%-c '-filename<$CreateDate-$filenumber.%e' {} \;
find . -name "DSC*.NEF" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%-c '-filename<$CreateDate-$filenumber.%e' {} \;
find . -name "IMG*.PEF" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%-c '-filename<$CreateDate-$filenumber.%e' {} \;
find . -name "IMG*.PEF" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%f%%-c '-filename<$CreateDate.%e' {} \;
find . -name "IMG*.CR2" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%-c '-filename<$CreateDate-$filenumber.%e' {} \;
find . -name "IMG*.DNG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%-c '-filename<$CreateDate-$filenumber.%e' {} \;
find . -name "IMG*.DNG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%f%%-c '-filename<$CreateDate.%e' {} \;
find . -name "IMG*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%-c '-filename<$CreateDate-$filenumber.%e' {} \;
find . -name "IMG*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%f%%-c '-filename<$CreateDate.%e' {} \;
find . -name   "P*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%-c '-filename<$CreateDate-$filenumber.%e' {} \;
find . -name   "P*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M.%S%%f%%-c '-filename<$CreateDate.%e' {} \;




Thursday, October 31, 2013

Simple shell script to import photo's from SD card.



cd /cygdrive/c/DCIM
for i in e f g h i j k l m
do
thisTarget="/cygdrive/${i}/DCIM"
if [ -d "$thisTarget" ]; then
thisDate=$(date +%y%m%d)
if [ -d "$thisTarget/100ND610" ]; then
mv "$thisTarget/100ND610" "$thisTarget/$thisDate"
fi
mv -f $thisTarget/1* .
for jj in $(ls -d $thisTarget/* | xargs -n1 basename)
do
for kk in _1 _2 _3 _4
do
if [ -d $jj$kk ]; then
echo $jj$kk
else
mv -f $thisTarget/$jj  $jj$kk
break
fi
done
done
rmdir $thisTarget
fi
done
find . -type d -exec rmdir --ignore-fail-on-non-empty -p {} \;
find . -name "DSC*.JPG" -ls -exec exifautotran {} \;
find . -name "IMG*.JPG" -ls -exec exifautotran {} \;
find . -name "DSC*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M%%-c.%%e "-filename<CreateDate" {} \;
find . -name "DSC*.NEF" -ls -exec exiftool  -d %Y.%m.%d-%H.%M%%-c.%%e "-filename<CreateDate" {} \;
find . -name "IMG*.PEF" -ls -exec exiftool  -d %Y.%m.%d-%H.%M%%-c.%%e "-filename<CreateDate" {} \;
find . -name "IMG*.CR2" -ls -exec exiftool  -d %Y.%m.%d-%H.%M%%-c.%%e "-filename<CreateDate" {} \;
find . -name "IMG*.DNG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M%%-c.%%e "-filename<CreateDate" {} \;
find . -name "IMG*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M%%-c.%%e "-filename<CreateDate" {} \;
find . -name "P*.JPG" -ls -exec exiftool  -d %Y.%m.%d-%H.%M%%-c.%%e "-filename<CreateDate" {} \;

Thursday, May 30, 2013

Solutions – performance

Performance tuning is some of the hardest software you will do.


Always try to test your system with as much fidelity as possible. 

      And allow multiple levels of simulation.

Before you ship, measure how much spare performance you have

      Leave most of the debugging in the “test” release to slow system down.

Common fixes to performance cause other problems

Caching – uses more memory
Looping – increases latency


Do performance fixes First & Last

i.e. design for performance, code for maintainability
Debug for performance only if you must.

Its ok to remove the debugging in the final version to provide some performance margin