Adventures in Home Security Surveillance with a TS-7970

As you may have seen in my TS-7970 Home Security Systems video on YouTube, I took a TS-7970 quad core single board computer and built it into my very own home security system using the open source software Zoneminder. This product works very well for the two camera system that I have hooked up. In case you didn’t get a chance to see the video, I wanted a security system that was cost effective and still worked well with the capability to expand if I so desired. I was referred to Zoneminder by a good friend and coworker of mine. Since I work at Technologic Systems I thought it would be cool to be able to use one of our boards to build up this camera system. After getting approval to use one of our boards my journey began on making my very own security system a reality.

To start out I am NOT a software developer. However, with the available user guides, and the occasional help from my co-worker friend, I got the system working. When starting out I originally used a TS-7970 solo SBC to begin my project using a board from work that I prepared as if shipping to a customer including an 8GB micro SD card. Once I got home I got to work on the project. I have to say Zoneminder has some great install guides. They take you 80% of the way when using this SBC, the other 20% was trial and error and a little help from my friend that knows Debian much better than I. Once I got set up on my computer I connected to the board using the USB B port and TeraTerm on my computer. I booted the TS-7970 up to its main prompt and began following the Install guide on Zoneminder’s wiki for debian systems:

https://wiki.zoneminder.com/Debian_8_64-bit_with_Zoneminder_1.29.0_the_Easy_Way

First thing I had to do in the system was to create a password for the root user. Once I did that I did apt-get update  to make sure I was up to date. I then installed PHP, MySQL, and Zoneminder which also included installing apache web server onto the TS-7970. To install some of those packages I had to make sure to add the Jessie backports to my sources.list file (as mentioned in the guide). It took some time to do everything in the right order and to get it to work perfect. I believe I honestly had to do this three times to get the system working how I wanted it to. Again, I remind you I am NOT a software developer so I may have done stuff on accident that a normal more software savvy individual would not have. Once Zoneminder was installed I had to create a MySQL database that Zoneminder could use. Then I had to add Zoneminder to start automatically when the board boots. To get the apache web server to work properly I had to create a new user to the sudo group. Many fine tuning settings later my board was running Zoneminder and I could hook up my cameras that I purchased.

I was able to log into the Zoneminder web GUI and setup my cameras. This is specific to your cameras that you would use. The Zoneminder web service does well and has many options to tweak, many more than what I need in fact. Once I got the system up and running I was now able to tweak the cameras to detect motion and set the resolution. Mind you this is still on the TS-7970 solo board. I noticed that the FPS on the captured frames was around 8 frames per second, which I guess is normal for surveillance systems, but I wanted more, so I swapped out the TS-7970 solo for a quad core. By doing that I had to start all over and reinstall the security system. This time I also did some port changes for the apache server to go through the router, as well as API permissions so that only authorized users can access my system from the outside world.

After getting the TS-7970 quad core board up and going I was getting 20+ FPS on my captured video, much better! I was very happy with how this project came out, I now have a security system that is running on a single board computer that could honestly be installed almost anywhere since it is wifi capable, and is capable of running in environments that other boards are not. I could see this setup being used as a standalone server in multiple locations for a business with all of them sending the captures off to a single server over the internet. All of this is made possible by the TS-7970’s powerful hardware, it is definitely a great little system for this project.

After several months of use, the system is still working flawlessly, I have now downloaded ZM Ninja from the iOS store so I could have a nice app to check on my security system with. I also have a sweet base made by one of my coworkers at our office using our 3D printer (which also uses one of our boards as a print server), I have been very happy with this product but I still wanted to tinker because our little TS-7970 quad core board had more features available to use. One thing that would have been nice is more storage to keep events longer. My friend had an amazing idea of using the mSATA on the TS-7970, so I went on a search for a mSATA drive to use on my little security project. Two days later I received my mSATA drive and once I got home I turned off the board, installed the mSATA, and powered on the board. Immediately linux recognized the 32GB mSATA device. Using this guide: https://wiki.zoneminder.com/Using_a_dedicated_Hard_Drive I followed it step by step only to run into a few technicalities of binding and mounting folders, as well as getting the drive to mount automatically. After only about an hour worth of tinkering, my system was back up and running using this fancy new fast mSATA device with tons more storage. After adding the 32GB mSATA to the TS-7970 I noticed immediately an improved playback on the video when reviewing the stored footage. I was impressed to say the least.

 

Real World Example in Working with I2C Sensor Device

Let’s take a look at what it takes to read sensor data from an I2C interface (aka I2C, IIC, TwoWire, TWI).  In particular, we’ll be reading data from the NXP MPL3115A2 Altimeter/Barometer/Temperature sensor.  The principles found in this guide can also be applied generically, even to your ambifacient lunar waneshaft positioning sensor of your turboencabulator.

Continue reading “Real World Example in Working with I2C Sensor Device”

All Your Base(plate) Are Belong to Us!

Print Your Own Baseplate for Development and Prototyping

Abstract

A new development baseplate and accessories for the TS-7670, TS-7680, and TS-7970 are now available for 3D printing. The main baseplate features standoffs for securing the single board computer (SBC), clip mounts for cable management, and tabs for attaching accessory boards. The accessory boards include a full sized breadboard mounting plate, and two (vertical and horizontal) half-sized breadboard mounting plates with compartments for organizing resistors and components. Two different sized cable clips are also included. You can download the STL files for 3D printing by referring to the product webpage in the resources tab, or directly here:

Development Baseplate and Accessories for 3D Printing

Continue reading “All Your Base(plate) Are Belong to Us!”

Hot Off the Press: Working with I2C Sensor Devices

Nuts and Volts has published the article “Working with I2C Sensor Devices” in the July 2017 issue.  It walks you through how to interface with an I2C device using a single board computer.  Be sure to visit your local bookstore and pick up a copy while they’re available!

http://www.nutsvolts.com/magazine/article/working-with-i2c-sensor-devices

http://nutsvolts.texterity.com/nutsvolts/201707/?folio=36&pg=36#pg36

 

 

IoT, Here We Come! Ubuntu Core Announced for TS-4900

In a joint press release between partners Canonical and Technologic Systems, the pairing of Ubuntu Core and TS-4900 was officially announced.

We couldn’t be more excited!

We feel that Ubuntu Core is going to make a big splash in the IoT world for its security, ease of management, and flexibility.  Combine that with our rock-solid, industrial TS-4900 and you have yourself a reliable, production-ready IoT device.

We’re very honored to be featured in the Ubuntu booth at the Mobile World Congress in 2017.  For more information, please take a look at the press release, Bringing Ubuntu Core to the i.MX6 Based TS-4900.  If that isn’t enough to quench your thirst, take a look at our Ubuntu Core Powered Embedded Systems page.

 

Practical Guide to Getting Started with the TS-7970

ts-7970-connected

Introduction

This guide will walk you through the basic steps of getting your TS-7970 up and running. It’s mostly an extrapolation from the official TS-7970 Manual, but provides a more practical and casual approach in setting up common connections, networking, and environments to begin development.

Continue reading “Practical Guide to Getting Started with the TS-7970”

Building a Yocto Image for NXP i.MX6 Products

yocto-project-thumbdrive

Things to Know

We’re going to be walking through how to prepare a Yocto build for use with our i.MX6 products, specifically the TS-4900 which we have a special build recipe for. A build recipe is a friendly term to describe the scripts and environment variables required to build a Yocto distribution. There are many other build recipes available which work on a more generic level as well, so this guide can be applied generally as well. This guide is both an echo and extension of the TS-4900 Build Yocto Distribution wiki page. I’ll be mostly echoing (aka copy/pasting) the steps, but I’ll also add a few notes along the way. I’m going to assume you’ve landed here because you’re using search terms that make you at least familiar with what Yocto is and the terminology that surrounds a basic software development environment. If you have questions, I’m happy to try and answer them in the comments that follow.

Continue reading “Building a Yocto Image for NXP i.MX6 Products”

Reading CPU Temperature and Controlling LED with C++ via sysfs

thermometer

Let’s take a quick look at an example C++ program which reads CPU temperature and controls an LED using sysfs. This example is a bit specific in that it’s only been tested on our NXP i.MX6 powered TS-4900 or TS-7970 running Yocto Linux, but the principles could be applied to other embedded systems as well. If you’re interested in the nitty gritty details about sysfs, take a look at The sysfs Filesystem by Patrick Mochel. Suffice it to say for our purposes, sysfs makes it easy for us to interact with system hardware using plain text files located in the /sys/ directory. The file to control the red LED is /sys/class/leds/red-led/brightness. The file to read the CPU temperature is /sys/class/thermal/thermal_zone0/temp. If we want to turn the red LED on, we simply write a ‘1’ to the file, and not surprisingly, writing a ‘0’ will turn it off. If you’ve booted up your TS-4900 or TS-7970, you can see this by running the shell commands:

Continue reading “Reading CPU Temperature and Controlling LED with C++ via sysfs”