LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-14-2012, 04:01 PM   #1
ochocobull
Member
 
Registered: Jul 2011
Location: Central Oregon
Distribution: Debian lenny
Posts: 30

Rep: Reputation: Disabled
Fun project


My buddy and I have an idea for a project but to be honest I don't even know if it is possible so I thought I would post the information out here and let the big brains tear it apart.

The idea is to run a compact unit that has the following components:
  1. Motion/heat sensor
  2. web interface
  3. NIC card
  4. camera
  5. Mass storage
  6. internet connection (provided by pre paid cellular)

The overall goal is to have a unit that will take a picture when a motion/heat sensor is triggered and inprint the date and time on the picture taken. Then send the picture via text message or email over the cellular connection.

I know this is all very simplistic but I thought I would run with it. My question is does this even sound feasible or is it ridiculous? Thanks for the help and if you need anything from me please let me know.
 
Old 10-14-2012, 04:54 PM   #2
archShade
Member
 
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
This is definatley possible.

First things first can you define what you mean by compact, do you mean a few cm^3 of the size of a small laptop.

My initial thoughts are use a Rasberry Pi Model B this has a NIC and a USB controller. I would guesse that you could connect a webcam and a USB prepaid dongle. Storage is provided SD card.

Other sensors can be connected via I2C/UART/GPIO. If you have no real knowledge of how to do this check out the Gertboard, this is a breakout board wich includes a simple PIC microcontroller which can be used to control other sensors. An alternative to using a motion or thermal sensor is to use the webcam by comparing frames for changes you could check movement quite easily. You would need to suppress some movement the system would be too sensitive (possible changing ambient lighting changes) but this is quite easy.

The R-Pi is the same size as a credit card and only take ~1A of current (5V uUSB power suply).
 
1 members found this post helpful.
Old 10-14-2012, 05:20 PM   #3
ochocobull
Member
 
Registered: Jul 2011
Location: Central Oregon
Distribution: Debian lenny
Posts: 30

Original Poster
Rep: Reputation: Disabled
Smile Thank you

That is great thank you ArchSHADE,

Now I have to look up all this new hardware.

The thought is that the unit would be approximately 8" x 12" x 4" deep. The only other cavout is that it needs to be able to withstand the elements. Probably would have to build a weatherproof housing or something like that.

I really appreciate the help and I will do some more research into the hardware you suggested. Thank you again.
 
Old 10-15-2012, 05:10 PM   #4
archShade
Member
 
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
Just to add the R-Pi model B has just had a Memory upgrade. The R-Pi model B now with twice the RAMey goodness.

No I'm not a shill for R-Pi but I do think there cool little boards.
 
1 members found this post helpful.
Old 10-15-2012, 06:04 PM   #5
ochocobull
Member
 
Registered: Jul 2011
Location: Central Oregon
Distribution: Debian lenny
Posts: 30

Original Poster
Rep: Reputation: Disabled
I agree I got the board ordered. I am looking into what type of camera and sensor I should get. Then I can begin learning bash or some other language to figure out how to tie it all together. With the information you have provided I think this should be fairly simple. I am sure that I will be posting on here very shortly. I really do appreciate all the help archShade and the quick responses they are extremely helpful.
 
Old 10-15-2012, 06:36 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
You have a lot of choices for a PIR (Passive Infra-red) sensor. You will need to determine the desired field of view and range.

Maybe something like:
http://www.parallax.com/tabid/768/Pr...3/Default.aspx
 
Old 10-16-2012, 09:47 AM   #7
archShade
Member
 
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
If you really want to use a seperate sensor to detect motion then a PIR sensor is a good choice. Best go for one with digital IC built in (like the one linked to by Michaelk) most have a simple high flag output that will pulse on detection.

There are some problems with PIR sensors:
  • Odd blind spots (packaged lens dependent)
  • False positive due to rapid ambient tempreture change.
  • False positve due to stray white or infrared sources, the sun and car lights are the two biggest issues. You don't want to be taking a shot every time a cloud uncovers the sun. (this can be mitigated using a hood).
  • False positive due to small animals entering FOV

To be able to read this you will have to either continually pole the sensor or come up with a way to make the GPIO give an interupt. Currently this is not in the vanilla kernal, a quick google gives at least one patch but I would go for polling.

I still like my idea of of capturing some frames with a time delay (say 10 frames with 100ms between each). These frames could be added to a circle buffer. If you take a bitwise average (I would guese geometric mean) and standard deviation of the previous 10 frames and compare it to the latest frame. If a cluster of pixels changes by more than 3 std deviations from that pixels average you call that a positive. Drop the frame buffer (10 shots) to the SD card and send a text/email. This would protect you from drifting ambient conditions. You could also apply some normalization for frame illumination, by normalizing each pixel to the the scene average. this would protect against false positive caused by rapid change in ambient lighting (frame being filled by a oncoming carlight. Nearby light coming on).
Best of all no need for additional sensor equipment.


No matter what you choose to do I would recomend against using bash for this project. I appreciate this is mainly due to personal choice but I find bash difficult to work with for much more than reasonable simple adminitritive scripts.

I personally would use python, although this is definatley personal choice. The best tool is the one you can get the job done in
 
Old 10-22-2012, 12:07 AM   #8
ochocobull
Member
 
Registered: Jul 2011
Location: Central Oregon
Distribution: Debian lenny
Posts: 30

Original Poster
Rep: Reputation: Disabled
Thanks again for the reply really great ideas. I have not abandoned this project I have been learning a little about python and attempting to get my gear working the way it should. It is proving to be a little more difficult then I expected. Then another friend of mine suggested a different direction so I am going down that road. The trick to this approach is the ability to have an SD card extender of some type. Sort of like the cables used to update a gps however I need to have an SD card on both sides one being the storage unit. So I am off now to find that type of cable or see if I can have one built. Thanks again for all the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Quick review for SING, first distro of 31 Flavors for Fun project LXer Syndicated Linux News 0 08-04-2012 02:30 PM
LXer: The 31 Flavors of Fun project has been started LXer Syndicated Linux News 0 08-04-2012 08:40 AM
Fun project ochocobull Linux - Server 3 03-06-2012 09:38 PM
LXer: GNU Project Debugger: More fun with GDB LXer Syndicated Linux News 0 10-10-2006 03:54 AM
Fun new security project LinuxBlackBox Linux - Security 2 10-01-2006 07:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration