Wednesday, September 16, 2015

Raspberry Pi 2 Model B–Adding Use 2.5″ Hard Drive - Hitachi Touro 1Tb USB 3.0


If you have a small portable 2.5″ hard drive that draws power from the USB port, you can make this work without the need for an external power supply with the Raspberry Pi. You will be modifying how the GPIO pins on the Pi work, specifically turning pin 38 on (represented by 1). 

This means you can double the current over the USB bus from 600mA to 1200mA so you can actually power external USB devices through the Raspberry Pi itself.
Update to latest firmware:
root@raspime:/# sudo rpi-update
Edit /boot/config.txt
root@raspime:/# nano /boot/config.txt
add this line to the /boot/config.txt
max_usb_current=1Reboot
VerifyCheck gpio38, value should be '1'
sudo bash
root@raspime:/# cd  /sys/class/gpio
root@raspime:/# echo 38 > /sys/class/gpio/export
root@raspime:/# cat /sys/class/gpio/gpio38/value
1
OR
Using the wiringPi gpio command, you can do the following:
To make sure everything in default conditions
gpio -g write 38 0
gpio -g mode 38 out
To increase the limit to 1.2A:
gpio -g write 38 1
Verify
root@raspime:/# gpio -v
gpio version: 2.26
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Raspberry Pi Details:
  Type: Model 2, Revision: 1.1, Memory: 1024MB, Maker: Sony
Check gpio38, value should be '1'
root@raspime:/# gpio -g read 38
1

No comments: