Author Topic: Funny how you forget stuff!!  (Read 2242 times)

0 Members and 1 Guest are viewing this topic.

Offline frackers

  • Full Member
  • ***
  • Posts: 239
  • Karma: +9/-0
  • If it moves - computerise it!
Funny how you forget stuff!!
« on: September 13, 2016, 07:31:02 am »
So I wrote the controller and logger for my wind turbine some 3-4 years ago and it has worked really well.

One of the things that I think I sorted really well was the tracking of charge in the battery bank. I use a 1-wire DS2438 battery monitor chip which can 'coulomb count' by measuring the current 30 times a second and integrating the values into a register that can be read out as amp-hours. As well as the instantaneous value, the chip also hold historic totals of charge in and out and I use these values to work out the overall efficiency of the system which I use to adjust the measured value of charge!

So far so good until 1.6 megawatt hours have passed through the system when it all went pear shaped :(

So what is with the magic number? the charge totals in and out are 16 bit numbers so they go to 65535 and then roll round to 0 and 65535 * 24 volts is 1.6 MWh. The efficiency I was calculating went from 92% down to 40% when the registers rolled over - I didn't notice until the charge one was at 6500 and the discharge one at 435. No wonder it thought that it was pulling 100amp-hrs from the battery bank was actually only 45amp-hrs and hence nowhere as discharged as it thought.!

My dump load has been busy the last few days loosing the excess power that should have been shunted off to the swimming pool filter pump.
Robin Down Under (or are you Up Over!)

Offline Pete

  • Sr. Member
  • ****
  • Posts: 385
  • Karma: +19/-1
  • Mount Barrow Tasmania
Re: Funny how you forget stuff!!
« Reply #1 on: September 13, 2016, 04:42:41 pm »
Ah the wonders of modern technology.
I guess you will have to write some sort of program that resets the controller before doomsday comes about.
Sounds like a very smart controller,
Your problem is a bit like the scare campaign around the Y2K bug only yours actually happened.
Seems the smarter the systems get the smarter we have to get.
Good luck with getting the batteries back up to charge.

Offline MadScientist267

  • Impossible Condition Curator
  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +44/-4
  • Rules? What rules?
Re: Funny how you forget stuff!!
« Reply #2 on: September 13, 2016, 05:05:16 pm »
Pretty much sums it up (Har Har)...

Run out of bits, it's like the odometer in your 72 pinto (if you have one of course lol)... 1111:1111:1111:1111 + 1... works out to "where'd the next '1' go" and 0000:0000:0000:0000 indeed lol

Just be glad it wasn't a doze box... every third bit would have turned blue and while the second to last found an update, the others insisted the whole thing had to be rebooted for the rollover to take effect... Things can always be worse :P

I agree that it otherwise sounds like a useful device. Just goes to show, no matter how deep you dig, there's always a place for a bug underneath that's harder than the shovel...

Steve
Wanted: Schrödinger's cat, dead and alive.