Rapti Posted March 28, 2024 Posted March 28, 2024 Hi all, I guess, I've figured it out by reading some of Vinc_Vega's posts. This is my first-ever schematic. Please let me know if it's not right. Thank you. I've also noticed that many PCBs have large copper ground fills - is this necessary and what is the benefit? Can it not be just nets with the rest of the copper being etched away?Why the resistor and the condensator? Gesendet von meinem SM-G988B mit Tapatalk
No1sonuk Posted March 28, 2024 Posted March 28, 2024 33 minutes ago, Rapti said: Why the resistor and the condensator? Gesendet von meinem SM-G988B mit Tapatalk Looks to me like the resistor pulls the enable lines low in case the Arduino doesn't. The Capacitor (the English name for it) smooths and reduces noise on the power supply. 1
Vinc_Vega Posted March 28, 2024 Posted March 28, 2024 The pulldown resistor is not required. It has been recommended somewhere here in the forum in case you have problems to receive data (RE low = receiver enabled). As No1sonuk already wrote, the capacity is to reduce noise in the power supply. It is optional too. Regards, Vinc 1 Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Rapti Posted April 25, 2024 Posted April 25, 2024 I have now made a diagram of the wiring. Can anyone confirm that this is correct? I think I have read that there can be problems using an Arduino MEGA as a slave? Is this correct?
No1sonuk Posted April 25, 2024 Posted April 25, 2024 6 hours ago, Rapti said: I have now made a diagram of the wiring. Can anyone confirm that this is correct? I think I have read that there can be problems using an Arduino MEGA as a slave? Is this correct? There have been some issues with a Mega as a slave, and yours might be wired incorrectly anyway. I think you need to use TX0 and RX0 if you're using the Mega as a slave. You use TX1 and RX1 for the RS485 network on the master because TX0 and RX0 are used for the USB comms. All the other Arduinos are disconnected from the USB, so TX0 and RX0 are used on those.
Rapti Posted April 26, 2024 Posted April 26, 2024 10 hours ago, No1sonuk said: I think you need to use TX0 and RX0 if you're using the Mega as a slave. you are right. I will try it. Thanks.
Vinc_Vega Posted April 26, 2024 Posted April 26, 2024 (edited) 23 hours ago, Rapti said: I have now made a diagram of the wiring. Can anyone confirm that this is correct? I think I have read that there can be problems using an Arduino MEGA as a slave? Is this correct? Here you can find the discussion on how a slave Mega should be connected https://forum.dcs.world/topic/310930-maximising-the-use-of-arduino-nanos-max-switch-connections-possible/#comment-5083746 You also may have a look into previous RS485 related discussions. I recommend the second layout from that posting https://forum.dcs.world/topic/208455-dcs-bios-over-rs485/?do=findComment&comment=3926198 Regards, Vinc Edited April 26, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Strale Posted April 26, 2024 Posted April 26, 2024 Il 29/4/2023 at 12:37, Vinc_Vega ha scritto: Hi Les, first impression from here https://store.arduino.cc/products/arduino-nano-every They say: pin compatible and code will still work. I try to get one or two for experiments. Regards, Vinc Hi Vinc, one year from this post, did you have the chance to try those every ? I'm having problems with them, same code of a clone nano, uploaded, connected directly to USB i see the code and also the change of code when i press one switch but in the virtual cockpit it doesn't happen anything ! Really weird as they say it's compatible with nano. Thanks for any suggestion.
Vinc_Vega Posted April 27, 2024 Posted April 27, 2024 (edited) @Strale Hi I decided not to try the Nano Every as I had enough of the "regular" Nanos available and ESP32 modules in several form factors. Anyway, other members reported of unsolved problems. Sorry! Maybe @lesthegrngo or @outbaxx have more experience with that kind of chips. Best regards, Vinc Edited April 27, 2024 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Strale Posted April 28, 2024 Posted April 28, 2024 (edited) Thanks VInc, i was thinking that upgrading to original Arduino was the right choice but hell i can upload the sketch but even if i see the code changing when pressed a switch it doesn't do anything in the virtual cockpit. That's a shame Thanks UPDATE I know the rule but sometimes i loose myself ! Think twice .. buy Once ! Indeed NANO EVERY, against the statements on Arduino web store, are not compatible with Nano Sketches at least while using DCSBIOS ! I returned the board to Arduino and waiting for a full refund. Next time i'll write the rule on a post-it and place it on my monitor. Edited May 9, 2024 by Strale
Rapti Posted April 28, 2024 Posted April 28, 2024 On 4/26/2024 at 3:13 PM, Vinc_Vega said: Here you can find the discussion on how a slave Mega should be connected https://forum.dcs.world/topic/310930-maximising-the-use-of-arduino-nanos-max-switch-connections-possible/#comment-5083746 You also may have a look into previous RS485 related discussions. I recommend the second layout from that posting https://forum.dcs.world/topic/208455-dcs-bios-over-rs485/?do=findComment&comment=3926198 Regards, Vinc So i tried it with 1 MEGA as the Master, a MEGA as slave 1 and a Arduino UNO as slave 2. --> it worked! But I had to change the RX/TX on the clone mega's. I wired it exactly as in my picture above exept the slave mega uses TX0 and RX0, as No1sonuk mentioned. 1
Rapti Posted May 7, 2024 Posted May 7, 2024 After the succesful test, I designed the PCB's for th RS485 modules.I will connect each board with these micro latch connectors. The screw terminals are for connecting the arduinothe the board. The Red ans blue jumper is for deconnecting the RX ans TX when loading New arduino sketch. Gesendet von meinem SM-S928B mit Tapatalk 1
Rapti Posted May 15, 2024 Posted May 15, 2024 It works!!! I tested 3 slaves. 1 Uno and 2 Megas. Just the Master connected to the PC. The slaves are communicating via the RS485 modules.Gesendet von meinem SM-S928B mit Tapatalk
Zorg. Posted June 18, 2024 Posted June 18, 2024 Hi. Does anyone have a link for max 487s that are not very expensive, but functional. My last order on Aliexpress I ended up with chips they were all degraded with random operation and they are currently 5 dollars on Mouse
Heling Posted August 9, 2024 Posted August 9, 2024 I wonder why this improvement suggestion from 2020 was not incorporated into DcsBiosNgRS485Slave.cpp.inc: https://forum.dcs.world/topic/208455-dcs-bios-over-rs485/?do=findComment&comment=4374711
JohnnyChicago Posted December 22, 2024 Posted December 22, 2024 Hi, I am in the process of doing a RS485 Network. Right now i have a Mega as a Master and three Unos as Slaves, all working as it should. If i connect a 4th Uno Slave to the Network then there is no Communication . Or do i have to define more Pins in the Master Sketch ? #define UART1_TXENABLE_PIN 2 // for 3 Slaves #define UART2_TXENABLE_PIN 3 // for the next 3 Slaves ?? #define UART3_TXENABLE_PIN 4 // for the next 3 Slaves ?? Thanks Wishing you all the best
Vinc_Vega Posted December 23, 2024 Posted December 23, 2024 @JohnnyChicago No, you can hook up to 128 slaves to one bus. But nobody has experience with that amount. Just remember to give a slave it's unique number within the net. You enable the other pins at the Mega to have two more buses. Regards, Vinc 1 Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
JohnnyChicago Posted January 12 Posted January 12 Hi, i still need some help here. My RS485 Network is based on image below. Difference is , i have one Mega as a Master and the rest are all Nanos. On the image below there are only two Slaves.. I plan to have have 5 or more Slaves ! I made a test with breadboards with one Mega Master and two Uno Slaves.. all worked as it should ! But when i add a 3th or more Slaves (like in the image below) then there is no more communication on RX / TX..(RX / TX Led is going off on Slaves) So how i can i connect 128 slaves in theory when the maximum is 3 ?? (I know the Mega has multiple TX / RX Lines) Zitat /* Define where the TX_ENABLE signals are connected. You can connect up to three half-duplex RS-485 transceivers. Arduino Pin RS-485 Transceiver Pin TXn ------------------- DI (driver input) RXn ------------------- RO (Receiver Output) UARTn_TXENABLE_PIN ---- /RE, DE (active low receiver enable, driver enable) If you have less than three transceivers connected, comment out the corresponding #define UARTn_TEXENABLE_PIN lines for receivers that are not present. */
Vinc_Vega Posted January 13 Posted January 13 (edited) @JohnnyChicago The images from the first page of this post show similar graphics, but maybe a little bit clearer. The Slaves must be connected via the RS485 bus only and not to the USB port at the same time. It also may help to use a common power supply for all Arduinos. As I had difficulties to directly link the pictures, here they are again. For the software, you have to use the sketch from Arduino\libraries\DcsBios\examples\RS485Master\RS485Master.ino for the Master ONLY (Mega). Have a look at line 5 of the sketch RS485Master.ino #define DCSBIOS_RS485_MASTER If using a single RS485 bus, you may comment out the UART definitions as follows #define UART1_TXENABLE_PIN 2 // #define UART2_TXENABLE_PIN 3 // #define UART3_TXENABLE_PIN 4 The sketches from Arduino\libraries\DcsBios\examples\RS485Slave\RS485Slave.ino are for all your Slaves and therefore, have to be adjusted in line 6, so that each Slave has a unique identifier. The example in RS485Slave.ino is for Slave No. 1 #define DCSBIOS_RS485_SLAVE 1 For a second Slave you have to use another Slave number, like #define DCSBIOS_RS485_SLAVE 2 and so on ... Regards, Vinc Edited January 26 by Vinc_Vega spell correction Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
Recommended Posts