Tag Archives: Raspberry Pi

Make your own Raspberry Pi Laptop

In this tutorial I will show you how to make your Raspberry Pi into a very compact full featured laptop.

PLEASE BE SURE TO READ MY “What to Avoid Purchasing” below, to save you money, time, and your frustration level red-lining. This is a very simple project to complete with very little actual hardware hacking involved. This will cost you roughly $180.00 US dollars to make, at the time of writing this post. I would highly recommend doing this if you can. This laptop has been absolutely wonderful to work with, portable, light-weight, and very useful.

*** Please NOTE; You will find all of the below parts listed on eBay. Trust me when I tell you this, I tried using other retailer websites but the cables I received were at a lower quality and because of this DID NOT WORK for the connections. If your reading this from Europe, you may get lucky with finding the below adapters and cables from local business’s, but from within the continental US,I was not able to locate the correct parts except on eBay. The total cost for all the needed adapters and cables from eBay was no more than $20 US dollars. I was able to find all the necessary parts from various distributors listed on eBay. The downside is that it will probably take 2-3 weeks for the parts to be received. Be sure to pay attention to the lengths of each of the cables listed below on the product websites, you will not need 6ft or 8ft cables for this project. I had a difficult time in finding these cables shorter than 3ft, but they may be out there. Shorter the better, you can make every connection with less than 1ft. I plan on modifying some extra cables I have lying around to better suit my setup. Patients in this project PAYS OFF.

Skill Level: Beginner
Project Completion Time: 30 minutes

Parts Lists
– USB Micro B 5p Female to Type A Male Data Charging Cable Cord 25cm.  (eBay)

Image 1 - Female Micro B USB to 2.0 USB Male OTG Connector
Image 1 – Female Micro B USB to 2.0 USB Male OTG Connector

– Micro HDMI to HDMI Male Adapter Converter Cable   (eBay)

Image 2 - Micro HDMI to Standard HDMI cable.
Image 2 – Micro HDMI to Standard HDMI cable.

– Female Micro HDMI to Female Micro HDMI Coupler. (eBay)

Image 3 - Female Micro HDMI to Female HDMI Coupler
Image 3 – Female Micro HDMI to Female HDMI Coupler

– Motorola Artix Lapdock.   (eBay)

Image 4 - Motorola Atrix Lapdock
Image 4 – Motorola Atrix Lapdock

– Optional – Long Range WiFi USB Antenna designed for Raspberry Pi.   (Sold by Adafruit Industries)

Image 6 - Long Range WiFi USB Antenna for Raspberry Pi - Sold by Adafruit Industries.
Image 6 – Long Range WiFi USB Antenna for Raspberry Pi – Sold by Adafruit Industries.

The nice part of purchasing this WiFi antenna from Adafruit is that it allows a better WiFi connection for your new laptop. But the other nice part is that this is the WiFi antenna used in Adafruit’s Tutorial on creating “Onion Pi” TOR Proxy. I had no problems configuring my other Raspberry Pi following their tutorial as a TOR Proxy with this piece of hardware.

What to Avoid Purchasing  –  PLEASE READ….
When I was initially getting all of my adapters and cables, I have to admit, I was not very patient.
Do not purchase this adapter, it will not work with the Motorola Atrix Lapdock. The reason being is that this adapter does not have a correctly grounded CEC/DDC Ground. The Motorola Lapdock as well as the Motorola Lapdock 100 receives it’s power state from the presence of a signal through the micro HDMI connector. No signal, no video, no power to your Raspberry Pi.What this means to you, simply, your Raspberry Pi will not turn on, nor will it display a video signal to the lapdock. I could go into a lengthy discussion about the electrical properties of this but I will not take up anymore of time than necessary to explain it. There are numerous web posts that describe possible workarounds for this, which I have tried and did not work.

Image 7 - Do not purchase this adapter. It will not work with your lapdock.
Image 7 – Do not purchase this adapter. It will not work with your lapdock.

 

Onward to Construction

Putting it all together

Once you have received all of your cables, adapters and lapdock, assembly is pretty straight forward.
If you are using a Raspberry Pi Rev2 then you can power the Raspberry Pi directly from one of the two available USB Ports which can be used to back feed power from the lapdock’s internal battery and run your raspberry that way. If you do not have a Rev2 Pi then there will be some mods which need to be made to the cables. There are several articles on the web for this modification and will be outside of the scope for this project.
The Micro-HDMI Coupler you purchased simply fits on the HDMI Male connector on the lapdock. Then plug your micro HDMI cable into the other end of the coupler, then into your HDMI port on your Raspberry Pi. Pay Particular Attention to which one of the two connectors your plugging cables into. The connector with a WHITE insert is the HDMI connector. The two connectors can look very similar but aren’t. I haven’t tested what happens if these two are reversed on the cables, but honestly I really didn’t want to find out either.

 

Post Construction Configurations

By the time you reach this section, you should have successfully cabled your Raspberry Pi to your Motorola Atrix Lapdock. The lapdock monitor should be displaying the boot-up POST screen after you attached the USB male connector into one of the USB ports on the Raspberry Pi. You should then be given the “Raspi-Config” screen if you are using a new, un-configured Distro image. Make sure you set your settings to, BOOT TO DESKTOP , then any other settings you prefer to have configured. Important if you prefer to use the standard US, 104-Key PC Keyboard, this will need to be configured as well within “Raspi-Config”. If you do not configure this, you may find the keys on the keyboard do not correspond to what it is your trying to type. Once you have completed your “Raspi-Config” configurations, select “Finish”, then “Yes”, to reboot the Raspberry Pi.
You will notice that by default the screen resolution is not fully configured for your lapdock monitor resolution. We will need to change this so that the Raspberry Pi uses all of the available screen size during operation. This is very easy to change but will require “root” privileges to the “boot” folder in order to change the screen resolution. There are two ways to change these settings, one way is using the Desktop GUI environment and the other way is through a elevated command line using “LX Terminal”. I will describe the desktop GUI way, since it can be pretty easy to accidentally change other settings within the “Config.txt” using a command line resulting in your Raspberry Pi NOT booting up.

By now, you should be seeing your Raspberry Pi desktop on your new laptop screen. Follow the steps below to change the resolution for full screen viewing.

1. Click on the “Start” menu icon in the bottom left corner of the desktop environment.

2. Navigate to “File Manager”, I right-clicked on it, and selected “send to desktop”. This makes it easy to not only access the “boot” folder, but also the “images” folder where your time-lapse photos are stored to copy to a thumb drive or other media.

3. Once the “File Manager” opens, select “Tools” in the menu bar, and select “Open current folder as Root”.
This will open another “File Manager” window, but you will have full root privileges. BE VERY CAREFUL USING THIS, you can delete or modify any file critical to the operation of your Raspberry Pi. The left column

File Manager Screenshot.
File Manager Screenshot.

4. You should see a column on the left side of “File Manager” screen, with “Places” showing at the top of that column. Select the “Down Black Arrow” and select “Directory Tree” and navigate to the “boot” folder, this will be located near the top of the directory tree. Remember, to modify any of these files you will need to be in the root permission level. YOU SHOULD MAKE A COPY OF THIS FILE BEFORE MAKING ANY CHANGES TO IT, and store it either on your desktop or on a removable thumb drive.Locate the file called “config.txt” and (right-click and select open with Leafpad). This will open the file in a notepad text editor application called Leafpad.

5. From within this file there is one change to make.
a) Uncomment or Remove the (#) from in front of
#disable_overscan=1
It should now look like;
disable_overscan=1

An in depth page describing the various settings of the “Config.txt” can be found at.
http://elinux.org/R-Pi_ConfigurationFile

Save the file and perform a reboot of your Raspberry Pi. That’s it.

Side Notes
1. I included a WiFi USB Antenna as an optional accessory. If you do have this make sure you use one of the two additional USB ports on the back of the lapdock to plug this into. If you plug this WiFi adapter directly into the Raspberry Pi while it’s on, it will cause the Raspberry’s power to dip resulting in a reboot.
2. If you plan on Overclocking your Raspberry Pi you may experience some quirky behavior, when typing using the keyboard, the input for a letter will start to repeatedly initiate. Resultingggggggggggggggggggg oop’s. Like that. To remedy this, throttle back your Overclocking setting. I’ve noticed this a lot when running on Turbo and using a Sony Class 10 SD Card with a write speed of 40 mbps (standard speed of class 10 cards). I have not had any quirks or bugs running my Raspbian off of a PNY 8GB class 10 w/ 45mbps. But experiment around and see what works best for you.

Turn a Raspberry Pi / PiFace Display into a Time-Lapse Camera

Make a Raspberry Pi and PiFace Display into a Time-Lapse Camera using Snap-Camera

Skill Level: Beginner – Intermediate
Project Completion Time: 2-3 hours

TimeLapse Camera – Parts List
— Raspberry Pi – Rev 2 Board
— Pi-Face Display Module (element14)
— Raspberry Pi Camera Module (element14)
— Mobile Phone/tablet Battery Charger Pack (5000mAh or higher)
**(I’m using an “Anker Astro 3E 15000mAh dual USB model)
— 8,16,32,64GB SD Card or Micro-SD (Class 10 – 45mb/S or higher write speed)
— Raspbian Wheezy Distro
— Snap-Camera Application

TimeLapse Enclosure – Parts List
— Plastic or Metal container (preferably one with good seals for weather proofing)
— Camera Tripod
— Velcro
— 9/32 Drill Bit (for camera module aperture)

OS Preparation

Listed below are step-by-step instructions for creating a time-lapse camera using a Raspberry Pi and PiFace Display. I used a modified Raspbian Wheezy IMG produced by “University of Manchester School of Computer Science” for use with the PiFace module.The latest Raspbian Distro caused conflicts with the startup script from running autonomously. I used an older Distro version which worked as expected during configuration. The custom Raspbian SD Image download link is: http://pi.cs.man.ac.uk/download/rpi_raspbian_piface_4gb_sandisk.img
You may wish to initially configure raspi-config with, boot to desktop environment, and overclock to “High” just until you complete the snap-camera install & configuration to make things a little faster. This is what I did initially and then tweaked everything way back once I was finished.
During the initial boot up (raspi-config) I enabled the following settings.
1. Boot to CLI (booting up all the graphical libraries in my thinking would drain the battery quicker)
2. Enable SSH
3. I verified that the camera module was loaded, as well as the PiFace binaries loaded on boot up.
4. Configured a unique hostname (aided in SSH session into RPi to view images if need be.)
5. Before I changed the overclock settings I updated “raspi-config”, in advanced settings. This took quite a bit of time to complete due to the older Distro that I was using for thus project.
6. After completing the “raspi-Config” update, and system reboots, you should now be looking at your desktop or CLI. If you are on the CLI prompt then type “startx” to boot to desktop. I then opened a command line and ran the following commands, (sudo apt get update), again this will take a while as it is an older Distro version and there is quite a bit to update within the OS. You should perform a “reboot” once the update has finished. Once the RPi has rebooted and you are now looking at the desktop, open another command line within LXTerminal and type sudo apt get upgrade. Once the system has completed upgrading its components, perform another reboot.

Snap-Camera Installation
Element14 has a PDF walk-through for installing the Snap-Camera binaries & python libraries.
http://www.element14.com/community/servlet/JiveServlet/downloadBody/65069-102-2-287269/SnapCam%20Installation%20Guide%20V1.2.pdf

PiFace Display and Control Installation
You will also need to install the, pifacecad, which is used for controlling the PiFace Control Display, piface.org.uk has a great tutorial with step-by-step procedures for step.
http://www.piface.org.uk/guides/setting_up_pifacecad/installing_pifacecad_package/

PiFace Display and Control – Documentation
http://piface.github.io/pifacecad/installation.html

Excellent webpage listing everything you could possibly want to know and do with the PiFace Display and Control Module.
http://www.piface.org.uk/products/piface_control_and_display/

Helpful Tips – POST Installation & Configurations
Couple of things to verify once you have installed the snap-camera & pifacecad libraries.
1. Make sure your PiFace Display is initialized (turns on, LCD displaying content) after rebooting the Raspberry Pi. This is the integral part of having a fully automated camera running on the Raspberry Pi.
2. I attached a “mini-USB WiFi adapter” to my Raspberry Pi for a couple of reasons. a) Some of my Time Lapse scenes were created relatively close to my home network which allowed me to SSH into the RPi and visually verify that photos were being taken, and stored correctly within the “images” folder. This can be achieved with the following commands; (cd snap-camera/images (Enter), ls (Enter)), assuming you configured the snap-camera to it’s default location. b) This also allowed me to SSH into the RPi and perform a proper system shut-down, to reduce any possibility of the SD Card data from being corrupted.

Camera Enclosure Construction
The size of your camera enclosure will be determined by the battery pack you use to power your Raspberry Pi.

Deciding on what type of enclosure you want comes down to preference, plastic, wood, metal, plexiglass, etc. My own decision came down from a couple of necessary requirements. I decided not to go with metal for a couple of reasons, my environment being the Sonoran Desert with 120 degree summers would have produced an oven for my camera, NOT GOOD! I did not choose a wood enclosure because it would have been an absorbent material for moisture which would have caused condensation inside the box, and water with electronics usually don’t go together. Plexiglass was a viable option but was fairly expensive to buy, and again with high heat could have distorted the joints over time, compromising the structural integrity. I originally had this setup contained within a frosted plastic Tupperware container which worked nicely, but made mounting to the tripod with full range of motion difficult to obtain. So I decided to go with a box form factor which worked nicely in the mounting setup.
Weather proofing the enclosure should also be at the top of the requirement list, since you will probably want to leave this outside for extended TimeLapse shooting. Preferably, an enclosure with few as holes as possibly since these will become possibly points for water, rain, dust etc to enter the enclosure causing damage to the electronics within.

Assembly
Assembly will vary based on your type of enclosure. Discussed below are the steps I did for my camera enclosure.

Enclosure Mount to Tripod

Shows the mounting assembly used to secure to the tripod mount. The wooden strips are the common paint stirrers that are given away at your local hardware store. The bolt assembly with a metal washer, followed by a rubber washer. I used the rubber washer insert to reduce the stress being put on the plastic enclosure and the cedar wood strips.
Image 1

In this photo, I used wooden strips (commonly used as paint can stirrers), you can get these for free from your local chain hardware stores for FREE.

  • I cut 2x pieces the length of the enclosure.
    (These will be used for the anchors to the tripod, 1 piece will be inside the enclosure, and 1 piece on the outside anchored to the tripod).
  • I then used an excess piece of wood to basically balance everything to make it level.
  • I used an additional 2x pieces of wood, laid vertically to make the surface level so the battery and raspberry pi were even, laying flat across the bolts.
Picture of the mounting assembly for mounting the plastic enclosure to the tripod camera mount.
Image 2

Seen above, the 2nd piece of wood, with the enclosure base sandwiched between the two strips of wood.
The reason why I sandwiched the enclosure between the two wood strips was to alleviate any stress or uneven pressure on the thin plastic. This way there was equal force on both the top and bottom portions of the bolts holding the enclosure with my time-lapse camera and battery to the tripod.
Note: This was also the choice in purchasing a large metal washer, seen in “image 1”, thus reducing the stress on the actual wood strip as well. Below the metal washer, between the bolt head and wood strip is a rubber washer “image 1” to dampen any vibrations and reduce any stress fractures to the wood.
The other bolt seen in “image 1” with no washers was just used to prevent the entire enclosure from free-spinning on the tripod, “locking bolt”.

Mount assembly for camera to tripod.
Image 3

Above “image 3” is an enlarged view of the mounting assembly from the enclosure to the tripod.

Camera Mount – Battery – Raspberry Pi / PiFace Display

Image 4
Image 4

Inside of the enclosure showing the Anker 10000mAh rechargeable battery pack, PiFace Display running Snap-Camera, Camera Module attached to the lid of the enclosure, and the mini-USB WiFi adapter on right side of Raspberry Pi.

Image 5
Image 5

Image 5 shows the mount for the camera module to lid of the enclosure. The camera module is secured in place with velcro. The diameter of the camera aperture is 9/32 drill bit size.

 

Some Videos I’ve created using the Snap-Camera & RPi Camera

Arizona Sunset with Adobe After Effects Processing

Arizona Sunset – No Post Processing

Sunset behind Saguaro Cactus

Thanks for reading.
More tutorials to come, including
Raspberry Pi Laptop
Home Automation with Z-Wave and the Raspberry Pi