domotics concept

Hello everyone
i want some advice

I want to make a domotics system with I2C (mainly attiny45 with software-library-i2c IF POSSIBLE), and i want to be able to control it by buttons and software. This includes computer(mac + windows) and android smartphone. I could make an android, windows and mac program or i could make a internet site... what do you guys sugest. Also what programming languages would i have to learn? (labview is also an option). The moment i pres a button (hardware or software) i want near real time response of the attinys if possible.
I am willing to learn new languages if neccesary.
the goal is to make a graphical layout (like the attachment below)
i dont really want to use an arduino with ethernet. I prefer a computer as server. or even a raspberryPi

Now i want you guys to say what is the best/easiest/... software(s) to do it
please give advice or say if it is possible for a guy aged 17 and a half
please note: i have litle programming skills, but i really understand a program when i see it, and if necesary i want to learn them better
thank you

I could make an android, windows and mac program or i could make a internet site... what do you guys sugest.

The internet site has the advantage that I could turn your lights on while you are sleeping. No, wait, I mean that you could turn your lights on and off from any device that incorporates a web browser. No need to write a new program every time you get a new device.

Also what programming languages would i have to learn?

C++ and a little about html forms. Certainly a knowledge of client/server architecture, and what that implies, would be useful.

(labview is also an option).

You have labview on your phone?

The moment i pres a button (hardware or software) i want near real time response of the attinys if possible.

I'm not sure how you would connect an ethernet shield to an attiny. Even if you could, instantaneous reaction is an unrealistic expectation. It takes time to convert the data to a usable message on the PC/phone side, to transmit that message to the ethernet shield, to get that message to the Arduino/ATTiny, to decipher that message, and to implement the instruction(s) contained in that message. We're not talking minutes, here, but we are not talking instantaneous, either.

i dont really want to use an arduino with ethernet. I prefer a computer as server. or even a raspberryPi

You want the PC to act like a raspberry pi?

With the PC as the server (or the raspberry pi, in case it was just a word order mismatch), you still need some way to get the user-intent to the Arduinos/ATTinys. How is that to happen?

Now i want you guys to say what is the best/easiest/... software(s) to do it

To do what parts? There are parts that involve HTML. There are parts that involve getting data from the server to the MCUs. There are parts that involve using that data on the MCUs.

please give advice or say if it is possible for a guy aged 17 and a half

No, I think you need to be at least 17 and three quarters.

Of course it is possible. Age has little to do with willingness to learn and experiment.

i have litle programming skills

By the time you get done, this will no longer be true.

and if necesary i want to learn them better

It definitely will be.

As this is an Arduino forum, people will naturally suggest using Arduino, and it's native
language is C [C++ if you want to be more exact].

The major problem with your idea is you have sensors all over the house, which means
running bundles of wires every which way. That will rapidly become a big hassle, and also
make an unsightly mess. Also, I2C typically uses 5V signals [sometimes 3.3V], and the I2C
buss is not made for use with wires more than a couple of feet long, at most. You will
probably need to consider another communications hardware scheme.

Some people use RF [eg, XBee] which will end up costing a fair amount for such a distributed
system as shown. Some people use RS485/RS422, or CAN buss.

All in all, what you should probably do is think about having a separate processor in every room,
to control and sense locally, and then think about a scheme for communicating between the
various processors. This all will cost maybe $200-400 for your system [maybe].

Also, check out this board, http://arduino.cc/forum/index.php/board,16.0.html

PaulS:

(labview is also an option).

You have labview on your phone?

I have labview on pc (labview only exists computers and for windows phone)
i was thinking of making a server with labview that makes a webpage or server list or so (i dont even know if this is possible :stuck_out_tongue: ) but labview can connect trough usb with the main arduino.

PaulS:

The moment i pres a button (hardware or software) i want near real time response of the attinys if possible.

I'm not sure how you would connect an ethernet shield to an attiny. Even if you could, instantaneous reaction is an unrealistic expectation. It takes time to convert the data to a usable message on the PC/phone side, to transmit that message to the ethernet shield, to get that message to the Arduino/ATTiny, to decipher that message, and to implement the instruction(s) contained in that message. We're not talking minutes, here, but we are not talking instantaneous, either.

PaulS:

i dont really want to use an arduino with ethernet. I prefer a computer as server. or even a raspberryPi

You want the PC to act like a raspberry pi?

With the PC as the server (or the raspberry pi, in case it was just a word order mismatch), you still need some way to get the user-intent to the Arduinos/ATTinys. How is that to happen?

oric_dan(333):
The major problem with your idea is you have sensors all over the house, which means
running bundles of wires every which way. That will rapidly become a big hassle, and also
make an unsightly mess. Also, I2C typically uses 5V signals [sometimes 3.3V], and the I2C
buss is not made for use with wires more than a couple of feet long, at most. You will
probably need to consider another communications hardware scheme.

i first was thinking about making multiple attinys with I2C/twi and letting them talk to 1 arduino uno connected with usb to a computer OR letting the attinys talk trough i2c/TWI to a raspberryPi (the raspberry pi should be configurable as a webserver)
there are also these chips that are called I2C extenders for about 2.50 euro each. link: http://www.nxp.com/documents/data_sheet/P82B715.pdf and http://be02.rs-online.com/web/p/i-o-expanders/0821784/
About the speed: maybe i could lower the i2c to 40 Hz or even less for less interference with any magnetic field things (couldnt get the right word)

SO, one arduino in each room and connecting them with I2C extenders???

btw thanks for the reply guys :slight_smile:

for a guy aged 17 and a half

Man I wish I was young enough that half a year mattered :slight_smile:

SO, one arduino in each room and connecting them with I2C extenders???

That's reasonable, certainly I'd go with a decent amount of smarts in each room to keep local decisions independent of the rest of the system, that way when your Pi blows up at least you can still turn the lights on in each room.

The PCA9600 uses balanced lines so should have similar abilities to RS-485 although I haven't used it.


Rob

You seem to have the idea down about using a distributed processing scheme.
Those I2C extenders look like they'll do the job.

oric_dan(333):
Those I2C extenders look like they'll do the job.

wich extenders? the PCA9600 or the P82B715?
if answer is pca9600, can i also connect multiple devices at the long cable side and/or the short cable side?

Yes you can multidrop with the PCA9600 but I'm pretty sure the P82B715 is just point to point.

And as I mentioned the PCA9600 uses balanced lines and that's always a plus for noise.


Rob

thanks for the help guys :slight_smile:

I'd recommend using wireless unless you are working with a house still in construction or have a good amount of experience running wires through houses. Wireless doesn't have to be expensive, just look at the JeeNode as an example.

I was referring to the I2C extender datasheet where it said 50m.

Be careful with the JeeNode. I bought a couple, and they have a tiny tiny, maybe 6-mil
wide, trace hidden by solder mask that connects the FTDI adaptor power to the board.
It's too small to see, and certainly silly for a "power" jumper.

So, if you connect your battery power to the JeeNode, and then try to communicate with it
by plugging in the FTDI adaptor, you can blow the USB port on your PC.