Jump to content

Expand Arduino Pin Count for DCS Bios


matt.israel
 Share

Recommended Posts

I'm new to this forum and also just completed my first button box using DCS-BIOS. I'm starting to plan another box or two and am wondering what options there are for expanding the number of available pins on my Arduino board? I would prefer something a little smaller and more cost-effective than buying an Arduino Mega. On the same note, I am pretty new to this stuff and am not looking for a solution that would involve a lot of coding or advanced circuitry.

 

I have an UNO in this box now, but am planning on swapping it for a Nano when I go in and solder all the connections.

 

If there is an existing post on this topic I didn't find I would appreciate it if someone would point me in that direction.

f5dc3f360b38cad66e132100da8c2013.png.9b4585ca59dfee7cf9dacb962a254c15.png

Link to comment
Share on other sites

Use another Arduino.

If you have too much in one, two things happen:

1) It slows down the response of everything on that device.

2) It complicates the code.

 

Splitting the functions across multiple arduinos simplifies each part's coding, and when it's done, you don't need to worry about it until it needs changing.

 

As for actually going it, there are two main options:

1) USB hubs with multiple ports

2) A single USB port running into a Mega running an RS485 network.

  • Like 1
Link to comment
Share on other sites

Use another Arduino.

If you have too much in one, two things happen:

1) It slows down the response of everything on that device.

2) It complicates the code.

 

Splitting the functions across multiple arduinos simplifies each part's coding, and when it's done, you don't need to worry about it until it needs changing.

 

As for actually going it, there are two main options:

1) USB hubs with multiple ports

2) A single USB port running into a Mega running an RS485 network.

 

 

Thanks for the response! Multiple Arduinos with a USB hub was kinda a fallback plan for me, but it seemed like a rudimentary solution. That said, I'm here to play the game not become an electrical engineer. Think something of this nature would work; a hub I could put in my enclosure?

 

The basis for my question is I'm looking at adding the INS rotary switch to my second box and this monster just gobbles up the I/O pins. It calls for 8 pins! I'm open to other solutions as well. I was about to start another thread about reducing the number of switch (pin) options in DCS-BIOS, but I have a feeling I would have to go beyond manipulating the copy/paste portion of the code.

5V USB HUB USB2.0 Hub Concentrator 4-Female USB Expansion Board Module | eBay

Link to comment
Share on other sites

 

 

Thanks for the response! Multiple Arduinos with a USB hub was kinda a fallback plan for me, but it seemed like a rudimentary solution. That said, I'm here to play the game not become an electrical engineer. Think something of this nature would work; a hub I could put in my enclosure?

 

The basis for my question is I'm looking at adding the INS rotary switch to my second box and this monster just gobbles up the I/O pins. It calls for 8 pins! I'm open to other solutions as well. I was about to start another thread about reducing the number of switch (pin) options in DCS-BIOS, but I have a feeling I would have to go beyond manipulating the copy/paste portion of the code.

 

Distributed processing is pretty much the whole point of the microcontrollers Arduinos are based on.

It's better for your sanity in the long run. If you have a separate device for each panel, you have far less code to scroll through when you have a bug.

  • Like 1
Link to comment
Share on other sites

If you want to expand your gpio there are a few ways to do it, I'd recommend giving https://electronics.stackexchange.com/questions/83720/a-good-circuit-for-a-large-number-of-push-button-inputs for the basics. That said it really pays off having one arduino per button box, they can be quite cheap, especially if you buy nobrand Chinese clones (Arduino is open source so its not piracy). You can get a nano clone for ~1$, dont let this be a limit of your design.

 

As Blue73 mentioned, if one is to go for a full cockpit then it is a lot cleaner to have a master/slave setup over a network

Link to comment
Share on other sites

 

Hi Vlad, are you saying that updating the Arduino bootloader will help with the RS485 not working

 

Cheers

 

Les

 

 

Yes. I had good MAX487. But some arduinos didn't want to work with them. The PX and RX LEDs were off. After my experiments, sketches stopped loading on these arduins. I upgraded the bootloaders and everything worked fine.

 

 

 

 

Link to comment
Share on other sites

That's interesting - I had RS485 working at the beginning and then it stopped working one day, and defied all attempts to resurrect it. I assume that you just update the Adruino IDE program?

 

Cheers

 

Les

 

Yes. I have updated the bootloader via Arduino-IDE. I updated one ward with an old loader and the other adduino with a new loader. Both arduinos worked well.

Link to comment
Share on other sites

Vlad333, you have finally unlocked the mystery of why I could not get RS485 working! I got round to trying it today, by upgrading the Arduino IDE program suite, then set up one of the RS485 enabled stepper boards just the same way as I had what feels like a million times before. It worked first time, fuss free.

 

Thank you for that lead, you have unstuck something that had literally been non functioning for a year.

 

Cheers

 

Les

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...