How to connect the Electric Imp to Arduino without level shifting : Only use 3.3V

I didn’t have a proper logic level shifter around when I first started to experiment with the Electric Imp and Arduino.
There is a lot of simple level shift tricks out there - And an equal amount of tricks, that will most likely fry your Imp.

But, I came up with a very simple solution:
Just power you Arduino from the 3.3V at the Imp breakout board.
( I made a little sketch of the wirings here. )
The Arduino runs fine on 3.3V, but there is surely a limit to how many mA you can draw from the Imp board, so take care.

Use at own risk, naturally, but I have been running an Arduino for weeks with the imp, and no problems so far.

I have seen a number of folks connecting the Electric Imp to an Arduino, and I’m always curious as to what project is running on the Arduino, and what is the reason for adding an Electric Imp, but not actually just using the Electric Imp as the microcontroller? Is it to retrofit existing projects? Just for the joy of watching the two communicate? I’d like to hear what anyone has to share.

For the extra IO pins and extensive Arduino libraries, perhaps? @chrlilje I would use one of these 3.3v clones for about $5.

Just a heads up - that clone doesn’t have a USB socket, so you’ll need an FTDI cable to program it.

Provided a bootloader is installed it could be programmed with Aron’s code via serial, although I haven’t tried it yet myself

Nice solution chrlilje! Thanks for sharing this.

I needed to add the Arduino mainly because I have a bunch of 1wire sensors, that I would like to talk to.
I havn’t seen any 1wire libraries for the Electric Imp, and didn’t feel like trying to write one, so the easiest solution was to use the Arduino as a 1wire bridge.
(Actually, I am not using a full Arduino, I use a standalone Atmega168 running on the internal 8 mhz oscillator, but I omitted that for simplicity. )

There is also a price-tag issue. An Atmega168 is dirt cheap. If I fumble with the electronics for my sensors, I only burn a 1$ Atmega, not a 29$ Imp. :slight_smile:

Good stuff. It seems as though the activity here on the forums has been increasing significantly over the past month or so… hopefully that translates into a lot of reference and example software being written for all types of devices. I’ve been working on the hardware side a lot recently, and not spending as much time in code. I really wish there were a well made Imp module breakout available for devs, but there just isn’t, so I am building one in Eagle. If none of the open hardware shops will carry it, I think I sell it myself. Electric Imp already has a lot of reference designs to work with, so its just a matter of laying out a nice design that is easy to prototype with.

I’d love to see your set-up, if you feel like posting pics.

You can do 1-wire with a UART and a diode; can anyone find the link to that thread though? I had a quick search and couldn’t :frowning:

I’m using DS18B20 1-wire temperature sensors on an Electric Imp with a DS2482 to convert I2C to 1-wire. Example code is here:
http://forums.electricimp.com/discussion/1423/code-example-ds18b20-via-ds2482-onewire-via-i2c

Nice that it is possible to do 1-wire (onewire) with UART - Thanks for the tip @Hugo.
Found the thread, though:
http://forums.electricimp.com/discussion/comment/9236

@jwehr : So far, my setup is a humble breadboard in an old ice cream box in the bottom of the oily wet engine room of my boat. When it evolves to something less embarrassing, I will gladly post some photos :slight_smile:

No seriously… an Imp on a boat… we gotta see that.

Here you go :slight_smile:

The imp controls a 2kW electric heater to keep the engine room of our little boat frost free.
We are using an old USB power saving strip to switch the 230 V. (Those that you use to switch on printer, screen, etc, when the main computer turns on and send power to the usb.

  • It is just a really simple, cheap and safe 5v->230V relay.

I just stiched the hardware together quickly on a breadboard, and went home to my warm comfy sofa to do the code and adjust the parameters. Nice. :slight_smile:

yt
Christian

Do you have WiFi available from the marina, or on your boat?

I’m connecting my imp to an arduino for I/O purposes. I’m building a robot that will have several sensors and actuators, and the imp simply doesn’t have enough ports. Because it’s a fairly small robot, I found that getting the imp shield from sparkfun made the most sense for me since it gets both boards with logic level conversion all in the footprint of the arduino. Right now the plan is to have all the heavy processing done by a python script on my computer, so the imp is simply sending info from the arduino to the computer, which sends instructions back throught the imp, however if one of my microcontrollers ends up having to do any processing it will be the imp.

@jwehr : There are a couple of houseboats in the marina, and I know one of them pretty well, so I am just using his wifi for the imp.

  • And since a fiberglass hull is little hindrance to wifi-signals, connection is pretty good.

Btw, here is a link to the public open.sen.se feed from the boat.

The red dots shows the on/off points of the heater.

Do you have any alerts set up? I need to finish implementing that in my Pitchfork app. I use twilio to SMS me for Imp related alerts. The agent could alert you if the Imp went offline for some reason.

I don’t have any alerts set up yet.
Twilio looks very clever for notification purposes - Thanks for that tip!

I would suggest you also look at GroveStreams. You can post all of your data there, get SMS or email alerts. It’s an amazing cloud solutions.