Topic: Various Senoko oddities

I'm seeing a combination of a few behaviors with the Senoko board and battery on my Novena laptop making me wonder if I'm seeing one of the known bugs and/or am just screwing something up. Symptoms:

- "shutdown -h now, "sudo systemctl poweroff", etc. sometimes leave the power button lit and unable to reboot without pulling the AC power. Only sometimes though.

- Leaving the AC plugged into the Senoko board on the laptop doesn't actually seem to charge the battery in a way that it can supply the laptop. When I pull the AC power, the laptop dies.

- I already tried (and I think succeeded) in flashing the senoko firmware from 20150504. I had to repeat the exercise several times though. Usually, the update-senoko script's polling would catch when I held down the reflash button on the Senoko board, but releasing the button when instructed would not wake up the tool and let it exit. The whole cycle did work once though, but before and after that, I've tried maybe 10 times.

- Connecting with "sudo screen /dev/ttymxc3 115200" to the battery board has variously reported different things: different statusus of "Charge FET:", "Discharge FET:", and "State:" while plugged in. The last few power cycles though, it's shown me the output at the bottom of the post. Charge level of 0% yet "State: normal discharge" even with the FETs both on. The "Alarms:" at the bottom look disconcerting but then it says "No errors detected" below. After trying the "power up without battery and holding down reflash button" trick, I got a different stats display (the second paste)

Voltage of the cells doesn't look like overdischarge, but I tried commands like those in viewtopic.php?pid=1448#p1448 (forcing a charge of 15 seconds) 

I've tried some of the commands thrown around in other posts (like forcing the cell to charge for a few seconds and then putting it back in auto mode) with no luck. I saw mentions of it being possible to fully discharge the battery, but I don't *think* I've run it very long off the battery. I've tried pulling all 4(?) connections I saw between the battery and the board and plugging them back a few minutes later. I've tried "gg it" and "gg pfreset".

Two other potentially unrelated problems, but just in case they matter:

- (Do I just need to insert an SD card with a recovery image?) Holding down user button doesn't start any sort of recovery program when powering up.

- The LCD sometimes looks fuzzy and the color palette weird. Kind of like the screenshot in http://www.kosagi.com/forums/viewtopic. … 486#p1486. I tried the steps from the following post which seems to have helped but not eliminated the problem. (The LCD backlight is also bleeding a bunch, and actually has been developing new spots, but I assume that's even more unrelated.)

Thoughts?

Manufacturer:       Texas Inst.
Part name:          bq20z95
Firmware version:   0x150
Charge FET:         on
Discharge FET:      on
State:              normal discharge
Time until full:    65535 minutes
Time until empty:   65535 minutes
Chemistry:          LION
Serial number:      0x0001
Cycle count:        1
Battery health:     98%
Charge:             0%
Max capacity:       4865 mAh
Design capacity:    5000 mAh
Temperature:        28.4 C
Voltage:            12142 mV
Current:            0 mA
Average current:    0 mA
Target voltage:     12600 mV
Target current:     5000 mA
Number of cells:    3 cells
Cell 1 voltage:     4026 mV
Cell 2 voltage:     4071 mV
Cell 3 voltage:     4044 mV
Cell 4 voltage:     0 mV
Charge status:      0x200
    Charging allowed?   yes
    Can suspend?        no
    Can precharge?      no
    Can maintenance?    no
    Temperature limit?  no
    Temperature limit?  no
    Can fastcharge?     yes
    Pulse charging?     no
    Pulse disable CHG?  no
    Cell balancing?     no
    Precharge timeout?  no
    Fastcharge timeout? no
    Overcharge OV?      no
    Overcharge OC?      no
    Overcharge?         no
    Battery empty?      no
Alarms:
    TERMINATE DISCHARGE ALARM
    REMAINING CAPACITY ALARM
Charge state:
    Battery initialized
    Battery discharging/relaxing
    Battery fully discharged
No errors detected
No safety alerts
No safety status messages

2 (edited by pelrun 2015-05-10 17:03:49)

Re: Various Senoko oddities

Ok, lets tackle the simple ones first. The LCD weirdness is a known problem and is being worked on; at this point if it comes up in the bad state just reboot. Backlight bleed is because the bolts holding the lcd in are tightened too much. Yes, even if they're unacceptably loose. Check the bezel and ensure it's actually flat (my green one had a bad bow in it). Then, putting washers between the bezel and the lcd apparently helps.

Your battery is in good condition; all three cells are above 3000mA. The gas gauge is confused, though, with that 0% charge level (although everything else in that status output is fine). In the senoko console, try resetting the cell configuration, which will also reset a bunch of other internal settings:

gg cells 3
gg capacity 3 5000

Re: Various Senoko oddities

Thanks, pelrun.

It could also be that the charger has forgotten how much current your power supply can deliver.  The charger must be told the maximum output so it can ensure enough current is available to run the system and charge the battery at the same time.

What is the output of the charge control command?

chg

You may want to set the charge input current using "chg input":

chg input 3750

Note that the charger is missing some insignificant bits, so values get rounded down.

Re: Various Senoko oddities

Short version: All the Senoko issues haven't repeated yet since some other work I did last night, but they were erratic before, so I'm trying the other ideas too and will report back with any other oddities. Thanks!

Details:

Late last night, I tried something else: pulling all the power and plugging it back in while holding down the reflash button. That seems to have made it happier so far, but I'm trying these other commands now just to force the issue.

xobs: "chg" did show a slightly lower input before:

Charger information:
        Charge thread:    running
        Manufacturer ID:  0x0040
        Device ID:        0x0007
        Current:          4992 mA
        Voltage:          12592 mV
        Input:            3328 mA

After "chg input 3750", it's reporting an input of 3584 mA.

pelrun: I tried your commands too, though those look to have been the configured values already, but if they clear more bad state out, all the better.

Re: Various Senoko oddities

Hmm, unfortunately whatever success I was seeing was temporary. After that night, I shut off the Novena (with > half charge). I tried turning it on with battery power tonight and it wouldn't turn on. Once I plugged it in and investigated:

Manufacturer:       Texas Inst.
Part name:          bq20z95
Firmware version:   0x150
Charge FET:         off
Discharge FET:      off
State:              battery failure
Time until full:    65535 minutes
Time until empty:   65535 minutes
Chemistry:          LION
Serial number:      0x0001
Cycle count:        1
Battery health:     96%
Charge:             99%
Max capacity:       4773 mAh
Design capacity:    5000 mAh
Temperature:        26.1 C
Voltage:            48932 mV
Current:            0 mA
Average current:    0 mA
Target voltage:     0 mV
Target current:     0 mA
Number of cells:    3 cells
Cell 1 voltage:     0 mV
Cell 2 voltage:     8039 mV
Cell 3 voltage:     8125 mV
Cell 4 voltage:     0 mV
Charge status:      0x0
    Charging allowed?   yes
    Can suspend?        no
    Can precharge?      no
    Can maintenance?    no
    Temperature limit?  no
    Temperature limit?  no
    Can fastcharge?     no
    Pulse charging?     no
    Pulse disable CHG?  no
    Cell balancing?     no
    Precharge timeout?  no
    Fastcharge timeout? no
    Overcharge OV?      no
    Overcharge OC?      no
    Overcharge?         no
    Battery empty?      no
Alarms:
    TERMINATE CHARGE ALARM
    TERMINATE DISCHARGE ALARM
Charge state:
    Battery initialized
    Battery discharging/relaxing
    Battery fully discharged
No errors detected
No safety alerts
Safety status:
    Pack undervoltage condition
    Cell undervoltage condition
    Permanent failure condition

Re: Various Senoko oddities

Oh and the behavior where the power light stays on when I shut the machine down seems to be back. Not sure if that indicates any sort of failure during the shutdown process.

Re: Various Senoko oddities

Your pack has gone into "permanent failure" because it believes that one cell is 0 mV.  Normally that would be bad.

However, the cell voltages look really strange.  48V for the whole pack?  8V per cell?  If it's actually reading those values, it's probably good that it went into permanent failure mode, as those are impossible values to read.

Perhaps you can try rebooting the gas gauge with a "gg reboot".  Also, doing "gg pfreset" should clear the permanent failure flag.

The balancing taps have good connection, right?

Re: Various Senoko oddities

Apologies for potentially threadjacking (let me know if I should start a new one), but mine is having a very similar problem. (Don't think I've ever been able to run on battery power, either before or after updating the Senoko firmware.)

Already tried a

gg reboot

which didn't do much other than clear the permanent-failure flag (so I didn't try running

gg pfreset

on top of it), but otherwise I've got one cell that claims to be at 0 mV and two others that claim to be at about 57400 mV.

ch> stats
Manufacturer:       Texas Inst.
Part name:          bq20z95
Firmware version:   0x150
Charge FET:         off
Discharge FET:      off
State:              battery failure
Time until full:    65535 minutes
Time until empty:   0 minutes
Chemistry:          LION
Serial number:      0x0001
Cycle count:        1
Battery health:     98%
Charge:             0%
Max capacity:       4856 mAh
Design capacity:    5000 mAh
Temperature:        32.7 C
Voltage:            49264 mV
Current:            -9 mA
Average current:    -9 mA
Target voltage:     0 mV
Target current:     0 mA
Number of cells:    3 cells
Cell 1 voltage:     0 mV
Cell 2 voltage:     57391 mV
Cell 3 voltage:     57410 mV
Cell 4 voltage:     0 mV
Charge status:      0x1
    Charging allowed?   yes
    Can suspend?        no
    Can precharge?      no
    Can maintenance?    no
    Temperature limit?  no
    Temperature limit?  no
    Can fastcharge?     no
    Pulse charging?     no
    Pulse disable CHG?  no
    Cell balancing?     no
    Precharge timeout?  no
    Fastcharge timeout? no
    Overcharge OV?      no
    Overcharge OC?      no
    Overcharge?         no
    Battery empty?      yes
Alarms:
    TERMINATE CHARGE ALARM
    TERMINATE DISCHARGE ALARM
    REMAINING CAPACITY ALARM
    REMAINING TIME ALARM
Charge state:
    Battery initialized
    Battery discharging/relaxing
    Battery fully discharged
No errors detected
No safety alerts
Safety status:
    Pack undervoltage condition
    Cell undervoltage condition
ch> 

Not sure about manoj's setup, but my balancing taps do look fully seated.

Re: Various Senoko oddities

You didn't do an (ill-advised) "gg cal" by any chance? Drastically wrong voltages like that is a pretty good indicator.

That first cell reading 0 isn't good though - it's either a bad connection on the balance connector, or a dead battery.

Re: Various Senoko oddities

I haven't done any `gg cal`. Early on, I tried the `chg set` routine xobs mentioned here, and I tried using the on/off button on Senoko at one point before I learned about `gg reboot`, but that was about it.

I'm not by my Novena at the moment, but I can double-check the balance connector this evening (GMT-4)--like I said, they look properly connected, but I'll unplug/replug later today.

Re: Various Senoko oddities

All seems well with the connectors, but the stats look the same. (Wasn't sure how to unplug them with a spudger without breaking something, and I didn't want to go in there with pliers and risk shorting something, so I just tried to push them pretty firmly into the board and they didn't budge. I assume we're talking about the two +/T/X connectors right above the words "Senoko Battery Board", but just to be sure I at least tried pushing on all of the connectors.) If I were to go to Hobby King (e.g.) and get a new battery, what should I look for?

12 (edited by pelrun 2015-05-19 19:41:33)

Re: Various Senoko oddities

The +TX connectors are actually for temperature sensing. The balance connector is the smaller 4-pin one on the side of the senoko board, furthest away from the novena board.

Re: Various Senoko oddities

Ah, good to know. (This is what I get for Googling for "balancing taps" and getting sort of vague photos of small connectors.) I unseated the real balancing connector a bit this morning and reseated it, so I'll see tonight whether the stats are any different.

Re: Various Senoko oddities

No change, unfortunately. So if I assume my battery's dead (whether we chalk it up to the earlier firmware or not), what should I look for in a new battery, and how should I let Senoko know what's happened once I've installed it?

Re: Various Senoko oddities

If you have a multimeter, you can try measuring the voltage of the balancing taps manually.  The first one should read 3.7V, the second one should read 2x3.7V (7.4V), and the third should read 3x3.7V (11.6).

If it's not working, that's sad.  sad

Hobby King is a decent source for batteries.  You want a 3s1p (three cells in series, one cell in parallel).  You'll have to lop off the main connector and solder on an ATX connector.  Then configure Senoko by running "gg capacity 3 [capacity-in-mAh]".

Re: Various Senoko oddities

Or you can measure between adjacent pins and get the cell voltages directly (between pins 1-2 is cell 1, pins 2-3 is cell 2, pins 3-4 is cell 3).

The big thing to look at when getting batteries from HobbyKing is the width - you need them to be <=18mm thick if you want them to fit in the case with the lid shut. The battery finder tool on the HobbyKing site lets you set this, just change Width(C) to be between 0-18mm.

The biggest battery I could find that fits is a 2S 8000mAh one (57600mWh, roughly equivalent capacity to a 3S 5300mAh), link below. You'd need to cut the balance connector off it and use the one from your old battery, leave the extra pin disconnected. Configure senoko with "gg capacity 2 8000".

http://www.hobbyking.com/hobbyking/stor … duct=16224

It's biggest in capacity and size, though, pretty much eats up the entire peek array. You might want to settle for a smaller 3S battery instead.

Re: Various Senoko oddities

My machine is working fine, but recently developed (sporadically) some of the symptoms described here: namely, sometimes it leaves the power light on after shutdown (pulling AC and holding the power button on senoko fixes this) and sometimes after shutdown it reboots (holding power button on either case or senoko seems to fix this)

Re: Various Senoko oddities

Took a while to get back to it, but I just checked my balancing tap. It looked properly connected, but I reseated it just in case, and now I'm seeing more reasonable numbers (below). I didn't run any of the suggested commands. Did just reseating the balancing tap fix everything, was it the prolonged period of being unplugged, or something else? This is rather weird.

Manufacturer:       Texas Inst.
Part name:          bq20z95
Firmware version:   0x150
Charge FET:         on
Discharge FET:      on
State:              charge
Time until full:    21 minutes
Time until empty:   65535 minutes
Chemistry:          LION
Serial number:      0x0001
Cycle count:        1
Battery health:     96%
Charge:             95%
Max capacity:       4772 mAh
Design capacity:    5000 mAh
Temperature:        25.3 C
Voltage:            12497 mV
Current:            1570 mA
Average current:    1461 mA
Target voltage:     12600 mV
Target current:     5000 mA
Number of cells:    3 cells
Cell 1 voltage:     4159 mV
Cell 2 voltage:     4181 mV
Cell 3 voltage:     4156 mV
Cell 4 voltage:     0 mV
Charge status:      0x240
    Charging allowed?   yes
    Can suspend?        no
    Can precharge?      no
    Can maintenance?    no
    Temperature limit?  no
    Temperature limit?  no
    Can fastcharge?     yes
    Pulse charging?     no
    Pulse disable CHG?  no
    Cell balancing?     in-progress
    Precharge timeout?  no
    Fastcharge timeout? no
    Overcharge OV?      no
    Overcharge OC?      no
    Overcharge?         no
    Battery empty?      no
Alarms:
Charge state:
    Battery initialized
No errors detected
No safety alerts
No safety status messages

19

Re: Various Senoko oddities

singpolyma wrote:

My machine is working fine, but recently developed (sporadically) some of the symptoms described here: namely, sometimes it leaves the power light on after shutdown (pulling AC and holding the power button on senoko fixes this) and sometimes after shutdown it reboots (holding power button on either case or senoko seems to fix this)

I see the same. Not sure if it is related to kernel 3.19 or updated senoko firmware, but both reboot and shutdown do not fully succeed.
The power light remains on and needs a 3 second press to turn off through senoko.

Re: Various Senoko oddities

Well, apparently I didn't unplug the balancing connector as far as I thought I had the last time. (I knew it wasn't all the way, but I'd never seen the JST-XH connectors before and didn't want to force it when it wasn't moving very much on my first attempt. They look more fragile than they actually are (a feeling I tend to get whenever I see JST-style connectors), and I tend to be reluctant to use anything metal around connectors for lithium-ion batteries in particular when I can avoid it, just in case something slips and accidentally shorts pins that really shouldn't be shorted.)

That said, I completely unplugged it, saw all the expected voltages (about 4 volts per cell), sat confused for a moment about all this, and then plugged it back in, and all seems well. So you guys were right the first time, I don't have to buy a new battery, and I learned more about a new (to me) connector! Sorry for the run-around earlier.

Re: Various Senoko oddities

OK, it seems like this floats in and out of correct state. After recharging the battery, powering off, and unplugging it, I left it alone for a few days, then tried to power it up off of the battery. It came on briefly and shut down. When I gave it mains power to boot it up and checked the stats, I saw the crazy unbalanced state below. I then shut it off, unplugged power, then tried again with it plugged in a few days later (just now) and it was fine again (with no error conditions, though I did not use pfreset at the time). Ideas?

It doesn't seem like it should be a loose connection, because what would cause a 4-5V pack to be reported as 58 V?

Manufacturer:       Texas Inst.
Part name:          bq20z95
Firmware version:   0x150
Charge FET:         off
Discharge FET:      off
State:              battery failure
Time until full:    65535 minutes
Time until empty:   65535 minutes
Chemistry:          LION
Serial number:      0x0001
Cycle count:        1
Battery health:     0%
Charge:             100%
Max capacity:       0 mAh
Design capacity:    5000 mAh
Temperature:        24.6 C
Voltage:            84 mV
Current:            0 mA
Average current:    0 mA
Target voltage:     0 mV
Target current:     0 mA
Number of cells:    3 cells
Cell 1 voltage:     0 mV
Cell 2 voltage:     57545 mV
Cell 3 voltage:     8075 mV
Cell 4 voltage:     0 mV
Charge status:      0x1
    Charging allowed?   yes
    Can suspend?        no
    Can precharge?      no
    Can maintenance?    no
    Temperature limit?  no
    Temperature limit?  no
    Can fastcharge?     no
    Pulse charging?     no
    Pulse disable CHG?  no
    Cell balancing?     no
    Precharge timeout?  no
    Fastcharge timeout? no
    Overcharge OV?      no
    Overcharge OC?      no
    Overcharge?         no
    Battery empty?      yes
Alarms:
    TERMINATE CHARGE ALARM
    TERMINATE DISCHARGE ALARM
    REMAINING CAPACITY ALARM
Charge state:
    Battery initialized
    Battery discharging/relaxing
    Battery fully discharged
No errors detected
No safety alerts
Safety status:
    Pack undervoltage condition
    Cell undervoltage condition
    Permanent failure condition

Re: Various Senoko oddities

I ended up with mine in a similar state while playing with the calibration at one point. Recalibrating it (after checking connections were solid etc.) did fix it, but I wonder if it might be quicker for you to just reimport xobs's senoko data dump to get back to a known good state?

Re: Various Senoko oddities

I agree.  With numbers like that, it seems that the flash has gotten... funny.  Try reloading flash.

Re: Various Senoko oddities

Reflash as in the update-senoko script? I've generally had trouble with that too (as mentioned above). It succeeded once, but every other time I've tried it (including just now, most of the script proceeds, but it gets stuck in the loop waiting for the board to appear on i2c:

# Wait for the board to show up on I2C
while ! /usr/sbin/i2cget -f -y 0 0x20 0 2> /dev/null > /dev/null
do
    echo 0 > /sys/class/gpio/gpio149/value
    echo 1 > /sys/class/gpio/gpio149/value
done

When I try that i2cget command on my own I get "Error: Read failed", and when I strace that:

open("/dev/i2c/0", O_RDWR)              = -1 ENOENT (No such file or directory)
open("/dev/i2c-0", O_RDWR)              = 3
ioctl(3, 0x705, 0xbe920640)             = 0
ioctl(3, 0x706, 0x20)                   = 0
ioctl(3, 0x720, 0xbe920640)             = -1 EAGAIN (Resource temporarily unavailable)
close(3)                                = 0
write(2, "Error: Read failed\n", 19Error: Read failed
)    = 19

Re: Various Senoko oddities

Nah, they mean my gas-gauge flashing tool: https://github.com/pelrun/novena-gg-tools

It rewrites the flash data on the gas gauge with a known-good image to get it out of a broken state.