Page 1 of 1
Arduino IO Expansion V5 RS485 Problem
Posted: Sat Mar 24, 2012 1:06 am
by tempUser
Hello!
I bought this board and tested to work with RS485 port.
The data is successfully sent by the board, but it can not receive data!
The second pin is set to LOW (digitalWrite(2, LOW);).
I measured the voltage between the following contact of SP485 chip (see attached image):
- Vcc <-> GND = 5.14V
- DI <-> GND = 5.14V
- A <-> B = 1.8-2.5V (changes when receiving data)
- DE <-> GND = 0V
- RE <-> GND = 0V
- RO <-> GND = 0V
Why RO pin is zero and Serial.read() is nothing too?
Thank you very much!
Best regards,
Alexander
P.S. Datasheet of SP485:
http://www.datasheetcatalog.org/datashe ... P481CN.pdf

Re: Arduino IO Expansion V5 RS485 Problem
Posted: Sat Mar 24, 2012 4:55 pm
by jack
Hi there,
Could you provide us your wiring diagram to let us know about details?
Best regards
Jack
Re: Arduino IO Expansion V5 RS485 Problem
Posted: Sat Mar 24, 2012 9:00 pm
by tempUser
jack wrote:Hi there,
Could you provide us your wiring diagram to let us know about details?
Best regards
Jack
I attached photo with connection. Thanks.
Re: Arduino IO Expansion V5 RS485 Problem
Posted: Mon Mar 26, 2012 1:58 pm
by jack
I have tested the receiving and sending function with RS485 port on V5 IO shield,it works well.
Please kindly use the following demo code and checking your wiring.
RS485 Receiving:
- Vcc <-> GND = 3.28V
- DI <-> GND = 3.28V
- A <-> GND = 3.00V
- B <-> GND = 1.57V
- DE <-> GND = 0V
- RE <-> GND = 0V
- RO <-> GND = 3.28V
SAMPLE CODE
RS485 Transmit Data
Code: Select all
//RS485 has a enable/disable pin to transmit or receive data.
//Arduino Digital Pin 2 = Rx/Tx 'Enable'; High to Transmit, Low to Receive
int EN = 2;
void setup()
{
pinMode(EN, OUTPUT);
Serial.begin(19200);
}
void loop()
{
// send data
digitalWrite(EN, HIGH);//Enable data transmit
Serial.print('A');
delay(1000);
}
RS485 Receiving Data
Code: Select all
int ledPin = 13;// Light up Led when receiving data
int EN = 2;
int val;
void setup()
{
pinMode(ledPin, OUTPUT);
pinMode(EN, OUTPUT);
Serial.begin(19200);
}
void loop()
{
// receive data
digitalWrite(EN, LOW);//Enable Receiving Data
val = Serial.read();
if (-1 != val) {
if ('A' == val) {
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}
}
}
Re: Arduino IO Expansion V5 RS485 Problem
Posted: Mon Mar 26, 2012 9:33 pm
by tempUser
jack wrote:
RS485 Receiving:
- Vcc <-> GND = 3.28V
- DI <-> GND = 3.28V
- A <-> GND = 3.00V
- B <-> GND = 1.57V
- DE <-> GND = 0V
- RE <-> GND = 0V
- RO <-> GND = 3.28V
I have the same results:
- Vcc <-> GND = 5.14V
- DI <-> GND = 5.14V
- A <-> B = 1.8-2.5V (changes when receiving data)
- DE <-> GND = 0V
- RE <-> GND = 0V
- RO <-> GND = 0V
except that:
- RO <-> GND = 0V
What does this mean? I think that it is not working properly SP485. What do you think about this?
Thanks!
Re: Arduino IO Expansion V5 RS485 Problem
Posted: Mon Apr 25, 2016 6:09 pm
by adolfainsley8
What does this mean? I think that it is not working properly SP485. What do you think about this???