Skip to main content

Posts

Showing posts with the label induinox

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: IR Emitter

In my last post , I promised an arduino board based remote control. This is the post you have been waiting for. Now the InduinoX comes with an IR emitter too (don't you just love this board?)! The IR emitter is connected to analog pin 0. So you can start transmitting the remote signal you previously discovered. Before we go too far, make sure you have read the primer on IR remotes . My TV remote sends out the signal in the sony protocol as observed from my gnuplots and oscilloscope. You know now that according to Sony protocol, a 1 is represented by 1200ms of high and 600ms of low, while a 0 is represented by 600ms of high and 600ms of low. Also the signal is to be prefixed with a header, which is 2400ms high signal followed by a 600ms of low. So lets write some code to send the header, 0 and 1 first. #define HEADER_ON    2400 #define HEADER_OFF   600 #define BIT_1_ON     1200 #define BIT_1_OFF    600 #define BIT_0_O...

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...