Contact and Coil | Nearly In Control

Feb/11

4

Finally Getting an Arduino

I cruised through January in a kind of sleep deprived stupor (we just had our second child this December). Things are finally swinging back to normal, and I’m getting my geek back on.

I’ve been looking for a less expensive way to do discrete (or analog) I/O over WiFi for homebrew projects. I want something that can be compatible with SoapBox Snap (the open source ladder logic editor/runtime I’ve been working on), so I’ll need to be able to write a communication driver in C#. I’ve been rather frustrated by the options:

  • National Control Devices WiFi Relay Boards – but they start at $250 and go up from there.
  • Insteon – perfect for home automation and more reliable than X10, but their software license agreement for their development kit is extremely unfriendly to open source.
  • Belkin and other manufacturers have created some wireless USB hubs, but I can’t seem to find anyone who has them in stock, most have been discontinued, and the cost is still prohibitive ($100+) especially when you figure you still have to buy some Phidgets boards on top of that.

Then I finally decided this was my best choice: the YellowJacket WiFi Arduino. Arduino is a family of open-source hardware designs for microcontroller boards. You can buy add-on cards for them (called shields), but you can also purchase custom designs with specific features, like this one with built-in 802.11b WiFi.

The price is right ($55), it’s very open source friendly, and since I get to program the microcontroller end, I should have no problem writing a driver for it in C#. Unfortunately it’s on back order, but I expect to get it in a couple of weeks. I’ll post more after I’ve played with it a bit.

I must admit there’s one other honourable mention, though it was a bit too much of a hack for me. There are these cheap routers you can get called La Fonera (made by FON). It turns out that they have 3 or 4 unused general purpose TTL level I/O on the circuit board, and if you install a copy of the open source DD-WRT firmware on it, it lets you control those I/O using the command line prompt if you telnet or SSH into the router. Perfect, and you can pick these things up really cheap on eBay. Unfortunately I wanted something just a little more off-the-shelf than that. (I do have a copy of DD-WRT running on my old Linksys router and I’m using it as a wireless bridge to extend the range of the wireless in my house, so I did give it some serious consideration.)

· ·

7 comments

  • ivirban · February 11, 2011 at 2:21 pm

    Best wishes!
    I also have an Arduino and I am a PLC programmer. I am glad to found a ladder editor for Arduino.
    I downloaded Snap, but I am afraid to install it, becouse I have lots of Rockwell software installed which used .NET 2.0 and I don’t know how 4.0 will influence them. I notice you work with AB too… can you advice me if it’s ok to install 4 without affecting AB softwares?
    Keep on doing the great job!

  • Author comment by Scott Whitlock · February 12, 2011 at 10:46 am

    @ivirban – I do a lot of .NET programming, and I can assure you that .NET 2.0 and .NET 4 can co-exist on a machine just fine. In fact, there is a weird versioning system with .NET: Versions 3.0 and 3.5 are actually just extensions of version 2.0 (they just add new DLLs, but the version 2.0 DLLs are still used). .NET 4 is a completely new set of DLLs that can be installed in parallel with .NET 2.0 through 3.5. Also, please realize that you can’t control Arduino’s from SoapBox Snap *yet*. I’ll be working on that once I get my YellowJacket (they’re on back order). You can use SoapBox Snap to control Phidgets devices though.

  • ivirban · February 13, 2011 at 6:03 pm

    Thank you so much!
    I am looking forward to see Arduino controlled by SoapBox.
    I am not an expert on Arduino, only played a bit with it. I really missed Timer instructions from ladder. Tried to make some libraries for them, but didn’t worked out. Do you know such libraries for Arduino? (functions like TON, RTO, CTU, etc.)

  • Mild Lee Interested · August 21, 2011 at 7:48 am

    Is anybody any closer to a ladder IDE for Arduino?
    I Working on a cheap “automation helper” based on the Arduino. The idea is to have a (very) little digital I/O (PNP) and a couple of analogue channels (0 – 10V and 4 – 20mA inputs to start and later outputs). I want some basic commissioning tools in a cheap, easy to use package. The idea is to be able to ROUGHLY emulate parts of a machine/system not yet installed. For example, take a 0 – 10V signal meant for a valve and feed back a 4 – 20mA signal emulating a pressure sensor – with delays, offsets, etc being set up by the user). I know industrialy hardened, properly engineered, fully calibrated devices that do this stuff are available already, but they are expensive. I want a device that is cheap, practically a throw-away commissioning tool that I won’t mind cooking with a dumb wiring error.
    I’ve built some basic Arduino hardware: an opto-isolated digital I/O shield with 2 inputs and 2 outputs that also delivers 5V to the Arduino from 24Vdc input and an analogue input shield that is basically just a couple of resistors and trim pots to convert 20mA to 5V input and 10Vdc to 5V input. I have been struggling with C in the Arduino IDE to get a few tools up and running, but ladder would be so much easier…

  • MIKE MADDOX · July 15, 2013 at 1:34 pm

    I am beginning to work with Arduino, it is a nice tool
    I am interested in any new items , upgrades.

    PLC, WONDERWARE, VB Programmer-interested in VB.NET & C# as well

  • Travis · July 31, 2013 at 10:28 am

    I have been searching for a ladder logic editor for Arduino for weeks. I found this: http://cq.cx/ladder.pl but I have had zero luck running the program in Arduino. Some guy make a really horrible how to on making it work, but like i said….no luck. I notice it’s been a few years since Scott posted. Did you just give up?

  • Author comment by Scott Whitlock · August 6, 2013 at 9:37 pm

    @Travis – I’m still around. I do actually have an Arduino project on the go, but it’s not ladder logic. Someone could adapt SoapBox Snap and write an Arduino runtime for it, but it would take a bit of work, both in C# and in the Arduino side. I don’t see myself getting the time to do it (now that child #3 is here! :)

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me