olinuxino-MICRO with LiPo

Started by ritzBerl, June 27, 2013, 12:03:19 pm

Previous topic - Next topic

ritzBerl

I want to run my Micro board with a LiPo battery backup. But so far i wasn't able to charge the LiPo through the iMX233's integrated charger. I have a volt-and amperemeter connected to the battery. When i boot with an empty battery (3.1V) and 5V supply it says:

PowerPrep start initialize power...
Battery Voltage = 3.40V
Chargeable battery detected butthe voltage is too low for batterypowered operation.Booting from 5Vpower source


and there is 0mA current to/from the battery. So i disconnected, charged and reconnected the battery ->

PowerPrep start initialize power...
Battery Voltage = 4.12V
5v source detected.Valid batteryvoltage detected.Booting from batteryvoltage source.


So it seems that there are two power modes/sources the SoC can run, from +5V and batteryvoltage source. Is there any way to read and switch between the power sources (+5V and battery voltage) from the running linux? What i need is a battery backed up solution that is able to detect +5V failiures and recharge when +5V supply returns.

Thanks in advance for any help on this topic.

ritzBerl

I still didn't manage to put charge from the micro board into the battery. During testing i faced an even worse problem:

After approx. 20 minutes powerd only by the LiPo (no +5V), the CPU resets and stays in a state of start booting and resetting endless. The battery Voltage is still 4.0V. Minimizing LiPo cable length and adding 100uF and 100nF Capacitors to VBAT didn't help.

I tried it with actual official Archlinuxarm image:
"Linux olinuxino 3.7.2-3-ARCH #1 PREEMPT Sat May 25 15:54:00 UTC 2013 armv5tejl GNU/Linux"
and with a newer kernel
"Linux olinuxino 3.9.4-dirty #1 Sun May 26 14:47:06 CEST 2013 armv5tejl GNU/Linux"
as well.

Seems the olinuxino-MICRO doesn't really work with a battery. Any suggestions? Or am I doing something wrong?

Fadil Berisha

Did you try with kernel 2.6 and bootlets?

ritzBerl

July 01, 2013, 02:29:49 pm #3 Last Edit: July 01, 2013, 03:39:13 pm by ritzBerl
Ok, now I tried the precompiled debian with kernel 2.6:
Linux debian 2.6.35.3_OLinuXinoR4 #11 PREEMPT Mon May 21 10:27:52 EEST 2012 armv5tejl GNU/Linux

But i can't boot with a connected battery. The boot hangs when mounting the rootfs:

mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:00:09 UTC (9)

mmc0: new high speed SDHC card at address e624

mmcblk0: mmc0:e624 SU04G 3.69 GiB

mmcblk0: p1 p2


The board boots well if the battery is removed. When i boot with +5V, then connect the battery and remove the +5V, the system works fine for some minutes then resets and ends up in the previous mentioned state of booting and resetting endless.

The behaviour when battery powered is still very weird and unusable. Please help?

Fadil Berisha

July 01, 2013, 05:57:29 pm #4 Last Edit: July 01, 2013, 06:18:03 pm by Fadil Berisha
Quote from: ritzBerl on July 01, 2013, 02:29:49 pm

The board boots well if the battery is removed. When i boot with +5V, then connect the battery and remove the +5V, the system works fine for some minutes then resets and ends up in the previous mentioned state of booting and resetting endless.

The behaviour when battery powered is still very weird and unusable.


Well defined problem.
I can not reproduce scenario because don't have micro. Someone else?

Evgeny Boger

I've tested about 5 or so Olinuxino Micro boards and I could confirm that working from battery is kind of unstable. One of the board I've tested doesn't work from battery source at all since it is restarting every second or so. Another board  works from 3.75V and higher despite the datasheet clearly states it should work from as low as 2.9V. Another one works o.k. from 3.4V.

That's is really weird.

As for charging, I believe there is no kernel support for battery charging yet. Nevertheless, one could easily enable charger from userspace using /dev/mem approach (based on http://tech.groups.yahoo.com/group/olinuxino/message/1358):


imx233_wr(HW_POWER_CHARGE_SET, 0x0000001f);
imx233_wr(HW_POWER_CHARGE_TOG, 0x00010000);


This will toggle charger at full current.

ritzBerl

Thank you Evgeny Boger for your confirmation. In the meantime i tried a LiPo powered MAXI board (6V-16V removed) and it seems stable until now. Thats strange because there are no significant hardware differences to the MICRO concerning the iMX233 supply circuit part. I will spend some time and try to find/measure some difference.

What the MAXI still doesn't is to charge the LiPo. It just sucks down the LiPo then resets and reboots with connected power supply. So i have to enable the charger. Using /dev/mem interface is a good hint, i didn't know that cause i'm not the ultimate linux guru. Not yet :-). Thanks



LubOlimex

Sorry for the delay guys,

We compiled an image that shouldn't have power issues (but it might have other problems, haven't performed full tests). It might be downloaded from here: https://docs.google.com/file/d/0B7WHuNCASY8cNjFzc210RUhKNFU/edit?usp=sharing.

This is completely a software/kernel issue and I'm not sure when we can compile a better image for the imx233-Micro.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Fadil Berisha

Quote from: LubOlimex on July 17, 2013, 01:03:29 pm
https://docs.google.com/file/d/0B7WHuNCASY8cNjFzc210RUhKNFU/edit?usp=sharing.

This is completely a software/kernel issue and I'm not sure when we can compile a better image for the imx233-Micro.



Hi LubOlimex,

Is that LTIB 2.6 kernel? Asking because want to port that solution on latest 3.x

Fadil Berisha

ritzBerl

Quote from: LubOlimex on July 17, 2013, 01:03:29 pm
We compiled an image that shouldn't have power issues


Hello LubOlimex,

thanks for your support. Unfortunately I can't confirm that your image solves these power issues. My MICRO-board still resets after some minutes powered by battery. Any ideas?