Loading...
  Show Posts
Pages: 1 ... 49 50 [51]
751  Forum 2005-2010 (read only) / Français / Re: Newbie et Carte relais rs-485 on: April 28, 2010, 07:01:58 pm
Merci pour ta réponse startx  smiley-wink

Pour l'instant, je continue mes essais, sans succés hélas...

Si je suis les différents avis récoltés, j'ai une topologie type 'mirroir' avec 2 SN75176, le premier en emission piloté par l'Arduino, le second en reception pilotant ATty...

ARDUINO|SN75176|OUTPUT CONTROLER(with SN75176)
Tx-------->Di----A------>A
Rx-------->Ro-----B------>B
Int-------->Re/De

J'envoie un bit 0 sur Re/De, pour déterminer la direction des données (Tx), puis je balance ma trame...

Je ne trouve hélas pas de code détaillé relatif au rs485 ayant cette configuration !!!  :-[

Si quelqu'un pouvait m'écrire une code simple, détaillé, avec la commande en décimale afin que je puisse valider mes suspiçions ???

@++

Ps : Startx, peux-tu m'orienter vers la carte que tu as opté ???
752  Forum 2005-2010 (read only) / Français / Re: Newbie et Carte relais rs-485 on: April 27, 2010, 01:01:46 pm
Salut Startx,

Je ne comprends pas trop comment tu branches tes 2 entrées/sorties par relais ???

Un shema me parlerais plus ??? As-tu déjà réussi à piloter ces cartes relais ???

@+
753  Forum 2005-2010 (read only) / Français / Re: Newbie et Carte relais rs-485 on: April 23, 2010, 05:54:56 pm
Schema ici :: http://guilde.cwahi.net/

code :



Code:
// "TEST DES CARTES RELAIS RS-485"

// "Communication Parameters :"
// "8 Data, 1 Stop, No Parity"
// "Baud rate : 9600"

// "Commands :"
// "OFF command : FF 01 00 (HEX) or 255 1 0 (DEC)"
// "ON command : FF 01 01 (HEX) or 255 1 1 (DEC)"

#define Rx 15
#define Tx 14

int inbyte = 0;

void setup(void)
{
  Serial.begin(9600);
  Serial3.begin(9600);
  
  pinMode(Rx, INPUT);
  pinMode(Tx, OUTPUT);
  
  digitalWrite(Tx, LOW);
  digitalWrite(Rx, LOW);
  
  Serial.println("Setup ok");
}

void loop()
{
  digitalWrite(Tx, HIGH);
  Serial.println("init");
  delay(1000);
//  if (Serial3.available() > 0){
//    Serial.println("loop");
    delay(10);
    Serial3.print('FF 01 01', HEX);
    Serial3.println();
    delay(100);
    digitalWrite(Tx, LOW);
    delay(1);
    digitalWrite(Rx, HIGH);
    delay(1);
    inbyte = Serial3.read();
    Serial.println(inbyte, DEC);
    delay(100);
    Serial3.flush();
    digitalWrite(Rx, LOW);
  }
//}
   

754  Forum 2005-2010 (read only) / Français / Re: Newbie et Carte relais rs-485 on: April 23, 2010, 04:56:23 pm
Merci pour ta réponse.

En effet, je me suis posé la question de la compatibilité. La carte relais posséde pourtant un chip SN75176BP (sur la petite carte controler) couplé avec un chip ATMEL ATTINY2313-20PU (pour la gestion du canal, je suppose)

En effet, peut-être un problème de cablage. quoique je penche de plus en plus vers un souci de programation, je doute sur la trame à envoyé.

Je completerais le sujet avec schema et code au plus tôt...

@+
755  Forum 2005-2010 (read only) / Français / Newbie et Carte relais rs-485 on: April 23, 2010, 11:08:24 am
Bonjour,

Tout nouveau dans le monde Arduino, je m'éclate avec ma Mega...
Pourtant, je suis face à une difficulté relative au protocole rs-485.

J'ai fait l'acquisition de deux cartes relais rs-485 à 8 canaux sur le sîte de sigma-shop : http://www.sigma-shop.com/product/47/rs485-8-channel-relay-controller-12vdc-rs485-bus-id-01-relays-1-8.html

8 data, no parity, 1 stop bit

J'ai fait different essais, de cablage, de programation...je suis perdu.
La commande semble relativement simple :

Relay 1 commands:
OFF command : FF 01 00 (HEX) or 255 1 0 (DEC)
ON command : FF 01 01 (HEX) or 255 1 1 (DEC)

J'ai tenté le port serie 3 et 2, avec differentes commandes du type :
   Serial3.println('FF 01 01', HEX);

...mais rien n'y fait !!!

Si quelqu'un possède une telle carte relais ou a la possibilité de m'aider, je suis preneur...

756  Forum 2005-2010 (read only) / Interfacing / Re: Glcd S1D13700 on: January 09, 2011, 07:21:56 pm
Yep !

Datasheet, shematic : http://www.cafelogic.com/download/s1d13700-library-schematic-and-example-code/
757  Forum 2005-2010 (read only) / Interfacing / Re: Glcd S1D13700 on: January 09, 2011, 12:19:45 pm
up
758  Forum 2005-2010 (read only) / Interfacing / Glcd S1D13700 on: January 09, 2011, 06:08:22 am
Hello,

This is my first project with a graphic Lcd. And i have some questions about how to manage font size, and also how to génerate graphics for simple menu...The S1D13700 controller howto is describe there : http://www.cafelogic.com/download/s1d13700_arduino_documentation/#one_a

Do i have to use special sofware ? Is there any freeware ? Could i use it on Linux Debian ?

Thanks

@+

Zoroastre.
759  Forum 2005-2010 (read only) / Interfacing / Re: 8 channel relay board using rs-485 proto on: May 29, 2010, 11:57:34 pm
Well,

It works !!!

Thanks to all.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1272038904

Schema : http://guilde.cwahi.net/

piece of code :
Code:
...
digitalWrite(any_dpin, HIGH);
Serial3.print("\xFF\x01\x01"); # Swith on relais 1
digitalWrite(any_dpin, LOW);
...

The SN75176 needs to be released a while after tx, the fix was to swith off Re/ & De after each command.

@+

760  Forum 2005-2010 (read only) / Interfacing / Re: 8 channel relay board using rs-485 proto on: April 28, 2010, 07:17:21 pm
Thanks all  smiley-wink

From now, i understand a little better what is rs485. But i have no issue with my board !!!

I have this configuration :

ARDUINO|SN75176|OUTPUT CONTROLER(with SN75176)
Tx-------->Di----A------>A
Rx-------->Ro-----B------>B
Int-------->Re/De

The Arduino transmit data via an SN75176 to the onboard one wich is in receipt mode...The two SN75176 are in 'mirror' topology (A to A, and B to B). I couldn't find such topology on web !!!

First, I send a 0 bit to Re/De to set direction (Tx), and data after.

Could someone write me a simple and detailed code to help me validate my scheme ???

761  Forum 2005-2010 (read only) / Interfacing / Re: 8 channel relay board using rs-485 proto on: April 25, 2010, 05:42:26 am
I'm 100% agree with Mrmeval, i think i could communicate with SN75176.
Soon, and i don't know how and why, while i was trying to switch relay n°9 (second board), the relay 6 was on...at this try, i was playing with cable on A and B...

I will contact Kmtronic.

Thanks all for your help.
762  Forum 2005-2010 (read only) / Interfacing / Re: 8 channel relay board using rs-485 proto on: April 25, 2010, 02:42:23 am
scheme there : http://guilde.cwahi.net/

Are you sure that Arduino doesnot have rs-485 support ??? Modbus is Rs-485 ???
763  Forum 2005-2010 (read only) / Interfacing / 8 channel relay board using rs-485 proto on: April 25, 2010, 02:34:07 am
Hello all !

I'm trying to interface with a 8 channel relay board using a SN75176BP with rs-485 protocol bought there : http://www.sigma-shop.com/product/47/rs485-8-channel-relay-controller-12vdc-rs485-bus-id-01-relays-1-8.html

8 data, no parity, 1 stop bit

The command to send to the controller board seems simple :

Relay 1 commands:
OFF command : FF 01 00 (HEX) or 255 1 0 (DEC)
ON command : FF 01 01 (HEX) or 255 1 1 (DEC)

But nothing works...Any helps would be appreciate (sample code + schema). I have an Arduino Mega.

@+

Original topic there : http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1272038904

Pages: 1 ... 49 50 [51]