Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: Problem interfacing arduino and relay on: February 12, 2011, 12:42:41 pm
No the problem wasn't the sketch (in addition even the remote control works great).
After testing all the other relay on the board I found that the problem was related to the 1st relay. The other 7 works perfectly.
I've just contacted the chinese seller to ask for a reinbursement...
Thanks a lot anyway for your reply.

Leonardo
2  Using Arduino / Motors, Mechanics, and Power / Problem interfacing arduino and relay on: February 12, 2011, 05:04:55 am
Hi, I'm facing some problem in interfacing my Arduino Mega with a 8 relay shield.
The shield specification can be found here http://cgi.ebay.it/Eight-8-Relay-Module-Board-for-8051-PIC-Project-12V-/130485564595?pt=LH_DefaultDomain_0&hash=item1e618bb4b3.

I've powered the shield with an external 12 V DC power supply (1000 mA) and connect the GND of the power supply with the Arduino Mega GND pin (I've read it in some posts).
I've also set an Arduino DIGITAL pin as OUTPUT (pin 50 on the sketch) and put it to HIGH but the realy remain open and didn't change its state.....?!?!?? smiley-sad

Can someone give me some advice on that?

Thanks in advanced


Here is the sketch I used...
Code:
// look for IR codes and print them as they are received

//You also need to wire the 12 volt supply ground to the Arduino ground, otherwise the transistor will never turn on.


#include <WProgram.h>
#include <NECIRrcv.h>
#define IRPIN 36 // pin that IR detector is connected to

NECIRrcv ir(IRPIN);
int PinRelay1 = 50;


void setup()
{
  Serial.begin(9600) ;
  Serial.println("NEC IR code reception");
  ir.begin() ;
  pinMode (PinRelay1, OUTPUT);
  //digitalWrite (PinRelay1,LOW);
}

void loop()
{
  unsigned long ircode ;
  while (ir.available()) {
    ircode = ir.read() ;
    //Serial.println (ircode);

    switch (ircode)
    {

    case 3910598400:
      Serial.println ("Hai premuto il tasto 0");
      Serial.println ("attendi, sto accendendo il rele' 1");
      digitalWrite (PinRelay1, HIGH);
      break;

    case 4077715200:
      Serial.println ("Hai premuto il tasto 1");
      Serial.println ("attendi, sto spegnendo il rele' 1");
      digitalWrite (PinRelay1, LOW);
      break;

    case 3877175040:
      Serial.println ("Hai premuto il tasto 2");
      break;

    case 2707357440:
      Serial.println ("Hai premuto il tasto 3");
      break;

    case 4144561920:
      Serial.println ("Hai premuto il tasto 4");
      break;

    case 3810328320:
      Serial.println ("Hai premuto il tasto 5");
      break;

    case 2774204160:
      Serial.println ("Hai premuto il tasto 6");
      break;

    case 3175284480:
      Serial.println ("Hai premuto il tasto 7");
      break;

    case 2907897600:
      Serial.println ("Hai premuto il tasto 8");
      break;

    case 3041591040:
      Serial.println ("Hai premuto il tasto 9");
      break;

    case 3860463360:
      Serial.println ("Hai premuto il tasto 100+");
      break;

    case 4061003520:
      Serial.println ("Hai premuto il tasto Indietro");
      break;

    case 3125149440:
      Serial.println ("Hai premuto il tasto Spegnimento Totale");
      break;

  case 3108437760:
      Serial.println ("Hai premuto il tasto Mode");
      break;

    case 3091726080:
      Serial.println ("Hai premuto il tasto Mute");
      break;

    case 3141861120:
      Serial.println ("Hai premuto il tasto Pagina Precedente");
      break;

    case 3208707840:
      Serial.println ("Hai premuto il tasto Pagina Successiva");
      break;
    
     case 3158572800:
      Serial.println ("Hai premuto il tasto Play/Pause");
      break;
      
   case 4161273600:
      Serial.println ("Hai premuto il tasto Volume -");
      break;

    case 3927310080:
      Serial.println ("Hai premuto il tasto Volume +");
      break;
    
     case 4127850240:
      Serial.println ("Hai premuto il tasto Equalizzatore");
      break;
    }
  }
}

P.S: in the sketch I use a remote control for switch the realy to OPEN or CLOSED.





3  Forum 2005-2010 (read only) / Italiano / Re: Evento gratuito di Arduino a Roma, organizziamo? on: January 10, 2011, 04:34:33 am
ARRRRRRRRRRIVOOOOOOOO!!!
4  Forum 2005-2010 (read only) / Troubleshooting / Arduino burned????? on: January 09, 2011, 06:11:23 am
This morning for a mistake I plug 12 Volt on the 5V PIN on my Proto Shield installed on my Arduino Mega...
At the same shield were conected both a Graphic  LCD (K0108) and a RTC (that have to be power with 5 V).

After 5 seconds I realized that and I disconnect it form the 12V.
Now the LCD shows just vertical lines. Is it gone??

 power the Arduino MEGA with the 5 v and run a test blinking sketch (SOS on pin 13) and it seems to work.

I didn't have the time to check if the Real Time Clock works, but I sincerely don't think so.

In your opinion may I have damage my Arduino MEGA by providing 12V on the 5V pin????

Thanks in advance

Pages: [1]