Skip to main content

Posts

Showing posts with the label electronics

InduinoX and wireless relays: Part I

It has been a while since I received my wireless relay and I finally got some time this weekend to put them to good use. The connections were really simple. I connected a 5V DC power supply (check polarity, the center pin should be positive) to the wireless transmitter and a 12V DC power supply to the relay board (which also has the receiver). To control the relays using InduinoX, I connected the wireless transmitter board ground to the InduinoX board's ground. Connected the relay 0 pin on the board to digital pin 7 on InduinoX. Finally connecte the light bulb to mains neutral, the live from mains to the common pin on the relay and "normally closed" (NC) pin on the relay to the light bulb. Generally you would connect the "Normally open" (NO) pin to the light bulb instead of NC, but I will explain in a minute why I had to connect NC. Now to the coding part. The specification for the relay tells us that when the relay pin is open (high impedance),...

InduinoX: Interfacing with the LDR

Now that I got my LCD display to work with the arduino board , I wanted to use it to show something useful. Since I needed to detect the ambient light for my home automation project , I decided to display the amount of light coming into a room using the light dependent resistor (LDR) that comes with the InduinoX board. Later I will use the LDR reading to determine whether I have to turn on the lights in the room or not. Typical LDR (Source: http://www.induino.com/wiki/index.php?title=File:LDR.jpg) The LDR's output is connected to analog pin 3. The voltage as read from pin 3 is inversely proportional to the light incident on it. The analog input is connected to a 10 bit analog to digital converter (ADC). Hence the values range from 0 (at 0V) to 1023 (at 5V). The analog pins can be referenced in the code using A0 (for analog input 0) to A5. For more information on analog inputs, check out  http://www.arduino.cc/en/Tutorial/AnalogInputPins . Now to get to the codin...

InduinoX: Interfacing with LCD

After my quick Hello World app , I became a bit more adventurous and decided to interface with the LCD screen that was part of the basic kit from Simple Labs (see this post for more details). Fortunately, arduino has a library called LiquidCrystal to interface with LCD displays that are driven by Hitachi HD44780 compatible drivers. All you have to do is add a #include <LiquidCrystal.h> in your code to start using the library. But before going into the coding part, I had to first make the proper connections from the LCD display to the arduino board. I looked up the datasheet for my LCD display, but found a much simpler connection diagram over at  http://www.arduino.cc/en/Tutorial/LiquidCrystal . I did not make the exact connections like in the diagram. This is what I did LCD                            Arduino PIN 1 (GND)                   ...

InduinoX: Blinking LEDs

Having received my arduino and basic components kit earlier last week , I sat out to write my first arduino program. A hello world of sorts. I started out by installing the arduino package in Kubuntu. What you get from the package is a simple IDE which can compile and upload the code to the arduino board. For installing the IDE on other flavors of linux, head on over to the arduino site . I connected the InduinoX board to my laptop using a USB cable. Selected the correct board type i n the IDE using   Tools --> Board --> Arduino Deceimila, Duemilanove, or Nano W/ ATmega 168 . Next select the correct USB to use fr om  Tools --> Serial Port . A nd finally wrote these first lines of arduino code :) void setup() {   pinMode(11, OUTPUT);  // Prepare red LED for output   pinMode(12, OUTPUT);   // Prepare blue LED for output   pinMode(13, OUTPUT);   // Prepare white LED for output } // a function which executes again and again...

Purchase experience with Simple Labs

I have been having this itch to work on a home automation project for a long time. And finally the day has come to scratch the itch. I have been putting off this idea for a while and it is high time I did something about it. So as a first step I at least wanted to get the basic electronic components. Perhaps staring them long enough would finally motivate me to do the project. I wanted to start off on a very simple setup. Basically, get a proximity sensor to detect if there are people in the room, talk to a light sensor and see if we need to turn on the lights, talk to a temperature sensor to see if we need to turn on the fan and do the necessary based on the sensors' response. To interface with these sensors I wanted to use an arduino board, which I have been wanting for a while now. The list comes down to Arduino board Proximity, light and temperature sensors Relays to turn on/off lights and fans I searched for the stuff online and found these 2 online stores (in In...