Jump to content

DCS-BIOS Discussion Thread


FSFIan

Recommended Posts

Termination resistance value is based on the impedance of the cable you use. RS-485 spec typically calls for a cable with 120ohm impedance, but I use cat5 network cable which is 100ohm. You only terminate on the extreme ends of the chain. So you should not solder termination to the board. Make it removable so you can add new boards to the end of the chain.

 

See the following guide:

[ame]http://www.ti.com/lit/an/slla272b/slla272b.pdf[/ame]

 

(Ugg I must say the forums auto embedding of PDFs is annoying.)


Edited by Gadroc
format due to auto embed of pdf
Link to comment
Share on other sites

Thank you for the quick reply. Reading your Document will take me a few days ;) But I will do!!!

RS-485 spec typically calls for a cable with 120ohm impedance,

Thats OK. But how to determine, what impedance my cable is?

I'll take this as a recommendation to use wellknown cable. As I work as an "Audio-Engineer" I will elect a cable from there. Will see.

You only terminate on the extreme ends of the chain.

That's well known to me. Thats why it's called Termination :) (Abschlusswiderstand in german)

So you should not solder termination to the board. Make it removable so you can add new boards to the end of the chain.

This is a very useful hint. I had in mind, not to solder some resistors before I know exactly bus-structure. I lost off mind, that most of our systems are "dynamic" and nobody knows where the module will be later in the "chain".

 

So I have to do some further development :)

 

I use cat5 network cable

Do you rember, I made such a suggestion few weeks ago?


Edited by Tekkx

Manual for my version of RS485-Hardware, contact: tekkx@dresi.de

Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You.

Link to comment
Share on other sites

Thats OK. But how to determine, what impedance my cable is?

I'll take this as a recommendation to use wellknown cable. As I work as an "Audio-Engineer" I will elect a cable from there. Will see.

 

Unfortunately I don't think it's trivial to measure existing cable. If you're using Cat 5 / 5e /6 the impedance is 100ohm. Before buying the twisted pair for the pit I'd make sure it has a specified impedance from your vendor.

Link to comment
Share on other sites

The impedance of a cable depends on how it is constructed. Cat5 cable is specified to have an impedance of 100 ohm.

 

A while ago I read everything I could find and understand about termination and fail-safe resistors. The most informative (to me) resources I could find were these:

  • This article: Designing RS-485 circuits
  • TI app note slyt324: RS-485: Passive fail-safe for an idle bus (no link to avoid auto-embedding, just google "slyt324")

I made a simple calculator in JavaScript to play with the equations from the second link:

http://dcs-bios.a10c.de/rs485-resistors.html

 

My recommendation would be to not bother with termination unless you have problems with lots of interference. Here is a quote from the first link, from the "Simplified low-power link" section:

For some shorter and slower links, you can save power and components by not using terminating and biasing components. This is feasible if the line is electrically short, which means that it behaves as a lumped, rather than distributed, system. On a short line, the reflections die out long before the receiver is ready to read the signal.

 

A general guideline is that a line is short if the rise time of its signals is greater than four times the signals' one-way delay.

 

According to the MAX487 datasheet, the slew-rate limiting feature guarantees a minimum rise time of 250 nanoseconds. That would allow a bus length of up to 12.49 meters without termination or biasing resistors. TI app note slla036d gives a slightly different rule under section 2.1, which works out to a length of 10 meters.

 

My recommendation would be to simply not bother with termination as long as your bus length does not approach 10 m and you are using the MAX487. You can always add it later.

 

Note: I am not an electrical engineer and I don't have any practical experience with RS-485 beyond 20 centimeter long buses on a breadboard, so take everything I say here with a grain of salt.

Link to comment
Share on other sites

Ian;2646000']My recommendation would be to simply not bother with termination as long as your bus length does not approach 10 m and you are using the MAX487. You can always add it later.

 

Note: I am not an electrical engineer and I don't have any practical experience with RS-485 beyond 20 centimeter long buses on a breadboard, so take everything I say here with a grain of salt.

 

I concur. I've read several things along the same lines and even reports of termination hindering shorter runs. My plan has been to create "termination plugs" off the PCBs which I would plug into the last devices on the chain if it became necessary.

Link to comment
Share on other sites

There is no logging functionality built into DCS-BIOS for that. The live view in the interactive control reference has been all I needed.

 

It's simple enough to write an application that connects to DCS-BIOS and logs things, though. In fact, the "test.py" in my python DCS-BIOS example already does this -- it prints the CMSP display lines and the CMSP mode to stdout whenever they change. Add a timestamp to the output and redirect it to a file and you have a logging application.

Link to comment
Share on other sites

Ian;2646102']There is no logging functionality built into DCS-BIOS for that. The live view in the interactive control reference has been all I needed.

 

It's simple enough to write an application that connects to DCS-BIOS and logs things, though. In fact, the "test.py" in my python DCS-BIOS example already does this -- it prints the CMSP display lines and the CMSP mode to stdout whenever they change. Add a timestamp to the output and redirect it to a file and you have a logging application.

OK thanks. I might program something into Flightpanels later on.

Link to comment
Share on other sites

I have attached a preview of my first stab at an RS-485 breakout board to this post. I have ordered parts to populate ten of these from AliExpress, which will probably arrive in about four weeks. The RJ-45 sockets will not be the 90° type shown in the picture but a "straight through" type so you'd plug in the cable from the top instead of the side. Since there is no datasheet for the sockets I ordered, it remains to be seen whether they will actually fit the boards, but AliExpress seems to be the way to go if you don't want your connectors to cost more than the microcontroller board they connect to.

 

I still don't plan to build a pit of my own, but I need a more convenient and more permanent test setup for DCS-BIOS development. A setup based on Cat5 cable also makes it easy to experiment with different RS-485 bus lengths.

 

  • The board will have stackable headers, so it is designed to plug into another board or breadboard and have an Arduino Nano plugged in on top of it.
  • The dimensions are about 100x18 mm, with four 3mm mounting holes.
  • I use the following pin mapping for the Cat5 cable:
    1 -- A (RS-485 Bus)
    2 -- B (RS-485 Bus)
    3 -- 5V
    4 -- GND
    5 -- 12V
    6 -- GND
    7 -- user-defined
    8 -- user-defined
    


    The user-defined pair is accessible on the pin header on the right.

  • You can connect the Arduino to the 5V or 12V line on the Cat5 cable by setting one of the PWR_5V or PWR_12V jumpers, or clear both jumpers and power it externally
  • The RX and TX jumpers can be used to disconnect the RX and TX lines going to the MAX487 chip, so you can reflash the Arduino without unplugging it from the board.

 

I consider the thing feature-complete at this point, but the boards will ship faster than the other components will, so I'll wait a few days before ordering the PCBs. In the meantime, I wanted to throw this out here in case any of you have feedback from the perspective of someone who is actually building panels.

 

If there is any interest, I am considering to sell these for about 10 Euro a piece (fully populated including a Nano) once I am happy with the design. That might allow me to eventually get up to an inventory of about 60 boards to test the RS-485 bus with a workload that might be found in a complete simpit.

rs485-shield-draft0.thumb.png.8ceb55739b14c41e56bdbb9de35a96d9.png

Link to comment
Share on other sites

Ian;2649262']

  • The RX and TX jumpers can be used to disconnect the RX and TX lines going to the MAX487 chip, so you can reflash the Arduino without unplugging it from the board.

Neat. You could use a double pole toggle switch on these pins so you can turn both on/off for programming without fiddling with jumpers.

You can even add a hidden latching double pole pushbutton behind a small hole in the front panel that you can depress using a paper clip, to allow programming of panels you don't have easy rear access to.

 

EDIT: Although you'd still need physical access to plug in a USB cable, doh!

Link to comment
Share on other sites

Hi

I would be interested in buying, currently building full set of panels.

 

Neal

Desktop PC:

Intel i7 14700K, MSI Z790 MAG Tomahawk MOBO, 64Gb RAM , GPU Nvidia RTX 3080ti

Windows 11, VPC joystick, Crosswind rudder peddles, HP Reverb G2, VPC Collective, DOF Reality H2, Gametrix seat, WinWing panels.

Link to comment
Share on other sites

I did some more reading and decided against selling boards. I would have to deal with CE marking and RoHS compliance, which is simply impossible to do without lots of cash and a bunch of lawyers.

 

There are some claims on the internet that development or evaluation boards are exempt, but I could find no mention of that anywhere in the actual legislation. The most informative source I could find was a .doc file hosted on element14.com (second Google hit for "RoHS development board"). In a nutshell, any sale of a dev board in Europe without CE marking and RoHS compliance documents is/was illegal, but so far, no authority has bothered to do anything about it.

 

I know that it would be very unlikely that I would get into legal trouble over this, but I also know that if I did, that would probably mean a hefty fine at least, and unlike the big corporations that have sold dev boards in the past without bothering with RoHS or CE compliance, I don't have a legal department.

 

 

Instead of selling boards, I plan to publish the board design (well, I was going to do that anyway) and where I sourced my parts once I have something working.

 

I will then fill out the necessary paperwork to tell the German IRS equivalent that I am a freelance software developer, which will enable me to set up a donation button. If people want to help me expand the number of devices I have to test, they will be able to do it that way.

 

You see, any income you have that isn't already reported by e.g. your employer needs to be totaled up and written into a box on your tax return. It does not make any difference in the amount of tax I need to pay, because the authorities will subsequently ignore it as it will be way below any applicable amount of exemption. But failing to do this would count as tax evasion, even if it would mean less work for all parties involved and yield the same results :doh:

Link to comment
Share on other sites

Hi Ian

fully understand. I am currently designing a led matrix pcb to work with Max7219 chip (fritzing software) and will proof this through Fritzing pcb making service, happy to share to help you expand your system testing.

Neal

Desktop PC:

Intel i7 14700K, MSI Z790 MAG Tomahawk MOBO, 64Gb RAM , GPU Nvidia RTX 3080ti

Windows 11, VPC joystick, Crosswind rudder peddles, HP Reverb G2, VPC Collective, DOF Reality H2, Gametrix seat, WinWing panels.

Link to comment
Share on other sites

Ian;2650213']I did some more reading and decided against selling boards. I would have to deal with CE marking and RoHS compliance, which is simply impossible to do without lots of cash and a bunch of lawyers.

 

There are some claims on the internet that development or evaluation boards are exempt, but I could find no mention of that anywhere in the actual legislation. The most informative source I could find was a .doc file hosted on element14.com (second Google hit for "RoHS development board"). In a nutshell, any sale of a dev board in Europe without CE marking and RoHS compliance documents is/was illegal, but so far, no authority has bothered to do anything about it.

 

I know that it would be very unlikely that I would get into legal trouble over this, but I also know that if I did, that would probably mean a hefty fine at least, and unlike the big corporations that have sold dev boards in the past without bothering with RoHS or CE compliance, I don't have a legal department.

 

 

Instead of selling boards, I plan to publish the board design (well, I was going to do that anyway) and where I sourced my parts once I have something working.

 

I will then fill out the necessary paperwork to tell the German IRS equivalent that I am a freelance software developer, which will enable me to set up a donation button. If people want to help me expand the number of devices I have to test, they will be able to do it that way.

 

You see, any income you have that isn't already reported by e.g. your employer needs to be totaled up and written into a box on your tax return. It does not make any difference in the amount of tax I need to pay, because the authorities will subsequently ignore it as it will be way below any applicable amount of exemption. But failing to do this would count as tax evasion, even if it would mean less work for all parties involved and yield the same results :doh:

 

Sorry to hear that Ian. Lemme know when you get something you like, and I'll happily organize a group buy of PCBs here in the US, as I'm gonna need at least 30 of em anyways, and we might as well buy in bulk.

 

Would you consider adding a screw hole pattern to it, so you can use it to mount both the pro mini and the 485 board via standoffs to panels?

Link to comment
Share on other sites

Count me in m8, Happy to show support.

 

weeb

Windows 7 64 Home Premium, i5 3570K (3.4 @ 4.4GHz), Asus P8Z77-V LX, 16GB dual channel 1600 ram, EVGA Nvidia GTX980ti, 240 GB OCZ SSD, 3 TB Raptor, Thrustmaster Warthog Hotas and Throttle, Saitek Pro Combat Rudder pedals.

Link to comment
Share on other sites

I just had to try something out on my own. Still WIP though.

Will be 15 USD for 10 boards at ITEAD (max 5cm*10cm 2 layer) plus 10 USD for shipping.

Haven't made any final decision yet about the IDC connector for in- and outputs. But it is leaning in that direction. Pretty cheap and easy to crimp etc.

 

As you ca see, I'm going with RJ45 as well for the communication and power (5V (Max) and 12V (Arduino)). Pretty convenient with pre-made and cheap cables.

For outputs I will design a driver board with ULN2803 circuits that will have a separate power distribution.

DCSBIOS_Breakout_001.jpg.6e4566b9db01cbfca219595b753e5324.jpg


Edited by BravoYankee4
Link to comment
Share on other sites

Do the math on power draw on these boards. The wires inside a ethernet cable are 26 - 28 AWG and can not handle much current. If you run power through the daisy chain cables the first boards connectors and run of wire will have the total current for the entire daisy chain running through it.

Link to comment
Share on other sites

In an earlier revision of my board, I had jumpers labelled PASS_5V and PASS_12V to disconnect the 5V and/or 12V lines from the second RJ-45 connector, so you could feed power to individual segments of the bus. I took them out because the PCB routing didn't work out (too many traces in a small space, and I didn't want to make the board wider than the Arduino Nano to keep it breadboard-compatible).

 

Wikipedia claims that one conductor in a Cat5 cable can safely carry up to 360 mA. In a real cockpit build, there will be single panels that need more than that (LED indicators, backlighting, steppers...).

 

I expect that most finished panels will be powered separately. Supplying power via the Cat5 cable could work for a few boards that have mostly inputs (switches, rotaty encoders, etc) instead of power-consuming outputs (LEDs, steppers, ...) and don't have a backlight, or for powering a single board during development.

 

@BravoYankee4: Try plugging your specifications into http://pcbshopper.com/. According to that website, you can get a lower price from Smart Prototyping, and the shipping time to Sweden is a week less than ITEAD Studio.

Also, what software did you use to design your board? Just curious.

Link to comment
Share on other sites

Hi Ian.

 

I use the following pin mapping for the Cat5 cable:

Code:

1 -- A (RS-485 Bus) 2 -- B (RS-485 Bus) 3 -- 5V 4 -- GND 5 -- 12V 6 -- GND 7 -- user-defined 8 -- user-defined

The user-defined pair is accessible on the pin header on the right.

 

What would happen if you accidentally plug one of these cables into the network connector of your PC?

Wouldn't it be better to use Pins 4,5,7,8 for power as these are not used on a standard network connection. So there should be less potential to damage anything. However, please bear in mind that I'm no expert in this matter.

 

Cheers,

Stefan

Link to comment
Share on other sites

I know that there can't be a huge current in the Cat5 cables. However I used the same sort of cable (without the RJ45 connectors obviously) when I installed security equipment, and then we used double wires when something (like sirens) needed some more power.

So, I will use double wires for 5V, 12V and GND. The 5V line will power the MAX circuits and the 12V will be for the Nanos.

None of the Nanos will power anything, since that will be handled by the driver boards. And if neede one can always add a second cable to the last board in the chain to add some power.

Of course, there can't be a infinite number of boards per bus.

 

I have use ITEAD previously (and Seedstudio) and I am happy with their services. There might be others that are cheaper and better so I might try that one as well if you recommend that.

 

From the very beginning I tried both Eagle, Target and Designspark without doing anything serious. Eventually I found some excellent tutorials (in Swedish) for Diptrace and that is the software I use ever since.

Link to comment
Share on other sites

What would happen if you accidentally plug one of these cables into the network connector of your PC?

Wouldn't it be better to use Pins 4,5,7,8 for power as these are not used on a standard network connection.

 

Gigabit Ethernet uses all eight pins. If you only have four pins, you can only do Fast Ethernet (100 Mbps).

 

Any properly designed network device should not break if you plug this cable in. Ethernet ports in end devices have coupling transformers that won't pass direct current, and any properly designed ethernet port will have protection against transient events as well (e.g. a lightning strike in the vicinity of the network cable or an electrostatic discharge).

Link to comment
Share on other sites

Due to some acquired knowledge about Toner Transfer I was able to design and (cheap) make a small batch of RS-485-Interfaces with RJ45-Connectors.

Still I wait for the MAX487s from China.

If these items are arrived (maybe next week) I'll do some stress tests about current load (with a fire extinguisher in sight).

German say "Probieren geht über studieren" (tests are better than science) :)

I am prepared to sacrifice two of these Interfaces. So we definitely will know how much load this construct will be able to carry without our birds go up in flames.

Also I hope to identify the bottleneck. (traces on PCB, connectors or CAT5-cable)

 

Actual I think the most important problem will be voltage drop on long distances.

 

Edit: Right now I think about 24 Volt on the line with 12V-Stabilizers on each module... Will follow this if my assumption will become true.


Edited by Tekkx

Manual for my version of RS485-Hardware, contact: tekkx@dresi.de

Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You.

Link to comment
Share on other sites

Due to some acquired knowledge about Toner Transfer I was able to design and (cheap) make a small batch of RS-485-Interfaces with RJ45-Connectors.

Still I wait for the MAX487s from China.

If these items are arrived (maybe next week) I'll do some stress tests about current load (with a fire extinguisher in sight).

German say "Probieren geht über studieren" (tests are better than science) :)

I am prepared to sacrifice two of these Interfaces. So we definitely will know how much load this construct will be able to carry without our birds go up in flames.

Also I hope to identify the bottleneck. (traces on PCB, connectors or CAT5-cable)

 

Actual I think the most important problem will be voltage drop on long distances.

 

Edit: Right now I think about 24 Volt on the line with 12V-Stabilizers on each module... Will follow this if my assumption will become true.

 

I belived the saying was "vertrauen is gut kontrolle ist besser" ;)

Link to comment
Share on other sites

That is also OK, but more used if you monitor your staff :)

 

If you read some manuals or sheets it's OK, but if you see sth. smoking you'll never forget. ;)

 

:poster_offtopic:

BTW: I did right now a calculation of my income 2015 (ordered by the "Finanzamt"). All in DCS and DCS-BIOS involved costs are at 1350 Euros. Just for tools and components. :doh:


Edited by Tekkx

Manual for my version of RS485-Hardware, contact: tekkx@dresi.de

Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...