Hi all, I have purchased a FTDI usb to RS485 converter to talk to my industruino. However I fail to recieve and/or send data from/to the arduino. From what I understand the Serial1 should be connected to the RS485 port? And digital pin 9 should be set to high to enable the RS485 port on the industruino?
Per example from the modbus master and slave example I have removed the 560R jumpers from the industruino (slave) and have attached the 120R wires of the FTDI converter to the A and B channel.
GND GND (RS485)
A Data+ (A) and 120R pin1
B Data- (B) and 120R pin2
Any ideas why I'm not receiving any data would be greatly apreciated!
Modbus master and slave example: https://industruino.com/blog/our-news-1/post/modbus-rtu-master-and-slave-14
#define RS485_ENABLE_PIN 9
Serial1.begin(9600); //open the TX/RX port
int inByte = Serial1.read();
Hi Arnoud, the pin 9 on the IND.I/O is the TxEnablePin, which means it has to be HIGH during transmission. In your above sketch, this pin stays HIGH from Setup, so in theory you won't be able to receive anything, which is the opposite of what you are reporting. Can you please double check? This reference may be useful: https://arduino-info.wikispaces.com/SoftwareSerialRS485Example (it uses software serial but the Industruino can use hardware serial1)
I have managed to receive data from the USB FTDI device, however I fail to send data from the Arduino. I have checked with my logic analyzer and there is no change on the A or B pin of the RS485 port on the industruino.
How do I enable the send mode on the MAX485?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!