Spy On Your Office

[Garagedeveloper] sent us his custom surveillance system, part 1, part 2, and part 3 after needing a way to find out why some cables at work were becoming unplugged (spoiler, the cleaners were messing up the wiring). At the base of the system is a web cam glued to a stepper motor. However, it gets much more in depth with a web front-end that allows the user to stream the feed and control the position of the stepper. We’re not particularly fond of how many different parts the project takes, while it all could be accomplished under C# with ASP.NET and parallel port library instead of including Arduino and excess code, but to each their own and the project turned out a success anyway.

30 thoughts on “Spy On Your Office

  1. MacAddict (now MacLife) did this back in 1997 with an old school black-and-white QuickCam, a small motor, and a pivot made out of a couple AOL CDs. It even had a thermometer that read the office temperature. The general public (at least the ones on the Internet back then) could go to their site and turn the camera, once their turn came up.

  2. Why create an extra layer of unneeded hardware with an arduino? This jakob guy seems to not know what he is writing about but loves to fondle his arduinos. That would just add extra costs and extra coding time…. Web app>computer>arduino> stepper motor? I’m just astounded at you’re thinking process, I would love for you to state your reasoning.

  3. Heh so instead, he’d use C#, a whole pile of bloatware. And a “parallel port library” in a world that can’t find a parallel port on any computer I own.
    That and doing hardware timing of a steper motor with a naked parallel port with “just c#”.

    I think the hackaday editor should hide in a hole somewhere and learn a bit about general hacking and electronics before making an ass of himself like that again.

  4. “We’re not particularly fond of how many different parts the project takes?”

    So you speak for all of the Hackaday team? Please refrain from including opinion in your posts. If you’re going to write about something, write about it, don’t bash peoples’ methods.

    Maybe the guy doesn’t know C# or ASP.NET? Maybe he was the only one with the initiative to set this up in the first place, and he deserves a lot of credit for doing it without being a know-it-all?

    I certainly don’t know C#, or ASP.NET, or much of anything about anything, but knowing things doesn’t make one a hacker. The spirit of repurposing things and/or making something from scratch or components at-hand rather than buying a prepackaged product is what makes somebody a hacker.

    I think I have said enough.

  5. In fairness, lately it seems like every single hardware hack on the ‘net just *has* to include an Arduino in somehow… It gets a bit repetitive, and could send a false message to greenhorn hackers. (“You have to buy an Arduino to do anything fun.” Of course that’s completely false, but when you see a prominent hacking site and every post is Arduino this or Arduino that…)

  6. I don’t usually address individual complaints over an article. However, you caught me in a bad mood.

    @dissapointed I think you have me confused, I intended for a more code based setup with LESS hardware. Had you read, the original article USES an Arduino. I will admit, could have worded it better – but I was on a tight schedule.

    @BusError Just because you don’t have a parallel port, they are NOT impossible to find. I could have suggested serial, USB, any number of connections – LPT is one of the easiest. Continuing on, had you of read the article you would realize he doesn’t control the steppers naked with Arduino, he uses a dedicated stepper controller. I never suggested removing the controller part of the project. And I will admit, I’m learning everyday something new about hacking – but it is my past knowledge that landed myself this job, so I must know /something/.

    @Dash_Merc Here at HackaDay, for all articles we use a general ‘we’ to convey a group message that everyone here is in agreement – sitting around an office laughing, and loving everyone’s hacks…Even if we do not. As for opinions, I never bashed his idea, I suggested an alternative for future revisions to spark discussion among our readers; It seems I have accomplished my task. Moving forward (third time is the charm) had you read, you would realize the project is originally in C#, see the @deoryp comment below for full synapse.

    @deoryp He uses C#, I’m not about to suggest he learn a whole new language simply to control a web cam. Regardless, having programmed in C, C++ and C# myself, while there are the trade-offs, I find C# much more user friendly.

    @sarsface You’re actually partially correct, when I was a fresh writer for HAD I tried to balance the side. If there were a lot of Arduino posts, I would lay off them. But either way there is no winning. If we write about Arduino, readers hate it. If we suggest an alternative, readers hate it. So I gave up ‘sides’ so to speak.

    Its been said before, if you don’t like it – hack it yourself. Maybe one day you’ll be in the HAD limelight.

  7. “having programmed in C, C++ and C# myself, while there are the trade-offs, I find C# much more user friendly.”

    Correct!

    C# is pwsome – i’ve been developing with it since I made the switch from C++ 5 years ago and haven’t looked back. And LINQ is just one big pile of WIN!

  8. Re. C#, I second that!

    I can’t believe people still use C or C++. C# is just light years ahead in terms of user friendliness, compiler and API design and efficiency. The built-in libraries are very comprehensible and gives you basically all you can ask for. And it’s free!

    I hear all you Linux and Mac people worry about Windows-specific solutions, but seriously, get a life – I could code my own Linux in C# over the week-end if I needed one.

    C# ftw!

  9. but seriously, get a life – I could code my own Linux in C# over the week-end if I needed one.

    Posted at 11:44 pm on Jan 7th, 2010 by Johnny
    —————————————————

    wow, now i know you need a lobotomy to code in C#.

    lets get down to the basics as you have no idea about low level coding.

    1. its pretty much impossible to write native code with C#

    2. if you could compile native code with c# you couldn’t use any of the framework in 16bit real mode, thus you couldn’t code a boot loader, memory management, etc. also the dot net framework will not work outside of windows because the .net framework is dependent on win32/64 API so even if you do manage to get it to natively compile, dont use the dot net framework for any 16bit coding, its still useless when you pop the processor into 32bit protected mode.

    please go study some basic programming before making stupid comments.

  10. MS-bashing aside, C# is an incredibly enjoyable language to work with. I’m certainly not suggesting a one-language-fits-all approach, but if C# is a relevant language to consider for a project, I will use it wherever possible.

    @Drone: For simplicity of setup and coding, ASP.NET actually seems like a reasonably sensible approach in this situation. What would you recommend instead?

  11. @ BusError
    What, you only use laptops or macs? A Dell Optiplex and a fairly new Asus motherboard both have parallel ports. I don’t think I’ve owned a computer this century that didn’t (apart from the IBM PS/2 laptop I have stowed in the basement)

    As for bloatware, consider this analogy: To cut wood, all you need is a thin, sharp bit of metal. That doesn’t mean that radial arm saws, table saws, etc don’t have their place, even though their complexity doesn’t match the simplicity of the task. Sometimes you just want to be done in 10 lines of code.

  12. @Johnny:

    Hehe! I hope you were joking…

    C# is a wonderful language, but it has different applications than C++. You must choose your language in function of what you want to do. I work in the gaming industry and I coding a AAA game in C# is just impossible! But I would code all the tools and editors in C#.

    IMHO, there’s no war between C++ and C#, as there’s no war between C++ and Java. But there surely is one between Java and C#!

  13. Does anyone actually READ about these projects before posting? He did use C#.

    He does a good job explaining his reasoning behind the design too. The arduino supplied the power, eliminating an extra PS. And it probably also provided the USB interface (My box doesn’t have serial OR parallel ports).

    Besides, hacks usually start with what you have lying around. I don’t get these “he should have used…” posts. Just take it for what it’s worth, guys.

  14. @inetd.conf:

    Wow. Speaking as a programmer fluent in Assembly, C, C++, C#, Java, PHP, Python and probably one or two others – why the hostility? You’re right that it’s not sensible to try to write something apparently low-level natively in a managed language, but you’re wrong about it not being possible. Okay, it’s not pure C#, but Singularity (http://en.wikipedia.org/wiki/Singularity_%28operating_system%29) had its kernel and device drivers written in a managed C# derivative.

    And you say “dot net framework will not work outside of windows because the .net framework is dependent on win32/64 API”. I take it you’ve never heard of Mono (http://www.mono-project.com/Main_Page) then?

    @everyone: What the hell is with commenters these days? All I ever see is “Oh noes more arduino” or “I’ve been reading for years but I’m stopping because HAD is terrible now”. IMHO HAD is as interesting as it ever was; the only thing that’s gone downhill is the quality of the comments.

  15. Just a note on parallel ports – they aren’t obsolete, and were specifically designed just for directly controlling stepper motors in real-time. Really.
    Best thing for the job.

    Some of you might think parallels are just slow data cables. They were originally designed for real-time CNC control. Transferring data was just a bad hack applied to them after real-time control duties faded away with the advent of smart printers with data buffers.
    They were originally designed for dumb line printers and the like – steppers, limit switches, actuators, etc.

    Parallel is still the best tool for that job folks, and if you wanted to design a new CNC or stepper control port from scratch, its function would have to look exactly the same.

  16. Has anyone ever thought about the most common port used for printers at home before usb? and what type of motor is most typically found in a printer?
    Stunmonkey is very correct

  17. Well, I always make my own pc workstations, so I have a vague idea of the connectors stickin at the back.
    lets take my Gigabyte GA-EP45-Extreme here, runs my Q9650 at 4Ghz for over a year now.

    Not a sign of a parallel port on it. The previous P35 mobo was the same.

    And if I have to BUY a CARD to get an obsolete set of ports whats the fringgin point ? Why not use a nice FTDI chip and have a nice, modern USB interface that will even work from /any/ random, year 2000+ motherboard, development board, laptop and so on ?

    And what about getting rid of the PC and have an arduino (or other MCU, I don’t care) do an MCU job and allow the PC to be turned off ?

    Because THATS my suggestion to the original hacker here (not the myriad of wanabees wanking around). Don’t get rid not of the Arduino, just get rid of the bloat AND PC attached to it.

    You can get a small board, like a bifferboard or a ARM9 mini2440 (plug, I’m the kernel maintainer for this one) do the web interfacing and GPIO twiggling, and turn your silly PC off.

  18. I do something similar using a Logitech Orb camera with pan/tilt, UStream.tv, my iPhone, and VNC to monitor my home while I’m at work.

    I can watch the video stream either from the UStream website, or view a lower FPS stream on my iPhone using the JAADU VNC client. Since the VNC client gives me remote access to the computer running the webcam, I can easily access the UI for panning and tilting the camera.

    This way, if my dog gets up on the furniture while I’m at the office, I just VNC in and play MP3s in iTunes of me yelling at the dog.

    One bonus to this setup is I can easily record the videos for uploding to youtube. Here’s a video of it in action: http://www.youtube.com/watch?v=KcpV1ahFl7Q

  19. Parallel is NOT obsolete. It is perfect for it’s job, anything else that could compete with it would still have to work exactly the same damn way. Explain how its obsolete?

    You can’t use USB for real-time control. You can’t use it anywhere in the stream, so no USB-to-whatever connectors either.
    USB has delays, does bursts of data, and also compresses things into a serial stream, hence universal SERIAL bus. All of these things screw with timing and synching, so can’t be used for timing-critical apps. You would have to use something that works in PARALLEL, in real-time, and at decent triggering voltages.
    You know, like a PARALLEL port. Duh.

    The only part of it that is obsolete is using it for data transfer, something it wasn’t designed for in the first place.

  20. @AndyShaw:

    Singularity is not even close to being C#. at best its a cousin twice removed ( C# > Spec# > Sing# )

    and 99% of the low level code in Singularity was written in ASM and C including the HAL, Bootstrap, debugging and dispatch code. now if you bother to look close at Singularity you will notice the HAL is huge compared to other operating systems because of the limitations of sing# drivers.

    as for Mono, its still in its infancy even though mono has come along way in the past few years it still fails to support a lot of the dotnet frame work such as P/Invokes, poor winform handling, no cross process transactions, no com, no Enterprise.Services, doesn’t have full C# 4.0 compiler compatibility, little to no dotnet 3.5 support, no WPF, WWF or CAS.

    so lets be blunt, microsoft had to completely redesign C# and transform it into a new language just to write the basics of an operating system, but said OS still depends heavily on C/ASM for anything low level. ill admit its mildly interesting as a toy but at the moment its not much more than that.

  21. I would enjoy this blog more if HAD could lay off the second-guessing hardware/software choices of the projects you post up. You solve problems with the tools, parts, and knowledge you have available to you.

  22. @Jakob – You did get me there; I only read part 1 before returning to flame you, but nowhere does it mention C#…those notes are saved for part 2 and 3, if I remember what I read correctly.

    …and since you appear to not like it, perhaps you should hack it yourself, as you mentioned in your rebuttal to those of us who were particularly testy while browsing out daily dose of hackaday.

    And to everyone in general (not that anyone’s reading this; it’s for my peace/piece of mind, not yours): Arduino’s aren’t bad. They just provide what they set out to: a simple, easy-to-use prototyping platform. If somebody has an Arduino and is in a pinch, it’s a right quick way to a workable prototype, especially useful for those one-off projects that aren’t intended to be permanent, just to exercise an idea. That’s why so many people use them. That’s why I use mine: for learning, and for quick prototyping that even I — an uneducated electronics fanatic — can understand.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.