After putting together a half-dozen or so Electric Imp projects, it occurred to me that just because the imp is powerful enough to handle complicated tasks doesn't mean that making a simple thing internet-connected is any less powerful. This is one application that I find to be *very* powerful, particularly in the context of driving a simple physical interaction into "the cloud". It's a knob. A simple, familiar, analog control.

Ok, so I'm a little ahead of myself: if you aren't yet familiar with the Electric Imp, it's time to check it out. The imp is a tiny, powerful, wifi-connected processor that looks like an SD card. It connects easily to any wireless network, phones home to the Electric Imp service, and lets you connect all sorts of things to the internet and each other. You program it in your web browser using the electric imp planner. Check out the overview at http://electricimp.com/.

Right now I have my copy of this demo hooked up to a fun little board I use to control some in-ceiling RGB lighting. We've got more instructables coming along soon for that - for now you can check out the video we posted here. Check out the pictures - the kicker is that this method of controlling that light:
  1. is totally wireless and was installed in about the time it took to get the light in the ceiling in the first place
  2. works from anywhere in the world
  3. can be connected, disconnected, or changed (pre-program light shows or interpret inputs differently) from anywhere in the world, without tools, just by opening my browser. 

When you're ready, check out the next page and see the (short) list of things you need to connect a knob to the internet!

Step 1: What You'll Need

When you're ready to get started with this instructable, you'll need an imp. They're available on Sparkfun, along with the Electric Imp breakout board, which you'll also need. If you got one of Electric Imp's April dev boards directly from Electric Imp, you can use that.

In order to connect and program your imp, you'll need a computer, a wireless network for the imp to connect to, and an iOS or Android device with the Electric Imp app (free in the App Store and Google Play store). You'll need to create a free Electric Imp developer account, which is pretty quick to do. You can view all your connected imps at plan.electricimp.com.

You'll need a few other pieces as well, but the list is pretty short:
  1. An enclosure. Should be big enough to hold an imp+breakout board and battery (1.25" x 2.25") and deep enough to hold the aforementioned contents and leave room for the base of a potentiometer. I used a Serpac RB33-1TC1BC enclosure, which is about 1.9" deep, but you can get away with about 1.6" of depth.
  2. A potentiometer, 1k ohms or 5k ohms. Get a linear potentiometer, not a logarithmic one. Mine includes a switch (it clicks nicely when you turn it all the way counter-clockwise), and I incorporated that into my firmware. I recommend finding one with a switch, but it's not essential. Just useful.
  3. A knob for your potentiometer! The pot I used had a 6mm outer diameter on the shaft, so size the knob to fit. I like the kind with the set screw to hold it in place. 
  4. A battery pack or clip. It's not a good idea to run the Imp off of two alkaline AA batteries because they only give you 3V DC, and the imp needs 3.3V. The imp has an on-board regulator, but it won't even turn on until above 3.3V. You can use a 2-AA clip and a couple of UltraFire lithium ion batteries, though, because they're 3.6 V each. A 9V works too. Pick the appropriate battery clip.
  5. Optional: a toggle switch. I used an single-pole-double-throw (SPDT) or "changeover" switch, and I use it to switch between USB and Battery power. Since I usually don't have USB power available, this turns the power selector switch into a simple power switch. This lets me turn the box off and save battery when I'm not using it.
You're going to need a few tools, too:
  1. A decent soldering iron and some good solder. 
  2. Some spare wire. Solid-core is a bit easier to work with. 
  3. Some heat-shrink tubing is very useful. You can do without if you need to.
  4. If you're using heat-shrink, you'll need a heat gun to shrink it. A good hair dryer will do in a pinch. 
  5. Wire cutters / wire strippers
  6. A ruler for measuring out dimensions to drill holes in the enclosure lid
  7. A drill and a few drill bits:
    1. A center punch and a hammer to mark the center of the holes you're going to drill. This keeps the drill from "walking"
    2. A small drill for drilling starter holes. A 1/8" drill will do nicely. You'll start all your holes with this drill, then step up to the appropriate size drill bit for the hole. 
    3. The switch I used required a 3/16" drill bit for the final hole.
    4. The potentiometer I used needed a 5/16" drill for the final hole.
    5. The potentiometer I used also had a small tab to prevent the pot from turning when you turn the knob. This is pretty typical. The 1/8" drill should be enough to take care of this. 
  8. You might need to trim some length off the potentiometer shaft to make everything fit nicely. I used a dremel with a cut-off wheel for this. A hack saw works just fine, too. You'll have more success with the hack saw if you have a vice to hold the part still.

When you've gathered the things you need, check out the next step to see how to connect the potentiometer to your breakout board!
Hopefully, you can show me how to let my PC control this remote controlled lawnmower: https://www.instructables.com/id/Remote-Controlled-Lawnmower/ <br> <br>The above web site has a video of my remote controlled lawnmower. <br> <br>Currently, the mower is controlled by a Futaba 4YF transmitter. I want my Windows 7 PC to control the mower either with an interface to the Futaba transmitter or by a PC based joystick and transmitter that replaces the Futaba transmitter. The interface needs to allow the following 2 steps: <br> <br>Step #1-Learn Mode Control the mower via the transmitter and record the sequence of joystick commands to the PC <br> <br>Step #2-Playback Mode Transmit commands recorded on the PC in Step #1 tothe mower. <br> <br>What is the easiest way to accomplish these 2 steps?
Hey congratulations on being a finalist in the hack it contest! Good luck to you!
Love it Tom!
I love the Imp! I bought one imp and a sparkfun board about 6 weeks ago, got it next day and then after having a play with it for that evening was so impressed that I ordered a 2nd Imp and Sparkfun board the next day. <br>I have done quite alot of the projects I have seen and done a few of my own which I really need to post. <br>The Imp is an amazing piece of kit and more people should invest in one and a breakout board as it makes it possible to control pretty much anything you want from any browser any where in the world. <br> <br>What we REALLY need though is someone to start selling MORE HANNAH BOARDS!!! I missed the initial release and got my Imps after all the official boards were sold. If anyone knows where I can get one or wants to sell me theirs or if your planning on making a small prototype PCB batch then please message me and let me know. <br> <br>This is a great ible btw!
Can it control minds?
Hi,,,, I'm an &quot;Old Fart&quot; Aussie... Love the idea.... I travel a lot and would like to be able to check out thing back home in my house... eg mail box.... How could I use the Imp for thisd......
Sure, that's a great idea! You could try putting a limit switch in the back of your mailbox, or a weight sensor in the floor of the box itself with a false bottom over it, and just have the imp read out the weight or switch position and push the result to a website or app via the HTTP Out node. Viola! No more trips to an empty mailbox :)
This looks awesome and very exciting. This may sound like a silly question but does the imp always have to be connected to wifi, ie can you program an imp or two at home/work and take it out into the field. Can you either just connect 2 imps directly to each other or directly to an iOS device. Can you program it and then essentially just run scripts at the push of a button. I am thinking it would make a better device than arduino for things like programable camera releases and the like. That would be the first thing I would build!
Glad it got you feeling creative! With a new impOS release we have on the way, the imp is able to operate locally once it's gotten its user-written firmware from the imp server, but imps cannot talk directly to each other or to other devices; all communication is through the imp server. Again, while this is a restriction for some applications, it's a major boost for others. You could still set up a programmable camera release this way, but you'd need to set up a network with a hotspot or tethering or the like.
So it would take a pocket wifi to make it connectable to an iPhone/pad/pod?<br>otherwise it looks small enough to be integrated into a battery grip, stealing power from the camera and programable on the fly.<br><br>I think it is still a very exciting product but not quite what I need.
Yes, that's right. It's definitely small enough and low-draw enough for what you're looking to do, but you may be right on the overall fit if you're looking for something that's going to work in the woods. The imp is made to bridge the gap between physical things and the internet via wi-fi. Perhaps one day, more diverse implementations will appear, but no plans right now. <br> <br>Thanks for your enthusiasm! Sounds like a cool project you're getting started on.
amazing well documented IBLE .. keep up the good work. What do you currently have your IMP knob controlling?
Thanks so much! I'm using this as my quick-test-for-anything box right now. If you'd like to see one of the things I've connected it to so far, check out the video of me connecting it to some in-ceiling lights here: https://www.instructables.com/id/Controlling-RGB-LEDs-with-controlBox/
The electric imp is a very cool device but the whole cloud based thing makes it a non-starter for me, until someone develops a local IDE and figures out how to disconnect it from internet so that it can be used as a strictly local device, I'll have to take a pass on it. <br>
sooo.... what happens if the internet goes down, your modem breaks, or your ISP goes off line for some reason? Too bad this can't simply be a local wireless network solution....
Sure, I understand where you're coming from. The imp isn't for everything or everybody. This solution offers some pretty hefty advantages in terms of ease-of-use and configurability, though. If you want your own solution from the ground up, maybe Gainspan is for you. You're simply not going to get going this quickly or easily, though. Best of luck!
I was curious as to why this could not just be a local network thing, and as best I can tell the EI *requires* you to go through their server. That greatly reduces the value. Does anyone know of comparable alternatives to this? Or a way to hack the EI so that it uses a different &quot;home&quot; server? Maybe some judicious mangling of local DNS and reverse engineering of protocols?

About This Instructable



Bio: Developer at Electric Imp
More by tombrew:NeoWeather: Ambient Weather Indicator Imp Chef: Internet-Connected BBQ Thermometer imPrinter: the Electric Imp wireless, internet-connected thermal printer 
Add instructable to: