Wanted - an amp hour meter

How do you store and manage your electricity?
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

I've zipped up all the files for this and here they are:

AH_Meter_Files.zip

The compiler is the CCS C compiler running on MPLAB V8.88. The .sch and .pcb files are DesignSpark.
I got the pcb from ITEAD and it is a "shared" one, so if you want one they should be able to supply without having to re-send the files.

It strikes me that this device could have some appeal for the "solar home" market. Then you would need to add a voltage input and make the current range from +ve to -ve (charge and discharge). The thing could then show watt-hours, battery voltage, load current and charge current. There's certainly enough spare memory to put those functions in.

Be a good project for someone!

Edit: Just in case you wondered, it is possible to make a 255 A version by using a Tamura 200 A current sensor with a slight change to the software - gives 1/4A resolution.
Last edited by Nevilleh on Tue, 12 Feb 2013, 09:53, edited 1 time in total.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

Just because I could, I added some stuff to this thing. One, a pwm output that can be used to drive a fuel gauge. If you program in your battery capacity, the fuel gauge will read full down to empty as you use up the amp-hours. Two, a variable frequency square wave output that can drive your tachometer to show amps. My tacho reads 0 - 7 for rpm x 1000, but driven by the AH meter it shows amps x 100. Just a nice way to make use of otherwise redundant dashboard instruments.
If you want to make on, ask for the updated files.
User avatar
jonescg
Senior Member
Posts: 3761
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.

Wanted - an amp hour meter

Post by jonescg »

I received my Ah meter from Neville. I loaded up my LiPo pack with a 1 ohm nichrome coil in a bucket of water which draws about 49 A.

Image

Image

And it worked! I notice that R4 and R5 get very hot at the back. Not solder meting hot, but stings when you touch it hot.

I also found that the zero setting is probably more important than getting the correct reading as per the current clamp. Cause when you stop the current flow, it goes back to 3 A or so, when it should be zero.

Not a bad little gizmo for the price!
Last edited by jonescg on Thu, 21 Feb 2013, 06:52, edited 1 time in total.
AEVA National Secretary, WA branch chair.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

Those resistors are the current limiter for the backlight. I find that the acklight voltages vary quite a bit depending on the brand of lcd and what is OK for one may be a bit more current and hence heat than another. You could make them bigger and dim down the backlight a bit if you want. Probably they are only getting to about 80 deg though.
You may find it is more accurate than the clamp meter!
If you measure the voltage on the Hall sensor output at no current (using an accurate voltmeter and most of hem are good to about 1 % or better), then pass some current though it and measure the voltage again. Subtract the zero current voltage and you get the delta-V. Look at the spec sheet I sent you and you will find the output voltage for 400 A (for your sensor). You can then work out the millivolts-per-amp for the sensor and hence calculate the actual current. Then you can compare that with the AH meter reading and the clamp meter.
I'd appreciate it if you would do that as I haven't tested it with actual current greater than 6 A, just a pot in place of the Hall sensor. Any inaccuracy in the lcd reading will be to gain errors in the op-amp. I hope I didn't make a mistake in calculating what it should be! It was spot on at 6 A though. ie it read exactly the same as the current meter on my bench power supply.

Edit: And yes, the zero setting is the most important. Get that right and the current should be too.
Last edited by Nevilleh on Thu, 21 Feb 2013, 08:18, edited 1 time in total.
User avatar
jonescg
Senior Member
Posts: 3761
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.

Wanted - an amp hour meter

Post by jonescg »

I decided to test my battery at a higher current.

The Ah meter showed 0 A at idle, but was reading about 5% less than what the current clamp showed. I have no idea how accurate (or not) my current clamp is, especially given the low batteries in it.

http://www.youtube.com/watch?v=pLD1iKYV_cg

These LiCo cells are amazing for their power, and their energy density is pretty sound too. 200 A continuous from an e-bike sized battery? No problems!
AEVA National Secretary, WA branch chair.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

Be nice if you could measure the current with a device of known accuracy, just to check. Maybe a proper shunt resistor and a voltmeter?
User avatar
coulomb
Site Admin
Posts: 4491
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Wanted - an amp hour meter

Post by coulomb »

jonescg wrote:

Wince! Connecting, and worse, disconnecting anderson connectors under load. Especially when everything is hot, and you may need to disconnect quickly.

Still, no disaster this time.

But please tell me that this particular anderson won't be used anywhere critical, like in a vehicle.

Nice little video, and impressive cells; thanks for putting it up.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.
User avatar
jonescg
Senior Member
Posts: 3761
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.

Wanted - an amp hour meter

Post by jonescg »

Calm down Coulomb. I only use these Andersons for load testing / mucking around with. They are already a bit chewed up from this sort of thing, but I don't want to waste my contactors on bench testing. In case you were wondering, I made the load wire and checked it's resistance, and did a quick calculation on what the current would be. I was in the right ball park. I don't think I'll be testing them at 25C using this technique :D

Perfect cells for racing I say.
AEVA National Secretary, WA branch chair.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

Trouble with your load resistor is that is is highly temperature dependent ie what you calculate for 25 deg will be a bit out when you pass a couple hundred amps through it, even in a bucket of water. Depends how accurate you want to be.
I just would like to know how good my ammeter is!
I have one of those clamp ammeters too, and it varies every time you open and close it. Did you zero it? Its only a Hall thing too, but the airgap of the clamp seems to vary every time you close it and the current reading is very dependent on the reluctance of the magnetic circuit of which the air gap is the major part.
I don't have any cells spare at the moment, they are all fitted to various things so its not easy to do a test like you are doing.
User avatar
jonescg
Senior Member
Posts: 3761
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.

Wanted - an amp hour meter

Post by jonescg »

I was only testing the cells and how both ammeters responded. I calculated 250 A at RT, which it did briefly achieve before dropping to ~200 A while the wiring heated up.

I don't really know how to check the accuracy of either meter now. The two of them were reading about 5% out (your meter being lower than my clamp) when I did the 50 A test too. So who's meter is wrong? I did zero it, yes.
AEVA National Secretary, WA branch chair.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

Yes, its not so easy, is it?
I tested it with my bench power supply which can only deliver 6 A and it agreed perfectly with the ammeter on that which can read to about .1 A so I know it is pretty accurate at that low current level. Be interesting if you can compare it with your clamp meter at that sort of current. Also, if you could do what I suggested earlier and measure the actual Hall sensor output voltage at 200 A - also that voltage at zero current. If you can let me know what those voltages are and also the meter reading, I will calculate the current from the sensor data.
Drdove
Noobie
Posts: 2
Joined: Sun, 14 Apr 2013, 12:02
Real Name: Paul Dove
Location: Huntsville, Al

Wanted - an amp hour meter

Post by Drdove »

Can you post the schematics in PDF format or something else we can just use a viewer to see?
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

Here's some .jpg images:


Image
Image

This is the upgraded version with outputs to drive a tachometer as an ammeter and a fuel gauge as a battery capacity meter.
User avatar
jonescg
Senior Member
Posts: 3761
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.

Wanted - an amp hour meter

Post by jonescg »

Hey Neville,

For those who were at the Perth branch meeting the other week they would have seen me proudly showing off my Ah meter Image moments before accidentally shorting it on the 13 V battery I was running it from Image.

Richo kindly offered to diagnose the board for me, and it looks like it was mostly the screen which suffered serious damage. He's put a new screen on it and it looks a lot better, but the battery amps is still reading something non-zero, indicating the op-amp might have also suffered. He's also offered to fix this too, which is very kind.

While going through the schematic we noticed a few things which could make it better in the next iteration. A few polyfuses wouldn't go astray, as well as some other components to protect against voltage spikes and reverse polarity. So we're going to try and set some things in place in the meantime. If you happen to have another board made up I'd be keen to buy it, even if it simply serves as a spare.

Cheers mate
Chris
AEVA National Secretary, WA branch chair.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

Ah, your message reminded about that - I had forgotten you asked for another board! I've just had a look and I do have most of the parts, but I am flat out at the moment and won't be able to get around to assembling one for a while. If Richo sorts yours out, let me know and I won't worry about it for the moment.
Yes, you can add fuses and reverse polarity protection. I didn't bother because it is designed to be installed and left permanently connected, so there is only a need for that sort of thing once! Or perhaps more often if you are showing the thing around......

By the way, the latest iteration has a couple of outputs added to drive an ammeter (tacho) and a "Charge left" gauge - a fuel gauge. I haven't made a pcb for it though.
User avatar
jonescg
Senior Member
Posts: 3761
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.

Wanted - an amp hour meter

Post by jonescg »

I had a very pleasant surprise in my inbox this morning!

Image

Justin of E-bikes.ca kindly hacked the Cycle Analyst so it will read 700 V from a voltage divider and still give me good data on Wh/km etcetera!

I wasn't originally planning on using the CA as the voltage division stuff was pretty hairy, but with a splash screen like this, how could I not?!!

Image

So I will persevere with the shunt and use the 5 V divided pack voltage to provide the CA with data. The CA is powered by it's own 12 V supply.

Now, I'm concerned that the grounds are going to be shared - that is the negative terminal of my auxiliary battery will be connected by a convoluted length of copper to the negative of the high voltage pack. Not ideal, but really, how else can you safely measure the voltage of your pack?

I'm going to use a 5 W, 700 V rated 680 kOhm resistor and a 5 kOhm resistor in the divider (I fixed the incorrect R2 in the picture). It's on the switched side of the contactor, so it's only going to be on when the bike is turned on.


Image
Last edited by jonescg on Sun, 21 Apr 2013, 07:19, edited 1 time in total.
AEVA National Secretary, WA branch chair.
Renard
Groupie
Posts: 219
Joined: Sun, 29 Aug 2010, 18:55
Real Name: Robert Fox
Location: Cobargo NSW

Wanted - an amp hour meter

Post by Renard »

jonescg wrote:
Now, I'm concerned that the grounds are going to be shared - that is the negative terminal of my auxiliary battery will be connected by a convoluted length of copper to the negative of the high voltage pack. Not ideal, but really, how else can you safely measure the voltage of your pack?

In idle moments I've been thinking on and off about this issue for some time.

The proper way to deal with it is to use a linear optocoupler such as the HCNR200, but that requires two more chips -- two single op-amps. (One can't use a dual, as the supplies and grounds must be separate.) See the datasheet.

Maybe an easier and dirtier method is to re-work the voltage divider to be in the form: 340k -4.87k-340k (or similarly proportioned values). At least with this set-up, you always have at least 340k between pack negative and chassis. But then you also have to re-position the shunt to the mid-point of the pack so it gets troublesome in another way.
Last edited by Renard on Sun, 21 Apr 2013, 05:11, edited 1 time in total.
Renard
User avatar
jonescg
Senior Member
Posts: 3761
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.

Wanted - an amp hour meter

Post by jonescg »

Justin got back to me and said yes, it will be joined at the ground. However, he suggested I run the cycle analyst from it's own 12-24 V supply via a tiny 2W DC/DC converter. This means the cycle analyst unit is completely isolated via the DC/DC.

The Rinehart inverter sends CAN information out, and a company called AIM make a dash which can be configured to read the outputs, one of which is the DC bus voltage. But these dashboards aren't cheap, and I'm still a long way from owning an inverter.
AEVA National Secretary, WA branch chair.
Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Wanted - an amp hour meter

Post by Nevilleh »

A year or more ago, a fellow in the US designed am instrumentation display to interface with the Cougar controller, but it has lots of other features too, such as measuring the EV battery voltage. He did it with a linear opto plus a small dc-dc converter so it all ran off the 12 V supply.
Here's his circuit: (I'm sure he wouldn't mind having it reprinted here)



Image


I don't recall his name now, but I built one of these and it worked well. I did think about stealing parts of his circuit and including them in my AH meter, but in the end decided not to as I already had a voltmeter and an an ammeter. However, the AH meter could easily be turned into a "Cycle Analyst" with complete isolation by utilising some of this stuff.

Edit: His name is Chris Freyman and he published the design back in Feb 2011.
Last edited by Nevilleh on Sun, 21 Apr 2013, 10:55, edited 1 time in total.
cts_casemod
Groupie
Posts: 76
Joined: Fri, 28 Sep 2012, 17:59
Real Name: Carlos
Location: UK - London

Wanted - an amp hour meter

Post by cts_casemod »

Hi folks,

Does someone still have some spare PCB? I am looking to buy one.
Regards
Post Reply