Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

RPi power from 12V battery


Recommended Posts

Some while ago I made a power pack from a substantial 12V leisure battery  with a view to being able to find some dark skies and get away from my patio.

I have also added a 12V to 5V 3A supply so I could power the RPi running KStars and Ekos.
The picture below is before I added this 5V but gives you some idea of the size of the thing.

1610902110829.thumb.jpg.7aaf43165de7c954e4133048dc08a941.jpg

But unfortunately attempts to use it have proved problematic.
It works in a fashion but the RPi runs very (VERY) slow when using it. SO slow it is essentially unusable,

If I power the RPi from the 240V power supply and everything else from the battery then it works fine so obviously I have an issue with the 5V supply, either current or voltage is not correct;.
The voltage is 5V so I assume it is the current but I am using one of THESE (The 5A version) and thought is would be fine.

So no idea why I have an issue but wondered what do others use to power an RPi from 12V (Withous similar issues) ?

Steve

 

  • Like 2
Link to comment
Share on other sites

I would try adding two capacitors, one across the input and one across the output. 1000 uf electrolytic 25 volt. They are polarity marked so they need to be connected the right way round. It might be a defective unit as I have used similar items without problems.

  • Thanks 1
Link to comment
Share on other sites

1 minute ago, Tomatobro said:

I would try adding two capacitors, one across the input and one across the output. 1000 uf electrolytic 25 volt. They are polarity marked so they need to be connected the right way round. It might be a defective unit as I have used similar items without problems.

Thanks, I probably have some somewhere in Garage I can try that.

Steve

Link to comment
Share on other sites

This 5v converter is a form of switch mode power supply so is working at something around 15Khz to 40Khz.

Perhaps the ripple on the line (or harmonic rfi from this) is causing interference and upsetting the RPi.

 

Aah Tomatobro has just replied as I was writing ...

the capacitors will help suppress any ripple and suppress interference

 

If that does not work a linear voltage regulator might be a better solution, much less efficient as it is dumping excess voltage as heat , but it does not have the same problems as switch mode sometimes have.

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, teoria_del_big_bang said:

It works in a fashion but the RPi runs very (VERY) slow when using it

I'll be generous and describe the way the RPi manages its power as "cranky".
I have noticed that with a Pi 3b+ the speed of the CPU depends hugely on small changes to the input (nominal 5 Volt) supply voltage. Although this is stepped down on the RPi board to feed a much lower voltage to the processor chip, on my board with an input voltage of 5.0 or 5.1 Volts, the CPU never runs faster than 600MHz and the CPU core voltage (of which more, later) sticks at 1.2 Volts. Raising the input voltage to 5.25 or 5.3 Volts allows the CPU to run at 1200MHz when that amount of processing power is required by the applications.

I have a little shell script that I run which gives some insight into this:

#!/bin/bash

# script to send system health data to remote system

REM="/corv-downloads"                          # directory to write log wntries
RF="${REM}/`uname -a | awk '{print $2}'`"      # log filename
NOW=`date "+%d-%b-%y %H:%M:%S"`

if grep -qs "$REM" /proc/mounts; then
:
else
  echo "$REM is not mounted."
  mount "$REM"
  if [ $? -eq 0 ]; then
   echo "Mount success!"
  else
   echo "Something went wrong with the mount..."
  fi
fi

if [ ! -d "$RF" ] ; then
  echo "Logging directory $RF not found, creating it"
  mkdir -p "$RF"
  if [ $? -ne 0 ] ; then
    echo "Could not create remote logging directory. Error: $?, exiting"
    exit 1
  fi

  echo "created $RF"
fi

# now collect data to send

UPTIME="`awk '{printf "Up: %dd %d:%02d",int($1/86400),int($1/3600)%24,int(($1/60)%60)}' /proc/uptime`"
LOAD="`awk '{print "Load:",$1}' /proc/loadavg`"
CPUTEMP=`vcgencmd measure_temp`
FCLOCK=`vcgencmd measure_clock arm|awk '{split($0,a,"="); print int((a[2]+5000)/1000000)}'`  # rounding
VCORE="`vcgencmd measure_volts core | awk -F "=" '{printf "Vcore %0.2f\n",$2}'`"
ROOT_SPACE=`df / | awk 'NR==2 {printf "%0.2fGB",$4/1048576}'`
TMP_SPACE=`df /tmp | awk 'NR==2 {printf "%dMB",$4/1024}'`
FREEMEM="`free | awk 'NR == 2 { mt = $2/1024; mf=$3/1024 } NR == 3 { sf = $3/1024 } END { printf "Mem Used %d/%d Swap %d",mf,mt,sf}'`"

echo "$NOW $UPTIME $LOAD $CPUTEMP ${FCLOCK}MHz $VCORE ${FREEMEM} Disk free:${ROOT_SPACE} Tmp:${TMP_SPACE}" >> "$RF/health.log"

(This assumes the log data will be written to an NFS mounted directory on a remote Linux box. In this case that directory is called "/corv-downloads")

The output is a single line such as this:

25-Apr-21 11:40:52 Up: 13d 20:06 Load: 1.95 temp=53.7'C 600MHz Vcore 1.20 Mem Used 129/968 Swap 0 Disk free:21.81GB Tmp:54MB

I do not know what version Raspberry Pi you have, nor whether the RPi4 is any better (it has a lower CPU Core voltage to hopefully the designers created a better on-board power supply.

The other thing that matters a lot is the quality of the micro-SD card. On my Pi3b+ a cheap card writes I-O at about 4MBytes/sec (with the CPU at 600MHz) while a SanDisk Extreme manages 13.25MByte/sec. without changing anything else.

  • Thanks 1
Link to comment
Share on other sites

30 minutes ago, pete_l said:

I do not know what version Raspberry Pi you have, nor whether the RPi4 is any better (it has a lower CPU Core voltage to hopefully the designers created a better on-board power supply.

The other thing that matters a lot is the quality of the micro-SD card. On my Pi3b+ a cheap card writes I-O at about 4MBytes/sec (with the CPU at 600MHz) while a SanDisk Extreme manages 13.25MByte/sec. without changing anything else.

Thanks for this info it is all very interesting.

I have the latest RPi 4 with 8Gb memory and I am running it from a SSD drive not the SD card.

You could e right with the voltage though as I think this converter is bang on 5V and I et the 240V ps is more like 5,2V (I will check this).

Steve

Link to comment
Share on other sites

22 minutes ago, teoria_del_big_bang said:

I have the latest RPi 4 with 8Gb memory and I am running it from a SSD drive not the SD card.

That's encouraging. My Pi4's scream along with a bootable SSD. How's your WiFi connection? My Pi4's are in "full metal jacket" enclosures as I dislike moving parts such as fans. I hack-sawed off a corner of the aluminium as the case was shielding the WiFi signal.IMG_20210425_125045.thumb.jpg.82db52bad797d55021de0caa7c95cf29.jpg

  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, pete_l said:

That's encouraging. My Pi4's scream along with a bootable SSD. How's your WiFi connection? My Pi4's are in "full metal jacket" enclosures as I dislike moving parts such as fans. I hack-sawed off a corner of the aluminium as the case was shielding the WiFi signal.

I too have it in a metal case which virtually redners the WiFi next to useless so have a WiFi dongle that works a treat.
It has never put a foot wrong since, the connection is much faster and have no issues over a 100 meters through a couple of walls.

THIS is the one I bought.

Steve

Link to comment
Share on other sites

1 hour ago, teoria_del_big_bang said:

My case is a tad on the over-priced side but it houses the SSD as well.
It does have a fan but it can e disabled or set to come on a certain cpu temperatures and really is not required as the case acts as a passive cooler and is sufficient on its own.

RPi CASE

Steve

I have that case Steve. How do you set the fan to come over a certain temp?

  • Like 1
Link to comment
Share on other sites

1 hour ago, Richie092 said:

I have that case Steve. How do you set the fan to come over a certain temp?

If not already done install the software.

Open terminal of Raspberry Pi, install the driver by the following command
curl https://download.argon40.com/argon1.sh | bash

Then the following command
argonone-config #configure driver

image.png.b01c22ffbc7efdac38f56d152dba7586.png

 

You can then press 2 and adjust the fan speeds fan speeds for 3 different cpu temperatures (55, 60 and 65 C)., even turn fan off, for these temperatures.

If you press 3 instead you can select your own temperatures and fan speeds.

image.png.c637a26921100f1c5235fbe7e64e59ea.png

Steve

 

Edited by teoria_del_big_bang
  • Thanks 1
Link to comment
Share on other sites

Another thing that may interest some RPi users is that I read that a lot of people had issues with power due to the USB C connector being continuously plugged in and out the connections become loose or deformed.

So I bought one of these that is permanently plugged into RPi and so if something wears it is the socket on this lead and not the RPi and so can be replaced. 

USB Extension Cable 20 CM

Now this might be an old fault that is now cured on new RPi's I am not sure but I did it just in case.

Steve

Edited by teoria_del_big_bang
Link to comment
Share on other sites

20 hours ago, teoria_del_big_bang said:

If not already done install the software.

Open terminal of Raspberry Pi, install the driver by the following command
curl https://download.argon40.com/argon1.sh | bash

Then the following command
argonone-config #configure driver

image.png.b01c22ffbc7efdac38f56d152dba7586.png

 

You can then press 2 and adjust the fan speeds fan speeds for 3 different cpu temperatures (55, 60 and 65 C)., even turn fan off, for these temperatures.

If you press 3 instead you can select your own temperatures and fan speeds.

image.png.c637a26921100f1c5235fbe7e64e59ea.png

Steve

 

Thanks for your help Steve, I will give that a try this week.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.