Nodo project – Nodo Ethernet Shield (NES)

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Today the NES kit has been delivered and I got it working.

NES

After same soldering the NES seems to work. I connected it to the router configured the port forwarding and logged into the Nodo Webapp. The Nodo is recognized over the internet and I could configure some settings in the Webapp. Now the issue is to figure out what addresses my KAKU devices have so I can control and monitor them.

Hopefully I can do some domotica very soon.

Interested in this hardware then take a look at:

Nodo domotica
Nodo shop – the NES
Nodo wiki
Nodo forum

Is there light? LDR sensor input

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

You can imagine it is helpful to know when it gets dark in or around the house. Knowing this you could turn on the lights automatically.  There are different sensors you can use to measure light intensity. At the moment I have some LDR (light dependent resistor)  elements to do some tests.

An LDR has a  high resistance when no light is sensed, the resistance will decrease when the sensor is illuminated (see also).

A basic test scenario is to connect an LDR together with a 10K Ohm resistor to your Arduino.

Together with the code snippet below you can experiment with more or less light. I don’t know whether the printed values are close to reality but you can give it a try.

/* Photocell simple testing sketch.

Connect one end of the photocell to 5V, the other end to Analog 0.
Then connect one end of a 10K resistor from Analog 0 to ground

For more information see www.ladyada.net/learn/sensors/cds.html
Modified by M.A. de Pablo. October 18, 2009.
Thanks to Grumpy_Mike for equations improvement.
*/


int photocellPin0 = 0;     // the cell and 10K pulldown are connected to a0
int photocellReading0;     // the analog reading from the analog resistor divider
float Res0=10.0;		  // Resistance in the circuit of sensor 0 (KOhms)
// depending of the Resistance used, you could measure better at dark or at bright conditions.
// you could use a double circuit (using other LDR connected to analog pin 1) to have fun testing the sensors.
// Change the value of Res0 depending of what you use in the circuit

void setup(void) {
  // We'll send debugging information via the Serial monitor
  Serial.begin(9600);  
}


void loop(void) {
  photocellReading0 = analogRead(photocellPin0);   // Read the analogue pin
  float Vout0=photocellReading0*0.0048828125;	// calculate the voltage
  int lux0=500/(Res0*((5-Vout0)/Vout0));	     // calculate the Lux
  Serial.print("Luminosidad 0: ");		     // Print the measurement (in Lux units) in the screen
  Serial.print(lux0);
  Serial.print(" Lux\t");
  Serial.print("Voltage: ");			     // Print the calculated voltage returned to pin 0
  Serial.print(Vout0);
  Serial.print(" Volts\t");
  Serial.print("Output: ");
  Serial.print(photocellReading0);		   // Print the measured level at pin 0
  Serial.print("Ligth conditions: ");		// Print an approach to ligth conditions
  if (photocellReading0 < 10) {
    Serial.println(" - Dark");
  } else if (photocellReading0 < 200) {
    Serial.println(" - Dim");
  } else if (photocellReading0 < 500) {
    Serial.println(" - Light");
  } else if (photocellReading0 < 800) {
    Serial.println(" - Bright");
  } else {
    Serial.println(" - Very bright");
  }
  delay(1000);
} 

Ladyada has a page with information about photocells, light, lux and Arduino. This page has a great sample scheme including a code example.

KAKU with Arduino using Nodo

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

The previous post was about JeeNode and receiving KAKU commands. The nodo-domotica  solution is also able to handle KAKU commands. I tried the Nodo sketch together with my Arduino Mega and an Aurel 433Mhz RX module bought from Conrad.

Aurel RX-4M50RR30SF

The module I used was the RX-4M50RR30SF (433mHz 5V – 102DBM – AM receiver). The productnumber at Conrad.nl is 190264 and it can be found here.

The Nodo schematic  shows that Arduino digital pin 2 is connected to the data-out pin of the RX module and that Arduino digital pin 12 is connected to the +5V pin of the RX module. The module’s GND pin is of course connected to a GND pin of the Arduino.
Looking at the photo above you see 8 pins instead of 3 pins; that’s because there is a pin for the antenna, 2 extra GND pins, a test pin (I don’t know how to use this) and an extra +5V pin. I connected all the three GND to the GND, the two +5V to pin 12 and the antenna pin to a approx. 17.5 cm piece of copper.
The nodo website mentions an antenna length of 15 cm but I already found some text about antenna lengths for 433Mhz signals mentioning the 17.5 cm. In close range both will work and that is what I have tested until now. It is also possible to buy a real antenna.

I was very happy to see this piece of hardware work. Before I tested this RF module I tried another module (QAM-RX4-433 from Ideetron.nl) which didn’t work in combination with the Nodo software.

 More things to sense …

 

TSOP 1838 – IR receiver

In my quest to find the right components for a domotica solution I found the TSOP 1838 (IR receiver) in the Nodo project. This sensor has only three pins to connect which makes it easy to use. Not if you don’t take a very close look at the datasheet and connect the pins the wrong way. Being new to the Nodo project, TSOPs and Arduino together with the fact that I ‘knew’  I had the pin layout right, I began to try different sketches and remote controls. I took me quite some time to finally get it right. I mixed up the pins. After connecting everything the right way it was really easy to get it working.

On the right you see a picture of the TSOP 1838
I included the pin layout .

The left (OUT) pin is used to retrieve the IR signal. This pin is connected to a digital input of the Arduino.
The second (GND) pin is the ground pin.
The third (+5V) pin is the pin that you must connect to the 5V pin of the Arduino.

You can find several IR libraries and code examples that can be used together with the TSOP1838.

Ken Shiriff has a blog where you can find a great example and download. I did try the IRrecvDump.pde and it worked great.

Ladyada.net also has a great page about IR controls and Arduino.

The nodo-domotica project is also using a TSOP1838 for IR reception. In the nodo sketches   pin 3 is used to get the IR signal, but don’t be fooled by the image showing you how to connect the sensor (that is where I went wrong) it looks like the middle pin is the signal pin but that is not the case!

Hopefully you get the sensor up and running in just a couple of minutes. I have to figure out what the protocol is for my DreamBox, XBOX, Sharp TV remotes. These are not yet supported by the libraries mentioned above. Support for Sony, NEC and some Philips protocols is available. Sony is the one I saw working.

As they say RTFM (to get the correct pin layout) …

Domotica, what do we want

Thinking about a domotica solution I have quite some whishes. Not all of them are real domotica but more about sensing, knowing and controlling things in and around the house. Browsing the internet my ideas are nothing new and there are a lot of people who work on the same goals. Luckely they are, that means I don’t have to learn everything from scratch. Reading all pages and problems I’m glad there are more people trying to accomplisch (parts of) the things I want to realize. If they weren’t I think I would never succeed!

Part of the ‘domotica’ wishlist:
– controlling KAKU devices
– controlling other 433Mhz switches
– reading my Balance Meteo Weather station sensor
– logging  temperature  inside the houde
– logging motion with PIR sensors
– Read / write remote control IR  signals (and send other triggers like KAKU commands)
– log energy consumption
– make lighting schemas
– control RGB LED stripes
– log VOIP caller IDs
– log doorbell rings
– make web-/securitycam photos on pre-defined events
– log humidity
– log pressure
– log light intensity

All this information must be stored in a database and privately accessible for me. I want to be able to access the information and send commands through a web-based solution. This will enable mobile access as well.

As you can see this is nothing special and new. Some people already have a website devoted to the same goals, take a look at: Bwired.nl and hekkers.net.

Next an example sketch …

Domotica

Since a month or so I’m working on a domotica implementation. Based on Arduino and Arduino like hardware. For now it is just browsing the internet to look for the right hardware. What sensors are available and how can they be used together with the Arduino development tools (IDE and available sketches).
I like to start with known solutions to learn more about the way Arduino works and how the connected hardware can be controlled.

For now I’m playing with an Arduino Mega 2560 and some JeeNode (JeeLabs) hardware. The JeeNode is a Arduino compatible platform with several interesting features. First of all it has a great community. Second, it has several nice out-of-the box features which are great for a domotica solution. It comes with a wireless RF chip that is configured to communicate with other JeeNodes. This is a real plus for a wireless domotica implementation. It is possible, with the pre-installed demo-sketch, to make a mesh-like network of JeeNodes.

For the Arduino I found the Nodo project as a great starting point for a Arduino based domotica solution. A new version is being made at this time which aims at the Arduino Mega and the new Arduino 1.0 IDE.

In this blog I want to share my experience in the quest for a great domotica implementation. Examples of sensors, sketches and links to interesting websites.

That’s it for the first post.