This video will describe how to use a UART to RS485 interface board in your project for reliable long distance communications. The board used is half duplex with auto Tx/Rx switching and over voltage/current protection.
Thanks, 40 years back I used four drums of twisted pair totaled of 200 meters and devised a floating supply to infect common mode pulses and of course it worked,nice!
I've got one of those USB adapters coming on the slow boat. I have to try out that "long distance programming" trick when it gets here. Thanks for the idea!
Unfortunately, i think you can't program the pro mini because of the missing dtr line that resets the mcu, which checks the presence and location of the bootloader from the burned fuses, then runs the bootloader, which listens on the serial line for incoming program data, and self-programs the flash, but dosen't overwrite the bootloader. I guess you could extend the reset pin to wherever you were programming from and hook up a switch but that method is error prone and highly timing sensitive. You'd have to hit the switch exactly when the IDE wants to begin the upload.
Hello, great explaination but I find my self some problem. When I tried to send a Data (ex : 01 03 00 00 00 00 A0 FF) the recieve data will be the same as the data that i send. Do you ever find this same problem?
Interesting to see the potentials on the A and B terminals. Sometime ago while I was battling with an camera control circuit I came across this on the internet; Quote..The EIA RS-485 Specification labels the data wires "A" and "B", but many manufacturers label their wires "+" and "-". In our experience, the "-" wire should be connected to the "A" line, and the "+" wire to the "B" line. Reversing the polarity will not damage a 485 device, but it will not communicate... unquote. A bit confusing.
Yes .. the true spec is A is "-" and B is "+" but vendors like TI and Maxim do the reverse. Some manufacturers use D- and D+ in their products. If you have two devices from the same manufacture I just match the two ends the same.
I was wondering when you were going to mention the noise pickup from long lines that need the transient suppression. Snuck that in at the end. It may be better to go with isolated 485 for longer lines, especially up a tower where transients or lightning will couple into the twisted pair referenced to ground. You left out the direction selection for half duplex communication where the same lines do transmit and receive. Your module didn’t have that so I guess that was the reason but should really be part of any 485 discussion. Finally, where is the mandatory Forth code? I feel cheated now not seeing any 😊
I try to keep my videos to 10 min max and as simple as possible as I primary make them for students at my maker club. Getting into full duplex 4 wire, repeater/isolators , ground wire vs no ground, multi-drop ... etc would take a few videos. The board I used has auto direction switching for half duplex. For tower work I use shielded cable with grounding kits and polyphasers on all lines. The board is very popular for tethered robotics. Forh code was left out as there is little interest which is sad as the kids I work with are doing some amazing things with it.
Wich library did you use for programming? I want to read some holding registers of my ABB B23 energy meter and the most libraries for Arduino are using other MAX485 modules.
how did you configured the transceiver for communication? just hooked it up and it automatically transmit? im trying to use this board the same way and it gives me all sort of issues
This board has automatic flow control. When idle it is in receive mode. When you transmit it switches to transmit mode automatically. After the transmission, you have to wait for it to switch to receive mode before receiving data and the remote node must know to delay before it sends. If you want to switch manually there are other boards where you control the D DE and R RE lines.
That is no use. First RS485 does not reduce latency in any way. It is just to imunize transmission lines. And this is in no way helpful to improve transmission speeds or latency. That being said: RS485 is the underlying standard for AES3 aka AES/EBU digital audio transmission. As well as for DMX512 lighting control.
I had a problem with this rs485 modules from aliexpress where I had lots of errors per second, and I fixed it by connecting the RS485 GND to the arduino GND, so, all of my devices on the bus had to have the same ground, which I wanted to avoid since it is a 500 meters installation and I wanted to avoid ground loops. Does anyone watching this had a similar problem? PS: the problem happened with all the 20 pcbs I had, so, maybe it's not a problem, and I'm just no using it properly, but I can't find datasheets or documentation on this product.
Your RS485 link works on the bench with two wires (without GNDs connected) because the "ground" levels are at the same potential. On a long run the "ground" potentials could be different which will cause problems. If the grounds vary more than -7 to +12 volts you will need a ground wire between nodes. To solve the ground loop problem connect a 100 Ohm resistor from each node's ground to the common ground wire. If the problem still persist check out opto-isolated RS485 nodes.
In your explanation you say the levels on A and B go between 5V and 0V. This is not necessarily the case. A 200mV difference is regarded enough. So pulling the lines all the way to GND and VCC should be kind of an edge case.
Yes ... the receiver can detect a differential input signal down to 200 mv while the driver must have at least a minimum of 1.5 volts output to meet the RS485 spec. The explanation was to describe the working concept of a differential link. For more details the viewer can consult the datasheets.
I had a problem with this module not being able to communicate. I found the problem to be C2 being to small in value. After removing C2 and replacing with a 22nF, the module worked. I think the purpose of C2 is to keep the transmission running in one direction, but when there is a pause in the communication, C2 will charge up or down and prepare the module for either transmitting or receiving the next block of data
RS485 is half duplex so this board switches the Tx/Rx function automatically with a delay set by the capacitor. This board is made by many China vendors and I have seen different capacitor values used. My board capacitor value is .1uF ( 100 nF) which actually was too high and I had to use delays to get my system working properly. This is described in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-2YD3pNjR1nY.html If timing is a problem you can get a UART to RS485 board where you control the RE and DE lines for Tx/Rx switching timing in software.
That is a big question. If you polled 100 engineers you would get a split decision. In a "normal" point to point application no ground connection between the two nodes are needed. The ground potential difference (GPD) tolerated is +12/-7 volts. In a multi node system with high GPD if the grounds are connected together you can get high loop currents. A 100 ohm resistor from each nodes signal ground to the ground bus would limit any ground loop current. If this becomes a big problem an opto-isolated link would be the way to go. Just my opinion.
When you send data to the module from the Arduino it sends it out the RS485 line. The module senses when transmission has stopped and switches to receive mode where the Arduino can receive data.
You can sent temperature data for frost alarm in farming applications. Water level flood alarm Mud slide alarm Wireless remote control .... etc ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6NHL-avk8BU.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ysNILdPZ7hk.html