Build a Cheap 24V 20A Battery Charger

I have a 24 volt battery bank I use to run an off grid well pump. On cloudy days, sometimes I want to run the well to test out sprinklers, etc. So I wanted a battery charger that could put out 20 amps if I connect it to my generator. Ends up you do not go to Wally World and get a cheap 24V battery charger. The ones I found were expensive, and put out less then 20 amps. So I bought a used 24 volt transformer on eBay for $50, got a 40 amp diode, cut up some wood I had in the corner and put it all together to see if it would get the  job done.

The diode PN I used is FERD40H100STS. When I hooked it up, it worked well. With the well pump running and the battery bank voltage dropping to about 22V, this charger was pumping about 450 watts into the battery bank. Close to the .5 KVA rating for the transformer. As the batteries charged, the power went down. Once the batteries were mostly charged, it was putting out about 200 watts. The plate the diode is mounted to is the positive out, the other wire coming out of the transformer is the negative connection. As you can see, I have 1/4 ” bolts for the + and – so I can put jumper cables between the charger and the battery bank.

If I had to build it over, I would have put a fuse somewhere (you should), and would have made the plate the diode is on bigger (it gets hot).

I have some extra diodes. If you PayPal $4 I will drop one in the mail in the USA. Or you can find them online. The main thing is to watch eBay or such sites and find a good deal on a used transformer. New they are pricy.


Posted in Uncategorized | Leave a comment

Cheap Trick to Remove a Frozen Ferrule

Replacing a leaking cutoff valve for a toilet or faucet is pretty simple, expect for when the old ferrule/compression ring get stuck on the water pipe. This happened to me the other day, and I did not have a puller tool available, but an idea popped into my head that I might be able to use the old valve to pull off the frozen ferrule. I gave my idea a try, and it worked. Here is what I did:

It ends up 1/4″ washers fit perfectly inside the old valve. I put enough in so that the end of the pipe will push against washer and the nut will pull on the stuck ferrule.

Tighten the nut until the ferrule hits the valve, take the valve back off, add another washer, and repeat until the compression ring is almost off the end of the pipe.

Now a gentle twist and pull should take the ferrule off. Clean up the pipe with some sandpaper, and you should be ready to put on the new valve.

Posted in Uncategorized | Leave a comment

Running a Digi TransPort WR11 XT on USB, 12V and 24V power

Update 2

Digi has a new product to address this need.
Digi PN: 76000976
I have it running in the field for about a month with any issue.



This setup worked great while running in my workshop, but once put into service in the countryside, the WR11 went dead after about a day. My best guess is the cell signal is weaker/different in the countryside and the WR11 might really pull some big power at times, more then the USB charger can supply. Now that the days are longer and the rain has gone, I have moved the WR11 back to AC power. I will continue to work on this project to get ready for next winter when I need to use power judiciously.


I have a remote hobby ranch that I monitor over the cell network. I have found the Digi TransPort WR11 XT to be a solid way to get a connection to the cell network for sending logging data back to a central server. Long story, but in the end running the WR11 on AC power was not good situation as the primary power is a 24V solar system. It ends up the most difficult part of the project was tracking down the special locking barrel connector Digi uses. After ordering a handful of connectors, paying shipping, and waiting after each to arrive and not fit, I finally found the right one:

Mouser PN: 806-KLDX-PA0202-B-LT

Below is a cable I made with the locking barrel connector.
Specs say the WR11 can use up to 15W of power, so to run on my 24V solar system, I used a 2.4A 12V – 24V cigarette lighter style auto USB charger. I run on one SIM card and find the power usage stays under 3W. Time will tell if I will need to find a beefier USB charger, but so far so good. So if you find yourself trying to run a WR1 XT on DC power, the connector PN above may save you the time, hassle and money I spent.

Posted in Uncategorized | Leave a comment

Script to Limit Number of Files in a Directory

I have some jobs that run and will fill up disk drives if not pruned.

I put together the simple script below that I can call with a directory and the number of files I want to keep. The oldest files will be deleted. I add it to cron jobs with a command in this pattern:

~/ ~/public_html/FrontDoor/Camera\ 01 200
Note: there are 2 params, the \ escapes the space before the 01
Copy into


for line in `ls -t "$1"`
  if [[ $Cnt -gt $limit ]]
    rm "$dir/$line"
    echo "rm $dir/$line"
  Cnt=`expr $Cnt + 1`

While I know this is not the most professional way to do this, I wanted something very simple I could play with and should have few dependencies so I could use it on shared servers that I do not have control over.

Posted in Uncategorized | Leave a comment

Lessons Running IP Security Cameras Off Grid

On a small off grid hobby ranch, running IP cameras to keep an eye on things proved a bit trickier then planned. Durning the summer the solar panels produce enough power to run a well, a data logger, a camera and a cell modem to send data once an hour.

In the winter however, the shorter days, lower sun angle and rainy, cloudy days dramatically reduce the power produced. The well system is designed to only run when enough power is available, but the data logger and camera run 24/7 and can run down the batteries and cause a system shutdown after a string of cloudy days.

In looking over where power was being consumed, an IP camera running on PoE (Power over Ethernet) from a PoE switch was consuming 10 watts 24/7 and pushing the system over the edge. So I set out to measure the different ways the camera could be powered and see if the consumption could be reduced. Below are my measurements:

Camera: HikVision DS-2CD2032F-I, Switch: TP-Link TL-SF1008P
PoE switch only 2Watts
Switch & 1 camera day (IR LEDs off) 6W
Switch & 2 cameras day 9W
Switch & 2 cameras 1 day, 1 night (IR LEDs on) 11W
Switch & 2 cameras night 13W
1 camera running on 12V power plug day 2W
1 camera running on 12V power plug night 3.3W
Non-PoE Switch TRENDnet TEG-S80g running on 5V DC (not on 120VAC wall wart)
No ports on .85W
1 port active 100Mbps .9W
2 ports active 1-100Mbps, 1-1Gbps 1.2W
3 ports active 2-100Mbps, 1-1Gbps 1.3W

So it looks like like the lowest power operation can be found running without PoE or AC but instead using the DC power plug, staying in day mode if possible and finding the lowest power non-PoE switch you can find. When running on-grid, these type of power differences do not amount to much. But when running on a small off-grid solar system, every watt counts.

Here is a site with lots of info on deep cycle batteries I found useful:

Posted in Uncategorized | 1 Comment