Tuesday, 12 September 2017

Lead Acid Batteries - Measurement of Internal Resistance - V3 of Code

​After hours running various tests to determine when the voltage samples should be taken I concluded there was no right answer. Mind you, the sweet joy of using Forth to do this via the serial port was a reward in itself. ( Timing loops could be tested interactively, results displayed on the terminal window, etc etc. )

I settled on a longer delay before sampling the loaded voltage, or Vend in the code, then a short delay before sampling the unloaded voltage, or Vbeg in the  code. Because of the way the voltage depresses over time, then recovers, I doubt there is a right way to do this. But my training in Statistical Process Control and Gauge Capability steered me in this direction.

I now have a testing method that gives me repeatable readings provided each test is run hours apart. So while the calculated internal resistance might not be the value according to some standard it should allow me to discern if my pulse conditioning circuit has any impact over time on the internal resistance.

Over the next few weeks I'll run my trials and see what happens.

Monday, 11 September 2017

Lead acid batteries - Measurement of internal resistance - x4 resolution mod

The initial project used a voltage divider to reduce the measured voltage down to less than 5V. This means the voltage resolution is about 20mV which means the internal resistance measurement for 1 amp of current is 0.020 ohms.

Instead of dividing by 4 with a resistor string, what if we subtracted 10V from the voltage to be measured? This would give us a voltage resolution of about 5mV with an internal resistance measurement for 1 amp of current is 0.005 ohms. This seems like a worthwhile improvement and can be easily achieved.

I had never played with a voltage subtracter before but it proved to work first time. Reaching into the junk box I pulled out a NE5532 dual op amp. I had no reason to chose this device over any other except I had hundreds I had recovered from a couple of boards. A few resistors and it was done.

While I used a NE5532 and 2.4k resistors I don't think there is anything critical about this. Just about any op amp will probably work and the resistors could be anything between perhaps 1k and 100k. As long as they are all the same value.

As before I'll post the updated code over on Hackaday. While this is not yet the complete measurement tool I wanted it will allow me to make some measurements on the impact, if any, pulse conditioning has on internal resistance.

Sunday, 13 August 2017

Lead acid batteries - Measurement of internal resistance - Code

While working on a small hardware modification to improve the resolution of measurements it occurred to me that displaying an internal resistance of 0.2 ohms as 200 was easier to read than 2. I updated the code over on  Hackaday

Debugging a change like this is so easy with Forth, especially when a simple x100 instruction fails because the 16 bit integer maths overflows.


ps the hardware mod worked a treat giving a fourfold improvement in resolution. I'll describe it shortly once I've finished the soldering. It might even mean that no modifications to the board are required!

Saturday, 12 August 2017

Lead acid batteries - Measurement of internal resistance - Schematic

Once you have modified the W1209 board here is the schematic for the overall project as it stands today.

Richard VK6TT

Friday, 11 August 2017

Lead acid batteries - Measurement of internal resistance

Hams, listen up. With our short arm deep pockets mentality this is going to really appeal to you. This project takes a cheap assembly, $2 delivered, from China and turns it into a test fixture for measuring the internal resistance of small lead acid batteries.The project as it stands works very well. However, I've already thought of ways to improve it which I will incorporate in due course and report on.

There were two motivating reasons for this project. The first, and a long standing one, was to measure the internal resistance of lead acid batteries to see if some of the rejuvenate, repair or restore ideas I had come across had any objective merit. As a ham I have plenty of small lead acid batteries which I only require occasionally. I periodically float charge them and occasionally I have had to dispose of one via the recycling depot after cells have gone open or short circuit. Recently I began playing with a pulse conditioning circuit and initial measurements of internal resistance suggested there was some lowering of the internal resistance. But manually setting up a test jig and then remembering to take measurements has been a problem for someone so easily distracted.

So I was looking for a way to automate the entire measurement, conditioning and charging process to firmly establish if there was any benefit in pulse conditioning these batteries. Then I stumbled across the project at eForth for cheap STM8S gadgets • Hackaday.io which is one of the most exciting ideas I have seen in recent times. The thought of taking a $2 board, replacing the firmware, and doing something entirely different with it just thrills me. The more I use these gadgets the more ham applications I see.

This project uses the W1209 thermostat board, readily available for under $2. Delivered. Hams, listen up. What I did was make a few small modification to the board:
  1. remove the 20k smd resistor next to the sensor connector,
  2. throw the sensor in the junk box,
  3. add a 10k resistor across the sensor connector (underneath if a smd resistor or remove the connector if using a through hole resistor)
  4. add a 30k resistor (or two 15k resistors in series) from the upper terminal of the sensor connector to the +12v rail.
Then I built a 1A constant current load from a 5v regulator and two 10 ohm resistors. You probably have those in your junk box ready for a project like this.

At present my board works as follows:
  • after connection to the battery  I hit the "+" key to run the measurement routine. It takes about 1 second and in that time it reads the battery voltage 32 times, summing the result, activates the relay which increase the current drawn by 1 amp and takes a further 32 measurements of the battery voltage summing those results, releases the relay then saves these two sums into eeprom
  • I then hit the "set" key  and the display shows me the average of the open circuit voltage, the loaded battery voltage, and the calculated internal resistance.
  • If I hit the "-" key the run counter is reset to zero.
The current partially discharge battery I tested this project on had a beginning voltage of 12.8V, a loaded voltage of 12.5V, and an internal resistance of 0.2 ohms.  Why not 0.3 ohms? That's the result of scaled integer maths. The 0.2 ohms is the correct answer. e.g. 12.81 - 12.59 = 0.22. But the display only shows voltage truncated to 0.1v.

My longer term goal is a test fixture that repeats daily a charge of the battery, measure the internal resistance, then applies the pulse conditioning until it is time to start the cycle over again. Then once every 8 weeks I can either dump the data back to the PC by reading the eeprom, or read the data via the display for whatever run I chose.

Over a series of posts I will cover the initial Forth code and subsequent improvements, the circuit for the 1A constant current load, how everything is wired up and eventually the further modifications to improve the resolution.

In the meantime here is what you need to do. Firstly, read the hackaday link above for background information. I really like the programmable power supply. I can see several of those going onto my workbench in due course. The team behind this Forth project need a big thank you for doing such a great job.

If you decide to give Forth a try, and I strongly encourage you to do so,  your shopping list is:
  • a few of the W1209 modules, pictured below, 
  • the programming dongle,
  • and a serial interface (USB dongle or MAX232 based device) if you don't already have one.
You'll never touch arduino again and probably end up running amforth or something similar on those those arduino boards like I do.

I will post working copies of my firmware if you simply want to flash the board and not learn Forth. And if all you want is a pre-programmed modified board then you best contact me. 

Tuesday, 27 June 2017

Satellite Tuner Board becomes a 800MHZ - 1600MHz Signal Generator

I've been so busy on non Ham activities that I haven't had a chance to pursue my Ham projects. As a stop-gap measure here is something I recently finished. While it doesn't neatly fit the goals of my blog to be easily repeatable by the reader it will hopefully inspire you to attempt something similar. If you have one of these satellite receiver boards then I can provide further details and code to help. 

A while back a generous Ham, Fritz, was giving away some satellite tuner boards at the NCRG Hamfest.  The board had a nice TXCO but on closer inspection it also had some nice PLL chips (Si4133) and mmic amplifiers. So I downloaded the relevant datasheets and ruminated on what it could be used for. My ultimate goal is to use one of these to generate a WSPR transmission on 1296MHZ. But you have to crawl before you can walk!

Before modification the PLL section of the board looked like this:

After removing the superfluous controller chip from elsewhere on the board and cutting the board to fit into an enclosure it became a matter of delicately soldering some thin wires onto relevant via's. These wires then went to a new control board I made.

It transpires that my version of the chip did not have the IF Out function. Which meant I couldn't use it for 70cms or 2m. However, each PLL chip had two PLL's and I found I could cover 800 MHz to 1600 MHz in four overlapping ranges, with steps down to 10kHz. The only drawback was I couldn't load the frequencies fast enough to also make this work as a micro-controller based frequency sweeper. Each frequency change took around 50ms to achieve.

In due course I hope to take some photographs of the noise sidebands as the step size, or phase detector frequency, changes. This should illustrate why the largest possible step size should be used if you are interested in signal purity.

The chip can be purchased for around A$10 (US$7) in a TSSOP package which would be easier to work with than the ones I had on the tuner board. Which is why I didn't remove them but used them in-situ. If you would be interested in building one from scratch let me know. I think a signal generator that covered 2m, 70cm and 23cm would be a great project with a cost around A$50 (US$35).

While kits exist that generate frequencies like the ones this project does, there is enormous satisfaction in re-purposing something that was meant to be scrapped.

Richard VK6TT

Wednesday, 17 May 2017

Etching Tank

I've been busy on non-ham activities the last few weeks so I haven't progressed many projects. I'm re-organising the workshop and trying to throw out some equipment surplus to requirements. My wife calls it junk!

I had a few SCSI tape drives lying around and as I opened one up to recover the controller board it occurred to me I could make a tank agitator for etching. In the past I had used an aquarium bubbler with an air stone. I stopped using this because it generated a plume of etchant that stained nearby objects. I moved on to putting the pcb in a zip lock back and manually rocking it while it sat in a dish.

This works well but if I could automate the rocking and heat it at the same time things would be better. I'm blessed with a working stove and hot plates in the workshop, but don't tell the wife or I might be expected to move into the workshop for good.

So there when I opened the SCSI drive was a great big cog used to load the tape. It took all of 5 minutes to work out there was a lug underneath the cog I had to chop off so it could rotate continuously and wire up a plug pack to the motor. A few more minutes to work out how to attach the rotating cog to the etchant bath and I was done. I used a bolt onto a pop stick, or small piece of wood found in frozen ice sweets, and a piece of string from the wood to a peg on the dish.

With the hotplate turned on and the motor running things went smoothly. The only issue is the dish tends to walk around the surface of the hot plate. I'm going to fix that by running the cord over an arm and pulley perhaps 50cm above the etchant tank. That way the lifting on the tank will be vertical instead of including a side to side motion as well.

The current arrangement looks like this before I make the arm and pulley:

A very temporary proof of concept. Which just goes to show that one man's junk can contain his treasure.

Richard VK6TT