Sunday, April 27, 2014

SBEC - Time Lapse Photography

Time Lapse Photography Using an Embedded Computer

The Raspberry Pi with Camera Addon Attached
I have been doing a lot of work on the Raspberry Pi, or otherwise known as RPi for short, over the last several months. It's a wonderful device that opens up a lot of possibilities for embedded projects, but it has its draw backs. There is no power down after shut down, at least out of the box, and the GPIO ports are in limited supply. Then along came the BeagleBone Black, otherwise known as BBB, in my life, and with its extra features and power, and an incredible number of GPIO options. This presented me with some options to explore, and decisions to be made. 

The RPi has proven itself more than durable and reliable. I have had the same Rasbian distro running in it since a few days after I bought it. Back then, I quickly modified the OS to run off of an older 120 GB Western Digital Elements USB powered portable drive. I installed LAMP (Linux Apache MySQL and PHP) features, WEBMIN, and wrote a few daemons in C++. As far as logging sensor data to an onboard database, this device has been stellar!

The BeagleBone Black with the Logitech USB
HD Camera. Photo Courtesy of Derek Molloy
Shortly after, I bought the camera addon and did some work with it, but considering the limited mobility of the camera, I quickly shelved the research until I came up with a project where the RPi would be mobile and deploy-able with the camera. Now that the RPi is part of my Seed Bed Environmental Control project, I am revisiting using its camera for time lapse imagery and resurfacing is the issue of camera mobility.

Then I made a fantastic discovery! Actually two, when you consider Derek Molloy along with the BeagleBone Black. I have had the BBB for awhile but I really didn't do anything with it until I was able to add a powered USB hub, a wifi dongle, and an external hard drive. Also, the hard drive definitely needs to be replaced. I am currently using an older SATA 160gb drive, but it is a full size internal drive without a case, and needs to be powered. I am using a eSATA USB drive hub that has its own power supply, but it is way to big and too power greedy to be considered for 24/7 operation. At least I know that the BBB has proven to be as sturdy and reliable using an external drive for its OS as the RPi has been. I just need to find a small self-powered drive to take over. 

Derek Molloy
Engineer, Researcher and Educator
Dr. Derek Molloy is a Senior Lecturer in the School of Electronic Engineering, Faculty of Engineering & Computing at Dublin City University. He lectures in Object-oriented Programming, 3D Computer Graphics and Digital Electronics at postgraduate and undergraduate levels. His research interests are in the fields of Computer & Machine Vision, 3D Graphics & Visualisation, embedded systems and e-Learning.
Derek Molloy Site
Anyway, I happened upon Derek while I was researching using the USB connection to allow the BBB to access the internet through my laptop. Not only was his YouTube video (Beaglebone: Getting Started - Windows USB Network Adapter Setup) dead-on the subject and solved it for me, I learned a considerable amount of other things as well, and a 'fan' was born. Like many that possess the level of electrical engineering education as Derek does, like David Jones for example, there were many more videos to be viewed. And it did not stop there. I also found a wealth of information provided by this champion of EE, and it has really opened up my eyes to the BBB.

So I checked out his video offering where he covers using a USB HD webcam connected to a BBB to record HD video and capture HD imagery. What he describes goes miles beyond what I have found using the camera addon for the RPi. And since I want the best I can get when it comes to time-lapse of our seed beds, this is a really good reason to switch to the BBB from the RPi in my Seed Bed Environmental Control project.

I could add it to the project, but the project is so overkill as it is. I do not see a need to add a second embedded computer to the mix. I will have to install packages however that allow me to cross compile for it as I do with the Pi. I believe I will have to set up another cross compiling profile on my laptop's virtual machine because the BBB uses ARM v7 instructions versus RPi's ARM v6. I am not sure if this makes a difference. I will have to research this.
Comparing BeagleBone Black & Raspberry Pi...
"BBB has the ARM v7 instruction set so there is a wider range of distros available. Things are still in progress post April launch, but the orig Bone had Android, Debian, Fedora, Ubuntu, Angstrom & many more. The Pi's ARM v6 instruction set holds it back requiring specialized distros that recompile packages for the older instruction set (like Raspbian)."




Saturday, April 12, 2014

2.4 GHz Module Channel Selection - nRF24L01 – RF_CH Register

ChannelFrequency (Mhz)Description
0 to 822400 to 2482Legal, but noisy (conflicts with wireless LAN, Bluetooth, etc.)
83 to 992483 to 2499Not legal for mobile
1002500Licensed in BC to Inukshuk Wireless
101 to 1192501 to 2519Legal
120 to 1252520 to 2525National and regional systems (Department of Defence, Telus)

I have discovered that not all the channels this module is capable of using are legal, not to mention suitable. Noise, traffic (blue tooth, wifi, cordless phones, etc.), play a vital role when picking channels to use. According to this page nRF24L01 – RF_CH Register the suitable channel range is 101-119. This cuts options down quite a bit considering that each pair will need a channel. Still, 18 pairs/links is more than enough for what I am doing, for now anyway. If this pool size looks like it will be breached, I will have to get creative on channel assignments.