Comments

Episode-1551- Eric Escobar on Automation — 91 Comments

  1. Printing your own toys or new accessories for toys. Brilliant.

    I’ve been pretty majorly into Raspberry Pis and Arduinos for 3 years. I have ramped up and down development on them as it makes sense.

    I have been running code from an arduino outside that has been tracking soil and air temperatures into a database all winter. Who has localized ACTUAL chill hours? This guy right here.

    • That’s pretty awesome Mike. What else have you done with them. I’m always curious to see what other people have done.

      • Off and on for 2 years I was developing a soup to nuts monitoring system entirely in python. I built a framework on the arduino that would allow you to send it commands and basically do everything dynamically from the command line, rather than recompiling for each and every change.

        That functionality has recently been completely beasted by the Pinoccio, and at this point I think anybody who is even thinking about arduinos should look at them first, by a long shot.
        Pinocc.io

        The idea was to be able to constantly monitor and grab datapoints and save them on a mongodb server that I have running, using radio (XBee). Some other equipment that I have gotten really hot on is the Sodaq. This thing was built with longevity and low power in mind, perfect for monitoring situations. I have it sitting out there under an almond tree sending radio back to the house running off a little solar panel and power supply.

        I am using probes from Atlas Scientific and Vegetronix

        It has been fun, but its definitely one of those things that I spend more time in consideration if specific “automation” is worth the amount of time needed to invest in it. Obviously the more often you do it, the more you stay up-to-date with your skills the faster you can implement solutions. I just try to balance it with real world realities, and at the moment am much more hot on building mobile farm note taking software than anything else.

        • I’ll check these out! That’s pretty cool. For my low power wireless stuff I use:
          lowpowerlab.com

    • I wrote some scripts and put a raspberry pi with a camera outside taking pictures a few times a day everyday, it was one of the coolest things I’ve ever done and had it running for a month or two. I even had a script that each time a new picture was taken it would be sent to my computer and set as my background, so I could see still images of what my property looked like all day. Very very nice when you’re indoors all day.

      I will say weatherizing these devices can be a severe pain in the ass though, and almost always results in an obnoxious number of Lowe’s/Home Depot trips to get parts. Being able to weatherize the camera so I could take pictures all year long from a remote location (Rather than the safety under my awnings) was one of the last things I was working on. In fact, I’ll say the casing these things outside was always a thorn in my side.

      This is what I ended up going with for an outdoor container:
      Weatherproof Outdoor Enclosure

      • Correct! I mean I do a reasonable job weatherproofing by putting it in an enclosure, but this has prevented random moisture damage for my cheap arduinos. I wouldn’t do it for something as expensive as a raspberry pi, but here’s a decent video…

        https://www.youtube.com/watch?v=GNJ4CEoOg4g

        I figure if you can submerge it, that it must protect reasonably from other types of moisture/water damage.

      • I have six Raspberry Pi’s running as wireless cameras using Motion. They are all outside. I built weatherproof enclosures for them using an 1 1/2″ LB electrical junction box (Google it if you don’t know what that is).

        On the LB’s long end, I grabbed an old CD case and used my scroll saw to make a clear lens. For cutting out the lens I covered the CD case with duct tape, this kept it from cracking when I was cutting with the saw. A little trimming to fit, and simply epoxy the lens in to the LB box.

        The Raspberry Pi camera is a small PC board a little less than 1″ square. It has holes in each corner. I grabbed some 12 gauge electrical wire and stripped the insulation off. The copper wire just fits through the holes in the camera. A little bending with some pliers and the copper wire goes in one hole, and loops back through a 2nd hole. That holds the PC board to the wire, and I could use the rest of the wire to bend as I see fit, and loop around a simple bolt I screwed through the LB box, mounting it inside the lens.

        The 1 1/2″ LB box is just big enough to fit the Raspberry Pi along with the wall-wart power supply. The Pi will be positioned so the power plug is facing out the other hole in the LB box. My local Ace hardware has thick rubber stoppers for a couple bucks. I drilled the stopper to create a little divot which allows the Pi’s power plug the room to fit.

        Finally I just use a cheap extension cord for power – the $3 for 6′ simple brown 2-wire extension cord. I snip off the 3-way plug on the end, drill a hole through the LB box, and snake the wire inside. I strip some the insulation off the ends and manually attach it to the power plugs on the wall-wart, covering it with a little electrical tape. I seal the wire hole with a little silicon.

        I screw on the top, and now I have a weatherproof Raspberry Pi camera! I use the Motion software which will save a video and picture whenever it sees a significant change in the image. I have a NAS device elsewhere in my network where it is getting saved – so I am not burning up the limited storage the Pi’s SD card has. And I can monitor the live video as well. I have two monitors on the wall of my office tied to a single old laptop using VLC Media player to display the six camera windows.

        I did fortify my wireless network prior to implementing the Raspberry PIs. I have been very happy with UniFi’s Ubiquity wireless system. I deployed three interior access points and one of their weatherproof external APs. I have fully saturated my property with WiFi, much better than the all-in-one-wireless-router wonders.

        Two of the cameras have the infra-red Pi cameras, and I have IR LED lights next to them. They are so-so. Once in a while I catch a bat or some other creature going by the camera at night. They work fine during the day, but the colors are all wrong. Good enough for a security camera though.

        The first three cameras went up in December, and the second three over the following months. So far, so good. They are holding up to the 100% up time, and I have not had any weather damage to them. Summer months in the heat may be a bit different, I don’t know.

        There is just something cool about being able to SSH into a little computer under the eves of the house or mounted to a pole in the yard. Especially when I realize that little computer exceeds every capability of my first desktop PC I bought 20 years ago. Amazing!

        HTH,
        -Eric

        • Eric, I too have a few of those setups running motion. One issue I ran into that I didn’t like was the the LED on the camera module stayed on and I couldn’t find a good way to disable it.

          I have since cut back on the number of Pi’s i have doing survelance because I found a killer camera system that was cheaper than the individual pi camera solution.

          I do agree with you though, it is pretty wild to SSH into a box that is in some remote location. Whenever I update my code to my chicken coop I always get this weird ‘wow I’m digitally in a chicken coop’ moment!

  2. Great show and great timing! I have an ag engineering degree and have been exposed to enough automation stuff in college (mostly using basic relays and usb based computer controls) to be a little knowledgeable. The raspberry pi thing is new to me and I’m going to be buying one of those!

    Now I know exactly how I’ll be able to set up my Salitan chicken tractor to run a couple days by itself while I’m camping memorial day weekend.

    One question: looking on Amazon, ther really are several types of raspberry pis, which type should I get at first? He mentioned a starter pack for $50 but can’t seem to find a starter for under $80.

      • I agree, amazon is great for getting things fast. When it comes to electronics, there’s a scale of cheap but will take a month to ship, to something like amazon or adafruit that is more expensive but you’ll have it by the weekend.

      • Thanks for the reference! After I got looking at it, looks like an arduino should work best fo what I plan to do. I’m thinking of using a truck wiper motor (they have amazing torque) with a couple pulleys and servos for engaging separate systems. Then I can progam to block/supply food, raise and move the tractor without needing to be around.

    • Matthew, don’t overlook electric wheelchair motors. I picked up a few for free from my local home hospice care center, they get rid of the chairs when they break. The motors are 24VDC gear motors with built-in brakes… they have lots of torque, and the chairs usually come with a two-channel motor controller… neat stuff to play with. I have one motor from a Rascal scooter controlling the up/down lift on my sawmill, and two other wheelchair motors running the sawdust conveyors, but they could be used for all sorts of things.

  3. I need to listen to this episode as I need to automate my mobile chicken coop doors opening in the morning and also provide lights to them in the evening during winter time.

    I’ve got a 10’x24′ mobile coop with about 130 chickens I rotate around the pasture so no electrical infrastructure. Will need to be all battery powered with maybe solar to keep batteries topped off.

    • I created a chicken door for my mobile coop, using a timer /dpdt relay/ window regulator. It all runs on 12 volt and i have a deep cycle battery and small solar panel. I still have enough draw that i hook up my schumaker charger to top things off on occasion. You will definitely need a pretty good sized panel array and battery bank to run a light on top of whatever draw your door pulls. Not too mention the heat and cold gets to the batteries as well.

  4. Is there somewhere on the TSP website that one could go to and see all the Bob Wells plants of the week without going through each episode? I listen to the podcasts while I’m driving for the most part, and can’t easily write them down along with their attributes, but it’d be great to go to a listing of all of them suggested so far.

    Thanks!!

    • Yes! Please! I would love a link to them! The nursery site doesn’t go into detail like Jack does!

  5. for anyone who would like to get started in basic automation, whether online, social media, or appliance Automation, I highly recommend if this then that at ifttt.com. you can do some of the things that was discussed in this today’s podcast for free on that website. I use it all the time. Eric, the show was really awesome.

  6. I got the civil engineering degree too, spent some time as the company IT guy, then veered into environmental engineering at the same company. Totally agree, the Department of Making You Sad (DMYS) definitely takes the fun out of it.

    But now I’m learning about programmable logic controllers (PLC) for running pumps and treatment systems at work, kind of like Arduino on steroids. Would love to know if anyone has used an Arduino or Pi to build a RIMS homebrew system. Just got my first Arduino, having fun with the kids at home. So easy to use.

  7. I’ve been using a 3d printer for the last four years. I’m in the process of completing my own design 3d printer, the RepRap Cre8 (cause it creates things, and it’s built out of a milk crate, get it?) If you care, it’s moving, but not calibrated.

    While I disagree that 3d printing is getting close to showing up in “everyone’s” home, it is already at a price point where a clever diy-type person can actually SAVE money with the printer, and payback periods are on the order of 2-5 years (depending on what printer you buy, etc).

    When I first showed it to my little kiddo, she said, “Oh, cool. Can you print chicken parts for Mr. Potato-head?” “Yep. We can do that!” She’s growing up in the future…

  8. Eric what were those education websites you were talking about? Edx.com and another one corsair?

  9. Sorry if this is a dumb question, but can I use either Raspberry or Arduinos on a 12 volt system? I was thinking while I have my truck apart, it would cool to make a door lock/unlock system controlled by my phone.

    • Arduinos have a voltage regulator built in that can handle a max of 12v (be careful some car batteries can come in as high as 13v)

      The Raspberry pi is more fragile and needs the 5v from my experience. The best thing to do is buy a UBEC.
      http://www.ebay.com/itm/Hobbywing-3A-Switch-Mode-UBEC-5V-6V-Max-5A-Lowest-RF-Noise-US-/291287829499?pt=LH_DefaultDomain_0&hash=item43d21b8bfb

      Basically a UBEC efficiently lowers your voltage. This is used frequently in RC planes that have a big battery for lift, but also need to control small on-board electronics.

    • As far as Arduinos go, they have an on-board voltage regulator to keep the power at a constant 5 volts. I believe the supported input range is 6-20V so 12V should be fine but if the voltage surged (when starting the truck for example) it might fry the Arduino. Another option is using a USB adapter attached to a cigarette lighter like those used to charge cell phones (assuming it was always on). And yeah, if you can trigger the lock with a relay, it would be pretty straightforward to control this via Arduino. Integrating that with a phone app might be a little trickier but it is definitely doable. A definite option is RFID. You can buy RFID kits for Arduino that come with a reader and a couple of RFID tags. You could then control the lock via RFID proximity.

  10. Eric, I had to laugh when Jack mentioned that a WWE wrestler comes up when your name is googled. My brother also “shares” a name with a famous wrestler. It makes gift gifting easy. Action figures, posters, t-shirts with his name and picture are always good for a laugh. Luckily, my brother is amused by it all. My sister-in-law keeps an action figure on her desk and when people ask her about, she tells them that it is her husband.

  11. Hi Eric. I really enjoyed the show, thanks. I’m doing similar work focused on gardening and greenhouse automation. Just curious which 433 MHz wireless kit you are using. 500 yards is very impressive. I’ve been focused on Bluetooth for data transmission but the range is pretty limited. I was just now looking at 433 MHz wireless kits and there are a lot out there with mixed reviews so really curious what you went with. Thanks again!

  12. Eric, if you really want to get into automation you should go to Automationdirect.com and get one of their PLC’s. you can get all kinds of cheap stuff there, and their PLC program software is free. another thing would be pic chip programming.

  13. I second Ken’s suggestion for Automationdirect.com, been having pretty good luck with them. Also check out IDEC, I think their software is free if you buy a PLC.

  14. Hi Eric,
    I was wondering if you’d used xbee at all, or what you use to communicate in-between your arduinos and other devices. Do you have any libraries that you find yourself using all the time that you would care to share?
    Thanks for the podcast, great episode!
    -D

    • Derek, I have used it in the past but since I’ve found a MUCH better solution.
      lowpowerlab.com is the place to go. You can buy an arduino/433mhz radio for like $15 and it works great.
      I believe the guy who makes all the stuff is named Felix, and he has all of the libraries, code samples and pretty much everything you could want.
      Let me know if you had something else in mind, but if the $15 price tag is too much you can make your own using a HopeRF 433 transceiver $4 on ebay and a $3 arduino nano ebay. Once you get your feet wet it would be fairly easy to mass produce these!

    • I have used xbee numerous times. I was actually in the process of creating an invention that used xbee very extensively. (Similar to the wemo he talked about during the interview).

      I am currently using one to transmit data back to my data server. The mesh networking with them is actually really really cool, however, its kind of dated already. The pinocc.io is pretty darn good at it, although obviouxly the xbee has much better range. My biggest complaint about the xbee is that you can’t batch configure them, or from a command line so you even up having to do everything from a GUI. (Like the pairing of devices, etc). That ended up being the stake in the heart of my project.

      • Ya that’s what I love about lowpowerlab.com, all command line, mesh networking you can write in, long range and cheap.

      • Just a thought. Is there a simple way to setup an Arduino or raspberry pi to communicate with another person/clients computer that would then send that information on to me for monitoring purposes? Obviously some form of software would need to be downloaded to the persons computer.

        • Ya that’s actually my setup. I have a handful of arduinos connected via the 433mhz radios and then a raspberry pi with a 433 radio. The pi is connected to wifi and relays information for all of the arduinos

      • Cooper, with Raspberry Pi, since it runs Linux, you could take advantage of SNMP. It really depends on what you want to monitor but if it is basic things like CPU usage, disk I/O, disk space, etc. it is very straight forward. You’d setup the SNMP server on the machine you want to monitor. Then setup SNMP as a client on the Pi. Then the Pi could regularly query the target server and act accordingly on the data (send a text, alert, etc.). There are open source tools like Cacti (http://www.cacti.net/) that you could even run on the Pi to graph the data, handle alerting, etc. Also, you are not restricted to things such as CPU stats, etc. If you had a specific thing you need to monitor, as long as the value can be written to a file regularly, you can setup custom SNMP triggers to return the value in the file. It gets a bit tricky but this is the approach I’d probably go for if I am understanding your question correctly. I did Linux admin for several years and we pretty much lived and breathed by SNMP when it comes to monitoring. πŸ™‚

  15. I’ve set up cameras inside and out to monitor for trouble, and send a notification to my Android device whenever motion’s detected. I’m also trying to piece together a 4 wheeled rover with a Raspberri Pi and a camera that I can drive around home from my tablet, so I can look around and make sure everything is okay. (I think I have all the pieces except a charging station I need to figure out how to build, so I can drive it onto the station and recharge it while it is not in use.)

    There’s one big flaw in my plans though… once in a while, the Internet connection flakes out, requiring rebooting first the modem then the router. This of course always happens within a day after leaving for vacation. Is there a good way I can remotely restart equipment even if the Internet connection is down and thus can’t be contacted to tell it to restart? I’d prefer a solution that doesn’t require a monthly fee for a 4G data plan, although I could do something like that and plug the 4G dongle into a Raspberry Pi, connect remotely and then send a signal to the IO pins that I connect to some kind of switch. I was also pondering setting up a Raspberry Pi to ping some external server, and if it fails for more than 15 minutes, issue the reboot commands. Maybe there’s a better way?

    • It looks to me you’re already well down the path towards figuring it out. Pinging an external server is one of the easiest ways you could do this.

      I’m not sure I understand what you mean by restarting? Do the devices not just start transmitting again when the internet is back up?

    • I’ve had trouble with this in the past too. My solution was setting up a cron to run a script that would ping my google.com, and my router. From there if it couldn’t connect it would restart networking services. It wasn’t the best solution but it did the job.

  16. I am so computer illiterate but my kids are going to LOVE this segment! This whole thread should be turned into a ‘how to’ segment. Great ideas, great minds.

    • Mac, I’d love to do something more once I’ve documented more of my projects. So far the only one I have documented is the chicken door!

  17. Loved the show, built my own automatic chicken door around 6-7 years ago using the Picaxe and a light sensor photocell driving a motor to wind-unwind a string to raise and lower a door, on my 4th revision I’ve nixed the pulley…to many issues with it breaking due to UV damage, now I’m suing a all-thread screw system, direct drive to open close the door….animals can’t force the door open now.

    We recently had our mail stolen on the one sat I forgot to get our mail in 4 months, found the mailbox open at 6am when I went out to walk the dog. I was trying to think of a way to add a camera system to take pictures from 5-7 yards away from 2 angles…our mailbox is about 200 yards from the house. Will look into the Pi for that I suppose.

  18. For those that are looking for 3D printing options. 3dhubs.org is a crowdsourced website that allows you to print on a variety of local printers.

    Also sites like thingiverse.com have files that can be printed.

  19. Instead of just having it email or text you with a status, can you have it email you the image taken by the camera? I could then see being able to email back with a single word command or something in the subject to have the system take action (turn on lights, sound external alarm as a predator deterrent, go back to sleep, etc.).
    I’m going to be digging around to see if there is a way to have two cameras (IR and non-IR) connected and switch between them depending on lighting conditions or maybe someone has come out with a better camera that can handle regular and low light conditions…

    • EmCommer, there’s some easier ways like slapping a web interface on it that I have for sending commands to it.

      I would say just use the IR camera. I have one in my coop and it works fine for daytime shots as well.

  20. Very inspiring show! I am looking at changing my career towards IT Security. Any suggestions on how to do that? I will be poking around the resources mentioned on the show and above. My background is in proposals and Technical Writing and I am trying to get my foot in the door after 6 months of unemployment.

  21. Hi Eric,

    Great show! I do have a high-level question for you.

    I’m looking for the best architecture/tools to be able to update a web page with the results from sensors attached to a Raspberry Pi. I have some general understanding of the RPi, python and HTML. Not sure if there’s a library or tool set that would help make this possible.

    Thanks!

    -Charlie

  22. Eric great show, possibly my favorite TSP. Do you have any info posted about using google calendar to schedule events on the pi?

  23. I keep coming back to these show notes for reference. So I decided to harvest links and info, and put them in a spreadsheet.
    Here: Google Docs Link
    I enabled public comments, so feel free to make suggestions. If you have posted here or in the TSP forum and want to add or improve this list, get in touch with me if you would like to edit and I’ll make you an admin. It’s not much, but I seem to keep coming back to this page enough to want to consolidate the above resources. If there’s a better list out there already, let me know. =)

    • Agreed Eric, that would definitely make sense. I can put it on my list, but it will be at least 20+ down from the top! πŸ˜› I’ve done very little editing, and zero creating on Wikipedia, so it’ll be yet another project just learning that side of things.

  24. If someone wants to start the page I’ll add all of my content. I’m just not sure where it should really go in the wiki.
    -Eric

  25. Does anyone have a favorite place to buy electronic parts?
    relays, resistors, LED’s.

    • For that basic stuff, I like digikey.com . Although they have so much there that it can sometimes be tough finding exactly what you are looking for. Don’t be afraid to call them though, they are usually really helpful.

    • One thing that you will find when purchasing electronic components is the shipping is often more than the part you need. If its something your serious about I would suggest buying some bundles because it really sucks when you discover that your missing one 75 cent part to complete your project and having to pay 10 dollars to get it shipped. There are many places that have various bundles for small parts like https://www.sparkfun.com/ http://www.adafruit.com/ http:/ /www.makershed.com/ and than of course there Digikey, Mouser, and Amazon