Jump to content

Lamobo R-1 Sata power


KF5YFD

Recommended Posts

Does the older stable version of wheezy have the sata power regulator patch?  I am having issues with my device shutting down if i access my drive on the Lamobo-r1_Debian_2.8_wheezy_3.4.107 image. I need the hardware support that the older version gives me along with a working sata drive install script. i dont seem to have the shut down issue on the newer kernal images.

Link to comment
Share on other sites

You mean this?

https://github.com/igorpecovnik/lib/blob/next/config/lamobo-r1.fex#L697

[sata_para]
sata_used = 1
sata_power_en = port:PB03<1><default><default><0>

I haven't notice such problems. All I know regarding SATA is it's proper powering - that's patch about. Is there any other solution? Once it's powered it works. I am having a rotating hard drive on it and it's working fine ... if I don't use HDMI and/or USB :huh:


Powering is in general problem with this board but thanks to poor board design. There is little we can do with software.

 

73   :)

Link to comment
Share on other sites

 

You mean this?

https://github.com/igorpecovnik/lib/blob/next/config/lamobo-r1.fex#L697

[sata_para]
sata_used = 1
sata_power_en = port:PB03<1><default><default><0>

I haven't notice such problems. All I know regarding SATA is it's proper powering - that's patch about. Is there any other solution? Once it's powered it works. I am having a rotating hard drive on it and it's working fine ... if I don't use HDMI and/or USB :huh:

Powering is in general problem with this board but thanks to poor board design. There is little we can do with software.

 

73   :)

 

 

 

 

i beleive this is the patch that made it work with the newer kernal image

 

https://github.com/igorpecovnik/lib/commit/c93c3ac25c984010ba5be98f83fab9102340b7f6

Link to comment
Share on other sites

FIRST OF THX iGOR FOR YOUR GREAT WORK AND HANDS-ON WORKING IMAGES :)

 

Sata powering, no nonsense, just inject the power 5 Volt into the LiPo battery connector and your ready to go.

Its idd poorly designed, and there are different solutions about, this 1 suits me fine.

 

I found the solution on a forum, if i find it again ill post the 1 who came with this solution. Credits due to that person who experimented, without risking his/your warranty.

The battery charger will shut off above 4,2 volts, and i was not using it anyway.

 

Because of another design flaw, watch the temperature of your hard-disk, its 40+ because it sits on top of something hot.

Especially if your using the closed acrylic case that comes with it.

 

Besides the hardware/design flaws in this board it will make a kick-ass router.

 

Edit: after injecting the 5 Volt to the LiPo socket press power on button

 

Greetz form Holland

Edited by Patcher
Link to comment
Share on other sites

Nearly all the stuff around the horrible power situation of the Lamobo R1 can be found in this otherwise pretty useless and crappy forum: http://bananapi.com/index.php/forum/general/391-why-the-sata-disk-doesnt-work-on-bpi-r1?start=12

 

I would have a look for undervoltage issues (very likely).

 

@Patcher: If you power the board using the LiPo socket does a connected HDD/SSD still work? And how do you solved the mechanical challenge to insert a plug into the LiPo connector and also use a disk (bending the connector?).

 

JFR: I used the board with an older image (3.4.106 or even older) and both a connected 2.5" HDD and a HDMI display. Since the AXP209 also has to power the disk on the Lamobo R1 you can simply read out the power requirements using sysfs. And due to the crappy Micro USB connector it's not possible to boot the board when a power hungry USB keyboard and mouse were also connected (peak consumption when trying to spin up the disk exceeded the overall power maximum). Without the USB peripherals it worked even with unpatched u-boot (rootfs on SATA). And when using the stress utility to produce some load the consumption of the board sometimes reached 9V (maximum since Micro USB allows 5V/1.8A max.)

 

And never ever use the original acrylic enclosure especially lying flat around. Both disk and the AXP209 power management unit might overheat easily due to bad placement and no airflow possible.

Link to comment
Share on other sites

@tkaiser.

Hi, i used this connector because i use a HDD.
If your not planning to use it with a HDD just use the normal way to connect through the micro usb.

To connect to this Li Po connector, just use an old 2 pin connector u can salvage from an old fan, its a normal 2 pins connector u will have laying around i guess.

Better not bend the connector because of warranty troubles.

Edit : removed confusing picture. for polarity see 2 posts down.

Link to comment
Share on other sites

Be sure u connect the 5 Volt at the bottom pin see photo.

 

Just to be sure: The pin closer to the PCB edge is 5V and the inner one GND? Or vice versa?

 

Thx for confirmation that a SATA disk will work when powered this way. 

Link to comment
Share on other sites

@Tkaiser

I just checked, and thx for your sharp eyes and acknowledgement of the polarity because the picture gave a false impression.

 

It would make no sense if the + was at the edge, even for Chinese developers. :blink:

 

 

So       + most inwards

and     -  outward pin

 

Removed the picture ofc.

Link to comment
Share on other sites

This is my first post, sorry for my English.
I bought one r1 bpi, I think it similar or the same lamobo-r1.
I download from blog this image Lamobo-r1_Debian_3.2_jessie_4.1.2.zip and tried use, but the same was not providing power to the SATA. After hours trying to understand the workings got the following solution:
sun7i-a20-lamobo-r1.dtb
--- /dev/fd/63	2015-07-14 05:24:00.879114523 +0200
+++ /dev/fd/62	2015-07-14 05:24:00.889113763 +0200
@@ -11,6 +11,7 @@
 		compatible = "regulator-fixed";
 		enable-active-high;
 		gpio = <0x1b 0x1 0x3 0x0>;
+		linux,phandle = <0x3a>;
 		pinctrl-0 = <0x34>;
 		pinctrl-names = "default";
 		regulator-boot-on;
@@ -820,7 +821,7 @@
 			ir0@0 {
 				allwinner,drive = <0x0>;
 				allwinner,function = "ir0";
-				allwinner,pins = "PB3", "PB4";
+				allwinner,pins = "PB4";
 				allwinner,pull = <0x0>;
 				linux,phandle = <0x27>;
 				phandle = <0x27>;
@@ -1067,6 +1068,7 @@
 			interrupts = <0x0 0x38 0x4>;
 			reg = <0x1c18000 0x1000>;
 			status = "okay";
+			target-supply = <0x3a>;
 		};
 
 		serial@01c28000 {

However not find source of dts,  then used the DTC tool. Could you help me change the correct file?

 
Another thing, uboot is not leaving the PB3 value high. Is there any solution?
I try install linux-u-boot-3.4.107-lamobo-r1_3.0_armhf.deb using only dpkg -i linux-u-boot-3.4.107-lamobo-r1_3.0_armhf.deb, need some else?
 
 
Thanks.
Link to comment
Share on other sites

This is the DT that I use:

 

https://github.com/igorpecovnik/lib/blob/next/patch/sun7i-a20-lamobo-r1.dts

 

According to the configuration it should work. I was not checking the last R1 build for sata power.

 

I try install linux-u-boot-3.4.107-lamobo-r1_3.0_armhf.deb using only dpkg -i linux-u-boot-3.4.107-lamobo-r1_3.0_armhf.deb, need some else?

 

Yes, that's the proper way to install u-boot.

Link to comment
Share on other sites

This is the DT that I use:

 

https://github.com/igorpecovnik/lib/blob/next/patch/sun7i-a20-lamobo-r1.dts

 

According to the configuration it should work. I was not checking the last R1 build for sata power.

 

 

Yes, that's the proper way to install u-boot.

Thanks for supporting ;)

 

I'm not sure, last four boots hard drive spin ok. I think now using last uboot. "U-Boot 2015.04-dirty (May 25 2015 - 08:34:10) Allwinner Technology"

I think dts file not good for power sata. But included target-supply work well.

Maybe at your next build, can you include this? Your work is very nice. :D

 

https://github.com/Lamobo/Lamobo-R1-OpenWrt/blob/master/target/linux/sunxi/files/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts#L63

https://github.com/igorpecovnik/lib/blob/next/patch/sun7i-a20-lamobo-r1.dts#L100

 

Thanks

Link to comment
Share on other sites

Hi Josef,

 

u want to do both?

so charge the LiPo and powering the board at the same time?

 

It wont be possible without some additional electronics, so NO its charge or Power the board.

 

 

Sinc P.

Link to comment
Share on other sites

so charge the LiPo and powering the board at the same time?

 

I read it like 'powering the board using the Micro-USB-pwr-in connector and using a LiPo battery as UPS'. And the question is whether the board will supply power to a SATA disk when running on battery (UPS mode).

 

This is somewhat different to the mode we power the board (providing more than 4.2V on the LiPo connector therefore forcing the AXP209 into 'non battery' mode). And according to 'multi' then the disk won't work: http://www.bananapi.com/index.php/forum/general/391-why-the-sata-disk-doesnt-work-on-bpi-r1?start=24#1817

Link to comment
Share on other sites

FYI: Running the very same test (" cd /mnt/sda/ && stress -t 900 -c 2 -m 2 -i 2 -d 2"), first time with the R1 being powered through the LiPo connector and second run through the crappy Micro-USB power-in (consumption peaks and voltage drops down to 4.7V -- the PSU provides 5.0V and with just 20 cm cable and Micro-USB we loose between 0.1-0.3V idle/load)

 
Powered through battery connector:
 
Bildschirmfoto%202015-07-31%20um%2009.24
 
 
Powered the crappy way through Micro-USB connector:
 
Bildschirmfoto%202015-07-31%20um%2009.35
 
 
Bildschirmfoto%202015-07-31%20um%2009.36
Link to comment
Share on other sites

Hello everybody.

before exposing my actual problem a little summary so that others who faced the same situation might benefit.

 

I got my buggy Lamobo-R1 and tried every possible image with sata before finding armbian.

I didn't expect so many problems and I tried to mount my sata hd for the first time when the unit shut off.

 

The armbian image file stopped booting when a SATA hd was connected to the unit!

I spent 5 days writing to Sinovoip and reading their nonsense replies until they sent me a link on the bananapi

forums full of complaints about how poorly this unit was designed.

 

No improvement. My unit does not boot with 5v 4A power injected through battery connector (even pushing pwr on button).

 

Finally I tried the only other option I've read on the same forum here , injecting power to J12 connector, and couldn't boot either but - unexpectedly - after removing J12 power the Lamobo-R1 booted again with armbian sd image and the sata worked.

 

Summarizing no boot possible injecting powering the unit other than from the micro USB port

With micro USB + battery connector I can boot and use SATA (just tested mounting and accessing files though)

BUT if I use the HD drive continuously reading it for more than 22/25 minutes then the unit shuts down unexpectedly.

 

For the heat issues I read on forums I put silicon nuts to give 5mm space between the pcb and the hard disk but even with that the unit shuts down,

but honestly after 25 minutes the heat didn't seem that much.

 

Do you have hints/suggestions on how to proceed? I'll put a fan now to test if this behaviour is due to heat but I'm skeptical.

 

Thanks for any help you might give,

V.

Link to comment
Share on other sites

:-) I was in the same situation several months before. Lamobo can work perfectly, as both of my lamobo does, but you must: (thanks to Igor, Patcher, Tkaiser etc...)

 

- Operate Lamobo verticaly

- put high profile heatsink to BCM switch (under the harddisk)

- put heatsink to A20

 

If you use ordinary HDD with consumption 500mA, no USB, no WiFi, no HDMI and you have good USB power cable, you don´t need secondary power via battery connector.

 

20150915_193939.jpg

 

:-) It works :))))

 

PM

 

 

Hello everybody.

before exposing my actual problem a little summary so that others who faced the same situation might benefit.

 

I got my buggy Lamobo-R1 and tried every possible image with sata before finding armbian.

I didn't expect so many problems and I tried to mount my sata hd for the first time when the unit shut off.

 

The armbian image file stopped booting when a SATA hd was connected to the unit!

I spent 5 days writing to Sinovoip and reading their nonsense replies until they sent me a link on the bananapi

forums full of complaints about how poorly this unit was designed.

 

No improvement. My unit does not boot with 5v 4A power injected through battery connector (even pushing pwr on button).

 

Finally I tried the only other option I've read on the same forum here , injecting power to J12 connector, and couldn't boot either but - unexpectedly - after removing J12 power the Lamobo-R1 booted again with armbian sd image and the sata worked.

 

Summarizing no boot possible injecting powering the unit other than from the micro USB port

With micro USB + battery connector I can boot and use SATA (just tested mounting and accessing files though)

BUT if I use the HD drive continuously reading it for more than 22/25 minutes then the unit shuts down unexpectedly.

 

For the heat issues I read on forums I put silicon nuts to give 5mm space between the pcb and the hard disk but even with that the unit shuts down,

but honestly after 25 minutes the heat didn't seem that much.

 

Do you have hints/suggestions on how to proceed? I'll put a fan now to test if this behaviour is due to heat but I'm skeptical.

 

Thanks for any help you might give,

V.

Link to comment
Share on other sites

Finally I tried the only other option I've read on the same forum here , injecting power to J12 connector

 

The whole idea is crap. The person supplying additional power used the wrong Micro-USB connector (USB OTG and not power-in).

 

You always have to keep in mind that this is not a Raspberry Pi (where you can insert power easily through GPIO pins since its power scheme is totally different) but an A20/AXP209 device. And the PMU (AXP209) decides on its own where to take power from if there is more than one source available.

 

In case you use kernel 3.4 I would suggest installing RPi-Monitor with the sunxi fixes since this immediately shows you thermal values for SoC and PMU and the power used from the three different available sources (power-in, USB-OTG and LiPo -- for the latter not exactly when you connect a PSU to the LiPo connector since the voltage can't be read out and my sunxi fixes then assume 5V).

 

I delivered one R1 recently to a customer. Runs vertical, no heat sinks (one on the SoC but a crappy one that doesn't help at all) but some sort of convection and a small fan that jumps in if the PSU's temperature exceeds 55°C. Uptime while being totally stable for 30+ days. Temperature was a problem a few weeks ago when ambient temperature exceeded 30°C (since inside the enclosure it were 7°-8° above and then the PMU's temperature exceeded 55° -- might be ok if it gets higher but I decided to let then a fan cool down both SoC and PMU since the fan is just a few cm above both)

 

IMG_5550.jpg

 

IMG_5575.JPG

Link to comment
Share on other sites

Just to give an idea how many information sources are available (forget about the cameras since these are Raspberry Pis that record video on the Lamobo):

 

Bildschirmfoto%202015-08-16%20um%2015.32

 

The disk's temp can be read using S.M.A.R.T. (hddtemp package, already included by Igor), PMU using sysfs, SoC using a small binary included with my sunxi fixes, and I also used an internal thermal sensor to get an idea what's going on (since in the enclosure are 2 PSUs and 1 LCD with backlight and signal board)

 

In the statistics view RPi-Monitor provides graphs and there I differentiate between available voltage and used amperage for the power sources "USB OTG" and "power-in" (unfortunately not available for the LiPo connector when used together with a PSU). But this way you get a clue what sort of problem you're running into (most likely undervoltage due to bad USB cables and the most crappy connector in the world: Micro-USB).

Link to comment
Share on other sites

Nothing to add, just a breadboard a 4.7K res on a base of a transistor (picture TKasier) and that  petrmaje didn't give up on the R1, makes me smile. :rolleyes: 

I geuss Goethe is right again : "In the realm of ideas everything depends on enthusiasm... in the real world all rests on perseverance.

 

Currently i´am on a D.V.R. with R1 and zoneminder (ipcamera) project, no problems, and damn the A20 still keeps surprising me.

 

Caio from Holland

Link to comment
Share on other sites

Nothing to add, just a breadboard a 4.7K res on a base of a transistor (picture TKasier) and that  petrmaje didn't give up on the R1, makes me smile. :rolleyes:

I geuss Goethe is right again : "In the realm of ideas everything depends on enthusiasm... in the real world all rests on perseverance.

 

Currently i´am on a D.V.R. with R1 and zoneminder (ipcamera) project, no problems, and damn the A20 still keeps surprising me.

 

Caio from Holland

:-) the board is so bad and so good... Goethe is right :)

Link to comment
Share on other sites

just a breadboard a 4.7K res on a base of a transistor (picture TKasier)

 

It's a DS18B20 (thermal sensor via 1-Wire). I had to learn it the hard way that in the SBC world all this thermal measurement stuff totally depends on ambient/surrounding temperature. You fire up the standard set of stress tests in the morning without heatsink applied and let RPi-Monitor measure the SoC's temperature. Being back from the office in the evening you mount the newly aquired heatsink and re-run the same set of tests. Big surprise: With applied heatsink the SoC's temperature is 4°C higher than without. In fact, the room's temperature increased by 5°-6°C and so the heatsink led to 1°-2°C less compared to the situation without. If you've not always an eye on surrounding temperature you easily draw wrong conclusions :-)

Link to comment
Share on other sites

Many thanks to all of you for the fast replies,

I took a pause from the Lamobo-R1 and used a BananaPro instead. I had no problems at all!

 

I'll try again later with R1 board and see if something improves. Sinovoip offered me to replace the board, but I'm afraid shipping back the board to china will cost more than the board itself... I'll report you if things improve.

 

BTW Thanks tkaiser, RPI-Monitor is a great tool!

 

I take advantage of this post to ask if anybody has a script for cloning a big sd card to a smaller one.

I use rpi-clone on RPIs but since armbian has a single partition rpi-clone does not work :-/

Better I start a new topic, not to mess up things in the forum too much...

 

Have a nice weekend,

V.

Link to comment
Share on other sites

Yesterday I installed the latest 4.4 kernel (apt-get install linux-image-4.4-bananian) for Bananian 16.04 (all patches applied) on a Banana Pi R1.  The install resulted in the "ATA not ready" messages I recall being present prior the inclusion of the power patch referred to in this topic.  The net result appears to be as before the inclusion of this patch: the disk isn't getting enough power to complete its initialisation.   Reverting to the 3.4 kernel fixed the problem.

 

When using bananian-config, the option to select the R1 as the target hardware is no longer available.  Instead it reports that various hardware configurations are now supported by the device tree, or words to that effect.

 

If this is a known problem, can anybody point me in the right direction?  If not, I'm happy to help in the diagnosis and resolution.

 

I'm using a Western Digital spinning disk.

Link to comment
Share on other sites

15 minutes ago, SteEdgar said:

If this is a known problem, can anybody point me in the right direction?  If not, I'm happy to help in the diagnosis and resolution.

 

- you can stabilise power by adding a battery or power there

- there has been major improvement in our latest kernel

Carefully read info at download page: https://www.armbian.com/lamobo-r1/

Link to comment
Share on other sites

Thanks for the speedy response!

 

The info on the downloads page states: "underpower issues are possible when using hard drive, HDMI and wireless together. Connecting a battery may help".

 

I've tried 4.4 without using HDMI or wireless and it still fails to provide enough power (my default use is wired SSH).

I'll try the latest kernel in the next couple of days and provide any useful feedback.

Link to comment
Share on other sites

You have to change whole image, since u-boot configuration might be problem in your case. Powering is defined there  ... but you have to understand that this board has serious design flaws and strange things will happen if you don't add battery or power on alternative way. Stock powering is simply broken on this board.

Link to comment
Share on other sites

11 hours ago, SteEdgar said:

- the latest 4.4 kernel (apt-get install linux-image-4.4-bananian) for Bananian 16.04 (all patches applied) on a Banana Pi R1. 

- bananian-config,

 

So you are using Bananian and asking here for advice ?

I have a spinning disk, a short cable and running  ARMBIAN  5.25 (no armbian updates, just Debian) works like a charm.

Since I couldn't get the WiFi to work with Bananian after 15.04  I have left this 'Distro' behind.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines