IR Controlled LED

IR remote controller LED Lights,

i have few doubts

  1. atmega328 to uln2803 b/w need pullup or pulldown or nothing ?

  2. 0.1mfd connected to Aref pin and gnd ? (need to connect or remove)

  3. TSOP1738 signal(3rd pin) pin pullup need to connect or not ?(i tried with pull-up, less receiving angle if i connect )

  4. for hardware reset i connected .1MFD to atmega328 pin 1 and ground ?

#include "IRremote.h"

/*-----( Declare Constants )-----*/
int receiver = 11; // pin 3 of IR receiver to Arduino digital pin 11

/*-----( Declare objects )-----*/
IRrecv irrecv(receiver);           // create instance of 'irrecv' 
decode_results results;            // create instance of 'decode_results'
/*-----( Declare Variables )-----*/
int Relay1 = 9;      // relay one connect to pin 9
int Relay2 = 8;      // relay two connect to pin 8
int Relay3 = 2;      // relay three connect to pin 2
int Relay4 = 3;      // relay four connect to pin 3
int Relay5 = 4;      // relay one connect to pin 4
int Relay6 = 5;      // relay two connect to pin 5
int Relay7 = 6;      // relay one connect to pin 6
int Relay8 = 7;      // relay two connect to pin 7
int cpuled = 13;       // CPU Monitoring



void setup()   /*----( SETUP: RUNS ONCE )----*/
{
 
  // initialize the Relay1 pin as an output:
  pinMode(Relay1, OUTPUT);
   // initialize the Relay2 pin as an output:
  pinMode(Relay2, OUTPUT);
   // initialize the Relay3 pin as an output:
  pinMode(Relay3, OUTPUT);
   // initialize the Relay4 pin as an output:
  pinMode(Relay4, OUTPUT);
 // initialize the Relay5 pin as an output:
  pinMode(Relay5, OUTPUT);
 // initialize the Relay6 pin as an output:
  pinMode(Relay6, OUTPUT);
  // initialize the Relay7 pin as an output:
  pinMode(Relay7, OUTPUT);
 // initialize the Relay8 pin as an output:
  pinMode(Relay8, OUTPUT);
 // initialize the CPU pin as an output:
  pinMode(cpuled, OUTPUT);
  irrecv.enableIRIn(); // Start the receiver
}/*--(end setup )---*/

int on1= 0;
int on2= 0;
int on3= 0;
int on4= 0;
int on5= 0;
int on6= 0;
int on7= 0;
int on8= 0;

void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
      if (irrecv.decode(&results)) // have we received an IR signal?
  {
    translateIR(); 
    irrecv.resume(); // receive the next value
  }  
 digitalWrite(cpuled, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(50);              // wait for a second
  digitalWrite(cpuled, LOW);    // turn the LED off by making the voltage LOW
  delay(50);              // wait for a second 
}/* --(end main loop )-- */

/*-----( Declare User-written Functions )-----*/
void translateIR() // takes action based on IR code received

// describing TV remote controller IR codes 

{

  switch(results.value)

  {

  
  case 0x584F00FF:  
        on1 = !on1;
         digitalWrite(Relay1, on1 ? HIGH : LOW);
         delay(100);
   break;

  case 0x584F807F:  
        on2 = !on2;
         digitalWrite(Relay2, on2 ? HIGH : LOW);
         delay(100); 
   break;

  case 0x584F40BF:  
         on3 = !on3;
         digitalWrite(Relay3, on3 ? HIGH : LOW);
         delay(100);
   break;

  case 0x584FC03F:  
        on4= !on4;
        digitalWrite(Relay4, on4 ? HIGH : LOW);
        delay(100);
   break;

  case 0x584F20DF:  
        on5= !on5;
        digitalWrite(Relay5, on5 ? HIGH : LOW);
        delay(100);
    break;

  case 0x584FA05F:  
        on6= !on6;
        digitalWrite(Relay6, on6 ? HIGH : LOW);
        delay(100);
    break;
    
  case 0x584F609F:  
        on7= !on7;
        digitalWrite(Relay7, on7 ? HIGH : LOW);
        delay(100);
    break;

   case 0x584FE01F:  
        on8= !on8;
        digitalWrite(Relay8, on8 ? HIGH : LOW);
        delay(100);
    break;

   
  }

  delay(100);

} //END translateIR

  delay(50);              // wait for a second

Really?

Questions 2,3, and 4 require a read of the datasheets for the parts involved. What do they say about it? For question 1, the answer is probably nothing. Have you have omitted power and ground connections from your schematic?

If you are using a DIP ULN2803 (I think so), you have the inputs and outputs connected backwards. Not a good omen.

yes , ULN2803 connection reversed sorry for that, this diagram i draw for explanation purpose only, i have done my own pcb and tested its working but some times got cpu hanging problem , its restart automatically

raja2008: yes , ULN2803 connection reversed sorry for that, this diagram i draw for explanation purpose only, i have done my own pcb and tested its working but some times got cpu hanging problem , its restart automatically

Great! So you can show us the actual schematic! What is the value of the filter cap in the lower left corner of the board? The traces in there are obscured by the diodes, so it's hard to see that part of the circuit. This is an example of why I want to see the schematic. You have only one bypass cap on the CPU, and it's polarized. That worries me because the ESR may not be good enough.

You should write a simple test sketch that only switches the relays, to narrow down the problem.

Lower left corner capacitor value 1000Mfd and nearby cup polarized capacitor value 10Mfd others 0.Mfd

For some strange reason, going by the title, "IR Controlled LED", I expected this thread to be about IR controlled LEDs. You named your PCB layout image "IR Remote control pcb.png", yet your PCB layout has neither an IR receiver nor LEDs and bears no resemblance to the schematic you showed in your opening post. All very confusing.

  1. TSOP1738 signal(3rd pin) pin pullup need to connect or not ?(i tried with pull-up, less receiving angle if i connect )

The datasheet shows an internal pullup resistor. Although I guess that's totally irrelevant since your PCB layout doesn't have an IR receiver anyway.

  1. for hardware reset i connected .1MFD to atmega328 pin 1 and ground ?

Not on the PCB layout you didn't.

pls see my schematic diagram, in this pcb layout i replaced led with relays, and some components i soldered at behind

raja2008: Lower left corner capacitor value 1000Mfd and nearby cup polarized capacitor value 10Mfd others 0.Mfd

Well, a 10 uF electrolytic by itself doesn't have a low enough impedance at high frequencies to properly filter the supply to the processor. I don't see any other (if I'm wrong, it's your fault not mine, because you still have not posted a proper schematic, you say "this diagram i draw for explanation purpose only").

You don't seem to be responding to replies. Did you try a relay test sketch, as I suggested?

Since you imply that you are testing, you must have an assembled board. Can you at least post a photo?