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
Arduino IO Expansion V5 RS485 Problem
Re: Arduino IO Expansion V5 RS485 Problem
Hi there,
Could you provide us your wiring diagram to let us know about details?
Best regards
Jack
Could you provide us your wiring diagram to let us know about details?
Best regards
Jack
Re: Arduino IO Expansion V5 RS485 Problem
I attached photo with connection. Thanks.jack wrote:Hi there,
Could you provide us your wiring diagram to let us know about details?
Best regards
Jack
- Attachments
-
- io_expansionv5_sheme.jpg (63.04 KiB) Viewed 27549 times
-
- io_expansionv5.jpg (126.55 KiB) Viewed 27549 times
Re: Arduino IO Expansion V5 RS485 Problem
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
RS485 Receiving Data
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
I have the same results: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
- 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!
-
- Posts: 1
- Joined: Mon Apr 25, 2016 6:07 pm
Re: Arduino IO Expansion V5 RS485 Problem
What does this mean? I think that it is not working properly SP485. What do you think about this???
=== Solitaire ===