Tag Archives: raspberrypi

From reading Adafruit’s excellent dissection of the (then new) RPi Model B+ power supply I had learnt (from the schematics) that 5V GPIO pin was directly connected to RT8020AGQW step down DC/DC converter (5v to 3.3V/1.8V) which automatically switches to a low-dropout mode. So it should be possible to power a RPi B+ with much less than 5V at the GPIO 5v pin. Relevant excerpts from the data sheet:

Since I did not have the right equipment to test for this at that time I tried calculating it from the datasheet. Assuming a worst case Rds of 0.5 ohms for the PMOS at a current of 700mA (model B+, camera module, USB wireless) I get a voltage drop of 0.35V across the PMOS. So if we ideally want 3.3v at the output, then VIN should be 3.65V. At this point I should add that I am not completely sure if that is the correct way to estimate the dropout.

Now that I own an adjustable power supply I wanted to test that out. The only RPi I had on hand was a model A+ so thats what I used.

DISCLAIMER: All numbers below are from a very rough test and come with no guarantees. This means that if your house burns down or something terrible happens because of using something I said then I am not to blame for that.

Test A:

I tried booted the RPi at 5V, with a keyboard and HDMI monitor connected. Then I launched Minecraft (wish the RPi foundation included a stability testing benchmark) and started lowering the voltage. For the short duration of time that I tested I was able to run without any brownouts at 3.5V. Going lower to 3.4v or even 3.45V would cause random reboots, which brings us to the next test.

Test B:

While the RPi was rebooting I increased voltage back to 3.5V but noticed that was not sufficient and the RPi stayed stuck in a continuous reboot cycle. I was able to see the RPi booting up messages but at some point during that it was get reset. In hindsight I should have tried to make a video to figure out when exactly the reset happened. I next tried 3.6V which also did not work. I was only able to stop the reboot cycle at 3.7V.

Test C:

Next I unplugged the keyboard and plugged in wireless dongle and again tried lowering the voltage. I was able to sustain a download over wifi with X server loaded at 3.5V.

Conclusion

The calculation was fairly accurate and as expected the model A+ was able to operate at a lower voltage than calculated because of using less current.

Coming back to the title of this post, I went down this path because I wanted to minimize components and was wondering if I could directly power the RPi for my remotely controlled home rover from the Li Ion battery. Searching for lithium ion battery discharge curves I see that at 1C rate reaching 3.5V would be somewhere in the 60% to 80% discharge capacity of the battery. So if I want to use the full battery capacity I should use a step-up converter, but if I don’t care about that I should be able to power up a Rpi with a lithium battery connected directory to Vin. Monitoring the current and voltage to the RPi might also be a good option to ensure stability to raise early warning if the voltage goes too low.

UPDATE: Wow… it was easier than I thought it would be. I was able to quickly get to the same level of functionality as that previous post in less than an hour. Here is the push message posted to Prowl app using the cellular shield by a python script running on the Raspberry Pi.

Setup config files

~/.vimrc

set expandtab "et"
set sw=4 "shiftwidth"
set smarttab "spaces for tabs ?"
set ts=4 "tabstop
set shiftround
"Indentations and line numbers
"set number "nu"
set autoindent
set cindent "ci"
set incsearch "incremental search
set hlsearch "highlight search
"line break - causes word granularity wrapping
set lbr
set wrap
"Folding
syntax on
syntax sync fromstart
set foldmethod=indent
filetype plugin indent on
syntax enable
"set invlist
set showmatch "sm"
set smartcase "scs no ignore case when pattern has uppercase
set backspace=2 "bs how backspace works at start of line
filetype on "filetype detection on
"dont indent when pasting with middle clicks
set paste
" Make shift-insert work like in Xterm
map
map!
set nocompatible "dont emulate bugs
" configure command line completion
set wildmode=list:longest,full
" setup status line
set statusline=%F%m%r%h%w\ [%{&ff}]\ [%Y]\ [%07l,%07v][%p%%]\ [%L]
set laststatus=2 " always show the status line

Serial port setup

console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
And comment out the following from /etc/inittab file:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

You also might want to install minicom for monitoring:

$ sudo apt-get install minicom

To setup the serial port packages required for use with python:

$ sudo easy_install pyserial

Reboot time

As per my rough measurement it takes around 90-120 seconds for the raspberry pi to be able to accept ssh connections after initiating a reboot. I suspect that this is partly because of my slowish class 4 memory card. I was getting much quicker boot times with the 45MBps UHS-I SD card from my camera.

Change hostname

Update it in the following files and reboot:

$ sudo vim /etc/hostname /etc/hosts

And lastly

Once you are happy with your config remember to make a backup img of your card which you can restore if anything goes wrong.
A useful suggestion I found here was to zero out the free space to get better compression.

Webroll

Plan to leave a comment?

If you are human and seeing that your comments to a blog article are not being approved, then its possible that because of the content of your comment I am not able to tell it apart from spam. So unless you say something that seems to indicate that you have read the page I will not be approving your post.