20 Replies Latest reply on Jun 1, 2018 11:36 AM by Roger Wolff

    D-Sub signal access

    planedan

      I want to be able to interrogate the signal on each pin of any D-Sub cable, therefore I need to know what hardware do I need to get from the D-Sub input to the Pi?

      I have yet to purchase my Pi, but at this time plan to get a 3B

      I also hope to be able to connect it to my PC Monitor and install windows 10 with Visual Studio on it.

       

      Thanks for any suggestions you may have.

        • Re: D-Sub signal access
          genebren

          You might be able to use something like this:

          https://www.ebay.com/i/111873783565?chn=ps

          If you can further explain your need, I might be able to help you further.

          Good Luck,

          Gene

          2 of 2 people found this helpful
            • Re: D-Sub signal access
              planedan

              I have a 9, 15, and 25 in pairs.  I plan to plug a cable to each end, and record where each pin on the input side exits on the output side.  For example pin 1 on one end of the cable may go to pin 7 on the other end.  My program will see this and store the result.

                • Re: D-Sub signal access
                  genebren

                  Here are some clever little breakout boards that you can populate with D-sub connectors (male or female).  You could use these with a raspberry PI prototype board to interconnect the pins to the raspberry pi.

                   

                  Proto PCB for 9-25 pin D-SUB Connectors

                   

                  You could also build a fairly simple PCB to do all the interconnections for you.

                   

                  Good luck,

                  Gene

                  2 of 2 people found this helpful
                    • Re: D-Sub signal access
                      planedan

                      Thank you.  I think I have what I need to wire the D-Subs to a breadboard, and have looked into the GPIO, but still do not see that it is possible to pragmatically energize each of the pins and subsequently record the result, ie when pin 1 is energized, pin 7 on the other end sees it.  Thinking that if I had 50 GPIO pins and a 25 pin D-Sub cable, then GPIO 1 would be input ( energizing voltage) for d-sub pin 1 and GPIO 26 would be output from from d-sub pin 1 on the other end.  Thus, when my program sends the voltage to GPIO 1, whatever GPIO that was connected to the d-sub pin that sees the voltage, would respond high when the loop of the program asked for the state of that particular GPIO.  However, we only have 40 GPIO and it appears that many of them are already spoken for.

                       

                      So, is the Pi capable of doing what I want to do? 

                       

                      Thank you for your time.

                      3 of 3 people found this helpful
                        • Re: D-Sub signal access
                          dougw

                          You could use dual 16 bit decoders to get 32 output bits from 5 data bits.

                          You will also need a 32 bit input expander.

                          https://learn.adafruit.com/mcp230xx-gpio-expander-on-the-raspberry-pi/using-the-library

                          3 of 3 people found this helpful
                          • Re: D-Sub signal access
                            beacon_dave

                            A R-Pi sounds a bit overkill for this task.

                             

                            An Arduino Mega 2560 will give you 54 Digital IO pins and may be of interest if you don't want to have to expand the number of ports:

                            https://store.arduino.cc/arduino-mega-2560-rev3

                             

                            Shift registers might be another way to go:

                            https://www.electronics-tutorials.ws/sequential/seq_5.html

                             

                            and you can always use the likes of the I2C bus to expand the number of ports available.

                            4 of 4 people found this helpful
                            • Re: D-Sub signal access
                              genebren

                              Daniel,

                               

                              Both dougw  andbeacon_dave have excellent suggestions.

                               

                              I can understand that using the Raspberry Pi offers some interesting benefits, in that you can build a standalone tester/documenter for your cables.  Using the first suggestion, the decoders are used to extend the GPIO, such that 5 GPIO will yield you 32 addressable outputs.  Depending on how many outputs you add in this manner, you may or may not need to also add the expanders for additional inputs.  There are other similar devices that could be used that are I2C expanders, again giving you addition GPIO-like pins, addressed by I2C commands.

                               

                              The second suggestion could also be used with the Raspberry Pi, where the MEGA 2560 device could be used as a co-processor to the RPi.  The RPi could communicate with the MEGA2560, and tell it which pins to drive and which to sample.  Or given a more complex program, the MEAG2560 could be command to scan, and the return the pin-to-pin readings back to the RPi.

                               

                              There are quite a few options, which may or may not work for you depending on your understanding of electronics/programming.

                               

                              Good luck sorting out these options.

                              Gene

                              3 of 3 people found this helpful
                      • Re: D-Sub signal access
                        mp2100

                        You can certainly connect your Pi3B to your PC monitor, with HDMI (or an adapter if you don't have HDMI).  But the Pi only supports Win10_IoT Core:

                        https://developer.microsoft.com/en-us/windows/iot/downloads

                         

                         

                        Of course, maybe you can do Windows 10, there's this:

                        Windows 10 on ARM on a Raspberry Pi 3B 'Proof of Concept' with Full Windows Desktop

                        2 of 2 people found this helpful
                        • Re: D-Sub signal access
                          peteroakes

                          I take it your wanting to simply make a cable tester and you want this tester to map out the connections from one end of the cable to the other

                           

                          Please confirm

                            • Re: D-Sub signal access
                              planedan

                              That  is exactly what I want to do.

                                • Re: D-Sub signal access
                                  Roger Wolff

                                  I have an STM32 development board. A client has asked me to support a "game" where users will plug connection X to connection Y using banana plugs and the software will do some bells-and-whistles things when the solution is found....

                                   

                                  You basically need 50 IOs to achieve your application: up to 25 on connector A and up to 25 on connector B.

                                   

                                  I have an upgraded board that has 64 IOS.... and an USB port to connect to a pi or PC.

                                   

                                  You would be responsible to build the D-SUB connector blocks. D9-1 - D15-1 - D25-1 - STM-1

                                  So, pin1 of the 9-pin connector goes to pin 1 of the 15 pin connector and the 25-pin connector. And to the board. Similarly you connect all pin2's and so on.... (after pin 9, the dsub-9 no longer plays along...)

                                  4 of 4 people found this helpful
                                    • Re: D-Sub signal access
                                      planedan

                                      That seems good for what I want to do.  How does the STM32 play in this and what is a STM-1.  I already have the D9, D15, and D25 connector blocks and plan to mount them on a board of some kind, this weekend.  I planned to put an euro connector strip between the A D-Subs and the board that goes to the Pi.  Pin A-9-1 goes to euro connector slot 1, along with A-15-1 and A-25-1 and so on, which is sort of what you were describing.  You only test one cable at a time, 1, 15, or 25

                                       

                                      So, is this upgraded board, for sale?

                                       

                                      Thank you.

                                      1 of 1 people found this helpful
                                        • Re: D-Sub signal access
                                          Roger Wolff

                                          At the moment, I don't have it up in my shop yet.

                                           

                                          There is a marketing "wisdom" somewhere. Products compete on three measures: specifications, price and a third that I can't remember right now. To gain significant market share you need to be better than the competition on at least 2 of the three measures. On price I as a western company with relatively small volume cannot compete with stuff from ebay. On specifications I KNOW that my design is better than what's available on Ebay due to a few small details. But that is difficult to convey in a specsheet: The spec sheets look almost identical. So I made this to be able to use it internally. If I sell a few to people who can use it, that's great too.

                                           

                                          In this case, what's important for you is that I've already written the software that can be repurposed for your application.


                                          Shoot me an Email: info@BitWizard.nl

                                      • Re: D-Sub signal access
                                        peteroakes

                                        Then you dont need 50 active IO pins from a micro controller.

                                        You need to be able to activate one of 25 pins from one end of the cable and scan the other end (25 Pins) for the active one or many or none, depending on how it is wired.

                                        this means you need something like this

                                        use MCP23S17 SPI serial to 16 port IO expanders, this are cheap and well know for programming with any micro-controller with a SPI interface, this includes almost all Arduino's, Raspberry PIs, Beagle Bones, ESP8266 etc etc.

                                        build the chips onto their own board and you have a scanner usable with whatever processor you like even without a SPI port, the control signals could be BIT Banged out.

                                        each MCP23S17 with its own SPI address (Built in functionality), 2 used to control 32 outputs and 2 used to read upto 32 inputs

                                        as these chips are programmable you can come up with creative ways to scan the cable including looking for diodes in circuit etc,

                                         

                                        What you dont need to find is a single SBC with 50 or more IO pins available, thats just a complete waste of money and overkill, this way allows any micro-controller from cheap small to large expensive. the code to scan the pins would be very easy to do and take very little space

                                        3 of 3 people found this helpful
                                          • Re: D-Sub signal access
                                            Roger Wolff

                                            The first hit I found on "MCP23S17 breakout" costs about half what I would charge for the module with 64 IOs and the software to scan for connections. You'd need 3 to get 48 IOs. and you'd be 2 short of the 50 you need. You can use 2 GPIOs on the pi for that. But from a software point-of-view... I'd say a board that offers 64 IOs in one go would be preferable....

                                              • Re: D-Sub signal access
                                                planedan

                                                From what little I have been able to glean from documentation on the GPIO, there does not seem to be many true GP in that group.  If you had 2 GPIO, how many true GP would there be?  Also, can you purchase an RPi with more than 1 GPIO?  Now, I need to see what these MCP things are all about.  Thanks to everybody for your input, it is all very helpful for getting me started on this.

                                                  • Re: D-Sub signal access
                                                    Roger Wolff

                                                    Most modern embedded controllers (so everything except the CPU that goes into your PC) has a whole bunch of pins that can be programmed input/output high, or low as you please. General Purpose Input/Output. Most of these can have a few other functions. So on the pi P1 port there are pins that can do SPI or I2C as well as their general purpose IO. But if you don't need the I2C, they can be freely programmed to do whatever you want.

                                                    1 of 1 people found this helpful
                                          • Re: D-Sub signal access
                                            peteroakes

                                            2 of these and the price of 4 mcp23s17

                                            https://www.tindie.com/products/RobG/32-io-expander-booster-pack-pcb-mcp23s17/

                                             

                                            Add you controller and the D Type connectors

                                             

                                            Bit of programming and your pretty much done except for an enclosure

                                            2 of 2 people found this helpful
                                              • Re: D-Sub signal access
                                                planedan

                                                Peter, That looks very promising.  Have you purchased from them before?  Are both of the items shown in the pic, included?  Seems like a lot for $4.  Am I missing something.  I did not see any link to more information about the product on the site.

                                                 

                                                This is what I am referring to, and it could very well be what I am looking for.

                                                 

                                                 

                                                https://www.tindie.com/products/RobG/32-io-expander-booster-pack-pcb-mcp23s17/

                                                 

                                                Thank you.

                                                  • Re: D-Sub signal access
                                                    Roger Wolff

                                                    I have adapted the firmware on my STM breakout board for 64 IOs and checking connectivity.

                                                     

                                                    Note that it will check everything. So for example you'll learn when a cable connects DTR to RTS in the connector on one side.

                                                     

                                                    If you declare 26 pins (i.e. one dummy) on one side, and 26 on the other side, the identifications for the connectors will be a-y on the first connector and A-Y on the second. A nine-pin simple DB9 cross over (null modem) cable will then show up as Bc Cb Ee

                                                    Connecting DSR with DTR on each end (i.e. locally inside the connector) then adds "DF df" to the reported connections.

                                                     

                                                    The STM board provides a virtual com port that reports "puzzle 5: Bc Cb Ee DF df" when suddenly that null modem is inserted. The "5" means that it counted 5 changes against the previously reported state. You can send "fb\n" to the board to force a reporting cycle.

                                                    3 of 3 people found this helpful