Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Guidance with a cable testing project


  • Please log in to reply
6 replies to this topic

#1 Dick Hurtz

Dick Hurtz

    New Member

  • Members
  • Pip
  • 2 posts

Posted 20 October 2012 - 04:47 AM

Good evening yall. I'm looking to make the following project using the basic netduino board. This project will be used to test handmade cables for continuity / identify loose wires while building a cable:
Posted Image
Forward mode

Posted Image
Reverse mode

Here is what I see happening:
  • User plugs in adapter to the "universal" plug on the netduino.
  • Some sort of chip identifies the connector being adapted; used to show corresponding image and pinout
  • A probe is used to touch the other end of the tested cable, which could be a different connector or loose wire
  • The display shows in big numbers the pin being touched and a graphical representation
It seems just as easy to put it in reverse mode
  • User types in on a keypad what pin they want to activate. Signal sent to that pin.
  • User probes the other end of the tested cable
  • When the line is found the netduino buzzer beeps and screen flashes maybe

This will be my first project with the netduino and programming at large. I was hoping someone could give me some initial guidance in these areas:
  • Can someone recommend some compatible hardware that is easy to use and will work with the board? I'm poor so my budget is an issue, I don't want to go buying parts I can't use
  • Is a touch screen with an alphanumeric input that much harder to program? I realized after I drew my pictures a lot of connectors use a mix of ABC and/or 123 so I'd like to keep that consistent in the display.
  • How would I test a connector that has 70+ pins if the netduino only has limited ports?
  • In this example I drew a "chip" that would alleviate the need to manually enter what type of adapter cable you plugged in every time. Is there an electronics part out there that can serve as a unique identifier that doesn't take, like, EPROM programming? I could likely program a large bank of netduino_pin_1 <---> connector_a_pin_1 tables, but I'm thinking that chip would be the easiest way of selecting the table for connector_a. Maybe a DIP switch somewhere?

Thanks for any help or suggestions. I plan on getting started on this as soon as my parts arrive.

#2 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 20 October 2012 - 07:30 AM

Hi Dick,

Welcome to the Forums!

I don't have any help to offer on displays or touch screens with the Netduinos.

However for the interface to the cable I would like to recommend using a (large) number of 74HC595 shift register chips:
The 74HC595 is a shift register that can be driven from the SPI lines on the Netduino. It includes a shift register and a latch, the latch means that it can be used to expand the output capability of the Netduino. There are a few Wiki pages about the 74HC595, Mario has one here and Stefan started one here and has written lots of useful software to drive them.

The latch can be bypassed so that the chip is just a shift register with all the pins changing as the data is clocked in.

A while ago I suggested in a Wiki page a way to scan a 4x4 keypad matrix using a 74HC595, by feeding a signal back into the read pin of the SPI. The idea was to clock out a single "1" in a long word of zeros, and to record which bits in the input data were high to tell which key was pressed.

I think you could solve the cable and ID problem using a simplified version of that idea.
- connect up a number of 74HC595s as shift registers by joining the latch and clock signals together.
- connect eight small signal diodes to the 8 outputs of each 74HC595.
- connect the other end of each diode to a separate pin on the cable assembly.
- connect the SPI input "MISO" to the flying lead, and pull it low with a resistor (about 4K7 4700ohms).

(The diodes are to protect the 74HC595 if the cable shorts two pins together.)

Write out a long array of bytes with enough bytes to fill each shift register. Make all the bytes zero, except for the very first byte which should have a 1 in the first bit that is shifted out.
When the write is performed, also perform a read into another array of bytes. When it completes, look for a 1 in the read data. The 1 will tell you which shift register output the flying lead is connected to.

You can try the idea out by using a single 74HC595 on a bread board, so you can get going with little risk.

The ID function can be implemented by using the first 74HC595 for ID, instead of for scanning cable wires. Here, you use the diodes to connect some of the 8 outputs to the SPI input. With careful selection, you can connect them up to form a binary byte 0 - 255 that will appear in the first byte read in the scan operation.

I have had to rush this, because my youngest is waiting to be taken swimming! I'll try and draw a circuit diagram later.

Hope this get you started - Paul

#3 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 20 October 2012 - 11:14 AM

Circuit diagram attached. Its not too complicated. The "Universal Connector" is on the left - it is now a 5 way connection to the Netduino SPI and power. Have Fun - Paul (about to spend the rest of the day wall papering....) EDIT: OOPS - I missed off the resistor to ground on the MISO line. about 4K7 (4700 ohms) should do it.

Attached Files



#4 Dick Hurtz

Dick Hurtz

    New Member

  • Members
  • Pip
  • 2 posts

Posted 23 October 2012 - 12:00 AM

Thanks Paul for the obvious effort. I broke bad and ordered some parts online including a ton of shift registers, and an LCD touch screen link to that. Kind of commits me to making this thing but I hope I didn't get in over my head. I'm definitely better at hardware than software but not even especially good at that hehe.

I found a thing online to make drawings so I updated what I had in mind for this device
Attached File  Drawing1.png   57.77KB   22 downloads

If I understand I would send a code "00000" to the shift registers, and when I touch the probe to one leg of a shift register I should receive "00010" and know I was touching pin 4. And as a requirement, "00111" if 3,4,5 were tied together.

It seems do-able to get the display to show an illustration of what's going on. I was thinking that for each adapter cable I make I would reserve some pins and attach a DIP switch, and list each connector to a switch setting. Program that into the netduino so when you plug in any connector's adapter cable in it would know which graphic to show and numbers to allow. I suppose I could do the same thing by adding different resistor values to different connectors, would that work?

This is where my lack of programming skills is stopping me. I have a few books on C# but they are pretty dry. Could someone tell me what chapters I should focus on for what I'm doing? Do I need to learn all the functions, because it seems like I could get by with just a few. I don't really know where to start with that.

I'm really hoping I can get this display to work. Has anyone had success with this combination? I originally wanted a separate display and keypad, but couldn't find one with letters and numbers. I have a feeling I might have to subcontract this. 4DGL criminies.

I guess I'll post if my parts arrive. Thanks for any and all input.

#5 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 23 October 2012 - 12:32 AM

Dick,

Have you seen the multiplexor shied here on the forum it provides 32 IOs using 5 DIO on the Netduino. Multiplexor Shied

Just a thought,
Chuck

#6 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 23 October 2012 - 06:22 AM

If I understand I would send a code "00000" to the shift registers, and when I touch the probe to one leg of a shift register I should receive "00010" and know I was touching pin 4. And as a requirement, "00111" if 3,4,5 were tied together.

I was thinking that for each adapter cable I make I would reserve some pins and attach a DIP switch, and list each connector to a switch setting. Program that into the netduino so when you plug in any connector's adapter cable in it would know which graphic to show and numbers to allow. I suppose I could do the same thing by adding different resistor values to different connectors, would that work?


With my "design" you need to send out lots of bytes, with a single bit set. That bit needs to be the first one sent out. (I can't remember whether that is the MSbit or LSbit.)

I missed a trick with your "universal"connector. I was thinking about each adapter having the shift registers, with a 5-way connector back to the Netduino.
If you can find a large connector, you could use reserve a number of the pins on the connector for shorting to the fly lead for an ID code. Either way yes you could use dip switches to set the code - have a look for rotary binary switches, these are small 1cm square switches that have four switches giving a binary pattern for 0-15. These will be easier to set.

I don't have any suggestions for reading on controlling a display. My advice would be to put together a minimal system (one/two shift registers on bread board) and use debug prints to get the scanning to work first, and then play with the display.

I would like to think that using shift registers is better than an IO shield, as you can keep adding more registers if you need more pins. Probably cheaper too, but the flip side is you are going to have to build the circuit yourself which is not for some.

Hope it all goes well - Paul

#7 tlmiii01

tlmiii01

    Member

  • Members
  • PipPip
  • 12 posts

Posted 23 October 2012 - 01:35 PM

I'm really hoping I can get this display to work. Has anyone had success with this combination? I originally wanted a separate display and keypad, but couldn't find one with letters and numbers. I have a feeling I might have to subcontract this. 4DGL criminies.


Hi Dick,

I actually have the same LCD and it does work. I installed the SGC firmware for the LCD and connected it to the Netduino's UART.

I was working on a driver for this device last year, but didn't get all of it done. I can pull it up when I get home tonight to see what was left to do.

Thomas




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.